mirror of
https://gitee.com/spark-store-project/spark-store
synced 2026-06-22 06:03:49 +08:00
feat(account): polish reviews favorites and account UI
This commit is contained in:
@@ -42,6 +42,12 @@ type IpcRendererFacade = {
|
||||
invoke: typeof ipcRenderer.invoke;
|
||||
};
|
||||
|
||||
type WindowControlBridge = {
|
||||
minimize: () => void;
|
||||
toggleMaximize: () => void;
|
||||
close: () => void;
|
||||
};
|
||||
|
||||
type UpdateCenterStateListener = (snapshot: UpdateCenterSnapshot) => void;
|
||||
type UpdateCenterStartTask = {
|
||||
taskKey: string;
|
||||
@@ -91,6 +97,12 @@ contextBridge.exposeInMainWorld("apm_store", {
|
||||
})(),
|
||||
});
|
||||
|
||||
contextBridge.exposeInMainWorld("windowControls", {
|
||||
minimize: () => ipcRenderer.send("window-control-minimize"),
|
||||
toggleMaximize: () => ipcRenderer.send("window-control-toggle-maximize"),
|
||||
close: () => ipcRenderer.send("window-control-close"),
|
||||
} satisfies WindowControlBridge);
|
||||
|
||||
contextBridge.exposeInMainWorld("updateCenter", {
|
||||
open: (storeFilter: StoreFilter = "both"): Promise<UpdateCenterSnapshot> =>
|
||||
ipcRenderer.invoke("update-center-open", storeFilter),
|
||||
|
||||
Reference in New Issue
Block a user