fix: use reactive MkNoteHeader
This commit is contained in:
parent
8067ed4084
commit
33923a59fa
1 changed files with 3 additions and 7 deletions
|
@ -48,8 +48,6 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref } from "vue";
|
|
||||||
|
|
||||||
import type { entities } from "firefish-js";
|
import type { entities } from "firefish-js";
|
||||||
import { defaultStore } from "@/store";
|
import { defaultStore } from "@/store";
|
||||||
import MkVisibility from "@/components/MkVisibility.vue";
|
import MkVisibility from "@/components/MkVisibility.vue";
|
||||||
|
@ -66,18 +64,16 @@ const props = defineProps<{
|
||||||
canOpenServerInfo?: boolean;
|
canOpenServerInfo?: boolean;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const note = ref(props.note);
|
|
||||||
|
|
||||||
const showTicker =
|
const showTicker =
|
||||||
defaultStore.state.instanceTicker === "always" ||
|
defaultStore.state.instanceTicker === "always" ||
|
||||||
(defaultStore.state.instanceTicker === "remote" && note.value.user.instance);
|
(defaultStore.state.instanceTicker === "remote" && props.note.user.instance);
|
||||||
|
|
||||||
function openServerInfo() {
|
function openServerInfo() {
|
||||||
if (!props.canOpenServerInfo || !defaultStore.state.openServerInfo) return;
|
if (!props.canOpenServerInfo || !defaultStore.state.openServerInfo) return;
|
||||||
const instanceInfoUrl =
|
const instanceInfoUrl =
|
||||||
note.value.user.host == null
|
props.note.user.host == null
|
||||||
? "/about"
|
? "/about"
|
||||||
: `/instance-info/${note.value.user.host}`;
|
: `/instance-info/${props.note.user.host}`;
|
||||||
pageWindow(instanceInfoUrl);
|
pageWindow(instanceInfoUrl);
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in a new issue