diff options
Diffstat (limited to 'packages/client/src/scripts/please-login.ts')
| -rw-r--r-- | packages/client/src/scripts/please-login.ts | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/packages/client/src/scripts/please-login.ts b/packages/client/src/scripts/please-login.ts new file mode 100644 index 0000000000..928f6ec0f4 --- /dev/null +++ b/packages/client/src/scripts/please-login.ts @@ -0,0 +1,14 @@ +import { $i } from '@/account'; +import { i18n } from '@/i18n'; +import { dialog } from '@/os'; + +export function pleaseLogin() { + if ($i) return; + + dialog({ + title: i18n.locale.signinRequired, + text: null + }); + + throw new Error('signin required'); +} |