diff --git a/frontend/bindings/mesh-drop/internal/config/config.ts b/frontend/bindings/mesh-drop/internal/config/config.ts index eaafb87..ff10861 100644 --- a/frontend/bindings/mesh-drop/internal/config/config.ts +++ b/frontend/bindings/mesh-drop/internal/config/config.ts @@ -5,6 +5,10 @@ // @ts-ignore: Unused imports import { Call as $Call, CancellablePromise as $CancellablePromise, Create as $Create } from "@wailsio/runtime"; +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore: Unused imports +import * as $models from "./models.js"; + export function GetAutoAccept(): $CancellablePromise { return $Call.ByID(2605668438); } @@ -29,6 +33,12 @@ export function GetVersion(): $CancellablePromise { return $Call.ByID(3578438023); } +export function GetWindowState(): $CancellablePromise<$models.WindowState> { + return $Call.ByID(341414414).then(($result: any) => { + return $$createType0($result); + }); +} + /** * Save 保存配置到磁盘 */ @@ -54,3 +64,10 @@ export function SetSaveHistory(saveHistory: boolean): $CancellablePromise export function SetSavePath(savePath: string): $CancellablePromise { return $Call.ByID(3805718491, savePath); } + +export function SetWindowState(state: $models.WindowState): $CancellablePromise { + return $Call.ByID(4007191514, state); +} + +// Private type creation functions +const $$createType0 = $models.WindowState.createFrom; diff --git a/frontend/bindings/mesh-drop/internal/config/index.ts b/frontend/bindings/mesh-drop/internal/config/index.ts index ec844f7..0425068 100644 --- a/frontend/bindings/mesh-drop/internal/config/index.ts +++ b/frontend/bindings/mesh-drop/internal/config/index.ts @@ -5,3 +5,7 @@ import * as Config from "./config.js"; export { Config }; + +export { + WindowState +} from "./models.js"; diff --git a/frontend/bindings/mesh-drop/internal/config/models.ts b/frontend/bindings/mesh-drop/internal/config/models.ts new file mode 100644 index 0000000..ee7b617 --- /dev/null +++ b/frontend/bindings/mesh-drop/internal/config/models.ts @@ -0,0 +1,46 @@ +// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL +// This file is automatically generated. DO NOT EDIT + +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore: Unused imports +import { Create as $Create } from "@wailsio/runtime"; + +/** + * WindowState 定义窗口状态 + */ +export class WindowState { + "Width": number; + "Height": number; + "X": number; + "Y": number; + "Maximised": boolean; + + /** Creates a new WindowState instance. */ + constructor($$source: Partial = {}) { + if (!("Width" in $$source)) { + this["Width"] = 0; + } + if (!("Height" in $$source)) { + this["Height"] = 0; + } + if (!("X" in $$source)) { + this["X"] = 0; + } + if (!("Y" in $$source)) { + this["Y"] = 0; + } + if (!("Maximised" in $$source)) { + this["Maximised"] = false; + } + + Object.assign(this, $$source); + } + + /** + * Creates a new WindowState instance from a string or object. + */ + static createFrom($$source: any = {}): WindowState { + let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source; + return new WindowState($$parsedSource as Partial); + } +} diff --git a/frontend/components.d.ts b/frontend/components.d.ts index a82cadf..40072bb 100644 --- a/frontend/components.d.ts +++ b/frontend/components.d.ts @@ -11,8 +11,11 @@ export {} /* prettier-ignore */ declare module 'vue' { export interface GlobalComponents { + FileSendModal: typeof import('./src/components/modals/FileSendModal.vue')['default'] MainLayout: typeof import('./src/components/MainLayout.vue')['default'] PeerCard: typeof import('./src/components/PeerCard.vue')['default'] + SettingsView: typeof import('./src/components/SettingsView.vue')['default'] + TextSendModal: typeof import('./src/components/modals/TextSendModal.vue')['default'] TransferItem: typeof import('./src/components/TransferItem.vue')['default'] } } diff --git a/frontend/index.html b/frontend/index.html index 063c49a..e4011f6 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -5,6 +5,7 @@ Mesh Drop + diff --git a/frontend/package-lock.json b/frontend/package-lock.json index b722c0c..0f1ac1e 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -20,7 +20,9 @@ "@vitejs/plugin-vue": "^6.0.1", "@vue/tsconfig": "^0.8.1", "npm-run-all2": "^8.0.4", + "sass": "^1.97.3", "sass-embedded": "^1.92.1", + "sass-loader": "^16.0.6", "typescript": "~5.9.2", "unplugin-fonts": "^1.4.0", "unplugin-vue-components": "^29.0.0", @@ -1543,8 +1545,8 @@ "version": "4.0.3", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", + "devOptional": true, "license": "MIT", - "optional": true, "dependencies": { "readdirp": "^4.0.1" }, @@ -2013,6 +2015,13 @@ "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" } }, + "node_modules/neo-async": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "dev": true, + "license": "MIT" + }, "node_modules/node-addon-api": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-7.1.1.tgz", @@ -2219,8 +2228,8 @@ "version": "4.1.2", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", + "devOptional": true, "license": "MIT", - "optional": true, "engines": { "node": ">= 14.18.0" }, @@ -2323,8 +2332,8 @@ "version": "1.97.3", "resolved": "https://registry.npmjs.org/sass/-/sass-1.97.3.tgz", "integrity": "sha512-fDz1zJpd5GycprAbu4Q2PV/RprsRtKC/0z82z0JLgdytmcq0+ujJbJ/09bPGDxCLkKY3Np5cRAOcWiVkLXJURg==", + "devOptional": true, "license": "MIT", - "optional": true, "dependencies": { "chokidar": "^4.0.0", "immutable": "^5.0.2", @@ -2670,6 +2679,47 @@ "node": ">=14.0.0" } }, + "node_modules/sass-loader": { + "version": "16.0.6", + "resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-16.0.6.tgz", + "integrity": "sha512-sglGzId5gmlfxNs4gK2U3h7HlVRfx278YK6Ono5lwzuvi1jxig80YiuHkaDBVsYIKFhx8wN7XSCI0M2IDS/3qA==", + "dev": true, + "license": "MIT", + "dependencies": { + "neo-async": "^2.6.2" + }, + "engines": { + "node": ">= 18.12.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "@rspack/core": "0.x || 1.x", + "node-sass": "^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0 || ^9.0.0", + "sass": "^1.3.0", + "sass-embedded": "*", + "webpack": "^5.0.0" + }, + "peerDependenciesMeta": { + "@rspack/core": { + "optional": true + }, + "node-sass": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "webpack": { + "optional": true + } + } + }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", diff --git a/frontend/package.json b/frontend/package.json index 0ffc3d8..1f8bb3e 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -24,7 +24,9 @@ "@vitejs/plugin-vue": "^6.0.1", "@vue/tsconfig": "^0.8.1", "npm-run-all2": "^8.0.4", + "sass": "^1.97.3", "sass-embedded": "^1.92.1", + "sass-loader": "^16.0.6", "typescript": "~5.9.2", "unplugin-fonts": "^1.4.0", "unplugin-vue-components": "^29.0.0", diff --git a/frontend/src/App.vue b/frontend/src/App.vue index b83f08f..97724aa 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -8,8 +8,4 @@ import MainLayout from "./components/MainLayout.vue"; - + diff --git a/frontend/src/components/MainLayout.vue b/frontend/src/components/MainLayout.vue index 8db08a8..43cefa1 100644 --- a/frontend/src/components/MainLayout.vue +++ b/frontend/src/components/MainLayout.vue @@ -1,79 +1,28 @@ - - - - -
- -
- Click to select files -
-
+ + -
- - - - - - - - Add more files - -
-
- - - - Cancel - - Send {{ fileList.length > 0 ? `(${fileList.length})` : "" }} - - -
-
- - - - - - - - - - Cancel - - Send - - - - + - - diff --git a/frontend/src/components/SettingsView.vue b/frontend/src/components/SettingsView.vue new file mode 100644 index 0000000..a6c200d --- /dev/null +++ b/frontend/src/components/SettingsView.vue @@ -0,0 +1,119 @@ + + + diff --git a/frontend/src/components/TransferItem.vue b/frontend/src/components/TransferItem.vue index 92c9f1e..9ddd5c2 100644 --- a/frontend/src/components/TransferItem.vue +++ b/frontend/src/components/TransferItem.vue @@ -1,35 +1,25 @@