New: LICENSEファイル / Del: package.json.license / Feat: setup/initializationでVAPIDを生成 / Fix: 全てのエンドポイントでsuccessをレスポンス / Chg: input_noneエラーを廃止。入力がない場合は{}として解決する / Feat: フロントエンドでserver-infoを読み込む
This commit is contained in:
@@ -24,10 +24,12 @@
|
||||
import { RouterView } from "vue-router";
|
||||
import routerStatus from "@/lib/router";
|
||||
import Progress from "@/components/Progress.vue";
|
||||
/*import LynqChat from "lynqchat-js";
|
||||
import type ApiMap from "lynqchat-js/1.0.0-alpha.0/map"
|
||||
import { ref } from "vue";
|
||||
import serverInfo from "@/lib/account";
|
||||
|
||||
const client = new LynqChat<ApiMap>({
|
||||
origin: window.origin,
|
||||
});*/
|
||||
const isBootFailed = ref<boolean>(false);
|
||||
|
||||
if (!serverInfo.success) {
|
||||
isBootFailed.value = true;
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,5 @@
|
||||
import client from "@/lib/client";
|
||||
|
||||
const serverInfo = await client.request("server-info");
|
||||
|
||||
export default serverInfo;
|
||||
@@ -0,0 +1,8 @@
|
||||
import LynqChat from "lynqchat-js";
|
||||
import type ApiMap from "lynqchat-js/1.0.0-alpha.0/map";
|
||||
|
||||
const client = new LynqChat<ApiMap>({
|
||||
origin: window.origin,
|
||||
});
|
||||
|
||||
export default client;
|
||||
@@ -16,10 +16,9 @@ const router = createRouter({
|
||||
},
|
||||
],
|
||||
});
|
||||
// @ts-ignore 余分な引数の警告
|
||||
router.beforeEach((to, from, next) => {
|
||||
router.beforeEach(() => {
|
||||
routerStatus.isLoad = true;
|
||||
next();
|
||||
return;
|
||||
});
|
||||
router.afterEach(() => {
|
||||
routerStatus.isLoad = false;
|
||||
|
||||
Reference in New Issue
Block a user