diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2022-12-23 17:13:43 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2022-12-23 17:13:43 +0900 |
| commit | 2efd06f4ade569dd7c8d58c42f46a5b99878b8f1 (patch) | |
| tree | 84886ea513747b8295398fb9a341c39cfdb40c3d /packages/client | |
| parent | Merge branch 'develop' of https://github.com/misskey-dev/misskey into develop (diff) | |
| download | sharkey-2efd06f4ade569dd7c8d58c42f46a5b99878b8f1.tar.gz sharkey-2efd06f4ade569dd7c8d58c42f46a5b99878b8f1.tar.bz2 sharkey-2efd06f4ade569dd7c8d58c42f46a5b99878b8f1.zip | |
enhance(client): show warning on screen when logged in as bot
Related #9386
Diffstat (limited to 'packages/client')
| -rw-r--r-- | packages/client/src/ui/_common_/common.vue | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/packages/client/src/ui/_common_/common.vue b/packages/client/src/ui/_common_/common.vue index 1ea59dd260..7f3fc0e4af 100644 --- a/packages/client/src/ui/_common_/common.vue +++ b/packages/client/src/ui/_common_/common.vue @@ -14,6 +14,8 @@ <div v-if="pendingApiRequestsCount > 0" id="wait"></div> <div v-if="dev" id="devTicker"><span>DEV BUILD</span></div> + +<div v-if="$i && $i.isBot" id="botWarn"><span>{{ i18n.ts.loggedInAsBot }}</span></div> </template> <script lang="ts" setup> @@ -24,6 +26,7 @@ import { uploads } from '@/scripts/upload'; import * as sound from '@/scripts/sound'; import { $i } from '@/account'; import { stream } from '@/stream'; +import { i18n } from '@/i18n'; const XStreamIndicator = defineAsyncComponent(() => import('./stream-indicator.vue')); const XUpload = defineAsyncComponent(() => import('./upload.vue')); @@ -94,6 +97,29 @@ if ($i) { } } +#botWarn { + position: fixed; + top: 0; + left: 0; + right: 0; + bottom: 0; + margin: auto; + width: 100%; + height: max-content; + text-align: center; + z-index: 2147483647; + color: #ff0; + background: rgba(0, 0, 0, 0.5); + padding: 4px 7px; + font-size: 14px; + pointer-events: none; + user-select: none; + + > span { + animation: dev-ticker-blink 2s infinite; + } +} + #devTicker { position: fixed; top: 0; |