Toggleable showing updates

This commit is contained in:
ThatOneCalculator 2022-07-27 19:24:51 -07:00
parent aa6ca4d6e9
commit 5464e8a728
6 changed files with 12 additions and 5 deletions

View file

@ -905,6 +905,7 @@ customMOTD: "Custom MOTD (splash screen messages)"
customMOTDDescription: "Custom messages for the MOTD (splash screen) separated by line breaks to be shown randomly every time a user loads/reloads the page."
customSplashIcons: "Custom splash screen icons (urls)"
customSplashIconsDescription: "URLs for custom splash screen icons separated by line breaks to be shown randomly every time a user loads/reloads the page. Please make sure the images are on a static URL, preferably all resized to 192x192."
showUpdates: "Show a popup when Calckey updates"
_sensitiveMediaDetection:
description: "Reduces the effort of server moderation through automatically recognizing NSFW media via Machine Learning. This will slightly increase the load on the server."

View file

@ -905,6 +905,7 @@ customMOTD: "カスタムMOTDスプラッシュスクリーンメッセージ
customMOTDDescription: "ユーザがページをロード/リロードするたびにランダムに表示される、改行で区切られたMOTDスプラッシュスクリーン用のカスタムメッセージ"
customSplashIcons: "カスタムスプラッシュスクリーンアイコン"
customSplashIconsDescription: "ユーザがページをロード/リロードするたびにランダムに表示される、改行で区切られたカスタムスプラッシュスクリーンアイコンの URL。画像は静的なURLで、できればすべて192x192にリサイズしてください。"
showUpdates: "Calckeyの更新時にポップアップを表示する"
_sensitiveMediaDetection:
description: "機械学習を使って自動でセンシティブなメディアを検出し、モデレーションに役立てることができます。サーバーの負荷が少し増えます。"

View file

@ -1,6 +1,6 @@
{
"name": "misskey",
"version": "12.118.0-calc.12.b4",
"version": "12.118.0-calc.13.b4",
"codename": "aqua",
"repository": {
"type": "git",

View file

@ -237,17 +237,16 @@ import { getAccountFromId } from '@/scripts/get-account-from-id';
// テーマリビルドするため
localStorage.removeItem('theme');
/*
try { // 変なバージョン文字列来るとcompareVersionsでエラーになるため
if (lastVersion != null && compareVersions(version, lastVersion) === 1) {
if (lastVersion != null && compareVersions(version, lastVersion) === 1 && defaultStore.state.showUpdates) {
// ログインしてる場合だけ
if ($i) {
popup(defineAsyncComponent(() => import('@/components/updated.vue')), {}, {}, 'closed');
}
}
} catch (err) {
console.error(err);
}
*/
}
// NOTE: この処理は必ず↑のクライアント更新時処理より後に来ること(テーマ再構築のため)

View file

@ -56,6 +56,7 @@
<div><Mfm :key="useOsNativeEmojis" text="🍮🍦🍭🍩🍰🍫🍬🥞🍪"/></div>
</FormSwitch>
<FormSwitch v-model="disableDrawer" class="_formBlock">{{ i18n.ts.disableDrawer }}</FormSwitch>
<FormSwitch v-model="showUpdates" class="_formBlock">{{ i18n.ts.showUpdates }}</FormSwitch>
<FormSwitch v-model="aiChanMode">{{ i18n.ts.aiChanMode }}</FormSwitch>
<FormRadios v-model="fontSize" class="_formBlock">
@ -144,6 +145,7 @@ const enableInfiniteScroll = computed(defaultStore.makeGetterSetter('enableInfin
const enterSendsMessage = computed(defaultStore.makeGetterSetter('enterSendsMessage'));
const useReactionPickerForContextMenu = computed(defaultStore.makeGetterSetter('useReactionPickerForContextMenu'));
const squareAvatars = computed(defaultStore.makeGetterSetter('squareAvatars'));
const showUpdates = computed(defaultStore.makeGetterSetter('showUpdates'));
const aiChanMode = computed(defaultStore.makeGetterSetter('aiChanMode'));
watch(lang, () => {
@ -178,6 +180,7 @@ watch([
instanceTicker,
overridedDeviceKind,
showAds,
showUpdates,
], async () => {
await reloadAsk();
});

View file

@ -67,7 +67,6 @@ export const defaultStore = markRaw(new Storage('base', {
where: 'account',
default: true,
},
menu: {
where: 'deviceAccount',
default: [
@ -256,6 +255,10 @@ export const defaultStore = markRaw(new Storage('base', {
where: 'device',
default: true,
},
showUpdates: {
where: 'device',
default: false,
},
}));
// TODO: 他のタブと永続化されたstateを同期