diff --git a/pkg/views/src/components/publish/ArticleEditor.vue b/pkg/views/src/components/publish/ArticleEditor.vue index c720d01..384eae2 100644 --- a/pkg/views/src/components/publish/ArticleEditor.vue +++ b/pkg/views/src/components/publish/ArticleEditor.vue @@ -121,12 +121,14 @@ import { request } from "@/scripts/request" import { useEditor } from "@/stores/editor" import { getAtk } from "@/stores/userinfo" +import { useRealms } from "@/stores/realms"; import { computed, reactive, ref, watch } from "vue"; import { useRouter } from "vue-router" import PlannedPublish from "@/components/publish/parts/PlannedPublish.vue" import Media from "@/components/publish/parts/Media.vue" import PublishArea from "@/components/publish/parts/PublishArea.vue"; +const realms = useRealms() const editor = useEditor() const dialogs = reactive({ @@ -147,7 +149,7 @@ const data = ref({ const currentRealm = computed(() => { if(data.value.realm_id) { - return editor.availableRealms.find((e) => e.id === data.value.realm_id) + return realms.available.find((e: any) => e.id === data.value.realm_id) } else { return null } diff --git a/pkg/views/src/components/publish/parts/PublishArea.vue b/pkg/views/src/components/publish/parts/PublishArea.vue index f96a85a..b4bae5e 100644 --- a/pkg/views/src/components/publish/parts/PublishArea.vue +++ b/pkg/views/src/components/publish/parts/PublishArea.vue @@ -15,7 +15,7 @@ variant="solo-filled" item-title="name" item-value="id" - :items="editor.availableRealms" + :items="realms.available" :model-value="props.value" @update:model-value="(val) => emits('update:value', val)" /> @@ -29,7 +29,9 @@