Merge branch 'main' into resizable-sidebars
This commit is contained in:
commit
72701c9aef
16 changed files with 97 additions and 54 deletions
|
@ -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
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -21,8 +21,6 @@
|
|||
<script lang="ts" setup>
|
||||
import type { UserResponse } from '~/types/interfaces';
|
||||
|
||||
const { fetchMembers } = useApi();
|
||||
|
||||
const props = defineProps<{
|
||||
user: UserResponse
|
||||
}>();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue