makeyangcom 7 months ago
parent
commit
03d44f4c48

+ 4 - 1
desktop/framework/config/config.go

@@ -27,7 +27,10 @@ type Data struct {
 func Init(version embed.FS) {
 func Init(version embed.FS) {
 	wails, _ := version.ReadFile("wails.json")
 	wails, _ := version.ReadFile("wails.json")
 	var wailsJson Data
 	var wailsJson Data
-	json.Unmarshal(wails, &wailsJson)
+	err := json.Unmarshal(wails, &wailsJson)
+	if err != nil {
+		return
+	}
 	Get.Info.ProductVersion = wailsJson.Info.ProductVersion
 	Get.Info.ProductVersion = wailsJson.Info.ProductVersion
 	Get.Info.ProductName = wailsJson.Info.ProductName
 	Get.Info.ProductName = wailsJson.Info.ProductName
 	Get.Info.CompanyName = wailsJson.Info.CompanyName
 	Get.Info.CompanyName = wailsJson.Info.CompanyName

+ 5 - 6
desktop/go.mod

@@ -4,7 +4,7 @@ go 1.18
 
 
 require (
 require (
 	github.com/gookit/color v1.5.2
 	github.com/gookit/color v1.5.2
-	github.com/wailsapp/wails/v2 v2.7.1
+	github.com/wailsapp/wails/v2 v2.8.0
 	golang.org/x/sync v0.5.0
 	golang.org/x/sync v0.5.0
 )
 )
 
 
@@ -26,18 +26,17 @@ require (
 	github.com/pkg/errors v0.9.1 // indirect
 	github.com/pkg/errors v0.9.1 // indirect
 	github.com/rivo/uniseg v0.4.4 // indirect
 	github.com/rivo/uniseg v0.4.4 // indirect
 	github.com/samber/lo v1.38.1 // indirect
 	github.com/samber/lo v1.38.1 // indirect
-	github.com/stretchr/testify v1.8.3 // indirect
 	github.com/tkrajina/go-reflector v0.5.6 // indirect
 	github.com/tkrajina/go-reflector v0.5.6 // indirect
 	github.com/valyala/bytebufferpool v1.0.0 // indirect
 	github.com/valyala/bytebufferpool v1.0.0 // indirect
 	github.com/valyala/fasttemplate v1.2.2 // indirect
 	github.com/valyala/fasttemplate v1.2.2 // indirect
 	github.com/wailsapp/go-webview2 v1.0.10 // indirect
 	github.com/wailsapp/go-webview2 v1.0.10 // indirect
 	github.com/wailsapp/mimetype v1.4.1 // indirect
 	github.com/wailsapp/mimetype v1.4.1 // indirect
 	github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778 // indirect
 	github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778 // indirect
-	golang.org/x/crypto v0.14.0 // indirect
+	golang.org/x/crypto v0.18.0 // indirect
 	golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 // indirect
 	golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 // indirect
-	golang.org/x/net v0.17.0 // indirect
-	golang.org/x/sys v0.13.0 // indirect
-	golang.org/x/text v0.13.0 // indirect
+	golang.org/x/net v0.20.0 // indirect
+	golang.org/x/sys v0.16.0 // indirect
+	golang.org/x/text v0.14.0 // indirect
 )
 )
 
 
 // replace github.com/wailsapp/wails/v2 v2.3.1 => C:\Users\admin\go\pkg\mod
 // replace github.com/wailsapp/wails/v2 v2.3.1 => C:\Users\admin\go\pkg\mod

+ 11 - 12
desktop/go.sum

@@ -53,8 +53,7 @@ github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSS
 github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
 github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
 github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
 github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
 github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
 github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
-github.com/stretchr/testify v1.8.3 h1:RP3t2pwF7cMEbC1dqtB6poj3niw/9gnV4Cjg5oW5gtY=
-github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
+github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
 github.com/tkrajina/go-reflector v0.5.6 h1:hKQ0gyocG7vgMD2M3dRlYN6WBBOmdoOzJ6njQSepKdE=
 github.com/tkrajina/go-reflector v0.5.6 h1:hKQ0gyocG7vgMD2M3dRlYN6WBBOmdoOzJ6njQSepKdE=
 github.com/tkrajina/go-reflector v0.5.6/go.mod h1:ECbqLgccecY5kPmPmXg1MrHW585yMcDkVl6IvJe64T4=
 github.com/tkrajina/go-reflector v0.5.6/go.mod h1:ECbqLgccecY5kPmPmXg1MrHW585yMcDkVl6IvJe64T4=
 github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=
 github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=
@@ -66,17 +65,17 @@ github.com/wailsapp/go-webview2 v1.0.10 h1:PP5Hug6pnQEAhfRzLCoOh2jJaPdrqeRgJKZhy
 github.com/wailsapp/go-webview2 v1.0.10/go.mod h1:Uk2BePfCRzttBBjFrBmqKGJd41P6QIHeV9kTgIeOZNo=
 github.com/wailsapp/go-webview2 v1.0.10/go.mod h1:Uk2BePfCRzttBBjFrBmqKGJd41P6QIHeV9kTgIeOZNo=
 github.com/wailsapp/mimetype v1.4.1 h1:pQN9ycO7uo4vsUUuPeHEYoUkLVkaRntMnHJxVwYhwHs=
 github.com/wailsapp/mimetype v1.4.1 h1:pQN9ycO7uo4vsUUuPeHEYoUkLVkaRntMnHJxVwYhwHs=
 github.com/wailsapp/mimetype v1.4.1/go.mod h1:9aV5k31bBOv5z6u+QP8TltzvNGJPmNJD4XlAL3U+j3o=
 github.com/wailsapp/mimetype v1.4.1/go.mod h1:9aV5k31bBOv5z6u+QP8TltzvNGJPmNJD4XlAL3U+j3o=
-github.com/wailsapp/wails/v2 v2.7.1 h1:HAzp2c5ODOzsLC6ZMDVtNOB72ozM7/SJecJPB2Ur+UU=
-github.com/wailsapp/wails/v2 v2.7.1/go.mod h1:oIJVwwso5fdOgprBYWXBBqtx6PaSvxg8/KTQHNGkadc=
+github.com/wailsapp/wails/v2 v2.8.0 h1:b2NNn99uGPiN6P5bDsnPwOJZWtAOUhNLv7Vl+YxMTr4=
+github.com/wailsapp/wails/v2 v2.8.0/go.mod h1:EFUGWkUX3KofO4fmKR/GmsLy3HhPH7NbyOEaMt8lBF0=
 github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778 h1:QldyIu/L63oPpyvQmHgvgickp1Yw510KJOqX7H24mg8=
 github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778 h1:QldyIu/L63oPpyvQmHgvgickp1Yw510KJOqX7H24mg8=
 github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778/go.mod h1:2MuV+tbUrU1zIOPMxZ5EncGwgmMJsa+9ucAQZXxsObs=
 github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778/go.mod h1:2MuV+tbUrU1zIOPMxZ5EncGwgmMJsa+9ucAQZXxsObs=
-golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc=
-golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4=
+golang.org/x/crypto v0.18.0 h1:PGVlW0xEltQnzFZ55hkuX5+KLyrMYhHld1YHO4AKcdc=
+golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg=
 golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 h1:k/i9J1pBpvlfR+9QsetwPyERsqu1GIbi967PQMq3Ivc=
 golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 h1:k/i9J1pBpvlfR+9QsetwPyERsqu1GIbi967PQMq3Ivc=
 golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1/go.mod h1:V1LtkGg67GoY2N1AnLN78QLrzxkLyJw7RJb1gzOOz9w=
 golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1/go.mod h1:V1LtkGg67GoY2N1AnLN78QLrzxkLyJw7RJb1gzOOz9w=
 golang.org/x/net v0.0.0-20210505024714-0287a6fb4125/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
 golang.org/x/net v0.0.0-20210505024714-0287a6fb4125/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
-golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM=
-golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE=
+golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo=
+golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY=
 golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE=
 golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE=
 golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
 golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
 golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@@ -90,12 +89,12 @@ golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBc
 golang.org/x/sys v0.0.0-20211103235746-7861aae1554b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/sys v0.0.0-20211103235746-7861aae1554b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE=
-golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU=
+golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
 golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
 golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
 golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
 golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
-golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k=
-golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
+golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
+golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
 golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
 golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
 gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
 gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
 gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
 gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

+ 16 - 0
desktop/template/components.json

@@ -0,0 +1,16 @@
+{
+    "$schema": "https://shadcn-vue.com/schema.json",
+    "style": "default",
+    "typescript": true,
+    "tailwind": {
+        "config": "tailwind.config.js",
+        "css": "src/assets/css/globals.css",
+        "baseColor": "slate",
+        "cssVariables": true
+    },
+    "framework": "vite",
+    "aliases": {
+        "components": "@/component",
+        "utils": "@/package/lib/utils"
+    }
+}

+ 13 - 1
desktop/template/package.json

@@ -14,18 +14,30 @@
     "dependencies": {
     "dependencies": {
         "@element-plus/icons": "^0.0.11",
         "@element-plus/icons": "^0.0.11",
         "@element-plus/icons-vue": "^2.0.9",
         "@element-plus/icons-vue": "^2.0.9",
+        "@radix-ui/react-slot": "^1.0.2",
         "axios": "^0.27.2",
         "axios": "^0.27.2",
+        "class-variance-authority": "^0.7.0",
+        "clsx": "^2.1.0",
         "element-plus": "2.3.7",
         "element-plus": "2.3.7",
+        "lucide-react": "^0.365.0",
+        "lucide-vue-next": "^0.365.0",
+        "radix-vue": "^1.6.2",
+        "tailwind-merge": "^2.2.2",
+        "tailwindcss-animate": "^1.0.7",
         "uuid": "^9.0.0",
         "uuid": "^9.0.0",
         "vue": "3.2.37",
         "vue": "3.2.37",
         "vue-router": "4.1.5"
         "vue-router": "4.1.5"
     },
     },
     "devDependencies": {
     "devDependencies": {
         "@babel/types": "^7.18.10",
         "@babel/types": "^7.18.10",
-        "@types/react": "^18.2.56",
         "@types/node": "^18.11.18",
         "@types/node": "^18.11.18",
+        "@types/react": "^18.2.56",
+        "@vitejs/plugin-react": "^4.2.1",
         "@vitejs/plugin-vue": "^3.0.3",
         "@vitejs/plugin-vue": "^3.0.3",
         "@vue/tsconfig": "0.1.3",
         "@vue/tsconfig": "0.1.3",
+        "autoprefixer": "^10.4.19",
+        "tailwindcss": "^3.4.3",
+        "postcss": "latest",
         "typescript": "4.6.4",
         "typescript": "4.6.4",
         "vite": "3.0.7",
         "vite": "3.0.7",
         "vue-tsc": "0.39.5"
         "vue-tsc": "0.39.5"

+ 1 - 1
desktop/template/package.json.md5

@@ -1 +1 @@
-d24d6b406b5af24715d4d957ed80e892
+b675ea4ecb792710e5c6c1ecae1ddf7b

+ 6 - 0
desktop/template/postcss.config.js

@@ -0,0 +1,6 @@
+module.exports = {
+    plugins: {
+        tailwindcss: {},
+        autoprefixer: {},
+    }
+}

+ 2 - 1
desktop/template/src/app.vue

@@ -32,5 +32,6 @@ export default defineComponent({
 </script>
 </script>
 
 
 <style>
 <style>
-@import "./assets/css/base.scss";
+@import "./assets/css/base.css";
+@import "./assets/css/globals.css";
 </style>
 </style>

+ 76 - 0
desktop/template/src/assets/css/base.css

@@ -0,0 +1,76 @@
+@charset "UTF-8";
+
+@tailwind base;
+@tailwind components;
+@tailwind utilities;
+
+@layer base {
+    :root {
+        --background: 0 0% 100%;
+        --foreground: 240 10% 3.9%;
+
+        --card: 0 0% 100%;
+        --card-foreground: 240 10% 3.9%;
+
+        --popover: 0 0% 100%;
+        --popover-foreground: 240 10% 3.9%;
+
+        --primary: 240 5.9% 10%;
+        --primary-foreground: 0 0% 98%;
+
+        --secondary: 240 4.8% 95.9%;
+        --secondary-foreground: 240 5.9% 10%;
+        --muted: 240 4.8% 95.9%;
+        --muted-foreground: 240 3.8% 46.1%;
+        --accent: 240 4.8% 95.9%;
+        --accent-foreground: 240 5.9% 10%;
+
+        --destructive: 0 84.2% 60.2%;
+        --destructive-foreground: 0 0% 98%;
+
+        --border:240 5.9% 90%;
+        --input:240 5.9% 90%;
+        --ring:240 5.9% 10%;
+        --radius: 0.5rem;
+    }
+
+    .dark {
+        --background:240 10% 3.9%;
+        --foreground:0 0% 98%;
+
+        --card:240 10% 3.9%;
+        --card-foreground:0 0% 98%;
+
+        --popover:240 10% 3.9%;
+        --popover-foreground:0 0% 98%;
+
+        --primary:0 0% 98%;
+        --primary-foreground:240 5.9% 10%;
+
+        --secondary:240 3.7% 15.9%;
+        --secondary-foreground:0 0% 98%;
+
+        --muted:240 3.7% 15.9%;
+        --muted-foreground:240 5% 64.9%;
+
+        --accent:240 3.7% 15.9%;
+        --accent-foreground:0 0% 98%;
+
+        --destructive:0 62.8% 30.6%;
+        --destructive-foreground:0 0% 98%;
+
+        --border:240 3.7% 15.9%;
+        --input:240 3.7% 15.9%;
+        --ring:240 4.9% 83.9%;
+    }
+}
+
+
+@layer base {
+    * {
+        @apply border-border;
+    }
+    body {
+        @apply bg-background text-foreground;
+    }
+}

+ 0 - 55
desktop/template/src/assets/css/base.scss

@@ -1,55 +0,0 @@
-@charset "UTF-8";
-
-* {
-    box-sizing: border-box;
-    -webkit-tap-highlight-color: transparent;
-    -webkit-appearance: none;
-    -webkit-touch-callout: none;
-    outline: none;
-    user-select: none;
-    margin: 0;
-    padding: 0;
-}
-
-body {
-    font-family: Inter, sans-serif;
-    font-feature-settings: "tnum";
-    font-variant: tabular-nums;
-    -webkit-font-smoothing: antialiased;
-    font-size: 12px;
-    color: #666666;
-}
-
-ul li, ol li {
-    list-style: none;
-}
-
-::-webkit-scrollbar {
-    width: 3px;
-    height: 3px;
-}
-::-webkit-scrollbar-thumb {
-    border-radius: 0;
-    box-shadow: inset 0 0 3px rgba(68, 68, 71, 1);
-    background: rgba(68, 68, 71, .5);
-}
-::-webkit-scrollbar-track{
-    box-shadow: none;
-    border-radius: 0;
-    background: rgba(68, 68, 71, 0);
-}
-
-*:focus {
-    outline: none !important;
-}
-
-.page-main{
-    width: 100%;
-    height: 100%;
-    position: fixed;
-    z-index: 1;
-    top: 0;
-    left: 0;
-    right: 0;
-    bottom: 0;
-}

+ 0 - 0
desktop/template/src/assets/css/globals.css


+ 26 - 0
desktop/template/src/component/ui/button/Button.vue

@@ -0,0 +1,26 @@
+<script setup lang="ts">
+import type { HTMLAttributes } from 'vue'
+import { Primitive, type PrimitiveProps } from 'radix-vue'
+import { type ButtonVariants, buttonVariants } from '.'
+import { cn } from '@/package/lib/utils'
+
+interface Props extends PrimitiveProps {
+  variant?: ButtonVariants['variant']
+  size?: ButtonVariants['size']
+  class?: HTMLAttributes['class']
+}
+
+const props = withDefaults(defineProps<Props>(), {
+  as: 'button',
+})
+</script>
+
+<template>
+  <Primitive
+    :as="as"
+    :as-child="asChild"
+    :class="cn(buttonVariants({ variant, size }), props.class)"
+  >
+    <slot />
+  </Primitive>
+</template>

+ 34 - 0
desktop/template/src/component/ui/button/index.ts

@@ -0,0 +1,34 @@
+import { type VariantProps, cva } from 'class-variance-authority'
+
+export { default as Button } from './Button.vue'
+
+export const buttonVariants = cva(
+  'inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50',
+  {
+    variants: {
+      variant: {
+        default: 'bg-primary text-primary-foreground hover:bg-primary/90',
+        destructive:
+          'bg-destructive text-destructive-foreground hover:bg-destructive/90',
+        outline:
+          'border border-input bg-background hover:bg-accent hover:text-accent-foreground',
+        secondary:
+          'bg-secondary text-secondary-foreground hover:bg-secondary/80',
+        ghost: 'hover:bg-accent hover:text-accent-foreground',
+        link: 'text-primary underline-offset-4 hover:underline',
+      },
+      size: {
+        default: 'h-10 px-4 py-2',
+        sm: 'h-9 rounded-md px-3',
+        lg: 'h-11 rounded-md px-8',
+        icon: 'h-10 w-10',
+      },
+    },
+    defaultVariants: {
+      variant: 'default',
+      size: 'default',
+    },
+  },
+)
+
+export type ButtonVariants = VariantProps<typeof buttonVariants>

+ 0 - 9
desktop/template/src/main.ts

@@ -1,18 +1,9 @@
 import {createApp} from "vue";
 import {createApp} from "vue";
 import App from "./app.vue";
 import App from "./app.vue";
 import {router} from "./router";
 import {router} from "./router";
-import ElementPlus from "element-plus";
-import "element-plus/dist/index.css";
-import * as ElIcons from "@element-plus/icons-vue";
 
 
 const app = createApp(App);
 const app = createApp(App);
 
 
-app.use(ElementPlus, {zIndex: 90000});
-
-for (const [key, component] of Object.entries(ElIcons)) {
-    app.component(key, component);
-}
-
 app.use(router);
 app.use(router);
 
 
 app.directive("resize", {
 app.directive("resize", {

+ 6 - 0
desktop/template/src/package/lib/utils.ts

@@ -0,0 +1,6 @@
+import { type ClassValue, clsx } from "clsx";
+import { twMerge } from "tailwind-merge";
+
+export function cn(...inputs: ClassValue[]) {
+    return twMerge(clsx(inputs))
+}

+ 8 - 2
desktop/template/src/windows/start.vue

@@ -1,16 +1,22 @@
 <template>
 <template>
-    <div>Hello</div>
+    <div style="padding: 20px"><Button disabled><Loader2 class="w-4 h-4 mr-2 animate-spin" />Button</Button></div>
 </template>
 </template>
 
 
 <script lang="ts">
 <script lang="ts">
 import {defineComponent, nextTick, onBeforeMount, onBeforeUnmount, onMounted, onUnmounted} from "vue";
 import {defineComponent, nextTick, onBeforeMount, onBeforeUnmount, onMounted, onUnmounted} from "vue";
 import {ElLoading, ElMessage, ElNotification} from "element-plus";
 import {ElLoading, ElMessage, ElNotification} from "element-plus";
 import * as icons from "@element-plus/icons";
 import * as icons from "@element-plus/icons";
+import { Button } from "@/component/ui/button";
+import { Mail, Loader2 } from 'lucide-vue-next'
 export default defineComponent({
 export default defineComponent({
     name: "Start",
     name: "Start",
     emits: [],
     emits: [],
     props: ["cnc"],
     props: ["cnc"],
-    components: {},
+    components: {
+        Button,
+        Mail,
+        Loader2
+    },
     setup(props, context) {
     setup(props, context) {
 
 
         onBeforeMount(() => {
         onBeforeMount(() => {

+ 93 - 0
desktop/template/tailwind.config.js

@@ -0,0 +1,93 @@
+const animate = require("tailwindcss-animate")
+
+/** @type {import('tailwindcss').Config} */
+module.exports = {
+    darkMode: ["class"],
+    safelist: ["dark"],
+    prefix: "",
+
+    content: [
+        './pages/**/*.{ts,tsx,vue}',
+        './components/**/*.{ts,tsx,vue}',
+        './app/**/*.{ts,tsx,vue}',
+        './src/**/*.{ts,tsx,vue}',
+    ],
+
+    theme: {
+        container: {
+            center: true,
+            padding: "2rem",
+            screens: {
+                "2xl": "1400px",
+            },
+        },
+        extend: {
+            colors: {
+                border: "hsl(var(--border))",
+                input: "hsl(var(--input))",
+                ring: "hsl(var(--ring))",
+                background: "hsl(var(--background))",
+                foreground: "hsl(var(--foreground))",
+                primary: {
+                    DEFAULT: "hsl(var(--primary))",
+                    foreground: "hsl(var(--primary-foreground))",
+                },
+                secondary: {
+                    DEFAULT: "hsl(var(--secondary))",
+                    foreground: "hsl(var(--secondary-foreground))",
+                },
+                destructive: {
+                    DEFAULT: "hsl(var(--destructive))",
+                    foreground: "hsl(var(--destructive-foreground))",
+                },
+                muted: {
+                    DEFAULT: "hsl(var(--muted))",
+                    foreground: "hsl(var(--muted-foreground))",
+                },
+                accent: {
+                    DEFAULT: "hsl(var(--accent))",
+                    foreground: "hsl(var(--accent-foreground))",
+                },
+                popover: {
+                    DEFAULT: "hsl(var(--popover))",
+                    foreground: "hsl(var(--popover-foreground))",
+                },
+                card: {
+                    DEFAULT: "hsl(var(--card))",
+                    foreground: "hsl(var(--card-foreground))",
+                },
+            },
+            borderRadius: {
+                xl: "calc(var(--radius) + 4px)",
+                lg: "var(--radius)",
+                md: "calc(var(--radius) - 2px)",
+                sm: "calc(var(--radius) - 4px)",
+            },
+            keyframes: {
+                "accordion-down": {
+                    from: { height: 0 },
+                    to: { height: "var(--radix-accordion-content-height)" },
+                },
+                "accordion-up": {
+                    from: { height: "var(--radix-accordion-content-height)" },
+                    to: { height: 0 },
+                },
+                "collapsible-down": {
+                    from: { height: 0 },
+                    to: { height: 'var(--radix-collapsible-content-height)' },
+                },
+                "collapsible-up": {
+                    from: { height: 'var(--radix-collapsible-content-height)' },
+                    to: { height: 0 },
+                },
+            },
+            animation: {
+                "accordion-down": "accordion-down 0.2s ease-out",
+                "accordion-up": "accordion-up 0.2s ease-out",
+                "collapsible-down": "collapsible-down 0.2s ease-in-out",
+                "collapsible-up": "collapsible-up 0.2s ease-in-out",
+            },
+        },
+    },
+    plugins: [animate],
+}

+ 6 - 1
desktop/template/tsconfig.json

@@ -17,7 +17,12 @@
         "types": [
         "types": [
             "node"
             "node"
         ],
         ],
-        "skipLibCheck": true
+        "skipLibCheck": true,
+        "paths": {
+            "@/*": [
+                "./src/*"
+            ]
+        }
     },
     },
     "include": [
     "include": [
         "src/**/*.ts",
         "src/**/*.ts",

+ 14 - 1
desktop/template/vite.config.ts

@@ -1,5 +1,8 @@
-import { defineConfig } from "vite";
+import path from "path";
+import tailwind from "tailwindcss";
+import autoprefixer from "autoprefixer";
 import vue from "@vitejs/plugin-vue";
 import vue from "@vitejs/plugin-vue";
+import { defineConfig } from "vite";
 
 
 export default defineConfig({
 export default defineConfig({
     server: {
     server: {
@@ -14,4 +17,14 @@ export default defineConfig({
     optimizeDeps: {
     optimizeDeps: {
         exclude: ["punycode"]
         exclude: ["punycode"]
     },
     },
+    css: {
+        postcss: {
+            plugins: [tailwind(), autoprefixer()],
+        },
+    },
+    resolve: {
+        alias: {
+            "@": path.resolve(__dirname, "./src"),
+        },
+    },
 })
 })

+ 31 - 5
game/scenes/launch/launch.tscn

@@ -1,4 +1,4 @@
-[gd_scene load_steps=25 format=3 uid="uid://i6g3y6btijjm"]
+[gd_scene load_steps=26 format=3 uid="uid://i6g3y6btijjm"]
 
 
 [ext_resource type="Script" path="res://scripts/launch/launch.gd" id="1_4mmer"]
 [ext_resource type="Script" path="res://scripts/launch/launch.gd" id="1_4mmer"]
 [ext_resource type="Texture2D" uid="uid://d05rp7emahb2e" path="res://assets/launch/background.jpeg" id="1_5xji2"]
 [ext_resource type="Texture2D" uid="uid://d05rp7emahb2e" path="res://assets/launch/background.jpeg" id="1_5xji2"]
@@ -22,6 +22,7 @@
 [ext_resource type="Texture2D" uid="uid://bff7ga8f5lquw" path="res://assets/launch/login/cancel_button_0.png" id="17_1wujc"]
 [ext_resource type="Texture2D" uid="uid://bff7ga8f5lquw" path="res://assets/launch/login/cancel_button_0.png" id="17_1wujc"]
 [ext_resource type="Texture2D" uid="uid://06rsvnelh6ug" path="res://assets/launch/login/cancel_button_1.png" id="18_odk15"]
 [ext_resource type="Texture2D" uid="uid://06rsvnelh6ug" path="res://assets/launch/login/cancel_button_1.png" id="18_odk15"]
 [ext_resource type="Texture2D" uid="uid://cbdi6fpcw3q66" path="res://assets/launch/login/cancel_button_2.png" id="19_m2fqs"]
 [ext_resource type="Texture2D" uid="uid://cbdi6fpcw3q66" path="res://assets/launch/login/cancel_button_2.png" id="19_m2fqs"]
+[ext_resource type="Texture2D" uid="uid://dkvmumemt6bq6" path="res://assets/launch/server/server.png" id="23_j3a1k"]
 
 
 [sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_m6v8k"]
 [sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_m6v8k"]
 
 
@@ -413,7 +414,6 @@ placeholder_text = "请设置密保问题答案"
 flat = true
 flat = true
 
 
 [node name="ChangePassword" type="Control" parent="Login"]
 [node name="ChangePassword" type="Control" parent="Login"]
-visible = false
 layout_mode = 1
 layout_mode = 1
 anchors_preset = 15
 anchors_preset = 15
 anchor_right = 1.0
 anchor_right = 1.0
@@ -547,9 +547,35 @@ placeholder_text = "请再次输入新的密码"
 flat = true
 flat = true
 
 
 [node name="Server" type="Control" parent="."]
 [node name="Server" type="Control" parent="."]
-anchors_preset = 0
-offset_right = 40.0
-offset_bottom = 40.0
+layout_mode = 1
+anchors_preset = 15
+anchor_right = 1.0
+anchor_bottom = 1.0
+grow_horizontal = 2
+grow_vertical = 2
+
+[node name="Main" type="Control" parent="Server"]
+layout_mode = 1
+anchors_preset = 15
+anchor_right = 1.0
+anchor_bottom = 1.0
+grow_horizontal = 2
+grow_vertical = 2
+
+[node name="Background" type="TextureRect" parent="Server/Main"]
+layout_mode = 1
+anchors_preset = 8
+anchor_left = 0.5
+anchor_top = 0.5
+anchor_right = 0.5
+anchor_bottom = 0.5
+offset_left = -137.0
+offset_top = -211.5
+offset_right = 137.0
+offset_bottom = 211.5
+grow_horizontal = 2
+grow_vertical = 2
+texture = ExtResource("23_j3a1k")
 
 
 [node name="Role" type="Control" parent="."]
 [node name="Role" type="Control" parent="."]
 anchors_preset = 0
 anchors_preset = 0