mirror of
https://gitee.com/spark-store-project/spark-store
synced 2026-08-07 00:43:56 +08:00
feat(submitter): 完善提交表单功能,优化交互与体验
1. 新增electronUtils接口用于获取文件路径,支持拖拽上传deb包 2. 交换贡献者与官网地址表单字段 3. 重构架构选择UI,按来源和架构排序并添加来源标识 4. 新增截图和图标上传格式校验,限制仅支持PNG 5. 优化截图上传区域样式,支持拖放上传 6. 拆分重置表单和提交成功后的状态清理逻辑 7. 重构架构排序逻辑,兼容新旧存储格式
This commit is contained in:
@@ -1,4 +1,9 @@
|
||||
import { ipcRenderer, contextBridge, type IpcRendererEvent } from "electron";
|
||||
import {
|
||||
ipcRenderer,
|
||||
contextBridge,
|
||||
webUtils,
|
||||
type IpcRendererEvent,
|
||||
} from "electron";
|
||||
|
||||
type StoreFilter = "spark" | "apm" | "both";
|
||||
|
||||
@@ -97,6 +102,10 @@ contextBridge.exposeInMainWorld("apm_store", {
|
||||
})(),
|
||||
});
|
||||
|
||||
contextBridge.exposeInMainWorld("electronUtils", {
|
||||
getPathForFile: (file: File): string => webUtils.getPathForFile(file),
|
||||
});
|
||||
|
||||
contextBridge.exposeInMainWorld("windowControls", {
|
||||
minimize: () => ipcRenderer.send("window-control-minimize"),
|
||||
toggleMaximize: () => ipcRenderer.send("window-control-toggle-maximize"),
|
||||
|
||||
Reference in New Issue
Block a user