wip
This commit is contained in:
parent
17bb39c760
commit
afc3c3f0c7
|
@ -330,7 +330,7 @@ watch: "ウォッチ"
|
||||||
unwatch: "ウォッチ解除"
|
unwatch: "ウォッチ解除"
|
||||||
accept: "許可"
|
accept: "許可"
|
||||||
reject: "拒否"
|
reject: "拒否"
|
||||||
normal: "正常"
|
normal: "通常"
|
||||||
instanceName: "サーバー名"
|
instanceName: "サーバー名"
|
||||||
instanceDescription: "サーバーの紹介"
|
instanceDescription: "サーバーの紹介"
|
||||||
maintainerName: "管理者の名前"
|
maintainerName: "管理者の名前"
|
||||||
|
@ -1095,6 +1095,7 @@ expired: "期限切れ"
|
||||||
doYouAgree: "同意しますか?"
|
doYouAgree: "同意しますか?"
|
||||||
beSureToReadThisAsItIsImportant: "重要ですので必ずお読みください。"
|
beSureToReadThisAsItIsImportant: "重要ですので必ずお読みください。"
|
||||||
iHaveReadXCarefullyAndAgree: "「{x}」の内容をよく読み、同意します。"
|
iHaveReadXCarefullyAndAgree: "「{x}」の内容をよく読み、同意します。"
|
||||||
|
dialog: "ダイアログ"
|
||||||
|
|
||||||
_announcement:
|
_announcement:
|
||||||
forExistingUsers: "既存ユーザーのみ"
|
forExistingUsers: "既存ユーザーのみ"
|
||||||
|
|
|
@ -111,6 +111,8 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
|
||||||
display: announcement.display,
|
display: announcement.display,
|
||||||
isActive: announcement.isActive,
|
isActive: announcement.isActive,
|
||||||
forExistingUsers: announcement.forExistingUsers,
|
forExistingUsers: announcement.forExistingUsers,
|
||||||
|
needConfirmationToRead: announcement.needConfirmationToRead,
|
||||||
|
userId: announcement.userId,
|
||||||
reads: reads.get(announcement)!,
|
reads: reads.get(announcement)!,
|
||||||
}));
|
}));
|
||||||
});
|
});
|
||||||
|
|
|
@ -83,7 +83,7 @@ export async function mainBoot() {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
for (const announcement of $i.announcements.filter(x => x.display === 'dialog')) {
|
for (const announcement of ($i.unreadAnnouncements ?? []).filter(x => x.display === 'dialog')) {
|
||||||
popup(defineAsyncComponent(() => import('@/components/MkAnnouncementDialog.vue')), {
|
popup(defineAsyncComponent(() => import('@/components/MkAnnouncementDialog.vue')), {
|
||||||
announcement,
|
announcement,
|
||||||
}, {}, 'closed');
|
}, {}, 'closed');
|
||||||
|
|
|
@ -19,6 +19,11 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
<MkInput v-model="announcement.imageUrl">
|
<MkInput v-model="announcement.imageUrl">
|
||||||
<template #label>{{ i18n.ts.imageUrl }}</template>
|
<template #label>{{ i18n.ts.imageUrl }}</template>
|
||||||
</MkInput>
|
</MkInput>
|
||||||
|
<MkRadios v-model="announcement.display">
|
||||||
|
<option value="normal">{{ i18n.ts.normal }}</option>
|
||||||
|
<option value="banner">{{ i18n.ts.banner }}</option>
|
||||||
|
<option value="dialog">{{ i18n.ts.dialog }}</option>
|
||||||
|
</MkRadios>
|
||||||
<MkSwitch v-model="announcement.forExistingUsers">
|
<MkSwitch v-model="announcement.forExistingUsers">
|
||||||
{{ i18n.ts._announcement.forExistingUsers }}
|
{{ i18n.ts._announcement.forExistingUsers }}
|
||||||
<template #caption>{{ i18n.ts._announcement.forExistingUsersDescription }}</template>
|
<template #caption>{{ i18n.ts._announcement.forExistingUsersDescription }}</template>
|
||||||
|
@ -46,6 +51,8 @@ import XHeader from './_header_.vue';
|
||||||
import MkButton from '@/components/MkButton.vue';
|
import MkButton from '@/components/MkButton.vue';
|
||||||
import MkInput from '@/components/MkInput.vue';
|
import MkInput from '@/components/MkInput.vue';
|
||||||
import MkTextarea from '@/components/MkTextarea.vue';
|
import MkTextarea from '@/components/MkTextarea.vue';
|
||||||
|
import MkSwitch from '@/components/MkSwitch.vue';
|
||||||
|
import MkRadios from '@/components/MkRadios.vue';
|
||||||
import * as os from '@/os';
|
import * as os from '@/os';
|
||||||
import { i18n } from '@/i18n';
|
import { i18n } from '@/i18n';
|
||||||
import { definePageMetadata } from '@/scripts/page-metadata';
|
import { definePageMetadata } from '@/scripts/page-metadata';
|
||||||
|
|
|
@ -104,7 +104,7 @@ export type MeDetailed = UserDetailed & {
|
||||||
noCrawle: boolean;
|
noCrawle: boolean;
|
||||||
receiveAnnouncementEmail: boolean;
|
receiveAnnouncementEmail: boolean;
|
||||||
usePasswordLessLogin: boolean;
|
usePasswordLessLogin: boolean;
|
||||||
announcements: Announcement[];
|
unreadAnnouncements: Announcement[];
|
||||||
[other: string]: any;
|
[other: string]: any;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue