Browse Source

增加登陆界面,配置无标题栏

caner 1 year ago
parent
commit
2dbec98a34

+ 0 - 21
index.html

@@ -4,27 +4,6 @@
 <head>
 <head>
   <meta charset="UTF-8" />
   <meta charset="UTF-8" />
   <title>控制端</title>
   <title>控制端</title>
-  <style>
-    *{
-      box-sizing: border-box;
-    }
-    video,
-    #app,
-    html,
-    body {
-      margin: 0;
-      padding: 0;
-      user-select: none;
-      width: 100%;
-      height: 100%;
-      min-width: 1300px;
-      min-height: 760px;
-      overflow: hidden;
-      border-radius: 13px;
-      background: none;
-      position: relative;
-    }
-  </style>
 </head>
 </head>
 
 
 <body>
 <body>

+ 1 - 2
package.json

@@ -12,9 +12,8 @@
     "tauri": "tauri"
     "tauri": "tauri"
   },
   },
   "dependencies": {
   "dependencies": {
+    "@kuyoonjo/tauri-plugin-mqtt": "^0.1.0",
     "@tauri-apps/api": "^2",
     "@tauri-apps/api": "^2",
-    "@tauri-apps/plugin-shell": "^2",
-    "@tauri-apps/plugin-websocket": "~2",
     "naive-ui": "^2.40.1",
     "naive-ui": "^2.40.1",
     "pinia": "^2.2.6",
     "pinia": "^2.2.6",
     "pinia-plugin-persist": "^1.0.0",
     "pinia-plugin-persist": "^1.0.0",

+ 326 - 165
src-tauri/Cargo.lock

@@ -1,6 +1,6 @@
 # This file is automatically @generated by Cargo.
 # This file is automatically @generated by Cargo.
 # It is not intended for manual editing.
 # It is not intended for manual editing.
-version = 3
+version = 4
 
 
 [[package]]
 [[package]]
 name = "addr2line"
 name = "addr2line"
@@ -333,6 +333,22 @@ dependencies = [
  "windows-targets 0.52.6",
  "windows-targets 0.52.6",
 ]
 ]
 
 
+[[package]]
+name = "cocoa"
+version = "0.25.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f6140449f97a6e97f9511815c5632d84c8aacf8ac271ad77c559218161a1373c"
+dependencies = [
+ "bitflags 1.3.2",
+ "block",
+ "cocoa-foundation 0.1.2",
+ "core-foundation 0.9.4",
+ "core-graphics 0.23.2",
+ "foreign-types 0.5.0",
+ "libc",
+ "objc",
+]
+
 [[package]]
 [[package]]
 name = "cocoa"
 name = "cocoa"
 version = "0.26.0"
 version = "0.26.0"
@@ -341,10 +357,24 @@ checksum = "f79398230a6e2c08f5c9760610eb6924b52aa9e7950a619602baba59dcbbdbb2"
 dependencies = [
 dependencies = [
  "bitflags 2.6.0",
  "bitflags 2.6.0",
  "block",
  "block",
- "cocoa-foundation",
- "core-foundation",
- "core-graphics",
- "foreign-types",
+ "cocoa-foundation 0.2.0",
+ "core-foundation 0.10.0",
+ "core-graphics 0.24.0",
+ "foreign-types 0.5.0",
+ "libc",
+ "objc",
+]
+
+[[package]]
+name = "cocoa-foundation"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8c6234cbb2e4c785b456c0644748b1ac416dd045799740356f8363dfe00c93f7"
+dependencies = [
+ "bitflags 1.3.2",
+ "block",
+ "core-foundation 0.9.4",
+ "core-graphics-types 0.1.3",
  "libc",
  "libc",
  "objc",
  "objc",
 ]
 ]
@@ -357,8 +387,8 @@ checksum = "e14045fb83be07b5acf1c0884b2180461635b433455fa35d1cd6f17f1450679d"
 dependencies = [
 dependencies = [
  "bitflags 2.6.0",
  "bitflags 2.6.0",
  "block",
  "block",
- "core-foundation",
- "core-graphics-types",
+ "core-foundation 0.10.0",
+ "core-graphics-types 0.2.0",
  "libc",
  "libc",
  "objc",
  "objc",
 ]
 ]
@@ -389,6 +419,16 @@ dependencies = [
  "version_check",
  "version_check",
 ]
 ]
 
 
+[[package]]
+name = "core-foundation"
+version = "0.9.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f"
+dependencies = [
+ "core-foundation-sys",
+ "libc",
+]
+
 [[package]]
 [[package]]
 name = "core-foundation"
 name = "core-foundation"
 version = "0.10.0"
 version = "0.10.0"
@@ -405,6 +445,19 @@ version = "0.8.7"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b"
 checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b"
 
 
+[[package]]
+name = "core-graphics"
+version = "0.23.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c07782be35f9e1140080c6b96f0d44b739e2278479f64e02fdab4e32dfd8b081"
+dependencies = [
+ "bitflags 1.3.2",
+ "core-foundation 0.9.4",
+ "core-graphics-types 0.1.3",
+ "foreign-types 0.5.0",
+ "libc",
+]
+
 [[package]]
 [[package]]
 name = "core-graphics"
 name = "core-graphics"
 version = "0.24.0"
 version = "0.24.0"
@@ -412,9 +465,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "fa95a34622365fa5bbf40b20b75dba8dfa8c94c734aea8ac9a5ca38af14316f1"
 checksum = "fa95a34622365fa5bbf40b20b75dba8dfa8c94c734aea8ac9a5ca38af14316f1"
 dependencies = [
 dependencies = [
  "bitflags 2.6.0",
  "bitflags 2.6.0",
- "core-foundation",
- "core-graphics-types",
- "foreign-types",
+ "core-foundation 0.10.0",
+ "core-graphics-types 0.2.0",
+ "foreign-types 0.5.0",
+ "libc",
+]
+
+[[package]]
+name = "core-graphics-types"
+version = "0.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "45390e6114f68f718cc7a830514a96f903cccd70d02a8f6d9f643ac4ba45afaf"
+dependencies = [
+ "bitflags 1.3.2",
+ "core-foundation 0.9.4",
  "libc",
  "libc",
 ]
 ]
 
 
@@ -425,7 +489,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "3d44a101f213f6c4cdc1853d4b78aef6db6bdfa3468798cc1d9912f4735013eb"
 checksum = "3d44a101f213f6c4cdc1853d4b78aef6db6bdfa3468798cc1d9912f4735013eb"
 dependencies = [
 dependencies = [
  "bitflags 2.6.0",
  "bitflags 2.6.0",
- "core-foundation",
+ "core-foundation 0.10.0",
  "libc",
  "libc",
 ]
 ]
 
 
@@ -545,10 +609,10 @@ dependencies = [
 ]
 ]
 
 
 [[package]]
 [[package]]
-name = "data-encoding"
-version = "2.6.0"
+name = "debug_print"
+version = "1.0.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2"
+checksum = "8f215f9b7224f49fb73256115331f677d868b34d18b65dbe4db392e6021eea90"
 
 
 [[package]]
 [[package]]
 name = "deranged"
 name = "deranged"
@@ -700,15 +764,6 @@ version = "1.2.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "4ef6b89e5b37196644d8796de5268852ff179b44e96276cf4290264843743bb7"
 checksum = "4ef6b89e5b37196644d8796de5268852ff179b44e96276cf4290264843743bb7"
 
 
-[[package]]
-name = "encoding_rs"
-version = "0.8.35"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3"
-dependencies = [
- "cfg-if",
-]
-
 [[package]]
 [[package]]
 name = "equivalent"
 name = "equivalent"
 version = "1.0.1"
 version = "1.0.1"
@@ -725,6 +780,22 @@ dependencies = [
  "typeid",
  "typeid",
 ]
 ]
 
 
+[[package]]
+name = "errno"
+version = "0.3.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d"
+dependencies = [
+ "libc",
+ "windows-sys 0.59.0",
+]
+
+[[package]]
+name = "fastrand"
+version = "2.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be"
+
 [[package]]
 [[package]]
 name = "fdeflate"
 name = "fdeflate"
 version = "0.3.6"
 version = "0.3.6"
@@ -754,12 +825,32 @@ dependencies = [
  "miniz_oxide",
  "miniz_oxide",
 ]
 ]
 
 
+[[package]]
+name = "flume"
+version = "0.11.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "da0e4dd2a88388a1f4ccc7c9ce104604dab68d9f408dc34cd45823d5a9069095"
+dependencies = [
+ "futures-core",
+ "futures-sink",
+ "spin",
+]
+
 [[package]]
 [[package]]
 name = "fnv"
 name = "fnv"
 version = "1.0.7"
 version = "1.0.7"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
 checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
 
 
+[[package]]
+name = "foreign-types"
+version = "0.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1"
+dependencies = [
+ "foreign-types-shared 0.1.1",
+]
+
 [[package]]
 [[package]]
 name = "foreign-types"
 name = "foreign-types"
 version = "0.5.0"
 version = "0.5.0"
@@ -767,7 +858,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "d737d9aa519fb7b749cbc3b962edcf310a8dd1f4b67c91c4f83975dbdd17d965"
 checksum = "d737d9aa519fb7b749cbc3b962edcf310a8dd1f4b67c91c4f83975dbdd17d965"
 dependencies = [
 dependencies = [
  "foreign-types-macros",
  "foreign-types-macros",
- "foreign-types-shared",
+ "foreign-types-shared 0.3.1",
 ]
 ]
 
 
 [[package]]
 [[package]]
@@ -781,6 +872,12 @@ dependencies = [
  "syn 2.0.89",
  "syn 2.0.89",
 ]
 ]
 
 
+[[package]]
+name = "foreign-types-shared"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b"
+
 [[package]]
 [[package]]
 name = "foreign-types-shared"
 name = "foreign-types-shared"
 version = "0.3.1"
 version = "0.3.1"
@@ -1524,25 +1621,6 @@ version = "2.10.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "ddc24109865250148c2e0f3d25d4f0f479571723792d3802153c60922a4fb708"
 checksum = "ddc24109865250148c2e0f3d25d4f0f479571723792d3802153c60922a4fb708"
 
 
-[[package]]
-name = "is-docker"
-version = "0.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "928bae27f42bc99b60d9ac7334e3a21d10ad8f1835a4e12ec3ec0464765ed1b3"
-dependencies = [
- "once_cell",
-]
-
-[[package]]
-name = "is-wsl"
-version = "0.4.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "173609498df190136aa7dea1a91db051746d339e18476eed5ca40521f02d7aa5"
-dependencies = [
- "is-docker",
- "once_cell",
-]
-
 [[package]]
 [[package]]
 name = "itoa"
 name = "itoa"
 version = "0.4.8"
 version = "0.4.8"
@@ -1711,6 +1789,12 @@ dependencies = [
  "libc",
  "libc",
 ]
 ]
 
 
+[[package]]
+name = "linux-raw-sys"
+version = "0.4.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89"
+
 [[package]]
 [[package]]
 name = "litemap"
 name = "litemap"
 version = "0.7.3"
 version = "0.7.3"
@@ -1831,6 +1915,23 @@ dependencies = [
  "windows-sys 0.59.0",
  "windows-sys 0.59.0",
 ]
 ]
 
 
+[[package]]
+name = "native-tls"
+version = "0.2.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a8614eb2c83d59d1c8cc974dd3f920198647674a0a035e1af1fa58707e317466"
+dependencies = [
+ "libc",
+ "log",
+ "openssl",
+ "openssl-probe",
+ "openssl-sys",
+ "schannel",
+ "security-framework",
+ "security-framework-sys",
+ "tempfile",
+]
+
 [[package]]
 [[package]]
 name = "ndk"
 name = "ndk"
 version = "0.9.0"
 version = "0.9.0"
@@ -2152,32 +2253,55 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775"
 checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775"
 
 
 [[package]]
 [[package]]
-name = "open"
-version = "5.3.1"
+name = "openssl"
+version = "0.10.68"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3ecd52f0b8d15c40ce4820aa251ed5de032e5d91fab27f7db2f40d42a8bdf69c"
+checksum = "6174bc48f102d208783c2c84bf931bb75927a617866870de8a4ea85597f871f5"
 dependencies = [
 dependencies = [
- "is-wsl",
+ "bitflags 2.6.0",
+ "cfg-if",
+ "foreign-types 0.3.2",
  "libc",
  "libc",
- "pathdiff",
+ "once_cell",
+ "openssl-macros",
+ "openssl-sys",
 ]
 ]
 
 
 [[package]]
 [[package]]
-name = "option-ext"
-version = "0.2.0"
+name = "openssl-macros"
+version = "0.1.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d"
+checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.89",
+]
 
 
 [[package]]
 [[package]]
-name = "os_pipe"
-version = "1.2.1"
+name = "openssl-probe"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf"
+
+[[package]]
+name = "openssl-sys"
+version = "0.9.104"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5ffd2b0a5634335b135d5728d84c5e0fd726954b87111f7506a61c502280d982"
+checksum = "45abf306cbf99debc8195b66b7346498d7b10c210de50418b5ccd7ceba08c741"
 dependencies = [
 dependencies = [
+ "cc",
  "libc",
  "libc",
- "windows-sys 0.59.0",
+ "pkg-config",
+ "vcpkg",
 ]
 ]
 
 
+[[package]]
+name = "option-ext"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d"
+
 [[package]]
 [[package]]
 name = "pango"
 name = "pango"
 version = "0.18.3"
 version = "0.18.3"
@@ -2226,12 +2350,6 @@ dependencies = [
  "windows-targets 0.52.6",
  "windows-targets 0.52.6",
 ]
 ]
 
 
-[[package]]
-name = "pathdiff"
-version = "0.2.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d61c5ce1153ab5b689d0c074c4e7fc613e942dfb7dd9eea5ab202d2ad91fe361"
-
 [[package]]
 [[package]]
 name = "percent-encoding"
 name = "percent-encoding"
 version = "2.3.1"
 version = "2.3.1"
@@ -2702,6 +2820,24 @@ dependencies = [
  "windows-sys 0.52.0",
  "windows-sys 0.52.0",
 ]
 ]
 
 
+[[package]]
+name = "rumqttc"
+version = "0.24.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e1568e15fab2d546f940ed3a21f48bbbd1c494c90c99c4481339364a497f94a9"
+dependencies = [
+ "bytes",
+ "flume",
+ "futures-util",
+ "log",
+ "rustls-native-certs",
+ "rustls-pemfile",
+ "rustls-webpki",
+ "thiserror 1.0.69",
+ "tokio",
+ "tokio-rustls",
+]
+
 [[package]]
 [[package]]
 name = "rustc-demangle"
 name = "rustc-demangle"
 version = "0.1.24"
 version = "0.1.24"
@@ -2717,19 +2853,55 @@ dependencies = [
  "semver",
  "semver",
 ]
 ]
 
 
+[[package]]
+name = "rustix"
+version = "0.38.42"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f93dc38ecbab2eb790ff964bb77fa94faf256fd3e73285fd7ba0903b76bedb85"
+dependencies = [
+ "bitflags 2.6.0",
+ "errno",
+ "libc",
+ "linux-raw-sys",
+ "windows-sys 0.59.0",
+]
+
 [[package]]
 [[package]]
 name = "rustls"
 name = "rustls"
-version = "0.23.18"
+version = "0.22.4"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9c9cc1d47e243d655ace55ed38201c19ae02c148ae56412ab8750e8f0166ab7f"
+checksum = "bf4ef73721ac7bcd79b2b315da7779d8fc09718c6b3d2d1b2d94850eb8c18432"
 dependencies = [
 dependencies = [
- "once_cell",
+ "log",
+ "ring",
  "rustls-pki-types",
  "rustls-pki-types",
  "rustls-webpki",
  "rustls-webpki",
  "subtle",
  "subtle",
  "zeroize",
  "zeroize",
 ]
 ]
 
 
+[[package]]
+name = "rustls-native-certs"
+version = "0.7.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e5bfb394eeed242e909609f56089eecfe5fda225042e8b171791b9c95f5931e5"
+dependencies = [
+ "openssl-probe",
+ "rustls-pemfile",
+ "rustls-pki-types",
+ "schannel",
+ "security-framework",
+]
+
+[[package]]
+name = "rustls-pemfile"
+version = "2.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50"
+dependencies = [
+ "rustls-pki-types",
+]
+
 [[package]]
 [[package]]
 name = "rustls-pki-types"
 name = "rustls-pki-types"
 version = "1.10.0"
 version = "1.10.0"
@@ -2762,6 +2934,15 @@ dependencies = [
  "winapi-util",
  "winapi-util",
 ]
 ]
 
 
+[[package]]
+name = "schannel"
+version = "0.1.27"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1f29ebaa345f945cec9fbbc532eb307f0fdad8161f281b6369539c8d84876b3d"
+dependencies = [
+ "windows-sys 0.59.0",
+]
+
 [[package]]
 [[package]]
 name = "schemars"
 name = "schemars"
 version = "0.8.21"
 version = "0.8.21"
@@ -2795,6 +2976,29 @@ version = "1.2.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
 checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
 
 
+[[package]]
+name = "security-framework"
+version = "2.11.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02"
+dependencies = [
+ "bitflags 2.6.0",
+ "core-foundation 0.9.4",
+ "core-foundation-sys",
+ "libc",
+ "security-framework-sys",
+]
+
+[[package]]
+name = "security-framework-sys"
+version = "2.13.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1863fd3768cd83c56a7f60faa4dc0d403f1b6df0a38c3c25f44b7894e45370d5"
+dependencies = [
+ "core-foundation-sys",
+ "libc",
+]
+
 [[package]]
 [[package]]
 name = "selectors"
 name = "selectors"
 version = "0.22.0"
 version = "0.22.0"
@@ -2972,17 +3176,6 @@ dependencies = [
  "stable_deref_trait",
  "stable_deref_trait",
 ]
 ]
 
 
-[[package]]
-name = "sha1"
-version = "0.10.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba"
-dependencies = [
- "cfg-if",
- "cpufeatures",
- "digest",
-]
-
 [[package]]
 [[package]]
 name = "sha2"
 name = "sha2"
 version = "0.10.8"
 version = "0.10.8"
@@ -2994,16 +3187,6 @@ dependencies = [
  "digest",
  "digest",
 ]
 ]
 
 
-[[package]]
-name = "shared_child"
-version = "1.0.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "09fa9338aed9a1df411814a5b2252f7cd206c55ae9bf2fa763f8de84603aa60c"
-dependencies = [
- "libc",
- "windows-sys 0.59.0",
-]
-
 [[package]]
 [[package]]
 name = "shlex"
 name = "shlex"
 version = "1.3.0"
 version = "1.3.0"
@@ -3055,8 +3238,8 @@ checksum = "18051cdd562e792cad055119e0cdb2cfc137e44e3987532e0f9659a77931bb08"
 dependencies = [
 dependencies = [
  "bytemuck",
  "bytemuck",
  "cfg_aliases",
  "cfg_aliases",
- "core-graphics",
- "foreign-types",
+ "core-graphics 0.24.0",
+ "foreign-types 0.5.0",
  "js-sys",
  "js-sys",
  "log",
  "log",
  "objc2",
  "objc2",
@@ -3100,6 +3283,9 @@ name = "spin"
 version = "0.9.8"
 version = "0.9.8"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67"
 checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67"
+dependencies = [
+ "lock_api",
+]
 
 
 [[package]]
 [[package]]
 name = "stable_deref_trait"
 name = "stable_deref_trait"
@@ -3218,9 +3404,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "6682a07cf5bab0b8a2bd20d0a542917ab928b5edb75ebd4eda6b05cbaab872da"
 checksum = "6682a07cf5bab0b8a2bd20d0a542917ab928b5edb75ebd4eda6b05cbaab872da"
 dependencies = [
 dependencies = [
  "bitflags 2.6.0",
  "bitflags 2.6.0",
- "cocoa",
- "core-foundation",
- "core-graphics",
+ "cocoa 0.26.0",
+ "core-foundation 0.10.0",
+ "core-graphics 0.24.0",
  "crossbeam-channel",
  "crossbeam-channel",
  "dispatch",
  "dispatch",
  "dlopen2",
  "dlopen2",
@@ -3398,43 +3584,22 @@ dependencies = [
 ]
 ]
 
 
 [[package]]
 [[package]]
-name = "tauri-plugin-shell"
-version = "2.0.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0ad7880c5586b6b2104be451e3d7fc0f3800c84bda69e9ba81c828f87cb34267"
-dependencies = [
- "encoding_rs",
- "log",
- "open",
- "os_pipe",
- "regex",
- "schemars",
- "serde",
- "serde_json",
- "shared_child",
- "tauri",
- "tauri-plugin",
- "thiserror 1.0.69",
- "tokio",
-]
-
-[[package]]
-name = "tauri-plugin-websocket"
-version = "2.0.1"
+name = "tauri-plugin-mqtt"
+version = "0.1.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d2793b69e1dd494beed1e0a29865f38bd00011e7ccc35a3cfde8e3939328b790"
+checksum = "0124aaa93ad9a92b0bb172796db3c6f0042a3f3874194b8b91bc989a28bfeb4e"
 dependencies = [
 dependencies = [
- "futures-util",
- "http",
- "log",
- "rand 0.8.5",
+ "anyhow",
+ "debug_print",
+ "lazy_static",
+ "rumqttc",
  "serde",
  "serde",
- "serde_json",
  "tauri",
  "tauri",
  "tauri-plugin",
  "tauri-plugin",
  "thiserror 1.0.69",
  "thiserror 1.0.69",
  "tokio",
  "tokio",
- "tokio-tungstenite",
+ "tokio-native-tls",
+ "url",
 ]
 ]
 
 
 [[package]]
 [[package]]
@@ -3529,6 +3694,19 @@ dependencies = [
  "toml 0.7.8",
  "toml 0.7.8",
 ]
 ]
 
 
+[[package]]
+name = "tempfile"
+version = "3.14.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "28cce251fcbc87fac86a866eeb0d6c2d536fc16d06f184bb61aeae11aa4cee0c"
+dependencies = [
+ "cfg-if",
+ "fastrand",
+ "once_cell",
+ "rustix",
+ "windows-sys 0.59.0",
+]
+
 [[package]]
 [[package]]
 name = "tendril"
 name = "tendril"
 version = "0.4.3"
 version = "0.4.3"
@@ -3544,12 +3722,12 @@ dependencies = [
 name = "test"
 name = "test"
 version = "0.1.0"
 version = "0.1.0"
 dependencies = [
 dependencies = [
+ "cocoa 0.25.0",
  "serde",
  "serde",
  "serde_json",
  "serde_json",
  "tauri",
  "tauri",
  "tauri-build",
  "tauri-build",
- "tauri-plugin-shell",
- "tauri-plugin-websocket",
+ "tauri-plugin-mqtt",
 ]
 ]
 
 
 [[package]]
 [[package]]
@@ -3651,34 +3829,40 @@ dependencies = [
  "mio",
  "mio",
  "pin-project-lite",
  "pin-project-lite",
  "socket2",
  "socket2",
+ "tokio-macros",
  "windows-sys 0.52.0",
  "windows-sys 0.52.0",
 ]
 ]
 
 
 [[package]]
 [[package]]
-name = "tokio-rustls"
-version = "0.26.0"
+name = "tokio-macros"
+version = "2.4.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4"
+checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752"
 dependencies = [
 dependencies = [
- "rustls",
- "rustls-pki-types",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.89",
+]
+
+[[package]]
+name = "tokio-native-tls"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2"
+dependencies = [
+ "native-tls",
  "tokio",
  "tokio",
 ]
 ]
 
 
 [[package]]
 [[package]]
-name = "tokio-tungstenite"
-version = "0.24.0"
+name = "tokio-rustls"
+version = "0.25.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "edc5f74e248dc973e0dbb7b74c7e0d6fcc301c694ff50049504004ef4d0cdcd9"
+checksum = "775e0c0f0adb3a2f22a00c4745d728b479985fc15ee7ca6a2608388c5569860f"
 dependencies = [
 dependencies = [
- "futures-util",
- "log",
  "rustls",
  "rustls",
  "rustls-pki-types",
  "rustls-pki-types",
  "tokio",
  "tokio",
- "tokio-rustls",
- "tungstenite",
- "webpki-roots",
 ]
 ]
 
 
 [[package]]
 [[package]]
@@ -3784,7 +3968,7 @@ version = "0.19.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "d48a05076dd272615d03033bf04f480199f7d1b66a8ac64d75c625fc4a70c06b"
 checksum = "d48a05076dd272615d03033bf04f480199f7d1b66a8ac64d75c625fc4a70c06b"
 dependencies = [
 dependencies = [
- "core-graphics",
+ "core-graphics 0.24.0",
  "crossbeam-channel",
  "crossbeam-channel",
  "dirs",
  "dirs",
  "libappindicator",
  "libappindicator",
@@ -3805,26 +3989,6 @@ version = "0.2.5"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b"
 checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b"
 
 
-[[package]]
-name = "tungstenite"
-version = "0.24.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "18e5b8366ee7a95b16d32197d0b2604b43a0be89dc5fac9f8e96ccafbaedda8a"
-dependencies = [
- "byteorder",
- "bytes",
- "data-encoding",
- "http",
- "httparse",
- "log",
- "rand 0.8.5",
- "rustls",
- "rustls-pki-types",
- "sha1",
- "thiserror 1.0.69",
- "utf-8",
-]
-
 [[package]]
 [[package]]
 name = "typeid"
 name = "typeid"
 version = "1.0.2"
 version = "1.0.2"
@@ -3948,6 +4112,12 @@ dependencies = [
  "serde",
  "serde",
 ]
 ]
 
 
+[[package]]
+name = "vcpkg"
+version = "0.2.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426"
+
 [[package]]
 [[package]]
 name = "version-compare"
 name = "version-compare"
 version = "0.2.0"
 version = "0.2.0"
@@ -4145,15 +4315,6 @@ dependencies = [
  "system-deps",
  "system-deps",
 ]
 ]
 
 
-[[package]]
-name = "webpki-roots"
-version = "0.26.7"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5d642ff16b7e79272ae451b7322067cdc17cadf68c23264be9d94a32319efe7e"
-dependencies = [
- "rustls-pki-types",
-]
-
 [[package]]
 [[package]]
 name = "webview2-com"
 name = "webview2-com"
 version = "0.33.0"
 version = "0.33.0"

+ 4 - 3
src-tauri/Cargo.toml

@@ -18,9 +18,10 @@ crate-type = ["staticlib", "cdylib", "rlib"]
 tauri-build = { version = "2", features = [] }
 tauri-build = { version = "2", features = [] }
 
 
 [dependencies]
 [dependencies]
-tauri = { version = "2", features = [] }
-tauri-plugin-shell = "2"
+tauri = { version = "2", features = ["macos-private-api"] }
 serde = { version = "1", features = ["derive"] }
 serde = { version = "1", features = ["derive"] }
 serde_json = "1"
 serde_json = "1"
-tauri-plugin-websocket = "2"
+tauri-plugin-mqtt = "0.1.0"
 
 
+[target."cfg(target_os = \"macos\")".dependencies]
+cocoa = "0.25"

+ 7 - 2
src-tauri/capabilities/default.json

@@ -7,7 +7,12 @@
   ],
   ],
   "permissions": [
   "permissions": [
     "core:default",
     "core:default",
-    "shell:allow-open",
-    "websocket:default"
+    "core:window:default",
+    "core:window:allow-start-dragging",
+    "core:window:allow-close",
+    "core:window:allow-maximize",
+    "core:window:allow-minimize",
+    "core:window:allow-internal-toggle-maximize",
+    "mqtt:default"
   ]
   ]
 }
 }

+ 5 - 40
src-tauri/src/lib.rs

@@ -1,44 +1,9 @@
-// 模块引用
-use std::{
-    thread::{sleep, spawn},
-    time::Duration,
-};
-use tauri::{Emitter, Window};
-
-// 生成新函数
-#[tauri::command]
-fn greet(name: &str) -> String {
-    format!("Hello, {}! You've been greeted from Rust!", name)
-}
-// 使用derive 生成新的数据结构
-#[derive(Clone, serde::Serialize)]
-struct Payload {
-    message: String,
-}
-
-// 向窗口发送消息
-#[tauri::command]
-fn init_process(window: Window) {
-    spawn(move || loop {
-        window
-            .emit(
-                "event",
-                Payload {
-                    message: "你好".into(),
-                },
-            )
-            .unwrap();
-        sleep(Duration::from_millis(1000));
-    });
-}
-
+use tauri::{generate_context, generate_handler, Builder};
 // 条件编译属性cfg 的属性attr
 // 条件编译属性cfg 的属性attr
-#[cfg_attr(mobile, tauri::mobile_entry_point)]
 pub fn run() {
 pub fn run() {
-    tauri::Builder::default()
-        .plugin(tauri_plugin_websocket::init())
-        .plugin(tauri_plugin_shell::init())
-        .invoke_handler(tauri::generate_handler![greet, init_process])
-        .run(tauri::generate_context!())
+    Builder::default()
+        .plugin(tauri_plugin_mqtt::init())
+        .invoke_handler(generate_handler![])
+        .run(generate_context!())
         .expect("error while running tauri application");
         .expect("error while running tauri application");
 }
 }

+ 7 - 3
src-tauri/tauri.conf.json

@@ -13,13 +13,17 @@
     "windows": [
     "windows": [
       {
       {
         "title": "test",
         "title": "test",
-        "width": 800,
-        "height": 600
+        "center": true,
+        "transparent": true,
+        "decorations": false,
+        "minWidth": 1300,
+        "minHeight": 800
       }
       }
     ],
     ],
     "security": {
     "security": {
       "csp": null
       "csp": null
-    }
+    },
+    "macOSPrivateApi": true
   },
   },
   "bundle": {
   "bundle": {
     "active": true,
     "active": true,

+ 28 - 0
src/App.vue

@@ -25,3 +25,31 @@ const store = useStore()
 const show = computed(() => store.loading)
 const show = computed(() => store.loading)
 const themeOverrides = Theme
 const themeOverrides = Theme
 </script>
 </script>
+<style lang='scss'>
+* {
+  box-sizing: border-box;
+  user-select: none;
+  -webkit-user-select: none;
+}
+
+video,
+#app,
+html,
+body {
+  margin: 0;
+  padding: 0;
+  width: 100%;
+  height: 100%;
+  min-width: 1300px;
+  min-height: 760px;
+  overflow: hidden;
+  border-radius: 13px;
+  background: transparent;
+  position: relative;
+
+  &>div {
+    width: 100%;
+    height: 100%;
+  }
+}
+</style>

File diff suppressed because it is too large
+ 3 - 0
src/assets/icons/audio.svg


+ 1 - 0
src/assets/icons/close.svg

@@ -0,0 +1 @@
+<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1686402246252" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2277" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M548.992 503.744L885.44 167.328a31.968 31.968 0 1 0-45.248-45.248L503.744 458.496 167.328 122.08a31.968 31.968 0 1 0-45.248 45.248l336.416 336.416L122.08 840.16a31.968 31.968 0 1 0 45.248 45.248l336.416-336.416L840.16 885.44a31.968 31.968 0 1 0 45.248-45.248L548.992 503.744z" p-id="2278"></path></svg>

+ 4 - 0
src/assets/icons/gemePad.svg

@@ -0,0 +1,4 @@
+<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg  class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200">
+<path d="M941 469.9c-43.9-197.4-105.9-246.1-143.6-265.6C737 173 666.9 191.2 643.7 203c-26.4 13.3-44.2 38.7-71 49.7-31 12.7-73.2 16.1-104.9 0.8-25.3-12.2-47.6-38.3-78.2-49.9-38.8-14.7-103.5-35.2-167.4 9.7C207 224 99.1 312.6 66.8 589.6c-20 170.8 75.5 225.7 72 223.2 24.6 17.3 79.6 46.4 154.2 0.7 49.8-30.5 90.3-90.9 90.3-90.9s18-33.6 42-47.8c16.9-10.1 42.3-2.4 42.3-2.4h89.7s28.5-3.5 48.4 5.1c19.4 8.3 30.4 28.8 30.4 28.8s59.1 74.9 115.7 113c24.1 16.2 121 34.9 171.1-25 32.5-39.1 54.8-159.6 18.1-324.4z m-479-17.5c0 15-12.2 27.1-27.2 27.1h-67.9v68c0 15-12.2 27.2-27.2 27.2h-20.4c-15 0-27.2-12.1-27.2-27.2v-68h-67.9c-15 0-27.2-12.1-27.2-27.1V432c0-15 12.2-27.2 27.2-27.2h67.9v-67.9c0-15 12.2-27.2 27.2-27.2h20.4c15 0 27.2 12.2 27.2 27.2v67.9h67.9c15 0 27.2 12.1 27.2 27.2v20.4z m191.4 95.1c-28.1 0-50.9-22.8-50.9-51 0-28.1 22.8-50.9 50.9-50.9 28.1 0 50.9 22.8 50.9 50.9 0 28.2-22.8 51-50.9 51z m93.4-113.2c-27.8 0-50.4-22.6-50.4-50.4s22.6-50.3 50.4-50.3c27.8 0 50.4 22.6 50.4 50.3-0.1 27.8-22.6 50.4-50.4 50.4z" ></path>
+</svg>

+ 1 - 0
src/assets/icons/max.svg

@@ -0,0 +1 @@
+<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1686466364777" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3580" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M959.72 0H294.216a63.96 63.96 0 0 0-63.96 63.96v127.92H64.28A63.96 63.96 0 0 0 0.32 255.84V959.4a63.96 63.96 0 0 0 63.96 63.96h703.56a63.96 63.96 0 0 0 63.96-63.96V792.465h127.92a63.96 63.96 0 0 0 63.96-63.96V63.96A63.96 63.96 0 0 0 959.72 0zM767.84 728.505V959.4H64.28V255.84h703.56z m189.322 0H831.8V255.84a63.96 63.96 0 0 0-63.96-63.96H294.216V63.96H959.72z" p-id="3581"></path></svg>

+ 1 - 0
src/assets/icons/maxMin.svg

@@ -0,0 +1 @@
+<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1686466360385" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3440" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M812.3 959.4H213.7c-81.6 0-148-66.4-148-148V212.9c0-81.6 66.4-148 148-148h598.5c81.6 0 148 66.4 148 148v598.5C960.3 893 893.9 959.4 812.3 959.4zM213.7 120.9c-50.7 0-92 41.3-92 92v598.5c0 50.7 41.3 92 92 92h598.5c50.7 0 92-41.3 92-92V212.9c0-50.7-41.3-92-92-92H213.7z" fill="" p-id="3441"></path></svg>

+ 3 - 0
src/assets/icons/mic.svg

@@ -0,0 +1,3 @@
+<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200">
+<path d="M614.84 89.599c85.46-42.521 191.999-23.278 256.64 52.699 62.14 73.011 66.346 175.864 17.175 252.606-12.245 0.043-25.069-2.053-38.196-5.972-52.092-15.542-106.511-58.221-150.317-110.832-43.937-52.727-76.121-114.288-83.697-167.478-1.026-7.244-1.575-14.27-1.605-21.023zM183.277 673.503c-0.65 37.807 18.39 58.627 54.853 64.452l401.174-269.607c-55.417-35.016-102.607-92.76-127.041-153.483L183.277 673.503z m13.099 85.561c-33.353 34.785-43.416 70.844-35.552 97.735 3.21 11.001 9.616 20.502 18.766 27.571 9.687 7.488 22.743 12.42 38.674 13.792 54.361 4.671 135.657-30.433 230.659-136.886C544.402 654.29 630.44 603.529 700.922 591.152c42.649-7.475 80.095-1.257 111.194 15.08 31.084 16.337 55.171 42.664 71.234 75.383 25.069 51.093 30.245 118.177 11.189 186.245l-55.763-15.644c15.181-54.245 11.653-106.495-7.345-145.199-10.67-21.745-26.342-39.05-46.293-49.547-19.967-10.497-44.892-14.328-74.226-9.18-58.727 10.294-132.866 55.373-218.688 151.532-109.184 122.34-208.898 162.143-278.716 156.157-27.469-2.357-50.919-11.61-69.295-25.821-18.94-14.646-32.255-34.396-38.935-57.253-13.287-45.442 0.289-102.78 49.372-153.96l41.726 40.119z m660.039-326.86C791.529 410.72 726.7 360.119 675.794 298.991c-46.351-55.648-82.018-120.955-96.419-181.749-38.096 46.901-53.58 106.986-45.195 164.703 23.306 70.047 83.783 142.568 151.184 173.536 56.502 16.353 118.888 9.021 171.051-23.277z" ></path></svg>

+ 1 - 0
src/assets/icons/min.svg

@@ -0,0 +1 @@
+<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1686402233188" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1312" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M98.23 451.003l829.685-1.992 0.154 64-829.685 1.992z" fill="" p-id="1313"></path></svg>

+ 15 - 0
src/assets/icons/password.svg

@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg width="22px" height="22px" viewBox="0 0 22 22" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+    <title>切片</title>
+    <g id="首页" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
+        <g id="登录页/小尺寸适配" transform="translate(-521.000000, -507.000000)" fill="#D7DAE2">
+            <g id="编组-3" transform="translate(521.000000, 489.000000)">
+                <g id="icon/密码" transform="translate(0.000000, 18.000000)">
+                    <g id="icon/面性/用户" transform="translate(2.750000, 0.000000)">
+                        <path d="M15.1687329,9.22631696 L13.6419037,9.22631696 L13.6419037,5.56573705 C13.6484598,2.5 11.234721,0.00872880628 8.24939907,0 C5.26508568,0.00939825704 2.85177162,2.49860241 2.85570897,5.56330236 L2.85570897,9.2226649 L1.33125064,9.2226649 C0.97703587,9.22363176 0.637720577,9.36914422 0.388031427,9.62715641 C0.138342276,9.8851686 -0.00124277274,10.2345199 8.33833201e-06,10.5982736 L8.33833201e-06,20.6243913 C8.33833201e-06,21.3840195 0.596286273,22 1.33125064,22 L15.1687329,22 C15.5229477,21.9990331 15.862263,21.8535207 16.1119521,21.5955085 C16.3616413,21.3374963 16.5012263,20.9881449 16.4999752,20.6243913 L16.4999752,10.5994909 C16.5002813,10.2357374 16.3597909,9.88677169 16.1094351,9.62944486 C15.8590793,9.37211803 15.5193905,9.22753418 15.1651767,9.22753432 L15.1675475,9.22753432 L15.1687329,9.22631696 Z M8.99740312,15.8742807 L8.99740312,18.0642983 C8.99740532,18.163329 8.91957674,18.2437974 8.82314545,18.2444666 L7.67920898,18.2444666 C7.58192352,18.2444666 7.50269216,18.1641951 7.50139501,18.0642983 L7.50139501,15.8742807 C6.81469059,15.5187423 6.45549943,14.7255585 6.63324412,13.9571866 C6.81098881,13.1888147 7.47917077,12.6462632 8.24821363,12.645861 C9.01510474,12.6498092 9.67994094,13.19175 9.85772301,13.9578514 C10.0355051,14.7239528 9.6801348,15.5155677 8.99740312,15.8742807 L8.99740312,15.8742807 Z M11.5733347,9.22753432 L4.92783235,9.22753432 L4.92783235,5.65582117 C4.92586377,3.76741513 6.41289775,2.2337964 8.25176991,2.22775566 C10.0888693,2.23446601 11.5741215,3.76679864 11.5721492,5.65338645 L11.5721492,9.22753432 L11.5733347,9.22753432 Z" id="形状"></path>
+                    </g>
+                </g>
+            </g>
+        </g>
+    </g>
+</svg>

+ 1 - 0
src/assets/icons/server.svg

@@ -0,0 +1 @@
+<svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="64" height="64"><path d="M938.72 85.28a66.56 66.56 0 0 0-48-16c-42.4 0-102.56 22.72-172.64 64a432 432 0 0 0-585.6 585.6c-60.96 102.88-81.6 185.44-47.2 219.84a66.56 66.56 0 0 0 48 16c42.4 0 102.56-22.72 172.64-64a432 432 0 0 0 585.6-585.6c60.96-102.88 81.6-185.44 47.2-219.84zM133.76 891.36h-1.44c-1.44-18.56 10.08-57.92 39.2-113.6a438.4 438.4 0 0 0 74.56 74.56c-67.36 35.52-102.08 39.04-112.32 39.04zM226.08 688a336 336 0 0 1-32-66.24A330.24 330.24 0 0 1 176 512a335.2 335.2 0 0 1 445.6-317.28 328.8 328.8 0 0 1 66.4 32A338.72 338.72 0 0 1 797.92 336a1751.2 1751.2 0 0 1-211.2 250.4A1763.2 1763.2 0 0 1 336 797.6 338.72 338.72 0 0 1 226.08 688zM512 848a336 336 0 0 1-109.6-18.72A1904 1904 0 0 0 632 632a1889.76 1889.76 0 0 0 197.28-229.6A331.84 331.84 0 0 1 848 512a336 336 0 0 1-336 336z m340.48-601.76a438.4 438.4 0 0 0-74.56-74.56c67.36-35.52 101.76-39.04 112-39.04h1.44c1.76 18.56-9.76 57.92-38.88 113.6z" ></path></svg>

BIN
src/assets/img/bg.png


BIN
src/assets/img/login-left.png


+ 0 - 9
src/assets/naive-theme.ts

@@ -39,15 +39,6 @@ const themeOverrides: GlobalThemeOverrides = {
     fontSizeMedium: '14px',
     fontSizeMedium: '14px',
     fontSizeLarge: '15px',
     fontSizeLarge: '15px',
     fontSizeHuge: '16px'
     fontSizeHuge: '16px'
-  },
-  Icon: {
-    color: 'white'
-  },
-  Tree: {
-    nodeTextColor: '#FFFFFFFF',
-    nodeColorHover: 'rgba(0,0,0,0)',
-    nodeColorPressed: 'rgba(0,0,0,0)',
-    nodeColorActive: 'rgba(0,0,0,0)'
   }
   }
 }
 }
 export default themeOverrides
 export default themeOverrides

+ 59 - 0
src/components/topBar.vue

@@ -0,0 +1,59 @@
+<template>
+  <div
+    class="topBar"
+    data-tauri-drag-region
+  >
+    <div class="topBar-icon" />
+    <div class="topBar-content">
+      <slot />
+    </div>
+    <div class="topBar-btns">
+      <Icon
+        name="min"
+        :size="20"
+        color="#fff"
+        @click="appWindow.minimize()"
+      />
+      <Icon
+        name="close"
+        :size="18"
+        color="#fff"
+        @click="appWindow.close()"
+      />
+    </div>
+  </div>
+</template>
+
+<script setup lang='ts'>
+import { Window } from '@tauri-apps/api/window'
+
+const appWindow = new Window('main')
+
+</script>
+<style lang="scss" scoped>
+.topBar {
+  width: 100%;
+  height: 40px;
+  background: transparent;
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  position: absolute;
+  top: 0;
+  left: 0;
+  z-index: 9;
+  cursor: grabbing;
+
+  &-btns {
+    width: 70px;
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    padding-right: 15px;
+
+    svg {
+      cursor: pointer;
+    }
+  }
+}
+</style>

+ 4 - 2
src/main.ts

@@ -1,7 +1,9 @@
 import { createApp } from 'vue'
 import { createApp } from 'vue'
 import { createPinia } from 'pinia'
 import { createPinia } from 'pinia'
 import piniaPersist from 'pinia-plugin-persist'
 import piniaPersist from 'pinia-plugin-persist'
-import { createRouter, createWebHashHistory, RouteRecordRaw } from 'vue-router'
+import {
+  createRouter, createWebHistory, RouteRecordRaw
+} from 'vue-router'
 import App from '@/App.vue'
 import App from '@/App.vue'
 import naive from '@/assets/native-plugin'
 import naive from '@/assets/native-plugin'
 import Icon from '@/components/icon.vue'
 import Icon from '@/components/icon.vue'
@@ -16,7 +18,7 @@ routes.push({ path: '/:path(.*)', redirect: '/' })
 
 
 const app = createApp(App)
 const app = createApp(App)
 const router = createRouter({
 const router = createRouter({
-  history: createWebHashHistory(),
+  history: createWebHistory(),
   routes
   routes
 })
 })
 app.component('Icon', Icon)
 app.component('Icon', Icon)

+ 2 - 2
src/pages/test/index.vue → src/pages/home/index.vue

@@ -24,6 +24,6 @@ async function test() {
 
 
 </script>
 </script>
 
 
-<style>
+  <style>
 
 
-</style>
+  </style>

+ 1 - 1
src/pages/test/route.ts → src/pages/home/route.ts

@@ -2,7 +2,7 @@ import { RouteRecordRaw } from 'vue-router'
 import home from './index.vue'
 import home from './index.vue'
 
 
 export default {
 export default {
-  path: '/',
+  path: '/home',
   meta: {
   meta: {
     authorize: true
     authorize: true
   },
   },

+ 168 - 0
src/pages/login/index.vue

@@ -0,0 +1,168 @@
+<template>
+  <div class="login">
+    <topBar />
+    <div class="login-content">
+      <div class="login-content-left" />
+      <div class="login-content-right">
+        <p>Hello, 欢迎登录</p>
+        <div>
+          <Icon
+            name="server"
+            :size="25"
+          />
+          <input
+            v-model="url"
+            type="text"
+            placeholder="mqtts://*******"
+            maxlength="50"
+          >
+        </div>
+        <div>
+          <Icon
+            name="username"
+            :size="25"
+          />
+          <input
+            v-model="room"
+            type="text"
+            placeholder="请输入房间"
+            maxlength="20"
+          >
+        </div>
+        <div>
+          <Icon
+            name="password"
+            :size="25"
+          />
+          <input
+            v-model="name"
+            type="text"
+            placeholder="请输入名称"
+            maxlength="20"
+          >
+        </div>
+        <span>{{ err }}</span>
+        <div>
+          <n-button
+            type="info"
+            block
+            :disabled="disabled"
+          >
+            加入
+          </n-button>
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+<script setup lang="ts">
+import { computed, ref } from 'vue'
+import topBar from '@/components/topBar.vue'
+
+const err = ref('')
+const name = ref('')
+const room = ref('')
+const url = ref('')
+const disabled = computed(() => !name.value || !room.value || !url.value || !url.value.includes('mqtts://'))
+
+</script>
+<style scoped lang="scss">
+.login {
+  width: 100%;
+  height: 100%;
+  font-size: 15px;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  background: url(@/assets/img/bg.png) center center no-repeat;
+  background-size: 100% 100%;
+  -webkit-app-region: drag;
+  position: relative;
+
+  &-content {
+    width: 800px;
+    height: 400px;
+    background: white;
+    border-radius: 20px;
+    display: flex;
+    overflow: hidden;
+
+    &-left {
+      width: 500px;
+      background: url(@/assets/img/login-left.png) center center no-repeat;
+      background-size: 100% 100%;
+      -webkit-app-region: drag;
+    }
+
+    &-right {
+      width: 300px;
+      padding: 0 30px;
+      -webkit-app-region: no-drag;
+      overflow: hidden;
+
+      &>p {
+        font-size: 30px;
+        color: #5970C6;
+        text-align: left;
+        font-weight: 400;
+        text-align: center;
+        margin-top: 50px;
+        margin-bottom: 50px;
+      }
+
+      &>div {
+        padding: 10px 0;
+        display: flex;
+        align-items: center;
+
+        &:not(:last-child) {
+          border-bottom: solid 1px #D2D6E7;
+        }
+
+        input {
+          border: none;
+          margin-left: 5px;
+          outline: none;
+          width: 100%;
+          font-size: 15px;
+          color: #333;
+
+          &::placeholder {
+            color: #9DA1A8;
+            font-size: 15px;
+          }
+        }
+
+        // button {
+        //   background: #79b8fa;
+        //   border: none;
+        //   outline: none;
+        //   color: white;
+        //   font-size: 16px;
+        //   font-weight: 500;
+        //   border-radius: 10px;
+        //   margin-top: 40px;
+        //   margin-left: auto;
+        //   line-height: 35px;
+        //   padding: 0 35px;
+        //   cursor: not-allowed;
+        // }
+      }
+
+      &>span {
+        height: 17px;
+        color: red;
+        font-size: 12px;
+        overflow: hidden;
+        display: block;
+        text-overflow: ellipsis;
+      }
+
+      .resetStyle {
+        background: #2d8cf0;
+        cursor: pointer;
+      }
+    }
+  }
+}
+</style>

+ 10 - 0
src/pages/login/route.ts

@@ -0,0 +1,10 @@
+import { RouteRecordRaw } from 'vue-router'
+import login from './index.vue'
+
+export default {
+  path: '/',
+  meta: {
+    authorize: true
+  },
+  component: login
+} as RouteRecordRaw

Some files were not shown because too many files changed in this diff