Merge remote-tracking branch 'origin/main' into profile-modal
All checks were successful
ci/woodpecker/push/build-and-publish Pipeline was successful

This commit is contained in:
Twig 2025-07-18 11:01:02 +02:00
commit 36444664c2
No known key found for this signature in database
15 changed files with 96 additions and 53 deletions

View file

@ -26,9 +26,7 @@
<script lang="ts" setup>
const { fetchFriends } = useApi();
const friends = await fetchFriends().then((response) => {
return response.sort((a, b) => getDisplayName(a).localeCompare(getDisplayName(b)))
})
const friends = sortUsers(await fetchFriends())
const props = defineProps<{
variant: string

View file

@ -32,13 +32,13 @@
<script lang="ts" setup>
import RadioButtons from '~/components/UserInterface/RadioButtons.vue';
import type { TimeFormat } from '~/types/settings';
import loadPreferredTheme from '~/utils/loadPreferredTheme';
import settingSave from '~/utils/settingSave';
const runtimeConfig = useRuntimeConfig()
const defaultThemes = runtimeConfig.public.defaultThemes
const baseURL = runtimeConfig.app.baseURL;
const timeFormatTextStrings = ["Auto", "12-Hour", "24-Hour"]
let themeLinkElement: HTMLLinkElement | null = null;
const themes: Array<Theme> = []
@ -51,20 +51,8 @@ interface Theme {
}
function changeTheme(id: string, url: string) {
if (themeLinkElement && themeLinkElement.getAttribute('href') === `${baseURL}themes/${url}`) {
return;
}
settingSave("selectedThemeId", id)
// if the theme didn't originally load for some reason, create it
if (!themeLinkElement) {
themeLinkElement = document.createElement('link');
themeLinkElement.rel = 'stylesheet';
document.head.appendChild(themeLinkElement);
}
themeLinkElement.href = `${baseURL}themes/${url}`;
loadPreferredTheme()
}
async function fetchThemes() {

View file

@ -21,8 +21,6 @@
<script lang="ts" setup>
import type { UserResponse } from '~/types/interfaces';
const { fetchMembers } = useApi();
const props = defineProps<{
user: UserResponse
}>();