({
diff --git a/pkg/views/src/components/publish/MomentEditor.vue b/pkg/views/src/components/publish/MomentEditor.vue
index a48f523..e6d180e 100644
--- a/pkg/views/src/components/publish/MomentEditor.vue
+++ b/pkg/views/src/components/publish/MomentEditor.vue
@@ -6,20 +6,40 @@
You are editing a post with alias {{ editor.related.edit_to?.alias }}
-
+
-
+
-
+
diff --git a/pkg/views/src/components/publish/PostDeletion.vue b/pkg/views/src/components/publish/PostDeletion.vue
index 65a17cb..c298de1 100644
--- a/pkg/views/src/components/publish/PostDeletion.vue
+++ b/pkg/views/src/components/publish/PostDeletion.vue
@@ -20,6 +20,7 @@
diff --git a/pkg/views/src/components/realms/RealmAction.vue b/pkg/views/src/components/realms/RealmAction.vue
index 9c72ac5..314cd07 100644
--- a/pkg/views/src/components/realms/RealmAction.vue
+++ b/pkg/views/src/components/realms/RealmAction.vue
@@ -13,8 +13,8 @@
+
+
diff --git a/pkg/views/src/layouts/master.vue b/pkg/views/src/layouts/master.vue
index 1549e85..41a3476 100644
--- a/pkg/views/src/layouts/master.vue
+++ b/pkg/views/src/layouts/master.vue
@@ -99,7 +99,7 @@ import { useUserinfo } from "@/stores/userinfo"
import { useWellKnown } from "@/stores/wellKnown"
import PostTools from "@/components/publish/PostTools.vue"
import RealmTools from "@/components/realms/RealmTools.vue"
-import RealmList from "@/components/realms/RealmList.vue";
+import RealmList from "@/components/realms/RealmList.vue"
const id = useUserinfo()
const editor = useEditor()
diff --git a/pkg/views/src/main.ts b/pkg/views/src/main.ts
index edb1660..233d23b 100644
--- a/pkg/views/src/main.ts
+++ b/pkg/views/src/main.ts
@@ -1,32 +1,32 @@
-import "virtual:uno.css";
+import "virtual:uno.css"
-import "./assets/utils.css";
+import "./assets/utils.css"
-import { createApp } from "vue";
-import { createPinia } from "pinia";
+import { createApp } from "vue"
+import { createPinia } from "pinia"
-import "vuetify/styles";
-import { createVuetify } from "vuetify";
-import { md3 } from "vuetify/blueprints";
-import * as components from "vuetify/components";
-import * as labsComponents from 'vuetify/labs/components'
-import * as directives from "vuetify/directives";
+import "vuetify/styles"
+import { createVuetify } from "vuetify"
+import { md3 } from "vuetify/blueprints"
+import * as components from "vuetify/components"
+import * as labsComponents from "vuetify/labs/components"
+import * as directives from "vuetify/directives"
-import "@mdi/font/css/materialdesignicons.min.css";
-import "@fontsource/roboto/latin.css";
-import "@unocss/reset/tailwind.css";
+import "@mdi/font/css/materialdesignicons.min.css"
+import "@fontsource/roboto/latin.css"
+import "@unocss/reset/tailwind.css"
-import index from "./index.vue";
-import router from "./router";
+import index from "./index.vue"
+import router from "./router"
-const app = createApp(index);
+const app = createApp(index)
app.use(
createVuetify({
directives,
components: {
...components,
- ...labsComponents,
+ ...labsComponents
},
blueprint: md3,
theme: {
@@ -46,9 +46,9 @@ app.use(
}
}
})
-);
+)
-app.use(createPinia());
-app.use(router);
+app.use(createPinia())
+app.use(router)
-app.mount("#app");
+app.mount("#app")
diff --git a/pkg/views/src/router/index.ts b/pkg/views/src/router/index.ts
index 5ddd36c..3ce9642 100644
--- a/pkg/views/src/router/index.ts
+++ b/pkg/views/src/router/index.ts
@@ -1,5 +1,5 @@
-import { createRouter, createWebHistory } from "vue-router";
-import MasterLayout from "@/layouts/master.vue";
+import { createRouter, createWebHistory } from "vue-router"
+import MasterLayout from "@/layouts/master.vue"
const router = createRouter({
history: createWebHistory(import.meta.env.BASE_URL),
@@ -14,7 +14,6 @@ const router = createRouter({
component: () => import("@/views/explore.vue")
},
-
{
path: "/p/moments/:alias",
name: "posts.details.moments",
@@ -34,6 +33,6 @@ const router = createRouter({
]
}
]
-});
+})
-export default router;
+export default router
diff --git a/pkg/views/src/stores/realms.ts b/pkg/views/src/stores/realms.ts
index fa33f4a..9140618 100644
--- a/pkg/views/src/stores/realms.ts
+++ b/pkg/views/src/stores/realms.ts
@@ -1,6 +1,7 @@
import { reactive, ref } from "vue"
import { defineStore } from "pinia"
import { checkLoggedIn, getAtk } from "@/stores/userinfo"
+import { request } from "@/scripts/request"
export const useRealms = defineStore("realms", () => {
const done = ref(false)
@@ -20,7 +21,7 @@ export const useRealms = defineStore("realms", () => {
async function list() {
if (!checkLoggedIn()) return
- const res = await fetch("/api/realms/me/available", {
+ const res = await request("/api/realms/me/available", {
headers: { Authorization: `Bearer ${getAtk()}` }
})
if (res.status !== 200) {
diff --git a/pkg/views/src/stores/userinfo.ts b/pkg/views/src/stores/userinfo.ts
index 2f4f1a8..386a857 100644
--- a/pkg/views/src/stores/userinfo.ts
+++ b/pkg/views/src/stores/userinfo.ts
@@ -31,25 +31,25 @@ export const useUserinfo = defineStore("userinfo", () => {
async function readProfiles() {
if (!checkLoggedIn()) {
- isReady.value = true;
- }
-
- const res = await request("/api/users/me", {
- headers: { "Authorization": `Bearer ${getAtk()}` }
- });
-
- if (res.status !== 200) {
- return;
- }
-
- const data = await res.json();
-
- userinfo.value = {
- isReady: true,
- isLoggedIn: true,
- displayName: data["nick"],
- data: data
- };
+ isReady.value = true
+ }
+
+ const res = await request("/api/users/me", {
+ headers: { Authorization: `Bearer ${getAtk()}` }
+ })
+
+ if (res.status !== 200) {
+ return
+ }
+
+ const data = await res.json()
+
+ userinfo.value = {
+ isReady: true,
+ isLoggedIn: true,
+ displayName: data["nick"],
+ data: data
+ }
}
return { userinfo, isReady, readProfiles }
diff --git a/pkg/views/src/views/explore.vue b/pkg/views/src/views/explore.vue
index 43fe874..f2e3486 100644
--- a/pkg/views/src/views/explore.vue
+++ b/pkg/views/src/views/explore.vue
@@ -15,46 +15,49 @@
diff --git a/pkg/views/src/views/realms/page.vue b/pkg/views/src/views/realms/page.vue
index d4bfa62..cf6a38e 100644
--- a/pkg/views/src/views/realms/page.vue
+++ b/pkg/views/src/views/realms/page.vue
@@ -5,7 +5,7 @@
-
+
Realm Info
@@ -23,6 +23,10 @@
+
+
+
+
@@ -36,6 +40,7 @@ import { parse } from "marked"
import dompurify from "dompurify"
import PostList from "@/components/posts/PostList.vue"
import RealmAction from "@/components/realms/RealmAction.vue"
+import RealmMembers from "@/components/realms/RealmMembers.vue"
const route = useRoute()
const realms = useRealms()
diff --git a/pkg/views/tsconfig.node.json b/pkg/views/tsconfig.node.json
index f094063..2c669ee 100644
--- a/pkg/views/tsconfig.node.json
+++ b/pkg/views/tsconfig.node.json
@@ -1,12 +1,6 @@
{
"extends": "@tsconfig/node20/tsconfig.json",
- "include": [
- "vite.config.*",
- "vitest.config.*",
- "cypress.config.*",
- "nightwatch.conf.*",
- "playwright.config.*"
- ],
+ "include": ["vite.config.*", "vitest.config.*", "cypress.config.*", "nightwatch.conf.*", "playwright.config.*"],
"compilerOptions": {
"composite": true,
"noEmit": true,
diff --git a/pkg/views/uno.config.ts b/pkg/views/uno.config.ts
index cb688df..d0bf10d 100644
--- a/pkg/views/uno.config.ts
+++ b/pkg/views/uno.config.ts
@@ -1,4 +1,4 @@
-import { defineConfig, presetAttributify, presetTypography, presetUno } from "unocss";
+import { defineConfig, presetAttributify, presetTypography, presetUno } from "unocss"
export default defineConfig({
presets: [presetAttributify(), presetTypography(), presetUno({ preflight: false })]