rudeshark.net/packages/client/src/scripts/please-login.ts
2021-11-18 23:36:04 +09:00

15 lines
248 B
TypeScript

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