jormungandr-bite/packages/client/src/scripts/please-login.ts
2022-01-28 11:39:49 +09:00

14 lines
244 B
TypeScript

import { $i } from '@/account';
import { i18n } from '@/i18n';
import { alert } from '@/os';
export function pleaseLogin() {
if ($i) return;
alert({
title: i18n.ts.signinRequired,
text: null
});
throw new Error('signin required');
}