mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-23 02:53:09 +02:00
Compare commits
4 commits
03526d7afd
...
82ae499314
Author | SHA1 | Date | |
---|---|---|---|
|
82ae499314 | ||
|
8c955fcce5 | ||
|
bd7c4f66f3 | ||
|
d632054d5a |
3 changed files with 24 additions and 4 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;
|
||||||
|
|
|
@ -14,7 +14,10 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
<template #value>{{ proxyAccount ? `@${proxyAccount.username}` : i18n.ts.none }}</template>
|
<template #value>{{ proxyAccount ? `@${proxyAccount.username}` : i18n.ts.none }}</template>
|
||||||
</MkKeyValue>
|
</MkKeyValue>
|
||||||
|
|
||||||
|
<div class="_gaps" style="flex-direction:row">
|
||||||
<MkButton primary @click="chooseProxyAccount">{{ i18n.ts.selectAccount }}</MkButton>
|
<MkButton primary @click="chooseProxyAccount">{{ i18n.ts.selectAccount }}</MkButton>
|
||||||
|
<MkButton :disabled="proxyAccount == null" danger @click="resetProxyAccount">Reset</MkButton>
|
||||||
|
</div>
|
||||||
</FormSuspense>
|
</FormSuspense>
|
||||||
</MkSpacer>
|
</MkSpacer>
|
||||||
</MkStickyContainer>
|
</MkStickyContainer>
|
||||||
|
@ -52,6 +55,18 @@ function chooseProxyAccount() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function resetProxyAccount() {
|
||||||
|
const { canceled } = await os.confirm({ type: 'warning', text: i18n.ts.areYouSure });
|
||||||
|
|
||||||
|
if (canceled) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
proxyAccount.value = null;
|
||||||
|
proxyAccountId.value = null;
|
||||||
|
save();
|
||||||
|
}
|
||||||
|
|
||||||
function save() {
|
function save() {
|
||||||
os.apiWithDialog('admin/update-meta', {
|
os.apiWithDialog('admin/update-meta', {
|
||||||
proxyAccountId: proxyAccountId.value,
|
proxyAccountId: proxyAccountId.value,
|
||||||
|
|
|
@ -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,
|
||||||
|
|
Loading…
Reference in a new issue