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:
Marie 2024-09-12 00:41:56 +02:00
parent c3e2ca9314
commit 53d17b21f3
No known key found for this signature in database
GPG key ID: 7ADF6C9CD9A28555
11 changed files with 45 additions and 18 deletions

View file

@ -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')), {