fix save history

This commit is contained in:
2026-02-07 21:39:44 +08:00
parent e76bcd709c
commit 7c65daeb89
13 changed files with 177 additions and 135 deletions

View File

@@ -19,16 +19,16 @@ export enum Language {
* WindowState 定义窗口状态
*/
export class WindowState {
"Width": number;
"Height": number;
"width": number;
"height": number;
/** Creates a new WindowState instance. */
constructor($$source: Partial<WindowState> = {}) {
if (!("Width" in $$source)) {
this["Width"] = 0;
if (!("width" in $$source)) {
this["width"] = 0;
}
if (!("Height" in $$source)) {
this["Height"] = 0;
if (!("height" in $$source)) {
this["height"] = 0;
}
Object.assign(this, $$source);

View File

@@ -8,6 +8,9 @@ import { Call as $Call, CancellablePromise as $CancellablePromise, Create as $Cr
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore: Unused imports
import * as discovery$0 from "../discovery/models.js";
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore: Unused imports
import * as sync$0 from "../../../sync/models.js";
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore: Unused imports
@@ -45,6 +48,12 @@ export function GetTransferList(): $CancellablePromise<($models.Transfer | null)
});
}
export function GetTransferSyncMap(): $CancellablePromise<sync$0.Map | null> {
return $Call.ByID(2986557111).then(($result: any) => {
return $$createType4($result);
});
}
export function LoadHistory(): $CancellablePromise<void> {
return $Call.ByID(2987999795);
}
@@ -61,8 +70,8 @@ export function ResolvePendingRequest(id: string, accept: boolean, savePath: str
return $Call.ByID(207902967, id, accept, savePath);
}
export function SaveHistory(transfers: ($models.Transfer | null)[]): $CancellablePromise<void> {
return $Call.ByID(713135400, transfers);
export function SaveHistory(): $CancellablePromise<void> {
return $Call.ByID(713135400);
}
export function SendFile(target: discovery$0.Peer | null, targetIP: string, filePath: string): $CancellablePromise<void> {
@@ -97,3 +106,5 @@ export function StoreTransfersToList(transfers: ($models.Transfer | null)[]): $C
const $$createType0 = $models.Transfer.createFrom;
const $$createType1 = $Create.Nullable($$createType0);
const $$createType2 = $Create.Array($$createType1);
const $$createType3 = sync$0.Map.createFrom;
const $$createType4 = $Create.Nullable($$createType3);

View File

@@ -0,0 +1,6 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
export {
Map
} from "./models.js";

View File

@@ -0,0 +1,52 @@
// 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";
/**
* Map is like a Go map[any]any but is safe for concurrent use
* by multiple goroutines without additional locking or coordination.
* Loads, stores, and deletes run in amortized constant time.
*
* The Map type is specialized. Most code should use a plain Go map instead,
* with separate locking or coordination, for better type safety and to make it
* easier to maintain other invariants along with the map content.
*
* The Map type is optimized for two common use cases: (1) when the entry for a given
* key is only ever written once but read many times, as in caches that only grow,
* or (2) when multiple goroutines read, write, and overwrite entries for disjoint
* sets of keys. In these two cases, use of a Map may significantly reduce lock
* contention compared to a Go map paired with a separate [Mutex] or [RWMutex].
*
* The zero Map is empty and ready for use. A Map must not be copied after first use.
*
* In the terminology of [the Go memory model], Map arranges that a write operation
* “synchronizes before” any read operation that observes the effect of the write, where
* read and write operations are defined as follows.
* [Map.Load], [Map.LoadAndDelete], [Map.LoadOrStore], [Map.Swap], [Map.CompareAndSwap],
* and [Map.CompareAndDelete] are read operations;
* [Map.Delete], [Map.LoadAndDelete], [Map.Store], and [Map.Swap] are write operations;
* [Map.LoadOrStore] is a write operation when it returns loaded set to false;
* [Map.CompareAndSwap] is a write operation when it returns swapped set to true;
* and [Map.CompareAndDelete] is a write operation when it returns deleted set to true.
*
* [the Go memory model]: https://go.dev/ref/mem
*/
export class Map {
/** Creates a new Map instance. */
constructor($$source: Partial<Map> = {}) {
Object.assign(this, $$source);
}
/**
* Creates a new Map instance from a string or object.
*/
static createFrom($$source: any = {}): Map {
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
return new Map($$parsedSource as Partial<Map>);
}
}

View File

@@ -7,6 +7,10 @@ body,
/* 标准属性 */
cursor: default;
/* 鼠标指针变为默认箭头,而不是文本输入的 I 形 */
overflow: hidden;
height: 100%;
margin: 0;
padding: 0;
}
input,

View File

@@ -1 +1 @@
{"root":["./src/main.ts","./src/vite-env.d.ts","./src/plugins/i18n.ts","./src/plugins/index.ts","./src/plugins/vuetify.ts","./src/App.vue","./src/components/MainLayout.vue","./src/components/PeerCard.vue","./src/components/SettingsView.vue","./src/components/TransferItem.vue","./src/components/modals/FileSendModal.vue","./src/components/modals/TextSendModal.vue","./bindings/github.com/wailsapp/wails/v3/internal/eventcreate.ts","./bindings/github.com/wailsapp/wails/v3/internal/eventdata.d.ts","./bindings/github.com/wailsapp/wails/v3/pkg/services/notifications/index.ts","./bindings/github.com/wailsapp/wails/v3/pkg/services/notifications/models.ts","./bindings/github.com/wailsapp/wails/v3/pkg/services/notifications/notificationservice.ts","./bindings/mesh-drop/index.ts","./bindings/mesh-drop/models.ts","./bindings/mesh-drop/internal/config/config.ts","./bindings/mesh-drop/internal/config/index.ts","./bindings/mesh-drop/internal/config/models.ts","./bindings/mesh-drop/internal/discovery/index.ts","./bindings/mesh-drop/internal/discovery/models.ts","./bindings/mesh-drop/internal/discovery/service.ts","./bindings/mesh-drop/internal/transfer/index.ts","./bindings/mesh-drop/internal/transfer/models.ts","./bindings/mesh-drop/internal/transfer/service.ts","./bindings/time/index.ts","./bindings/time/models.ts"],"version":"5.9.3"}
{"root":["./src/main.ts","./src/vite-env.d.ts","./src/plugins/i18n.ts","./src/plugins/index.ts","./src/plugins/vuetify.ts","./src/App.vue","./src/components/MainLayout.vue","./src/components/PeerCard.vue","./src/components/SettingsView.vue","./src/components/TransferItem.vue","./src/components/modals/FileSendModal.vue","./src/components/modals/TextSendModal.vue","./bindings/github.com/wailsapp/wails/v3/internal/eventcreate.ts","./bindings/github.com/wailsapp/wails/v3/internal/eventdata.d.ts","./bindings/github.com/wailsapp/wails/v3/pkg/services/notifications/index.ts","./bindings/github.com/wailsapp/wails/v3/pkg/services/notifications/models.ts","./bindings/github.com/wailsapp/wails/v3/pkg/services/notifications/notificationservice.ts","./bindings/mesh-drop/index.ts","./bindings/mesh-drop/models.ts","./bindings/mesh-drop/internal/config/config.ts","./bindings/mesh-drop/internal/config/index.ts","./bindings/mesh-drop/internal/config/models.ts","./bindings/mesh-drop/internal/discovery/index.ts","./bindings/mesh-drop/internal/discovery/models.ts","./bindings/mesh-drop/internal/discovery/service.ts","./bindings/mesh-drop/internal/transfer/index.ts","./bindings/mesh-drop/internal/transfer/models.ts","./bindings/mesh-drop/internal/transfer/service.ts","./bindings/sync/index.ts","./bindings/sync/models.ts","./bindings/time/index.ts","./bindings/time/models.ts"],"version":"5.9.3"}