diff --git a/napcat.webui/index.html b/napcat.webui/index.html index 1f07d8e5..de5376cf 100644 --- a/napcat.webui/index.html +++ b/napcat.webui/index.html @@ -1,13 +1,13 @@ - + - + NapCat WebUI - - -
- - + + +
+ + diff --git a/napcat.webui/package.json b/napcat.webui/package.json index 5b0739d4..f6b8c6e7 100644 --- a/napcat.webui/package.json +++ b/napcat.webui/package.json @@ -14,7 +14,7 @@ "qrcode": "^1.5.4", "tdesign-icons-vue-next": "^0.3.3", "tdesign-vue-next": "^1.10.3", - "vue": "^3.5.12", + "vue": "^3.5.13", "vue-router": "^4.4.5" }, "devDependencies": { diff --git a/napcat.webui/public/logo_webui.png b/napcat.webui/public/logo_webui.png new file mode 100644 index 00000000..03aa7f5b Binary files /dev/null and b/napcat.webui/public/logo_webui.png differ diff --git a/napcat.webui/src/App.vue b/napcat.webui/src/App.vue index e5fe963f..0d46f1f7 100644 --- a/napcat.webui/src/App.vue +++ b/napcat.webui/src/App.vue @@ -1,7 +1,119 @@ - + + diff --git a/napcat.webui/src/assets/logo_webui.png b/napcat.webui/src/assets/logo_webui.png new file mode 100644 index 00000000..03aa7f5b Binary files /dev/null and b/napcat.webui/src/assets/logo_webui.png differ diff --git a/napcat.webui/src/components/Dashboard.vue b/napcat.webui/src/components/Dashboard.vue index 7d8fcb13..3f36a20d 100644 --- a/napcat.webui/src/components/Dashboard.vue +++ b/napcat.webui/src/components/Dashboard.vue @@ -1,16 +1,18 @@ diff --git a/napcat.webui/src/components/WebUiLogin.vue b/napcat.webui/src/components/WebUiLogin.vue index 956f3d60..553a2bef 100644 --- a/napcat.webui/src/components/WebUiLogin.vue +++ b/napcat.webui/src/components/WebUiLogin.vue @@ -1,20 +1,22 @@ diff --git a/napcat.webui/src/components/webui/Nav.vue b/napcat.webui/src/components/webui/Nav.vue index ddf489bd..f12df5a7 100644 --- a/napcat.webui/src/components/webui/Nav.vue +++ b/napcat.webui/src/components/webui/Nav.vue @@ -1,16 +1,25 @@ diff --git a/napcat.webui/src/pages/OtherConfig.vue b/napcat.webui/src/pages/OtherConfig.vue index 5fff6ff9..b978cf11 100644 --- a/napcat.webui/src/pages/OtherConfig.vue +++ b/napcat.webui/src/pages/OtherConfig.vue @@ -1,25 +1,24 @@ diff --git a/napcat.webui/src/pages/network/EmptyStateComponent.vue b/napcat.webui/src/pages/network/EmptyStateComponent.vue deleted file mode 100644 index 29fb8e9b..00000000 --- a/napcat.webui/src/pages/network/EmptyStateComponent.vue +++ /dev/null @@ -1,22 +0,0 @@ - - - - - diff --git a/napcat.webui/src/pages/network/HttpClientComponent.vue b/napcat.webui/src/pages/network/HttpClientComponent.vue index 71cd8d14..7d275b90 100644 --- a/napcat.webui/src/pages/network/HttpClientComponent.vue +++ b/napcat.webui/src/pages/network/HttpClientComponent.vue @@ -1,28 +1,25 @@ @@ -36,33 +33,16 @@ const props = defineProps<{ const messageFormatOptions = ref([ { label: 'Array', value: 'array' }, - { label: 'String', value: 'string' }, + { label: 'String', value: 'string' } ]); -watch( - () => props.config.messagePostFormat, - (newValue) => { - if (newValue !== 'array' && newValue !== 'string') { - props.config.messagePostFormat = 'array'; - } +watch(() => props.config.messagePostFormat, (newValue) => { + if (newValue !== 'array' && newValue !== 'string') { + props.config.messagePostFormat = 'array'; } -); +}); diff --git a/napcat.webui/src/pages/network/HttpServerComponent.vue b/napcat.webui/src/pages/network/HttpServerComponent.vue index 5e61b253..607e528d 100644 --- a/napcat.webui/src/pages/network/HttpServerComponent.vue +++ b/napcat.webui/src/pages/network/HttpServerComponent.vue @@ -1,34 +1,31 @@ @@ -42,33 +39,16 @@ const props = defineProps<{ const messageFormatOptions = ref([ { label: 'Array', value: 'array' }, - { label: 'String', value: 'string' }, + { label: 'String', value: 'string' } ]); -watch( - () => props.config.messagePostFormat, - (newValue) => { - if (newValue !== 'array' && newValue !== 'string') { - props.config.messagePostFormat = 'array'; - } +watch(() => props.config.messagePostFormat, (newValue) => { + if (newValue !== 'array' && newValue !== 'string') { + props.config.messagePostFormat = 'array'; } -); +}); diff --git a/napcat.webui/src/pages/network/WebsocketClientComponent.vue b/napcat.webui/src/pages/network/WebsocketClientComponent.vue index d7c2f657..fc05eb9f 100644 --- a/napcat.webui/src/pages/network/WebsocketClientComponent.vue +++ b/napcat.webui/src/pages/network/WebsocketClientComponent.vue @@ -1,31 +1,28 @@ @@ -39,33 +36,16 @@ const props = defineProps<{ const messageFormatOptions = ref([ { label: 'Array', value: 'array' }, - { label: 'String', value: 'string' }, + { label: 'String', value: 'string' } ]); -watch( - () => props.config.messagePostFormat, - (newValue) => { - if (newValue !== 'array' && newValue !== 'string') { - props.config.messagePostFormat = 'array'; - } +watch(() => props.config.messagePostFormat, (newValue) => { + if (newValue !== 'array' && newValue !== 'string') { + props.config.messagePostFormat = 'array'; } -); +}); diff --git a/napcat.webui/src/pages/network/WebsocketServerComponent.vue b/napcat.webui/src/pages/network/WebsocketServerComponent.vue index 88830ffa..c6c1a740 100644 --- a/napcat.webui/src/pages/network/WebsocketServerComponent.vue +++ b/napcat.webui/src/pages/network/WebsocketServerComponent.vue @@ -1,37 +1,34 @@ @@ -45,33 +42,15 @@ const props = defineProps<{ const messageFormatOptions = ref([ { label: 'Array', value: 'array' }, - { label: 'String', value: 'string' }, + { label: 'String', value: 'string' } ]); -watch( - () => props.config.messagePostFormat, - (newValue) => { - if (newValue !== 'array' && newValue !== 'string') { - props.config.messagePostFormat = 'array'; - } +watch(() => props.config.messagePostFormat, (newValue) => { + if (newValue !== 'array' && newValue !== 'string') { + props.config.messagePostFormat = 'array'; } -); +}); diff --git a/napcat.webui/src/ts/event-bus.ts b/napcat.webui/src/ts/event-bus.ts new file mode 100644 index 00000000..b4efb6ee --- /dev/null +++ b/napcat.webui/src/ts/event-bus.ts @@ -0,0 +1,3 @@ +import mitt from "mitt" +const emitter = mitt(); +export default emitter;