diff options
| author | かっこかり <67428053+kakkokari-gtyih@users.noreply.github.com> | 2024-06-01 11:27:03 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-01 11:27:03 +0900 |
| commit | fce66b85b603caac79e1bfa87b5f4621b1ba9d4e (patch) | |
| tree | d22952ee3f8e30057977a99a33823f4d52990fbc /packages/frontend/src/pages/settings | |
| parent | Merge pull request #13493 from misskey-dev/develop (diff) | |
| parent | fix(backend): use insertOne insteadof insert/findOneOrFail combination (#13908) (diff) | |
| download | misskey-fce66b85b603caac79e1bfa87b5f4621b1ba9d4e.tar.gz misskey-fce66b85b603caac79e1bfa87b5f4621b1ba9d4e.tar.bz2 misskey-fce66b85b603caac79e1bfa87b5f4621b1ba9d4e.zip | |
Merge pull request #13917 from misskey-dev/develop
Release 2024.5.0 (master)
Diffstat (limited to 'packages/frontend/src/pages/settings')
| -rw-r--r-- | packages/frontend/src/pages/settings/2fa.qrdialog.vue | 21 | ||||
| -rw-r--r-- | packages/frontend/src/pages/settings/2fa.vue | 12 | ||||
| -rw-r--r-- | packages/frontend/src/pages/settings/drive.vue | 5 | ||||
| -rw-r--r-- | packages/frontend/src/pages/settings/general.vue | 12 | ||||
| -rw-r--r-- | packages/frontend/src/pages/settings/plugin.vue | 20 | ||||
| -rw-r--r-- | packages/frontend/src/pages/settings/preferences-backups.vue | 1 |
6 files changed, 61 insertions, 10 deletions
diff --git a/packages/frontend/src/pages/settings/2fa.qrdialog.vue b/packages/frontend/src/pages/settings/2fa.qrdialog.vue index 2608560cc4..2244047b31 100644 --- a/packages/frontend/src/pages/settings/2fa.qrdialog.vue +++ b/packages/frontend/src/pages/settings/2fa.qrdialog.vue @@ -25,6 +25,8 @@ SPDX-License-Identifier: AGPL-3.0-only <div style="height: 100cqh; overflow: auto; text-align: center;"> <MkSpacer :marginMin="20" :marginMax="28"> <div class="_gaps"> + <MkInfo><MkLink url="https://misskey-hub.net/docs/for-users/stepped-guides/how-to-enable-2fa/" target="_blank">{{ i18n.ts._2fa.moreDetailedGuideHere }}</MkLink></MkInfo> + <I18n :src="i18n.ts._2fa.step1" tag="div"> <template #a> <a href="https://authy.com/" rel="noopener" target="_blank" class="_link">Authy</a> @@ -33,8 +35,12 @@ SPDX-License-Identifier: AGPL-3.0-only <a href="https://support.google.com/accounts/answer/1066447" rel="noopener" target="_blank" class="_link">Google Authenticator</a> </template> </I18n> - <div>{{ i18n.ts._2fa.step2 }}<br>{{ i18n.ts._2fa.step2Click }}</div> - <a :href="twoFactorData.url"><img :class="$style.qr" :src="twoFactorData.qr"></a> + <div>{{ i18n.ts._2fa.step2 }}</div> + <div> + <a :class="$style.qrRoot" :href="twoFactorData.url"><img :class="$style.qr" :src="twoFactorData.qr"></a> + <!-- QRコード側にマージンが入っているので直下でOK --> + <div><MkButton inline rounded link :to="twoFactorData.url" :linkBehavior="'browser'">{{ i18n.ts.launchApp }}</MkButton></div> + </div> <MkKeyValue :copy="twoFactorData.url"> <template #key>{{ i18n.ts._2fa.step2Uri }}</template> <template #value>{{ twoFactorData.url }}</template> @@ -52,7 +58,7 @@ SPDX-License-Identifier: AGPL-3.0-only <MkSpacer :marginMin="20" :marginMax="28"> <div class="_gaps"> <div>{{ i18n.ts._2fa.step3Title }}</div> - <MkInput v-model="token" autocomplete="one-time-code"></MkInput> + <MkInput v-model="token" autocomplete="one-time-code" inputmode="numeric"></MkInput> <div>{{ i18n.ts._2fa.step3 }}</div> </div> <div class="_buttonsCenter" style="margin-top: 16px;"> @@ -109,6 +115,7 @@ import { i18n } from '@/i18n.js'; import * as os from '@/os.js'; import MkFolder from '@/components/MkFolder.vue'; import MkInfo from '@/components/MkInfo.vue'; +import MkLink from '@/components/MkLink.vue'; import { confetti } from '@/scripts/confetti.js'; import { signinRequired } from '@/account.js'; @@ -177,8 +184,14 @@ function allDone() { transform: translateX(-50px); } -.qr { +.qrRoot { + display: block; + margin: 0 auto; width: 200px; max-width: 100%; } + +.qr { + width: 100%; +} </style> diff --git a/packages/frontend/src/pages/settings/2fa.vue b/packages/frontend/src/pages/settings/2fa.vue index d8c5f848fe..b7d648c1a4 100644 --- a/packages/frontend/src/pages/settings/2fa.vue +++ b/packages/frontend/src/pages/settings/2fa.vue @@ -30,7 +30,10 @@ SPDX-License-Identifier: AGPL-3.0-only <MkButton v-else danger @click="unregisterTOTP">{{ i18n.ts.unregister }}</MkButton> </div> - <MkButton v-else-if="!$i.twoFactorEnabled" primary gradate @click="registerTOTP">{{ i18n.ts._2fa.registerTOTP }}</MkButton> + <div v-else-if="!$i.twoFactorEnabled" class="_gaps_s"> + <MkButton primary gradate @click="registerTOTP">{{ i18n.ts._2fa.registerTOTP }}</MkButton> + <MkLink url="https://misskey-hub.net/docs/for-users/stepped-guides/how-to-enable-2fa/" target="_blank"><i class="ti ti-help-circle"></i> {{ i18n.ts.learnMore }}</MkLink> + </div> </MkFolder> <MkFolder> @@ -79,8 +82,9 @@ import MkInfo from '@/components/MkInfo.vue'; import MkSwitch from '@/components/MkSwitch.vue'; import FormSection from '@/components/form/section.vue'; import MkFolder from '@/components/MkFolder.vue'; +import MkLink from '@/components/MkLink.vue'; import * as os from '@/os.js'; -import { signinRequired } from '@/account.js'; +import { signinRequired, updateAccount } from '@/account.js'; import { i18n } from '@/i18n.js'; const $i = signinRequired(); @@ -116,6 +120,10 @@ async function unregisterTOTP(): Promise<void> { os.apiWithDialog('i/2fa/unregister', { password: auth.result.password, token: auth.result.token, + }).then(res => { + updateAccount({ + twoFactorEnabled: false, + }); }).catch(error => { os.alert({ type: 'error', diff --git a/packages/frontend/src/pages/settings/drive.vue b/packages/frontend/src/pages/settings/drive.vue index 1919f80864..81a8d474d2 100644 --- a/packages/frontend/src/pages/settings/drive.vue +++ b/packages/frontend/src/pages/settings/drive.vue @@ -44,6 +44,10 @@ SPDX-License-Identifier: AGPL-3.0-only <template #label>{{ i18n.ts.keepOriginalUploading }}</template> <template #caption>{{ i18n.ts.keepOriginalUploadingDescription }}</template> </MkSwitch> + <MkSwitch v-model="keepOriginalFilename"> + <template #label>{{ i18n.ts.keepOriginalFilename }}</template> + <template #caption>{{ i18n.ts.keepOriginalFilenameDescription }}</template> + </MkSwitch> <MkSwitch v-model="alwaysMarkNsfw" @update:modelValue="saveProfile()"> <template #label>{{ i18n.ts.alwaysMarkSensitive }}</template> </MkSwitch> @@ -96,6 +100,7 @@ const meterStyle = computed(() => { }); const keepOriginalUploading = computed(defaultStore.makeGetterSetter('keepOriginalUploading')); +const keepOriginalFilename = computed(defaultStore.makeGetterSetter('keepOriginalFilename')); misskeyApi('drive').then(info => { capacity.value = info.capacity; diff --git a/packages/frontend/src/pages/settings/general.vue b/packages/frontend/src/pages/settings/general.vue index d13b6884bd..cfc63f2a08 100644 --- a/packages/frontend/src/pages/settings/general.vue +++ b/packages/frontend/src/pages/settings/general.vue @@ -50,12 +50,16 @@ SPDX-License-Identifier: AGPL-3.0-only <div class="_gaps_m"> <div class="_gaps_s"> + <MkSwitch v-model="collapseRenotes"> + <template #label>{{ i18n.ts.collapseRenotes }}</template> + <template #caption>{{ i18n.ts.collapseRenotesDescription }}</template> + </MkSwitch> <MkSwitch v-model="showNoteActionsOnlyHover">{{ i18n.ts.showNoteActionsOnlyHover }}</MkSwitch> <MkSwitch v-model="showClipButtonInNoteFooter">{{ i18n.ts.showClipButtonInNoteFooter }}</MkSwitch> - <MkSwitch v-model="collapseRenotes">{{ i18n.ts.collapseRenotes }}</MkSwitch> <MkSwitch v-model="advancedMfm">{{ i18n.ts.enableAdvancedMfm }}</MkSwitch> <MkSwitch v-if="advancedMfm" v-model="animatedMfm">{{ i18n.ts.enableAnimatedMfm }}</MkSwitch> <MkSwitch v-if="advancedMfm" v-model="enableQuickAddMfmFunction">{{ i18n.ts.enableQuickAddMfmFunction }}</MkSwitch> + <MkSwitch v-model="showReactionsCount">{{ i18n.ts.showReactionsCount }}</MkSwitch> <MkSwitch v-model="showGapBetweenNotesInTimeline">{{ i18n.ts.showGapBetweenNotesInTimeline }}</MkSwitch> <MkSwitch v-model="loadRawImages">{{ i18n.ts.loadRawImages }}</MkSwitch> <MkRadios v-model="reactionsDisplaySize"> @@ -131,6 +135,7 @@ SPDX-License-Identifier: AGPL-3.0-only <MkSwitch v-model="disableDrawer">{{ i18n.ts.disableDrawer }}</MkSwitch> <MkSwitch v-model="forceShowAds">{{ i18n.ts.forceShowAds }}</MkSwitch> <MkSwitch v-model="enableSeasonalScreenEffect">{{ i18n.ts.seasonalScreenEffect }}</MkSwitch> + <MkSwitch v-model="useNativeUIForVideoAudioPlayer">{{ i18n.ts.useNativeUIForVideoAudioPlayer }}</MkSwitch> </div> <div> <MkRadios v-model="emojiStyle"> @@ -163,6 +168,7 @@ SPDX-License-Identifier: AGPL-3.0-only <MkSwitch v-model="keepScreenOn">{{ i18n.ts.keepScreenOn }}</MkSwitch> <MkSwitch v-model="disableStreamingTimeline">{{ i18n.ts.disableStreamingTimeline }}</MkSwitch> <MkSwitch v-model="enableHorizontalSwipe">{{ i18n.ts.enableHorizontalSwipe }}</MkSwitch> + <MkSwitch v-model="alwaysConfirmFollow">{{ i18n.ts.alwaysConfirmFollow }}</MkSwitch> </div> <MkSelect v-model="serverDisconnectedBehavior"> <template #label>{{ i18n.ts.whenServerDisconnected }}</template> @@ -281,6 +287,7 @@ const useBlurEffect = computed(defaultStore.makeGetterSetter('useBlurEffect')); const showGapBetweenNotesInTimeline = computed(defaultStore.makeGetterSetter('showGapBetweenNotesInTimeline')); const animatedMfm = computed(defaultStore.makeGetterSetter('animatedMfm')); const advancedMfm = computed(defaultStore.makeGetterSetter('advancedMfm')); +const showReactionsCount = computed(defaultStore.makeGetterSetter('showReactionsCount')); const enableQuickAddMfmFunction = computed(defaultStore.makeGetterSetter('enableQuickAddMfmFunction')); const emojiStyle = computed(defaultStore.makeGetterSetter('emojiStyle')); const disableDrawer = computed(defaultStore.makeGetterSetter('disableDrawer')); @@ -306,6 +313,8 @@ const disableStreamingTimeline = computed(defaultStore.makeGetterSetter('disable const useGroupedNotifications = computed(defaultStore.makeGetterSetter('useGroupedNotifications')); const enableSeasonalScreenEffect = computed(defaultStore.makeGetterSetter('enableSeasonalScreenEffect')); const enableHorizontalSwipe = computed(defaultStore.makeGetterSetter('enableHorizontalSwipe')); +const useNativeUIForVideoAudioPlayer = computed(defaultStore.makeGetterSetter('useNativeUIForVideoAudioPlayer')); +const alwaysConfirmFollow = computed(defaultStore.makeGetterSetter('alwaysConfirmFollow')); watch(lang, () => { miLocalStorage.setItem('lang', lang.value as string); @@ -347,6 +356,7 @@ watch([ keepScreenOn, disableStreamingTimeline, enableSeasonalScreenEffect, + alwaysConfirmFollow, ], async () => { await reloadAsk(); }); diff --git a/packages/frontend/src/pages/settings/plugin.vue b/packages/frontend/src/pages/settings/plugin.vue index 0ab75b95a2..9804454e66 100644 --- a/packages/frontend/src/pages/settings/plugin.vue +++ b/packages/frontend/src/pages/settings/plugin.vue @@ -42,12 +42,25 @@ SPDX-License-Identifier: AGPL-3.0-only </div> <MkFolder> + <template #icon><i class="ti ti-terminal-2"></i></template> + <template #label>{{ i18n.ts._plugin.viewLog }}</template> + + <div class="_gaps_s"> + <div class="_buttons"> + <MkButton inline @click="copy(pluginLogs.get(plugin.id)?.join('\n'))"><i class="ti ti-copy"></i> {{ i18n.ts.copy }}</MkButton> + </div> + + <MkCode :code="pluginLogs.get(plugin.id)?.join('\n') ?? ''"/> + </div> + </MkFolder> + + <MkFolder> <template #icon><i class="ti ti-code"></i></template> <template #label>{{ i18n.ts._plugin.viewSource }}</template> <div class="_gaps_s"> <div class="_buttons"> - <MkButton inline @click="copy(plugin)"><i class="ti ti-copy"></i> {{ i18n.ts.copy }}</MkButton> + <MkButton inline @click="copy(plugin.src)"><i class="ti ti-copy"></i> {{ i18n.ts.copy }}</MkButton> </div> <MkCode :code="plugin.src ?? ''" lang="is"/> @@ -74,6 +87,7 @@ import { ColdDeviceStorage } from '@/store.js'; import { unisonReload } from '@/scripts/unison-reload.js'; import { i18n } from '@/i18n.js'; import { definePageMetadata } from '@/scripts/page-metadata.js'; +import { pluginLogs } from '@/plugin.js'; const plugins = ref(ColdDeviceStorage.get('plugins')); @@ -87,8 +101,8 @@ async function uninstall(plugin) { }); } -function copy(plugin) { - copyToClipboard(plugin.src ?? ''); +function copy(text) { + copyToClipboard(text ?? ''); os.success(); } diff --git a/packages/frontend/src/pages/settings/preferences-backups.vue b/packages/frontend/src/pages/settings/preferences-backups.vue index 942de19d82..b6f1043154 100644 --- a/packages/frontend/src/pages/settings/preferences-backups.vue +++ b/packages/frontend/src/pages/settings/preferences-backups.vue @@ -70,6 +70,7 @@ const defaultStoreSaveKeys: (keyof typeof defaultStore['state'])[] = [ 'animation', 'animatedMfm', 'advancedMfm', + 'showReactionsCount', 'loadRawImages', 'imageNewTab', 'dataSaver', |