summaryrefslogtreecommitdiff
path: root/packages/client/src/scripts/please-login.ts
blob: aeaafa124bdcf2f47e3c52ce3bde2094fabe19c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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');
}