diff --git a/package.json b/package.json index 8028276..06fcae7 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,7 @@ "core-js": "^3.6.5", "element-resize-detector": "^1.2.3", "quasar": "^2.0.0", + "v-viewer": "^3.0.9", "vue-i18n": "^9.0.0-beta.0", "vuex": "^4.0.1" }, diff --git a/quasar.conf.js b/quasar.conf.js index 05a0120..e6e79b0 100644 --- a/quasar.conf.js +++ b/quasar.conf.js @@ -19,7 +19,7 @@ module.exports = configure(function (ctx) { // app boot file (/src/boot) // --> boot files are part of "main.js" // https://v2.quasar.dev/quasar-cli/boot-files - boot: ["i18n", "axios"], + boot: ["i18n", "axios", "v-viewer"], // https://v2.quasar.dev/quasar-cli/quasar-conf-js#Property%3A-css css: ["app.scss"], diff --git a/src/boot/axios.ts b/src/boot/axios.ts index 408a99d..b350ffe 100644 --- a/src/boot/axios.ts +++ b/src/boot/axios.ts @@ -1,7 +1,7 @@ -import { boot } from 'quasar/wrappers'; -import axios, { AxiosInstance } from 'axios'; +import { boot } from "quasar/wrappers"; +import axios, { AxiosInstance } from "axios"; -declare module '@vue/runtime-core' { +declare module "@vue/runtime-core" { interface ComponentCustomProperties { $axios: AxiosInstance; } @@ -13,7 +13,8 @@ declare module '@vue/runtime-core' { // good idea to move this instance creation inside of the // "export default () => {}" function below (which runs individually // for each client) -const api = axios.create({ baseURL: 'https://api.example.com' }); +const api = axios.create({ baseURL: "https://api.example.com" }); +api.defaults.headers.common["X-Product-Name"] = "RK_3568"; export default boot(({ app }) => { // for use inside Vue files (Options API) through this.$axios and this.$api diff --git a/src/boot/v-viewer.ts b/src/boot/v-viewer.ts new file mode 100644 index 0000000..3aa6626 --- /dev/null +++ b/src/boot/v-viewer.ts @@ -0,0 +1,12 @@ +import { boot } from "quasar/wrappers"; + +import "viewerjs/dist/viewer.css"; +import VueViewer from "v-viewer"; + +export default boot(({ app }) => { + app.use(VueViewer, { + defaultOptions: { + zIndex: 99999, + }, + }); +}); diff --git a/src/common/ClientConnection.ts b/src/common/ClientConnection.ts index 4a1913d..7a22123 100644 --- a/src/common/ClientConnection.ts +++ b/src/common/ClientConnection.ts @@ -366,6 +366,27 @@ export default class ClientConnection { } } + public setApplicationConfig(wall_row: number, wall_col: number) { + this.ws?.send( + JSON.stringify( + new Protocol.SetApplicationConfigRequestEntity( + 0, + "wall_row", + wall_row.toString() + ) + ) + ); + this.ws?.send( + JSON.stringify( + new Protocol.SetApplicationConfigRequestEntity( + 0, + "wall_col", + wall_col.toString() + ) + ) + ); + } + private _destoryed = false; public destory() { this._destoryed = true; diff --git a/src/components/BackgroundImageDialog.vue b/src/components/BackgroundImageDialog.vue new file mode 100644 index 0000000..6c31235 --- /dev/null +++ b/src/components/BackgroundImageDialog.vue @@ -0,0 +1,209 @@ + + + + + diff --git a/src/components/GridSettingDialog.vue b/src/components/GridSettingDialog.vue new file mode 100644 index 0000000..d626d32 --- /dev/null +++ b/src/components/GridSettingDialog.vue @@ -0,0 +1,133 @@ + + + + + diff --git a/src/components/GroupDialog.vue b/src/components/GroupDialog.vue index f23d450..6315b87 100644 --- a/src/components/GroupDialog.vue +++ b/src/components/GroupDialog.vue @@ -1,5 +1,5 @@