client: refactor pleaseLogin to pleaseLoginOrPage

This commit is contained in:
Johann150 2023-03-04 00:01:17 +01:00
parent 559a17cf26
commit 5a263ec2c3
Signed by untrusted user: Johann150
GPG key ID: 9EE6577A2A06F8F1
2 changed files with 3 additions and 3 deletions

View file

@ -2,7 +2,7 @@
import { EventEmitter } from 'eventemitter3';
import { Component, shallowRef, ShallowRef } from 'vue';
import { pleaseLogin } from '@/scripts/please-login';
import { pleaseLoginOrPage } from '@/scripts/please-login';
import { safeURIDecode } from '@/scripts/safe-uri-decode';
type RouteDef = {
@ -174,7 +174,7 @@ export class Router extends EventEmitter<{
}
if (res.route.loginRequired) {
pleaseLogin('/');
pleaseLoginOrPage('/');
}
const isSamePath = beforePath === path;

View file

@ -3,7 +3,7 @@ import { $i } from '@/account';
import { i18n } from '@/i18n';
import { popup } from '@/os';
export function pleaseLogin(path?: string) {
export function pleaseLoginOrPage(path?: string) {
if ($i) return;
popup(defineAsyncComponent(() => import('@/components/signin-dialog.vue')), {