fix (client): clicking remote instance ticker on unsigned UI causes an API error
This commit is contained in:
parent
712257a376
commit
e011455a25
1 changed files with 3 additions and 0 deletions
|
@ -58,6 +58,7 @@ import { userPage } from "@/filters/user";
|
||||||
import { i18n } from "@/i18n";
|
import { i18n } from "@/i18n";
|
||||||
import { pageWindow } from "@/os";
|
import { pageWindow } from "@/os";
|
||||||
import icon from "@/scripts/icon";
|
import icon from "@/scripts/icon";
|
||||||
|
import { me, isSignedIn } from "@/me";
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
note: entities.Note;
|
note: entities.Note;
|
||||||
|
@ -71,6 +72,8 @@ const showTicker =
|
||||||
|
|
||||||
function openServerInfo() {
|
function openServerInfo() {
|
||||||
if (!props.canOpenServerInfo || !defaultStore.state.openServerInfo) return;
|
if (!props.canOpenServerInfo || !defaultStore.state.openServerInfo) return;
|
||||||
|
if (props.note.user.host != null && !isSignedIn(me)) return;
|
||||||
|
|
||||||
const instanceInfoUrl =
|
const instanceInfoUrl =
|
||||||
props.note.user.host == null
|
props.note.user.host == null
|
||||||
? "/about"
|
? "/about"
|
||||||
|
|
Loading…
Reference in a new issue