upd: add required boolean, hide timelines on required ID
Blocks guest timeline on sidebar and on welcome page if ID Verification is required Blocks guests from going to timeline view, channels, antennas and lists
This commit is contained in:
parent
c3e2ca9314
commit
53d17b21f3
11 changed files with 45 additions and 18 deletions
|
|
@ -5,9 +5,25 @@
|
|||
|
||||
import { defineAsyncComponent } from 'vue';
|
||||
import { $i } from '@/account.js';
|
||||
import { i18n } from '@/i18n.js';
|
||||
import { popup } from '@/os.js';
|
||||
|
||||
export function confirmId(path?: string) {
|
||||
if (!$i) {
|
||||
const { dispose } = popup(defineAsyncComponent(() => import('@/components/MkSigninDialog.vue')), {
|
||||
autoSet: true,
|
||||
message: i18n.ts.signinRequired,
|
||||
}, {
|
||||
cancelled: () => {
|
||||
if (path) {
|
||||
window.location.href = path;
|
||||
}
|
||||
},
|
||||
closed: () => dispose(),
|
||||
});
|
||||
return new Error('User Account required for id verification');
|
||||
};
|
||||
|
||||
if ($i && !$i.idCheckRequired) return;
|
||||
|
||||
const { dispose } = popup(defineAsyncComponent(() => import('@/components/SkStripeIdDialog.vue')), {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue