diff options
| author | かっこかり <67428053+kakkokari-gtyih@users.noreply.github.com> | 2024-08-11 11:17:56 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-11 11:17:56 +0900 |
| commit | 046f2435b2edd6adffaf4f45bb30114d52e62b6b (patch) | |
| tree | 06e255e20328c45aeda269a02ddb685880ac982e /packages/frontend/src | |
| parent | Merge branch 'develop' of https://github.com/misskey-dev/misskey into develop (diff) | |
| download | misskey-046f2435b2edd6adffaf4f45bb30114d52e62b6b.tar.gz misskey-046f2435b2edd6adffaf4f45bb30114d52e62b6b.tar.bz2 misskey-046f2435b2edd6adffaf4f45bb30114d52e62b6b.zip | |
fix(frontend): mCaptchaを使用していてもbotプロテクションに関する警告が消えないのを修正 (#14390)
* fix(frontend): mCaptchaを使用していてもbotプロテクションに関する警告が消えないのを修正
* Update Changelog
* refactor
Diffstat (limited to 'packages/frontend/src')
| -rw-r--r-- | packages/frontend/src/pages/admin/index.vue | 31 | ||||
| -rw-r--r-- | packages/frontend/src/pages/settings/index.vue | 3 |
2 files changed, 14 insertions, 20 deletions
diff --git a/packages/frontend/src/pages/admin/index.vue b/packages/frontend/src/pages/admin/index.vue index 292f10da1a..40dec55deb 100644 --- a/packages/frontend/src/pages/admin/index.vue +++ b/packages/frontend/src/pages/admin/index.vue @@ -7,7 +7,7 @@ SPDX-License-Identifier: AGPL-3.0-only <div ref="el" class="hiyeyicy" :class="{ wide: !narrow }"> <div v-if="!narrow || currentPage?.route.name == null" class="nav"> <MkSpacer :contentMax="700" :marginMin="16"> - <div class="lxpfedzu"> + <div class="lxpfedzu _gaps"> <div class="banner"> <img :src="instance.iconUrl || '/favicon.ico'" alt="" class="icon"/> </div> @@ -61,10 +61,10 @@ const narrow = ref(false); const view = ref(null); const el = ref<HTMLDivElement | null>(null); const pageProps = ref({}); -let noMaintainerInformation = isEmpty(instance.maintainerName) || isEmpty(instance.maintainerEmail); -let noBotProtection = !instance.disableRegistration && !instance.enableHcaptcha && !instance.enableRecaptcha && !instance.enableTurnstile; -let noEmailServer = !instance.enableEmail; -let noInquiryUrl = isEmpty(instance.inquiryUrl); +const noMaintainerInformation = computed(() => isEmpty(instance.maintainerName) || isEmpty(instance.maintainerEmail)); +const noBotProtection = computed(() => !instance.disableRegistration && !instance.enableHcaptcha && !instance.enableRecaptcha && !instance.enableTurnstile && !instance.enableMcaptcha); +const noEmailServer = computed(() => !instance.enableEmail); +const noInquiryUrl = computed(() => isEmpty(instance.inquiryUrl)); const thereIsUnresolvedAbuseReport = ref(false); const currentPage = computed(() => router.currentRef.value.child); @@ -235,25 +235,22 @@ const menuDef = computed(() => [{ }], }]); -watch(narrow.value, () => { - if (currentPage.value?.route.name == null && !narrow.value) { - router.push('/admin/overview'); - } -}); - onMounted(() => { - ro.observe(el.value); - - narrow.value = el.value.offsetWidth < NARROW_THRESHOLD; + if (el.value != null) { + ro.observe(el.value); + narrow.value = el.value.offsetWidth < NARROW_THRESHOLD; + } if (currentPage.value?.route.name == null && !narrow.value) { - router.push('/admin/overview'); + router.replace('/admin/overview'); } }); onActivated(() => { - narrow.value = el.value.offsetWidth < NARROW_THRESHOLD; + if (el.value != null) { + narrow.value = el.value.offsetWidth < NARROW_THRESHOLD; + } if (currentPage.value?.route.name == null && !narrow.value) { - router.push('/admin/overview'); + router.replace('/admin/overview'); } }); diff --git a/packages/frontend/src/pages/settings/index.vue b/packages/frontend/src/pages/settings/index.vue index 5fc1fd1bca..7d16740a3e 100644 --- a/packages/frontend/src/pages/settings/index.vue +++ b/packages/frontend/src/pages/settings/index.vue @@ -198,9 +198,6 @@ const menuDef = computed(() => [{ }], }]); -watch(narrow, () => { -}); - onMounted(() => { ro.observe(el.value); |