mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-26 17:03:09 +02:00
Compare commits
4 commits
eba97f8e57
...
1731769349
Author | SHA1 | Date | |
---|---|---|---|
|
1731769349 | ||
|
8c955fcce5 | ||
|
bd7c4f66f3 | ||
|
ebe8179c9e |
3 changed files with 17 additions and 3 deletions
|
@ -55,8 +55,6 @@ import { i18n } from '@/i18n.js';
|
||||||
import { infoImageUrl } from '@/instance.js';
|
import { infoImageUrl } from '@/instance.js';
|
||||||
import { defaultStore } from '@/store.js';
|
import { defaultStore } from '@/store.js';
|
||||||
|
|
||||||
console.log(defaultStore.state.noteDesign, defaultStore.state.noteDesign === 'sharkey');
|
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
pagination: Paging;
|
pagination: Paging;
|
||||||
noGap?: boolean;
|
noGap?: boolean;
|
||||||
|
|
|
@ -16,9 +16,14 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template #default="{ items }">
|
<template #default="{ items }">
|
||||||
<MkDateSeparatedList v-slot="{ item }" :items="items" :direction="'down'" :noGap="false" :ad="false">
|
<MkDateSeparatedList v-if="defaultStore.state.noteDesign === 'misskey'"
|
||||||
|
v-slot="{ item }" :items="items" :direction="'down'" :noGap="false" :ad="false">
|
||||||
<MkNote :key="item.id" :note="item.note" :class="$style.note"/>
|
<MkNote :key="item.id" :note="item.note" :class="$style.note"/>
|
||||||
</MkDateSeparatedList>
|
</MkDateSeparatedList>
|
||||||
|
<MkDateSeparatedList v-if="defaultStore.state.noteDesign === 'sharkey'"
|
||||||
|
v-slot="{ item }" :items="items" :direction="'down'" :noGap="false" :ad="false">
|
||||||
|
<SkNote :key="item.id" :note="item.note" :class="$style.note"/>
|
||||||
|
</MkDateSeparatedList>
|
||||||
</template>
|
</template>
|
||||||
</MkPagination>
|
</MkPagination>
|
||||||
</MkSpacer>
|
</MkSpacer>
|
||||||
|
@ -28,10 +33,12 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import MkPagination from '@/components/MkPagination.vue';
|
import MkPagination from '@/components/MkPagination.vue';
|
||||||
import MkNote from '@/components/MkNote.vue';
|
import MkNote from '@/components/MkNote.vue';
|
||||||
|
import SkNote from '@/components/SkNote.vue';
|
||||||
import MkDateSeparatedList from '@/components/MkDateSeparatedList.vue';
|
import MkDateSeparatedList from '@/components/MkDateSeparatedList.vue';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
import { definePageMetadata } from '@/scripts/page-metadata.js';
|
import { definePageMetadata } from '@/scripts/page-metadata.js';
|
||||||
import { infoImageUrl } from '@/instance.js';
|
import { infoImageUrl } from '@/instance.js';
|
||||||
|
import { defaultStore } from '@/store.js';
|
||||||
|
|
||||||
const pagination = {
|
const pagination = {
|
||||||
endpoint: 'i/favorites' as const,
|
endpoint: 'i/favorites' as const,
|
||||||
|
|
|
@ -139,6 +139,7 @@ type Profile = {
|
||||||
hot: Record<keyof typeof defaultStoreSaveKeys, unknown>;
|
hot: Record<keyof typeof defaultStoreSaveKeys, unknown>;
|
||||||
cold: Record<keyof typeof coldDeviceStorageSaveKeys, unknown>;
|
cold: Record<keyof typeof coldDeviceStorageSaveKeys, unknown>;
|
||||||
fontSize: string | null;
|
fontSize: string | null;
|
||||||
|
lang: string | null;
|
||||||
cornerRadius: string | null;
|
cornerRadius: string | null;
|
||||||
useSystemFont: 't' | null;
|
useSystemFont: 't' | null;
|
||||||
wallpaper: string | null;
|
wallpaper: string | null;
|
||||||
|
@ -197,6 +198,7 @@ function getSettings(): Profile['settings'] {
|
||||||
hot,
|
hot,
|
||||||
cold,
|
cold,
|
||||||
fontSize: miLocalStorage.getItem('fontSize'),
|
fontSize: miLocalStorage.getItem('fontSize'),
|
||||||
|
lang: miLocalStorage.getItem('lang'),
|
||||||
cornerRadius: miLocalStorage.getItem('cornerRadius'),
|
cornerRadius: miLocalStorage.getItem('cornerRadius'),
|
||||||
useSystemFont: miLocalStorage.getItem('useSystemFont') as 't' | null,
|
useSystemFont: miLocalStorage.getItem('useSystemFont') as 't' | null,
|
||||||
wallpaper: miLocalStorage.getItem('wallpaper'),
|
wallpaper: miLocalStorage.getItem('wallpaper'),
|
||||||
|
@ -312,6 +314,13 @@ async function applyProfile(id: string): Promise<void> {
|
||||||
miLocalStorage.removeItem('fontSize');
|
miLocalStorage.removeItem('fontSize');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// lang
|
||||||
|
if (settings.lang) {
|
||||||
|
miLocalStorage.setItem('lang', settings.lang);
|
||||||
|
} else {
|
||||||
|
miLocalStorage.removeItem('lang');
|
||||||
|
}
|
||||||
|
|
||||||
// cornerRadius
|
// cornerRadius
|
||||||
if (settings.cornerRadius) {
|
if (settings.cornerRadius) {
|
||||||
miLocalStorage.setItem('cornerRadius', settings.cornerRadius);
|
miLocalStorage.setItem('cornerRadius', settings.cornerRadius);
|
||||||
|
|
Loading…
Reference in a new issue