diff --git a/components.d.ts b/components.d.ts index 6558830..4dbba03 100644 --- a/components.d.ts +++ b/components.d.ts @@ -8,24 +8,12 @@ export {} /* prettier-ignore */ declare module 'vue' { export interface GlobalComponents { - ChatContent: typeof import('./src/components/mainwindow/ChatView/ChatContent.vue')['default'] - ChatInput: typeof import('./src/components/mainwindow/ChatView/ChatInput.vue')['default'] - ChatTitle: typeof import('./src/components/mainwindow/ChatView/ChatTitle.vue')['default'] - ElBadge: typeof import('element-plus/es')['ElBadge'] ElIcon: typeof import('element-plus/es')['ElIcon'] ElLink: typeof import('element-plus/es')['ElLink'] ElText: typeof import('element-plus/es')['ElText'] FluentCheckBox: typeof import('./src/components/fluent-ui/FluentCheckBox.vue')['default'] FluentInput: typeof import('./src/components/fluent-ui/FluentInput.vue')['default'] - InputSearch: typeof import('./src/components/common/InputBox/InputSearch.vue')['default'] - MessageListItem: typeof import('./src/components/mainwindow/MessageList/MessageListItem.vue')['default'] - NavBar: typeof import('./src/components/mainwindow/NavBar.vue')['default'] - PopMenu: typeof import('./src/components/common/PopMenu/PopMenu.vue')['default'] - PopMenuItem: typeof import('./src/components/common/PopMenu/PopMenuItem.vue')['default'] RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] - SideBar: typeof import('./src/components/mainwindow/SideBar.vue')['default'] - SvgIcon: typeof import('./src/components/common/SvgIcon.vue')['default'] - TitleBar: typeof import('./src/components/common/TitleBar.vue')['default'] } } diff --git a/electron-builder.json5 b/electron-builder.json5 index 1222b0e..71a15e8 100644 --- a/electron-builder.json5 +++ b/electron-builder.json5 @@ -1,45 +1,37 @@ // @see - https://www.electron.build/configuration/configuration { - "$schema": "https://raw.githubusercontent.com/electron-userland/electron-builder/master/packages/app-builder-lib/scheme.json", - "appId": "cn.programcx", - "asar": true, - "productName": "Flow Message", - "directories": { - "output": "release/${version}" + $schema: "https://raw.githubusercontent.com/electron-userland/electron-builder/master/packages/app-builder-lib/scheme.json", + appId: "cn.programcx", + asar: true, + productName: "Flow Message", + directories: { + output: "release/${version}", }, - "files": [ - "dist", - "dist-electron" - ], - "mac": { - "target": [ - "dmg" - ], - "artifactName": "${productName}-Mac-${version}-Installer.${ext}", + files: ["dist", "dist-electron"], + mac: { + target: ["dmg"], + artifactName: "${productName}-Mac-${version}-Installer.${ext}", icon: "public/icon/icon.icns", }, - "win": { - "target": [ + win: { + target: [ { - "target": "nsis", - "arch": [ - "x64" - ] - } + target: "nsis", + arch: ["x64"], + }, ], - "artifactName": "${productName}-Windows-${version}-Setup.${ext}", + artifactName: "${productName}-Windows-${version}-Setup.${ext}", icon: "public/icon/icon.ico", }, - "nsis": { - "oneClick": false, - "perMachine": false, - "allowToChangeInstallationDirectory": true, - "deleteAppDataOnUninstall": false + nsis: { + oneClick: false, + perMachine: false, + allowToChangeInstallationDirectory: true, + deleteAppDataOnUninstall: false, }, - "linux": { - "target": [ - "AppImage" - ], - "artifactName": "${productName}-Linux-${version}.${ext}" - } -} \ No newline at end of file + linux: { + target: ["AppImage"], + artifactName: "${productName}-Linux-${version}.${ext}", + "icon": "public/icon/icon.png", + }, +} diff --git a/electron/ipc/window.ts b/electron/ipc/window.ts index cf79c35..abe81c5 100644 --- a/electron/ipc/window.ts +++ b/electron/ipc/window.ts @@ -1,310 +1,318 @@ -import { BrowserWindow } from "electron"; +import { BrowserWindow, ipcMain } from "electron"; export default function setupWindowIpcHandlers(win: BrowserWindow | null) { + //改变窗口大小 + ipcMain.on("resize-window", (_event, width: number, height: number) => { + if (win) { + win.setSize(width, height); + } + }); - // 判断窗口是否有效,返回 true 表示窗口可用 - const checkWindow = () => { - return win && !win.isDestroyed(); - }; - - // ----------------- Set 系列操作(使用 win.webContents 绑定) ----------------- - - if (checkWindow()) { - win.webContents.on("ipc-message", (_event, channel, ...args) => { - // 根据 channel 处理 set 操作 - switch (channel) { - // 改变窗口大小 - case "resize-window": { - const [width, height] = args as number[]; - win.setSize(width, height,true); - console.log("resize-window", width, height); - break; - } - // 设置窗口边框是否可见 - case "set-window-frame-visible": { - const [isFrameVisible] = args as [boolean]; - win.setMenuBarVisibility(isFrameVisible); - win.setResizable(isFrameVisible); - break; - } - // 设置窗口标题 - case "set-window-title": { - const [title] = args as [string]; - win.setTitle(title); - break; - } - // 设置窗口图标(居中窗口) - case "set-window-central": { - const { width, height } = win.getBounds(); - const { workAreaSize } = require("electron").screen.getPrimaryDisplay(); - const x = (workAreaSize.width - width) / 2; - const y = (workAreaSize.height - height) / 2; - win.setBounds({ x, y }); - break; - } - // 设置窗口是否置顶 - case "set-window-always-on-top": { - const [alwaysOnTop] = args as [boolean]; - win.setAlwaysOnTop(alwaysOnTop); - break; - } - // 设置窗口是否可见 - case "set-window-visible": { - const [visible] = args as [boolean]; - visible ? win.show() : win.hide(); - break; - } - // 设置窗口菜单栏是否可见 - case "set-window-menu-bar-visible": { - const [visible] = args as [boolean]; - win.setMenuBarVisibility(visible); - break; - } - // 设置窗口是否可改变大小 - case "set-window-resizable": { - const [resizable] = args as [boolean]; - win.setResizable(resizable); - break; - } - // 设置窗口是否可移动 - case "set-window-movable": { - const [movable] = args as [boolean]; - win.setMovable(movable); - break; - } - // 设置窗口最小化 - case "set-window-minimizable": { - const [minimizable] = args as [boolean]; - win.setMinimizable(minimizable); - break; - } - // 设置窗口最大化 - case "set-window-maximizable": { - const [maximizable] = args as [boolean]; - win.setMaximizable(maximizable); - break; - } - // 设置窗口是否全屏 - case "set-window-full-screen": { - const [fullScreen] = args as [boolean]; - win.setFullScreen(fullScreen); - break; - } - // 设置窗口背景颜色 - case "set-window-background-color": { - const [color] = args as [string]; - win.setBackgroundColor(color); - break; - } - // 设置窗口图标 - case "set-window-icon": { - const [iconPath] = args as [string]; - win.setIcon(iconPath); - break; - } - // 设置窗口是否在所有工作区可见 - case "set-window-visible-on-all-workspaces": { - const [visible] = args as [boolean]; - win.setVisibleOnAllWorkspaces(visible); - break; - } - // 设置窗口大小 - case "set-window-size": { - const [width, height] = args as number[]; - win.setSize(width, height); - break; - } - // 设置窗口位置 - case "set-window-position": { - const [x, y] = args as number[]; - win.setPosition(x, y); - break; - } - // 设置窗口透明度 - case "set-window-opacity": { - const [opacity] = args as [number]; - win.setOpacity(opacity); - break; - } - // 设置窗口是否在任务栏中显示 - case "set-window-in-taskbar": { - const [inTaskbar] = args as [boolean]; - win.setSkipTaskbar(!inTaskbar); - break; - } - // 设置窗口最小化 - case "minimize-window": { - win.minimize(); - break; - } - // 设置窗口最大化 - case "maximize-window": { - win.maximize(); - break; - } - // 设置窗口还原 - case "restore-window": { - win.restore(); - break; - } - // 设置窗口最小大小 - case "set-window-min-size": { - const [minWidth, minHeight] = args as number[]; - win.setMinimumSize(minWidth, minHeight); - break; - } - // 关闭窗口(只触发一次) - case "close-window": { - win.close(); - break; - } - // 销毁窗口 - case "destroy-window": { - win.destroy(); - break; - } - default: { - console.warn("Unknown set-window ipc-message channel:", channel); - } + //设置窗口边框是否可见 + ipcMain.on("set-window-frame-visible", (_event, isFrameVisible: boolean) => { + if (win) { + win.setMenuBarVisibility(isFrameVisible); + win.setResizable(isFrameVisible); + } + }); + + //设置窗口标题 + ipcMain.on("set-window-title", (_event, title: string) => { + if (win) { + win.setTitle(title); + } + }); + + //设置窗口图标 + ipcMain.on("set-window-central", (_event) => { + if (win) { + const { width, height } = win.getBounds(); + const { workAreaSize } = require("electron").screen.getPrimaryDisplay(); + const x = (workAreaSize.width - width) / 2; + const y = (workAreaSize.height - height) / 2; + win.setBounds({ x, y }); + } + }); + + //设置窗口是是否置顶 + ipcMain.on("set-window-always-on-top", (_event, alwaysOnTop: boolean) => { + if (win) { + win.setAlwaysOnTop(alwaysOnTop); + } + }); + + //设置窗口是否可见 + ipcMain.on("set-window-visible", (_event, visible: boolean) => { + if (win) { + visible ? win.show() : win.hide(); + } + }); + + //设置窗口菜单栏是否可见 + ipcMain.on("set-window-menu-bar-visible", (_event, visible: boolean) => { + if (win) { + win.setMenuBarVisibility(visible); + } + }); + + //设置窗口是否可改变大小 + ipcMain.on("set-window-resizable", (_event, resizable: boolean) => { + if (win) { + win.setResizable(resizable); + } + }); + + //设置窗口是否可移动 + ipcMain.on("set-window-movable", (_event, movable: boolean) => { + if (win) { + win.setMovable(movable); + } + }); + + //设置窗口最小化 + ipcMain.on("set-window-minimizable", (_event, minimizable: boolean) => { + if (win) { + win.setMinimizable(minimizable); + } + }); + + //设置窗口最大化 + ipcMain.on("set-window-maximizable", (_event, maximizable: boolean) => { + if (win) { + win.setMaximizable(maximizable); + } + }); + + //设置窗口是否全屏 + ipcMain.on("set-window-full-screen", (_event, fullScreen: boolean) => { + if (win) { + win.setFullScreen(fullScreen); + } + }); + + //设置窗口背景颜色 + ipcMain.on("set-window-background-color", (_event, color: string) => { + if (win) { + win.setBackgroundColor(color); + } + }); + + //设置窗口图标 + ipcMain.on("set-window-icon", (_event, iconPath: string) => { + if (win) { + win.setIcon(iconPath); + } + }); + + //设置窗口是否在所有工作区可见 + ipcMain.on( + "set-window-visible-on-all-workspaces", + (_event, visible: boolean) => { + if (win) { + win.setVisibleOnAllWorkspaces(visible); } - }); - } + } + ); + + //设置窗口大小 + ipcMain.on("set-window-size", (_event, width: number, height: number) => { + if (win) { + win.setSize(width, height); + } + }); + + //设置窗口位置 + ipcMain.on("set-window-position", (_event, x: number, y: number) => { + if (win) { + win.setPosition(x, y); + } + }); + + //设置窗口透明度 + ipcMain.on("set-window-opacity", (_event, opacity: number) => { + if (win) { + win.setOpacity(opacity); + } + }); + + //设置窗口是否在任务栏中显示 + ipcMain.on("set-window-in-taskbar", (_event, inTaskbar: boolean) => { + if (win) { + win.setSkipTaskbar(!inTaskbar); + } + }); + + //设置窗口最小化 + ipcMain.on("minimize-window", () => { + if (win) { + win.minimize(); + } + }); + + //设置窗口最大化 + ipcMain.on("maximize-window", () => { + if (win) { + win.maximize(); + } + }); + + //设置窗口还原 + ipcMain.on("restore-window", () => { + if (win) { + win.restore(); + } + }); + + //关闭窗口 + ipcMain.on("close-window", () => { + if (win) { + win.close(); + } + }); + + //销毁窗口 + ipcMain.on("destroy-window", () => { + if (win) { + win.destroy(); + } + }); + + //获取窗口位置 + ipcMain.on("get-window-position", (_event) => { + if (win) { + const [x, y] = win.getPosition(); + _event.reply("get-window-position-reply", { x, y }); + } + }); + + //获取窗口大小 + ipcMain.on("get-window-size", (_event) => { + if (win) { + const [width, height] = win.getSize(); + _event.reply("get-window-size-reply", { width, height }); + } + }); + + //获取窗口标题 + ipcMain.on("get-window-title", (_event) => { + if (win) { + const title = win.getTitle(); + _event.reply("get-window-title-reply", title); + } + }); + + //获取窗口背景色 + ipcMain.on("get-window-background-color", (_event) => { + if (win) { + const color = win.getBackgroundColor(); + _event.reply("get-window-background-color-reply", color); + } + }); + + //获取窗口透明度 + ipcMain.on("get-window-opacity", (_event) => { + if (win) { + const opacity = win.getOpacity(); + _event.reply("get-window-opacity-reply", opacity); + } + }); + + //获取窗口是否可见 + ipcMain.on("is-window-visible", (_event) => { + if (win) { + const visible = win.isVisible(); + _event.reply("is-window-visible-reply", visible); + } + }); + + //获取窗口是否最大化 + ipcMain.on("is-window-maximized", (_event) => { + if (win) { + const maximized = win.isMaximized(); + _event.reply("is-window-maximized-reply", maximized); + } + }); + + //获取窗口是否最小化 + ipcMain.on("is-window-minimized", (_event) => { + if (win) { + const minimized = win.isMinimized(); + _event.reply("is-window-minimized-reply", minimized); + } + }); + + //获取窗口是否全屏 + ipcMain.on("is-window-full-screen", (_event) => { + if (win) { + const fullScreen = win.isFullScreen(); + _event.reply("is-window-full-screen-reply", fullScreen); + } + }); + + //获取窗口是否可以改变大小 + ipcMain.on("is-window-resizable", (_event) => { + if (win) { + const resizable = win.isResizable(); + _event.reply("is-window-resizable-reply", resizable); + } + }); + + //获取窗口是否在所有工作区可见 + ipcMain.on("is-window-visible-on-all-workspaces", (_event) => { + if (win) { + const visibleOnAllWorkspaces = win.isVisibleOnAllWorkspaces(); + _event.reply( + "is-window-visible-on-all-workspaces-reply", + visibleOnAllWorkspaces + ); + } + }); + + //获取窗口是否置顶 + ipcMain.on("is-window-always-on-top", (_event) => { + if (win) { + const alwaysOnTop = win.isAlwaysOnTop(); + _event.reply("is-window-always-on-top-reply", alwaysOnTop); + } + }); + + //获取窗口是否可移动 + ipcMain.on("is-window-movable", (_event) => { + if (win) { + const movable = win.isMovable(); + _event.reply("is-window-movable-reply", movable); + } + }); + + //获取窗口是否可最小化 + ipcMain.on("is-window-minimizable", (_event) => { + if (win) { + const minimizable = win.isMinimizable(); + _event.reply("is-window-minimizable-reply", minimizable); + } + }); + + //获取窗口是否可最大化 + ipcMain.on("is-window-maximizable", (_event) => { + if (win) { + const maximizable = win.isMaximizable(); + _event.reply("is-window-maximizable-reply", maximizable); + } + }); + + //获取窗口是否可关闭 + ipcMain.on("is-window-closable", (_event) => { + if (win) { + const closable = win.isClosable(); + _event.reply("is-window-closable-reply", closable); + } + }); + + //获取窗口是否在任务栏中显示 + ipcMain.on("is-window-menu-bar-visible", (_event) => { + if (win) { + const menuBarVisible = win.isMenuBarVisible(); + _event.reply("is-window-menu-bar-visible-reply", menuBarVisible); + } + }); } -// // ----------------- Get 系列操作(使用全局 ipcMain) ----------------- - -// // 获取窗口位置 -// ipcMain.on("get-window-position", (_event) => { -// if (checkWindow()) { -// const [x, y] = win.getPosition(); -// return { x, y }; -// } -// }); - -// // 获取窗口大小 -// ipcMain.on("get-window-size", (_event) => { -// if (checkWindow()) { -// const [width, height] = win.getSize(); -// return { width, height }; -// } -// }); - -// // 获取窗口标题 -// ipcMain.on("get-window-title", (_event) => { -// if (checkWindow()) { -// const title = win.getTitle(); -// return title; -// } -// }); - -// // 获取窗口背景色 -// ipcMain.on("get-window-background-color", (_event) => { -// if (checkWindow()) { -// const color = win.getBackgroundColor(); -// return color; -// } -// }); - -// // 获取窗口透明度 -// ipcMain.on("get-window-opacity", (_event) => { -// if (checkWindow()) { -// const opacity = win.getOpacity(); -// return opacity; -// } -// }); - -// // 获取窗口是否可见 -// ipcMain.on("is-window-visible", (_event) => { -// if (checkWindow()) { -// const visible = win.isVisible(); -// return visible; -// } -// }); - -// // 获取窗口是否最大化 -// ipcMain.on("is-window-maximized", (_event) => { -// if (checkWindow()) { -// const maximized = win.isMaximized(); -// return maximized; -// } -// }); - -// // 获取窗口是否最小化 -// ipcMain.on("is-window-minimized", (_event) => { -// if (checkWindow()) { -// const minimized = win.isMinimized(); -// return minimized; -// } -// }); - -// // 获取窗口是否全屏 -// ipcMain.on("is-window-full-screen", (_event) => { -// if (checkWindow()) { -// const fullScreen = win.isFullScreen(); -// return fullScreen; -// } -// }); - -// // 获取窗口是否可以改变大小 -// ipcMain.on("is-window-resizable", (_event) => { -// if (checkWindow()) { -// const resizable = win.isResizable(); -// return resizable; -// } -// }); - -// // 获取窗口是否在所有工作区可见 -// ipcMain.on("is-window-visible-on-all-workspaces", (_event) => { -// if (checkWindow()) { -// const visibleOnAllWorkspaces = win.isVisibleOnAllWorkspaces(); -// return visibleOnAllWorkspaces; -// } -// }); - -// // 获取窗口是否置顶 -// ipcMain.on("is-window-always-on-top", (_event) => { -// if (checkWindow()) { -// const alwaysOnTop = win.isAlwaysOnTop(); -// return alwaysOnTop; -// } -// }); - -// // 获取窗口是否可移动 -// ipcMain.on("is-window-movable", (_event) => { -// if (checkWindow()) { -// const movable = win.isMovable(); -// return movable; -// } -// }); - -// // 获取窗口是否可最小化 -// ipcMain.on("is-window-minimizable", (_event) => { -// if (checkWindow()) { -// const minimizable = win.isMinimizable(); -// return minimizable; -// } -// }); - -// // 获取窗口是否可最大化 -// ipcMain.on("is-window-maximizable", (_event) => { -// if (checkWindow()) { -// const maximizable = win.isMaximizable(); -// return maximizable; -// } -// }); - -// // 获取窗口是否可关闭 -// ipcMain.on("is-window-closable", (_event) => { -// if (checkWindow()) { -// const closable = win.isClosable(); -// return closable; -// } -// }); - -// // 获取窗口是否在任务栏中显示 -// ipcMain.on("is-window-menu-bar-visible", (_event) => { -// if (checkWindow()) { -// const menuBarVisible = win.isMenuBarVisible(); -// return menuBarVisible; -// } -// }); -// } diff --git a/electron/main.ts b/electron/main.ts index eb8ed35..dd363e6 100644 --- a/electron/main.ts +++ b/electron/main.ts @@ -1,11 +1,23 @@ import { app, BrowserWindow, ipcMain } from "electron"; import { fileURLToPath } from "node:url"; import setupIpcHandlers from "./ipc"; + import path from "node:path"; const __dirname = path.dirname(fileURLToPath(import.meta.url)); +// The built directory structure +// +// ├─┬─┬ dist +// │ │ └── index.html +// │ │ +// │ ├─┬ dist-electron +// │ │ ├── main.js +// │ │ └── preload.mjs +// │ process.env.APP_ROOT = path.join(__dirname, ".."); + +// 🚧 Use ['ENV_NAME'] avoid vite:define plugin - Vite@2.x export const VITE_DEV_SERVER_URL = process.env["VITE_DEV_SERVER_URL"]; export const MAIN_DIST = path.join(process.env.APP_ROOT, "dist-electron"); export const RENDERER_DIST = path.join(process.env.APP_ROOT, "dist"); @@ -14,9 +26,15 @@ process.env.VITE_PUBLIC = VITE_DEV_SERVER_URL ? path.join(process.env.APP_ROOT, "public") : RENDERER_DIST; -let wins: Array = []; +let wins: Array = []; // Store all windows -// 创建新窗口 +/** + * + * @param route 需要加载的URL路径 + * @param width 设置窗口宽度 + * @param height 设置窗口高度 + * @param frame 是否显示窗口边框 + */ function createNewWindow( route: string, width: number, @@ -55,38 +73,33 @@ function createNewWindow( const finalRoute = route.startsWith("/") ? route : "/" + route; - // 加载URL或者本地HTML + //加载html文件 if (VITE_DEV_SERVER_URL) { const fullUrl = `${VITE_DEV_SERVER_URL}#${finalRoute}`; newWin.loadURL(fullUrl); - + newWin.webContents.openDevTools(); } else { const indexPath = path.join(RENDERER_DIST, "index.html"); newWin.loadFile(indexPath, { hash: finalRoute }); } - newWin.webContents.openDevTools(); - // 窗口加载完成后显示并发送消息 + // 等待加载完后再展示窗口 newWin.webContents.on("did-finish-load", () => { - if (!newWin.isDestroyed()) { - newWin.show(); - newWin.webContents.send( - "main-process-message", - new Date().toLocaleString() - ); - } + newWin.show(); + newWin.webContents.send( + "main-process-message", + new Date().toLocaleString() + ); }); - // 窗口关闭时处理 newWin.on("closed", () => { const index = wins.indexOf(newWin); - if (index !== -1) { - wins.splice(index, 1); - } - newWin.removeAllListeners(); + //将销毁的窗口从数组中删除 + if (index !== -1) wins.splice(index, 1); }); - setupIpcHandlers(newWin); // 设置IPC处理 + //设置IPC通信 + setupIpcHandlers(newWin); wins.push(newWin); } @@ -96,6 +109,7 @@ app.on("window-all-closed", () => { app.quit(); wins.forEach((win) => { win.destroy(); + win = null; }); wins = []; } @@ -103,17 +117,17 @@ app.on("window-all-closed", () => { app.on("activate", () => { if (BrowserWindow.getAllWindows().length === 0) { - createNewWindow("/", 350, 500, true); + createNewWindow("/", 300, 500, true); } }); -// 应用程序准备好后创建初始窗口 +//打开应用程序时创建初始窗口 app.whenReady().then(() => { createNewWindow( "/", - 350, + 300, 500, - false, + true, true, true, true, @@ -126,35 +140,38 @@ app.whenReady().then(() => { ); }); -ipcMain.on("create-new-window", ( - _event, - route: string, - width: number, - height: number, - frame: boolean = false, - hideMenuBar: boolean = true, - resizable: boolean = true, - movable: boolean = true, - minimizable: boolean = true, - maximizable: boolean = true, - fullScreen: boolean = false, - alwaysOnTop: boolean = false, - inTaskbar: boolean = true, - opacity: number = 1 -) => { - createNewWindow( - route, - width, - height, - frame, - hideMenuBar, - resizable, - movable, - minimizable, - maximizable, - fullScreen, - alwaysOnTop, - inTaskbar, - opacity - ); -}); +ipcMain.on( + "create-new-window", + ( + _event, + route: string, + width: number, + height: number, + frame: boolean = true, + hideMenuBar: boolean = true, + resizable: boolean = true, + movable: boolean = true, + minimizable: boolean = true, + maximizable: boolean = true, + fullScreen: boolean = false, + alwaysOnTop: boolean = false, + inTaskbar: boolean = true, + opacity: number = 1 + ) => { + createNewWindow( + route, + width, + height, + frame, + hideMenuBar, + resizable, + movable, + minimizable, + maximizable, + fullScreen, + alwaysOnTop, + inTaskbar, + opacity + ); + } +); diff --git a/electron/preload.ts b/electron/preload.ts index 27943ff..1d178c4 100644 --- a/electron/preload.ts +++ b/electron/preload.ts @@ -86,10 +86,6 @@ contextBridge.exposeInMainWorld("electron", { setWindowInTaskbar: (inTaskbar: boolean) => ipcRenderer.send("set-window-in-taskbar", inTaskbar), - //设置窗口最小大小 - setMinimumSize: (width: number, height: number) => - ipcRenderer.send("set-window-min-size", width, height), - // 窗口操作 minimizeWindow: () => ipcRenderer.send("minimize-window"), maximizeWindow: () => ipcRenderer.send("maximize-window"), diff --git a/package.json b/package.json index e063b08..eca68b7 100644 --- a/package.json +++ b/package.json @@ -37,9 +37,10 @@ "vite": "^5.1.6", "vite-plugin-electron": "^0.28.6", "vite-plugin-electron-renderer": "^0.14.5", - "vite-plugin-svgr": "^4.3.0", "vue-tsc": "^2.0.26" }, "main": "dist-electron/main.js", - "build-icon": "electron-icon-builder --input=./public/favicon.png --output=public --flatten" -} + "build": { + "publish": null + } +} \ No newline at end of file diff --git a/public/assets/svg/add_24.svg b/public/assets/svg/add_24.svg deleted file mode 100644 index 43ad117..0000000 --- a/public/assets/svg/add_24.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/administering_user_16.svg b/public/assets/svg/administering_user_16.svg deleted file mode 100644 index c8f78c0..0000000 --- a/public/assets/svg/administering_user_16.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/administering_user_24.svg b/public/assets/svg/administering_user_24.svg deleted file mode 100644 index 5c79bb2..0000000 --- a/public/assets/svg/administering_user_24.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/arrow_down_16.svg b/public/assets/svg/arrow_down_16.svg deleted file mode 100644 index 7c92567..0000000 --- a/public/assets/svg/arrow_down_16.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/arrow_down_24.svg b/public/assets/svg/arrow_down_24.svg deleted file mode 100644 index af17ec5..0000000 --- a/public/assets/svg/arrow_down_24.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/arrow_down_mini_16.svg b/public/assets/svg/arrow_down_mini_16.svg deleted file mode 100644 index 49d61bf..0000000 --- a/public/assets/svg/arrow_down_mini_16.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/arrow_down_small_16.svg b/public/assets/svg/arrow_down_small_16.svg deleted file mode 100644 index 0fbaad4..0000000 --- a/public/assets/svg/arrow_down_small_16.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/arrow_left_16.svg b/public/assets/svg/arrow_left_16.svg deleted file mode 100644 index c837423..0000000 --- a/public/assets/svg/arrow_left_16.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/arrow_left_24.svg b/public/assets/svg/arrow_left_24.svg deleted file mode 100644 index f988703..0000000 --- a/public/assets/svg/arrow_left_24.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/arrow_left_small_16.svg b/public/assets/svg/arrow_left_small_16.svg deleted file mode 100644 index d97c548..0000000 --- a/public/assets/svg/arrow_left_small_16.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/arrow_right_16.svg b/public/assets/svg/arrow_right_16.svg deleted file mode 100644 index fba80ff..0000000 --- a/public/assets/svg/arrow_right_16.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/arrow_right_24.svg b/public/assets/svg/arrow_right_24.svg deleted file mode 100644 index 89e00e5..0000000 --- a/public/assets/svg/arrow_right_24.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/arrow_right_small_16.svg b/public/assets/svg/arrow_right_small_16.svg deleted file mode 100644 index 30ab31c..0000000 --- a/public/assets/svg/arrow_right_small_16.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/arrow_up_16.svg b/public/assets/svg/arrow_up_16.svg deleted file mode 100644 index e6c5600..0000000 --- a/public/assets/svg/arrow_up_16.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/arrow_up_24.svg b/public/assets/svg/arrow_up_24.svg deleted file mode 100644 index acd09af..0000000 --- a/public/assets/svg/arrow_up_24.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/arrow_up_small_16.svg b/public/assets/svg/arrow_up_small_16.svg deleted file mode 100644 index 15f063c..0000000 --- a/public/assets/svg/arrow_up_small_16.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/arrows_16.svg b/public/assets/svg/arrows_16.svg deleted file mode 100644 index 02f7f25..0000000 --- a/public/assets/svg/arrows_16.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/arrows_24.svg b/public/assets/svg/arrows_24.svg deleted file mode 100644 index 26908a2..0000000 --- a/public/assets/svg/arrows_24.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/brush_16.svg b/public/assets/svg/brush_16.svg deleted file mode 100644 index f6456e8..0000000 --- a/public/assets/svg/brush_16.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/brush_24.svg b/public/assets/svg/brush_24.svg deleted file mode 100644 index ef7e40d..0000000 --- a/public/assets/svg/brush_24.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/caution_16.svg b/public/assets/svg/caution_16.svg deleted file mode 100644 index f65967e..0000000 --- a/public/assets/svg/caution_16.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/caution_24.svg b/public/assets/svg/caution_24.svg deleted file mode 100644 index c85d99e..0000000 --- a/public/assets/svg/caution_24.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/channel_discover_friend_24.svg b/public/assets/svg/channel_discover_friend_24.svg deleted file mode 100644 index 7524b32..0000000 --- a/public/assets/svg/channel_discover_friend_24.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/channel_discover_star_24.svg b/public/assets/svg/channel_discover_star_24.svg deleted file mode 100644 index e485ef4..0000000 --- a/public/assets/svg/channel_discover_star_24.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/close_16.svg b/public/assets/svg/close_16.svg deleted file mode 100644 index 681d808..0000000 --- a/public/assets/svg/close_16.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/close_24.svg b/public/assets/svg/close_24.svg deleted file mode 100644 index f6b549b..0000000 --- a/public/assets/svg/close_24.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/esc_16.svg b/public/assets/svg/esc_16.svg deleted file mode 100644 index a8f6b16..0000000 --- a/public/assets/svg/esc_16.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/esc_24.svg b/public/assets/svg/esc_24.svg deleted file mode 100644 index e14a8bb..0000000 --- a/public/assets/svg/esc_24.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/filelook_ai_16.svg b/public/assets/svg/filelook_ai_16.svg deleted file mode 100644 index 2f83d94..0000000 --- a/public/assets/svg/filelook_ai_16.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/filelook_apk_16.svg b/public/assets/svg/filelook_apk_16.svg deleted file mode 100644 index d62721a..0000000 --- a/public/assets/svg/filelook_apk_16.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/filelook_audio_16.svg b/public/assets/svg/filelook_audio_16.svg deleted file mode 100644 index 8c8f06f..0000000 --- a/public/assets/svg/filelook_audio_16.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/filelook_doc_16.svg b/public/assets/svg/filelook_doc_16.svg deleted file mode 100644 index 1265643..0000000 --- a/public/assets/svg/filelook_doc_16.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/filelook_exe_16.svg b/public/assets/svg/filelook_exe_16.svg deleted file mode 100644 index b014b09..0000000 --- a/public/assets/svg/filelook_exe_16.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/filelook_folder_16.svg b/public/assets/svg/filelook_folder_16.svg deleted file mode 100644 index 1a0aeed..0000000 --- a/public/assets/svg/filelook_folder_16.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/filelook_html_16.svg b/public/assets/svg/filelook_html_16.svg deleted file mode 100644 index 86c278b..0000000 --- a/public/assets/svg/filelook_html_16.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/filelook_image_16.svg b/public/assets/svg/filelook_image_16.svg deleted file mode 100644 index a54cb09..0000000 --- a/public/assets/svg/filelook_image_16.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/filelook_ipa_16.svg b/public/assets/svg/filelook_ipa_16.svg deleted file mode 100644 index 661b2a7..0000000 --- a/public/assets/svg/filelook_ipa_16.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/filelook_link_16.svg b/public/assets/svg/filelook_link_16.svg deleted file mode 100644 index 5f907ce..0000000 --- a/public/assets/svg/filelook_link_16.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/filelook_multi_files_16.svg b/public/assets/svg/filelook_multi_files_16.svg deleted file mode 100644 index 96a8263..0000000 --- a/public/assets/svg/filelook_multi_files_16.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/filelook_pdf_16.svg b/public/assets/svg/filelook_pdf_16.svg deleted file mode 100644 index 1459635..0000000 --- a/public/assets/svg/filelook_pdf_16.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/filelook_ppt_16.svg b/public/assets/svg/filelook_ppt_16.svg deleted file mode 100644 index 3b113ac..0000000 --- a/public/assets/svg/filelook_ppt_16.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/filelook_ps_16.svg b/public/assets/svg/filelook_ps_16.svg deleted file mode 100644 index 95e28e9..0000000 --- a/public/assets/svg/filelook_ps_16.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/filelook_sketch_16.svg b/public/assets/svg/filelook_sketch_16.svg deleted file mode 100644 index cb385bc..0000000 --- a/public/assets/svg/filelook_sketch_16.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/filelook_txt_16.svg b/public/assets/svg/filelook_txt_16.svg deleted file mode 100644 index 90f069d..0000000 --- a/public/assets/svg/filelook_txt_16.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/filelook_unknown_16.svg b/public/assets/svg/filelook_unknown_16.svg deleted file mode 100644 index 99fc70a..0000000 --- a/public/assets/svg/filelook_unknown_16.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/filelook_video_16.svg b/public/assets/svg/filelook_video_16.svg deleted file mode 100644 index 578c897..0000000 --- a/public/assets/svg/filelook_video_16.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/filelook_xls_16.svg b/public/assets/svg/filelook_xls_16.svg deleted file mode 100644 index 6d2782c..0000000 --- a/public/assets/svg/filelook_xls_16.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/filelook_zip_16.svg b/public/assets/svg/filelook_zip_16.svg deleted file mode 100644 index df284b9..0000000 --- a/public/assets/svg/filelook_zip_16.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/files_16.svg b/public/assets/svg/files_16.svg deleted file mode 100644 index dd33f46..0000000 --- a/public/assets/svg/files_16.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/files_24.svg b/public/assets/svg/files_24.svg deleted file mode 100644 index 62ffb16..0000000 --- a/public/assets/svg/files_24.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/filter_16.svg b/public/assets/svg/filter_16.svg deleted file mode 100644 index c7b743c..0000000 --- a/public/assets/svg/filter_16.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/filter_24.svg b/public/assets/svg/filter_24.svg deleted file mode 100644 index 1aa3c4b..0000000 --- a/public/assets/svg/filter_24.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/finger_16.svg b/public/assets/svg/finger_16.svg deleted file mode 100644 index f83b3a1..0000000 --- a/public/assets/svg/finger_16.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/finger_24.svg b/public/assets/svg/finger_24.svg deleted file mode 100644 index d2a3d67..0000000 --- a/public/assets/svg/finger_24.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/full_screen_16.svg b/public/assets/svg/full_screen_16.svg deleted file mode 100644 index c5b8a14..0000000 --- a/public/assets/svg/full_screen_16.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/full_screen_24.svg b/public/assets/svg/full_screen_24.svg deleted file mode 100644 index 563f38f..0000000 --- a/public/assets/svg/full_screen_24.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/full_screen_off_16.svg b/public/assets/svg/full_screen_off_16.svg deleted file mode 100644 index 8f375ee..0000000 --- a/public/assets/svg/full_screen_off_16.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/full_screen_off_24.svg b/public/assets/svg/full_screen_off_24.svg deleted file mode 100644 index 6f27257..0000000 --- a/public/assets/svg/full_screen_off_24.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/gif_16.svg b/public/assets/svg/gif_16.svg deleted file mode 100644 index 8e7a27e..0000000 --- a/public/assets/svg/gif_16.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/gif_24.svg b/public/assets/svg/gif_24.svg deleted file mode 100644 index 8dff24a..0000000 --- a/public/assets/svg/gif_24.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/group_16.svg b/public/assets/svg/group_16.svg deleted file mode 100644 index debe90d..0000000 --- a/public/assets/svg/group_16.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/group_24.svg b/public/assets/svg/group_24.svg deleted file mode 100644 index c771257..0000000 --- a/public/assets/svg/group_24.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/home_16.svg b/public/assets/svg/home_16.svg deleted file mode 100644 index ccfd41b..0000000 --- a/public/assets/svg/home_16.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/home_24.svg b/public/assets/svg/home_24.svg deleted file mode 100644 index cb603e2..0000000 --- a/public/assets/svg/home_24.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/image_16.svg b/public/assets/svg/image_16.svg deleted file mode 100644 index 44e885d..0000000 --- a/public/assets/svg/image_16.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/image_24.svg b/public/assets/svg/image_24.svg deleted file mode 100644 index c969ef8..0000000 --- a/public/assets/svg/image_24.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/like_filled_24.svg b/public/assets/svg/like_filled_24.svg deleted file mode 100644 index f756ca8..0000000 --- a/public/assets/svg/like_filled_24.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/like_outline_16.svg b/public/assets/svg/like_outline_16.svg deleted file mode 100644 index c13d538..0000000 --- a/public/assets/svg/like_outline_16.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/like_outline_24.svg b/public/assets/svg/like_outline_24.svg deleted file mode 100644 index c50004f..0000000 --- a/public/assets/svg/like_outline_24.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/link_16.svg b/public/assets/svg/link_16.svg deleted file mode 100644 index f7a3131..0000000 --- a/public/assets/svg/link_16.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/link_24.svg b/public/assets/svg/link_24.svg deleted file mode 100644 index 8d0f1ee..0000000 --- a/public/assets/svg/link_24.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/lock_16.svg b/public/assets/svg/lock_16.svg deleted file mode 100644 index 2dec0ba..0000000 --- a/public/assets/svg/lock_16.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/lock_24.svg b/public/assets/svg/lock_24.svg deleted file mode 100644 index e06ccc7..0000000 --- a/public/assets/svg/lock_24.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/long_screenshot_16.svg b/public/assets/svg/long_screenshot_16.svg deleted file mode 100644 index 64cb6f7..0000000 --- a/public/assets/svg/long_screenshot_16.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/long_screenshot_24.svg b/public/assets/svg/long_screenshot_24.svg deleted file mode 100644 index f43f5d8..0000000 --- a/public/assets/svg/long_screenshot_24.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/max_16.svg b/public/assets/svg/max_16.svg deleted file mode 100644 index c2c3355..0000000 --- a/public/assets/svg/max_16.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/max_24.svg b/public/assets/svg/max_24.svg deleted file mode 100644 index a84f080..0000000 --- a/public/assets/svg/max_24.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/minimize_16.svg b/public/assets/svg/minimize_16.svg deleted file mode 100644 index 3d88a7d..0000000 --- a/public/assets/svg/minimize_16.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/minimize_24.svg b/public/assets/svg/minimize_24.svg deleted file mode 100644 index 6ad1c6c..0000000 --- a/public/assets/svg/minimize_24.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/more_16.svg b/public/assets/svg/more_16.svg deleted file mode 100644 index 2e21863..0000000 --- a/public/assets/svg/more_16.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/more_24.svg b/public/assets/svg/more_24.svg deleted file mode 100644 index afbdffd..0000000 --- a/public/assets/svg/more_24.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/nav/collection_24.svg b/public/assets/svg/nav/collection_24.svg deleted file mode 100644 index 4fddb2b..0000000 --- a/public/assets/svg/nav/collection_24.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/nav/download_16.svg b/public/assets/svg/nav/download_16.svg deleted file mode 100644 index e72ca23..0000000 --- a/public/assets/svg/nav/download_16.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/nav/download_24.svg b/public/assets/svg/nav/download_24.svg deleted file mode 100644 index b8e45e6..0000000 --- a/public/assets/svg/nav/download_24.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/nav/folder_24.svg b/public/assets/svg/nav/folder_24.svg deleted file mode 100644 index 5b6af13..0000000 --- a/public/assets/svg/nav/folder_24.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/nav/menu_24.svg b/public/assets/svg/nav/menu_24.svg deleted file mode 100644 index f82fd61..0000000 --- a/public/assets/svg/nav/menu_24.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/nav/nav_application_normal_24.svg b/public/assets/svg/nav/nav_application_normal_24.svg deleted file mode 100644 index c925129..0000000 --- a/public/assets/svg/nav/nav_application_normal_24.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/nav/nav_contact_active_24.svg b/public/assets/svg/nav/nav_contact_active_24.svg deleted file mode 100644 index 1fe5469..0000000 --- a/public/assets/svg/nav/nav_contact_active_24.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/nav/nav_contact_normal_24.svg b/public/assets/svg/nav/nav_contact_normal_24.svg deleted file mode 100644 index 2bf0d7c..0000000 --- a/public/assets/svg/nav/nav_contact_normal_24.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/nav/nav_message_active_24.svg b/public/assets/svg/nav/nav_message_active_24.svg deleted file mode 100644 index 3bc090a..0000000 --- a/public/assets/svg/nav/nav_message_active_24.svg +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - diff --git a/public/assets/svg/nav/nav_message_normal_24.svg b/public/assets/svg/nav/nav_message_normal_24.svg deleted file mode 100644 index b321ca0..0000000 --- a/public/assets/svg/nav/nav_message_normal_24.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/nav/nav_setting_normal_16.svg b/public/assets/svg/nav/nav_setting_normal_16.svg deleted file mode 100644 index f3be97e..0000000 --- a/public/assets/svg/nav/nav_setting_normal_16.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/nav/update_16.svg b/public/assets/svg/nav/update_16.svg deleted file mode 100644 index 674a1ba..0000000 --- a/public/assets/svg/nav/update_16.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/nav/update_24.svg b/public/assets/svg/nav/update_24.svg deleted file mode 100644 index 726ca72..0000000 --- a/public/assets/svg/nav/update_24.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/open_file_16.svg b/public/assets/svg/open_file_16.svg deleted file mode 100644 index c221dee..0000000 --- a/public/assets/svg/open_file_16.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/open_file_24.svg b/public/assets/svg/open_file_24.svg deleted file mode 100644 index a890ae5..0000000 --- a/public/assets/svg/open_file_24.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/paste_16.svg b/public/assets/svg/paste_16.svg deleted file mode 100644 index c7c3263..0000000 --- a/public/assets/svg/paste_16.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/paste_24.svg b/public/assets/svg/paste_24.svg deleted file mode 100644 index d8d92bf..0000000 --- a/public/assets/svg/paste_24.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/pause_16.svg b/public/assets/svg/pause_16.svg deleted file mode 100644 index 91f0631..0000000 --- a/public/assets/svg/pause_16.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/pause_24.svg b/public/assets/svg/pause_24.svg deleted file mode 100644 index 371e61f..0000000 --- a/public/assets/svg/pause_24.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/pause_circle_16.svg b/public/assets/svg/pause_circle_16.svg deleted file mode 100644 index 51ade29..0000000 --- a/public/assets/svg/pause_circle_16.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/pause_circle_24.svg b/public/assets/svg/pause_circle_24.svg deleted file mode 100644 index f0f8195..0000000 --- a/public/assets/svg/pause_circle_24.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/pause_circle_filled_16.svg b/public/assets/svg/pause_circle_filled_16.svg deleted file mode 100644 index 2bb62fb..0000000 --- a/public/assets/svg/pause_circle_filled_16.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/pause_circle_filled_24.svg b/public/assets/svg/pause_circle_filled_24.svg deleted file mode 100644 index 2337d18..0000000 --- a/public/assets/svg/pause_circle_filled_24.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/question_16.svg b/public/assets/svg/question_16.svg deleted file mode 100644 index de7cbe7..0000000 --- a/public/assets/svg/question_16.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/question_24.svg b/public/assets/svg/question_24.svg deleted file mode 100644 index 1673d12..0000000 --- a/public/assets/svg/question_24.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/search.svg b/public/assets/svg/search.svg deleted file mode 100644 index 14d1753..0000000 --- a/public/assets/svg/search.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/public/assets/svg/star_16.svg b/public/assets/svg/star_16.svg deleted file mode 100644 index f616da8..0000000 --- a/public/assets/svg/star_16.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/star_24.svg b/public/assets/svg/star_24.svg deleted file mode 100644 index 3178bce..0000000 --- a/public/assets/svg/star_24.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/tick_16.svg b/public/assets/svg/tick_16.svg deleted file mode 100644 index 1db769b..0000000 --- a/public/assets/svg/tick_16.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/tick_24.svg b/public/assets/svg/tick_24.svg deleted file mode 100644 index 7d4e98b..0000000 --- a/public/assets/svg/tick_24.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/transmission_file_16.svg b/public/assets/svg/transmission_file_16.svg deleted file mode 100644 index b017796..0000000 --- a/public/assets/svg/transmission_file_16.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/transmission_file_24.svg b/public/assets/svg/transmission_file_24.svg deleted file mode 100644 index 7b6e05b..0000000 --- a/public/assets/svg/transmission_file_24.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/update_16.svg b/public/assets/svg/update_16.svg deleted file mode 100644 index 674a1ba..0000000 --- a/public/assets/svg/update_16.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/update_24.svg b/public/assets/svg/update_24.svg deleted file mode 100644 index 726ca72..0000000 --- a/public/assets/svg/update_24.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/user.svg b/public/assets/svg/user.svg deleted file mode 100644 index 8e6b3fe..0000000 --- a/public/assets/svg/user.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/user_24.svg b/public/assets/svg/user_24.svg deleted file mode 100644 index 4bcfc44..0000000 --- a/public/assets/svg/user_24.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/voice_high_16.svg b/public/assets/svg/voice_high_16.svg deleted file mode 100644 index 46ef331..0000000 --- a/public/assets/svg/voice_high_16.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/voice_high_24.svg b/public/assets/svg/voice_high_24.svg deleted file mode 100644 index 77959cb..0000000 --- a/public/assets/svg/voice_high_24.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/zoom_in_16.svg b/public/assets/svg/zoom_in_16.svg deleted file mode 100644 index 86e8a10..0000000 --- a/public/assets/svg/zoom_in_16.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/zoom_in_24.svg b/public/assets/svg/zoom_in_24.svg deleted file mode 100644 index 26cd857..0000000 --- a/public/assets/svg/zoom_in_24.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/zoom_out_16.svg b/public/assets/svg/zoom_out_16.svg deleted file mode 100644 index 3b7b943..0000000 --- a/public/assets/svg/zoom_out_16.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/svg/zoom_out_24.svg b/public/assets/svg/zoom_out_24.svg deleted file mode 100644 index 41ed179..0000000 --- a/public/assets/svg/zoom_out_24.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/App.vue b/src/App.vue index 4689e7a..1be21bf 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,11 +1,7 @@ - + @@ -14,7 +10,6 @@ import TitleBar from './components/common/TitleBar.vue'; .app { width: 100%; height: 100%; - padding: 0 0; display: flex; flex-direction: column; justify-content: center; diff --git a/src/assets/icon.png b/src/assets/icon.png deleted file mode 100644 index bd13b8b..0000000 Binary files a/src/assets/icon.png and /dev/null differ diff --git a/src/assets/png/avatar.png.jpg b/src/assets/png/avatar.png.jpg deleted file mode 100644 index be6a4fe..0000000 Binary files a/src/assets/png/avatar.png.jpg and /dev/null differ diff --git a/src/assets/png/c4ccf3a3-4b98-4056-a480-a2ef1d63158f.png b/src/assets/png/c4ccf3a3-4b98-4056-a480-a2ef1d63158f.png deleted file mode 100644 index 543d8db..0000000 Binary files a/src/assets/png/c4ccf3a3-4b98-4056-a480-a2ef1d63158f.png and /dev/null differ diff --git a/src/assets/png/c61ad9e2-8cf5-43d5-b043-1e21a582182d.png b/src/assets/png/c61ad9e2-8cf5-43d5-b043-1e21a582182d.png deleted file mode 100644 index e10f08a..0000000 Binary files a/src/assets/png/c61ad9e2-8cf5-43d5-b043-1e21a582182d.png and /dev/null differ diff --git a/src/components/common/InputBox/InputSearch.vue b/src/components/common/InputBox/InputSearch.vue deleted file mode 100644 index 131ddaa..0000000 --- a/src/components/common/InputBox/InputSearch.vue +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/src/components/common/PopMenu/PopMenu.vue b/src/components/common/PopMenu/PopMenu.vue deleted file mode 100644 index d12e8df..0000000 --- a/src/components/common/PopMenu/PopMenu.vue +++ /dev/null @@ -1,110 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/components/common/PopMenu/PopMenuItem.vue b/src/components/common/PopMenu/PopMenuItem.vue deleted file mode 100644 index 2fa6737..0000000 --- a/src/components/common/PopMenu/PopMenuItem.vue +++ /dev/null @@ -1,129 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/components/common/PopMenu/index.d.ts b/src/components/common/PopMenu/index.d.ts deleted file mode 100644 index 8844289..0000000 --- a/src/components/common/PopMenu/index.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { iconMap, type IconKey } from '../../../util/icon/iconMap'; - -interface PopMenuAttributeInterface { - items: PopMenuItemInterface[]; - position?: { - x: number; - y: number; - }; - visible: boolean; - autoPositioning?: boolean; -} - -interface PopMenuItemInterface{ - name: string; - icon?:IconKey; - click?: () => void; - children?: PopMenuAttributeInterface; - disabled?: boolean; - divider?: boolean; -} - -export {PopMenuAttributeInterface, PopMenuItemInterface} diff --git a/src/components/common/SvgIcon.vue b/src/components/common/SvgIcon.vue deleted file mode 100644 index b09139f..0000000 --- a/src/components/common/SvgIcon.vue +++ /dev/null @@ -1,66 +0,0 @@ - - - - - diff --git a/src/components/common/TitleBar.vue b/src/components/common/TitleBar.vue deleted file mode 100644 index 01bf1ab..0000000 --- a/src/components/common/TitleBar.vue +++ /dev/null @@ -1,86 +0,0 @@ - - - diff --git a/src/components/mainwindow/ChatView/ChatContent.vue b/src/components/mainwindow/ChatView/ChatContent.vue deleted file mode 100644 index d483c37..0000000 --- a/src/components/mainwindow/ChatView/ChatContent.vue +++ /dev/null @@ -1,29 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/components/mainwindow/ChatView/ChatInput.vue b/src/components/mainwindow/ChatView/ChatInput.vue deleted file mode 100644 index e705e62..0000000 --- a/src/components/mainwindow/ChatView/ChatInput.vue +++ /dev/null @@ -1,18 +0,0 @@ - - - \ No newline at end of file diff --git a/src/components/mainwindow/MessageList/MessageListItem.vue b/src/components/mainwindow/MessageList/MessageListItem.vue deleted file mode 100644 index 21873a9..0000000 --- a/src/components/mainwindow/MessageList/MessageListItem.vue +++ /dev/null @@ -1,103 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/components/mainwindow/NavBar.vue b/src/components/mainwindow/NavBar.vue deleted file mode 100644 index e8e7950..0000000 --- a/src/components/mainwindow/NavBar.vue +++ /dev/null @@ -1,110 +0,0 @@ - - - \ No newline at end of file diff --git a/src/components/mainwindow/SideBar.vue b/src/components/mainwindow/SideBar.vue deleted file mode 100644 index 3ac5680..0000000 --- a/src/components/mainwindow/SideBar.vue +++ /dev/null @@ -1,138 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/composables/SideBar/useBadge.ts b/src/composables/SideBar/useBadge.ts deleted file mode 100644 index 16f6fa9..0000000 --- a/src/composables/SideBar/useBadge.ts +++ /dev/null @@ -1,68 +0,0 @@ -/** - * @description: 侧边栏导航栏数据 - * @module useBadge - * @date 2024-04-10 - */ -import { NavBarItem } from '../../components/mainwindow/NavBar.vue'; -import { ref } from 'vue'; - -export const navData = ref([ - { - icon: 'message', - activeIcon: 'messageActive', - routeName: 'MessageList', - isTab: true, - default: true, - badgeType: 'none', - }, - { - icon: 'contact', - activeIcon: 'contactActive', - routeName: 'contactlist', - isTab: true, - badgeType: 'none', - } -]) - -export const bottomNavData = ref([ - { - icon: 'setting', - activeIcon: 'setting', - routeName: 'setting', - isTab: false, - badgeType: 'none', - }, - { - icon: 'collection', - activeIcon: 'collection', - routeName: 'collection', - isTab: false, - badgeType: 'none', - }, - { - icon: 'folder', - activeIcon: 'folder', - routeName: 'folder', - isTab: false, - badgeType: 'dot', - }, - { - icon: 'menu', - activeIcon: 'menu', - /*click属性等待注入*/ - isTab: false, - badgeType: 'none', - } - -]) -export const setNavBadge=(badgeType: 'dot' | 'number' | 'none', iconType: 'message' | 'contact' | 'setting' | 'collection' | 'folder' | 'menu', number?: number)=> { - const index = navData.value.findIndex((item) => item.icon === iconType); - if (index !== -1) { - navData.value[index].badgeType = badgeType; - if (badgeType === 'number') { - navData.value[index].badgeNumber = number; - } else { - navData.value[index].badgeNumber = 0; - } - } -} diff --git a/src/electron/window.ts b/src/electron/window.ts index 0c473bf..7714928 100644 --- a/src/electron/window.ts +++ b/src/electron/window.ts @@ -127,10 +127,6 @@ export default class Window { window.electron.maximizeWindow(); } - static setMinimumSize(width: number, height: number) { - window.electron.setMinimumSize(width, height); - } - static restoreWindow() { window.electron.restoreWindow(); } @@ -143,107 +139,107 @@ export default class Window { window.electron.destroyWindow(); } - // static async getWindowPosition() { - // return await window.electron.getWindowPosition().then((position) => { - // return position; - // }); - // } - - // static async getWindowSize() { - // return await window.electron.getWindowSize().then((size) => { - // return size; - // }); - // } - - // static async getWindowTitle() { - // return await window.electron.getWindowTitle().then((title) => { - // return title; - // }); - // } - - // static async getWindowBackgroundColor() { - // return await window.electron.getWindowBackgroundColor().then((color) => { - // return color; - // }); - // } - - // static async getWindowOpacity() { - // return await window.electron.getWindowOpacity().then((opacity) => { - // return opacity; - // }); - // } - - // static async isWindowVisible() { - // return await window.electron.isWindowVisible().then((visible) => { - // return visible; - // }); - // } - - // static async isWindowMaximized() { - // return await window.electron.isWindowMaximized().then((maximized) => { - // return maximized; - // }); - // } - - // static async isWindowMinimized() { - // return await window.electron.isWindowMinimized().then((minimized) => { - // return minimized; - // }); - // } - - // static async isWindowFullScreen() { - // return await window.electron.isWindowFullScreen().then((fullScreen) => { - // return fullScreen; - // }); - // } - - // static async isWindowResizable() { - // return await window.electron.isWindowResizable().then((resizable) => { - // return resizable; - // }); - // } - - // static async isWindowVisibleOnAllWorkspaces() { - // return await window.electron - // .isWindowVisibleOnAllWorkspaces() - // .then((visible) => { - // return visible; - // }); - // } - - // static async isWindowAlwaysOnTop() { - // return await window.electron.isWindowAlwaysOnTop().then((alwaysOnTop) => { - // return alwaysOnTop; - // }); - // } - - // static async isWindowMovable() { - // return await window.electron.isWindowMovable().then((movable) => { - // return movable; - // }); - // } - - // static async isWindowMinimizable() { - // return await window.electron.isWindowMinimizable().then((minimizable) => { - // return minimizable; - // }); - // } - - // static async isWindowMaximizable() { - // return await window.electron.isWindowMaximizable().then((maximizable) => { - // return maximizable; - // }); - // } - - // static async isWindowClosable() { - // return await window.electron.isWindowClosable().then((closable) => { - // return closable; - // }); - // } - - // static async isWindowMenuBarVisible() { - // return await window.electron.isWindowMenuBarVisible().then((visible) => { - // return visible; - // }); - // } + static async getWindowPosition() { + return await window.electron.getWindowPosition().then((position) => { + return position; + }); + } + + static async getWindowSize() { + return await window.electron.getWindowSize().then((size) => { + return size; + }); + } + + static async getWindowTitle() { + return await window.electron.getWindowTitle().then((title) => { + return title; + }); + } + + static async getWindowBackgroundColor() { + return await window.electron.getWindowBackgroundColor().then((color) => { + return color; + }); + } + + static async getWindowOpacity() { + return await window.electron.getWindowOpacity().then((opacity) => { + return opacity; + }); + } + + static async isWindowVisible() { + return await window.electron.isWindowVisible().then((visible) => { + return visible; + }); + } + + static async isWindowMaximized() { + return await window.electron.isWindowMaximized().then((maximized) => { + return maximized; + }); + } + + static async isWindowMinimized() { + return await window.electron.isWindowMinimized().then((minimized) => { + return minimized; + }); + } + + static async isWindowFullScreen() { + return await window.electron.isWindowFullScreen().then((fullScreen) => { + return fullScreen; + }); + } + + static async isWindowResizable() { + return await window.electron.isWindowResizable().then((resizable) => { + return resizable; + }); + } + + static async isWindowVisibleOnAllWorkspaces() { + return await window.electron + .isWindowVisibleOnAllWorkspaces() + .then((visible) => { + return visible; + }); + } + + static async isWindowAlwaysOnTop() { + return await window.electron.isWindowAlwaysOnTop().then((alwaysOnTop) => { + return alwaysOnTop; + }); + } + + static async isWindowMovable() { + return await window.electron.isWindowMovable().then((movable) => { + return movable; + }); + } + + static async isWindowMinimizable() { + return await window.electron.isWindowMinimizable().then((minimizable) => { + return minimizable; + }); + } + + static async isWindowMaximizable() { + return await window.electron.isWindowMaximizable().then((maximizable) => { + return maximizable; + }); + } + + static async isWindowClosable() { + return await window.electron.isWindowClosable().then((closable) => { + return closable; + }); + } + + static async isWindowMenuBarVisible() { + return await window.electron.isWindowMenuBarVisible().then((visible) => { + return visible; + }); + } } diff --git a/src/route/index.ts b/src/route/index.ts index f177e37..f454396 100644 --- a/src/route/index.ts +++ b/src/route/index.ts @@ -16,24 +16,6 @@ const routes: RouteRecordRaw[] = [ path: "/home", name: "home", component: () => import("../view/MainWindow.vue"), - children:[ - { - path: "messagelist", - name: "MessageList", - component: () => import("../view/mainwindow/MessageList.vue"), - // children:[ - // { - // path: "chatroom/:id", - // name: "chatroom", - // component: () => import("../view/mainwindow/ChatRoom.vue"), - // } - // ] - },{ - path: "contactlist", - name: "contactlist", - component: () => import("../view/mainwindow/ContactList.vue"), - } - ] }, ]; diff --git a/src/style.css b/src/style.css index 0eab0dc..1d5d53f 100644 --- a/src/style.css +++ b/src/style.css @@ -15,109 +15,15 @@ html.dark { --main-bg-color: rgb(40, 40, 40); - --main-fore-color: #ffffff; - - --dim-background-color: rgb(50, 50, 50); - --dim2-background-color: rgb(55, 55, 55); - --dim3-background-color: rgb(60, 60, 60); - --dim4-background-color: rgb(65, 65, 6); - --dim5-background-color: rgb(70, 70, 70); - --dim6-background-color: rgb(75, 75, 75); - --dim7-background-color: rgb(80, 80, 80); - --dim8-background-color: rgb(85, 85, 85); - --dim9-background-color: rgb(90, 90, 90); - - --sidebar-background-color:#1F1F1F; - - --bar-gradient-color: linear-gradient(135deg,#2F2932 0%,#13212F 100%); - - --nav-icon-color: rgb(255, 255, 255, 0.7); - --nav-icon-color-active: #0065d1; - - --mv-list-background-color: #1B1B1B; - - --pop-menu-background-color: rgba(40, 40, 40, 0.3); - --pop-item-background-color-hover: var(--dim2-background-color); - --pop-item-background-color-active: rgba(35, 35, 35,0.2); - --pop-menu-border-color:rgba(80, 80, 80); - --pop-menu-box-shadow: none; - - --inputbox-background-color: #282828; - --inputbox-background-color-hover: #808080; - --inputbox-border-color-active: #0066CC ; - --inputbox-placeholder-color: #e3e3e3; - - --list-item-background-color: #1B1B1B; - --list-item-background-color-hover: #2D2D2D; - --list-item-background-color-active: #162A3F; - --list-item-background-color-top: #282828; - - --tip-grey-fore-color: #808080; - - --grey-button-background-color: #393939; - --grey-button-background-color-hover: #222222; - - --topbar-icon-color: var(--main-fore-color); - --topbar-icon-color-hover: #0066CC ; - - --border-bottom-color: #393B40; } html { --main-bg-color: white; --main-fore-color: rgb(40, 40, 40); - --dim-background-color: rgba(250, 250, 250, 0.9); - --dim2-background-color: rgba(250, 250, 250, 0.8); - --dim3-background-color: rgba(250, 250, 250, 0.7); - --dim4-background-color: rgba(250, 250, 250, 0.6); - --dim5-background-color: rgba(250, 250, 250, 0.5); - --dim6-background-color: rgba(250, 250, 250, 0.4); - --dim7-background-color: rgba(250, 250, 250, 0.3); - --dim8-background-color: rgba(250, 250, 250, 0.2); - --dim9-background-color: rgba(250, 250, 250, 0.1); - - --sidebar-background-color: #0099FF; - - --bar-gradient-color: linear-gradient(125deg,#FEF3FF 0%,#D9EBFF 100%); - - --nav-icon-color: rgba(255, 255, 255, 0.7); - - --nav-icon-color-active: #fff; - - --mv-list-background-color: #ffffff; - - --pop-menu-background-color: var(--dim2-background-color); - --pop-item-background-color-hover: rgba(240, 240, 240, 0.1); - --pop-item-background-color-active: rgba(230, 230, 230, 0.2); - --pop-menu-box-shadow: 8px 6px 10px 0px rgba(196, 196, 196, 0.2); - - --inputbox-background-color: #F5F5F5; - --inputbox-placeholder-color: #999999; - --inputbox-border-color-active: #0099FF; - --inputbox-background-color-hover: #5e5e5e; - - --grey-button-background-color: #EBEBEB; - --grey-button-background-color-active: #D7D7D7; - - --list-item-background-color: #FFFFFF; - --list-item-background-color-hover: #F5F5F5; - --list-item-background-color-active: #CCEBFF; - --list-item-background-color-top: #E7E7E7; - - --tip-grey-fore-color: #a2a2a2; - background-color: var(--main-bg-color); - color: var(--main-fore-color); - - --pop-menu-border-color:none; - - --topbar-icon-color: var(--main-fore-color); - --topbar-icon-color-hover:var(--sidebar-background-color) ; - - --border-bottom-color: #d9d9d9; } @@ -129,7 +35,7 @@ body { #app { margin: 0 auto; - padding: 0; + padding: 2rem; text-align: center; } @@ -160,7 +66,7 @@ body { align-items: center; } -.flex-row-space-between { +.flex-row-space-bettween { display: flex; flex-direction: row; justify-content: space-between; @@ -179,19 +85,13 @@ body { justify-content: center; } -.flex-column-space-between { - display: flex; - flex-direction: column; - justify-content: space-between; -} - .flex-row { - display: flex; + display: row; flex-direction: row; } .flex-column { - display: flex; + display: column; flex-direction: column; } @@ -214,28 +114,4 @@ body { color: #213547; background-color: #ffffff; } -} */ - -/* 为滚动条整体设置样式 */ -::-webkit-scrollbar { - width: 6px; - height: 6px; -} - -/* 为滚动条的轨道设置样式 */ -::-webkit-scrollbar-track { - background: rgba(#101F1C, 0.1); - border-radius: 2em; -} - -/* 为滚动条的滑块设置样式 */ -::-webkit-scrollbar-thumb { - background-color: rgba(144, 147, 153, .3); - border-radius: 2em; - transition: background-color .3s; -} - -/* 当鼠标悬停在滑块上时改变滑块的颜色 */ -::-webkit-scrollbar-thumb:hover { - background-color: rgba(144, 147, 153, .1); -} \ No newline at end of file +} */ \ No newline at end of file diff --git a/src/types/ElectronRawApi.d.ts b/src/types/ElectronRawApi.d.ts index 1c7fda8..fd26a6d 100644 --- a/src/types/ElectronRawApi.d.ts +++ b/src/types/ElectronRawApi.d.ts @@ -33,28 +33,27 @@ declare interface Window { setWindowPosition: (x: number, y: number) => void; setWindowOpacity: (opacity: number) => void; setWindowInTaskbar: (inTaskbar: boolean) => void; - setMinimumSize: (width: number, height: number) => void; minimizeWindow: () => void; maximizeWindow: () => void; restoreWindow: () => void; closeWindow: () => void; destroyWindow: () => void; - // getWindowPosition: () => Promise<{ x: number; y: number }>; - // getWindowSize: () => Promise<{ width: number; height: number }>; - // getWindowTitle: () => Promise; - // getWindowBackgroundColor: () => Promise; - // getWindowOpacity: () => Promise; - // isWindowVisible: () => Promise; - // isWindowMaximized: () => Promise; - // isWindowMinimized: () => Promise; - // isWindowFullScreen: () => Promise; - // isWindowResizable: () => Promise; - // isWindowVisibleOnAllWorkspaces: () => Promise; - // isWindowAlwaysOnTop: () => Promise; - // isWindowMovable: () => Promise; - // isWindowMinimizable: () => Promise; - // isWindowMaximizable: () => Promise; - // isWindowClosable: () => Promise; - // isWindowMenuBarVisible: () => Promise; + getWindowPosition: () => Promise<{ x: number; y: number }>; + getWindowSize: () => Promise<{ width: number; height: number }>; + getWindowTitle: () => Promise; + getWindowBackgroundColor: () => Promise; + getWindowOpacity: () => Promise; + isWindowVisible: () => Promise; + isWindowMaximized: () => Promise; + isWindowMinimized: () => Promise; + isWindowFullScreen: () => Promise; + isWindowResizable: () => Promise; + isWindowVisibleOnAllWorkspaces: () => Promise; + isWindowAlwaysOnTop: () => Promise; + isWindowMovable: () => Promise; + isWindowMinimizable: () => Promise; + isWindowMaximizable: () => Promise; + isWindowClosable: () => Promise; + isWindowMenuBarVisible: () => Promise; }; } diff --git a/src/util/icon/iconMap.ts b/src/util/icon/iconMap.ts deleted file mode 100644 index 6745ba8..0000000 --- a/src/util/icon/iconMap.ts +++ /dev/null @@ -1,76 +0,0 @@ -/** - * @description: 图标映射表 - * @module iconMap - * @date 2024-04-09 - */ - -import MessageIcon from '/assets/svg/nav/nav_message_normal_24.svg'; -import MessageActiveIcon from '/assets/svg/nav/nav_message_active_24.svg'; -import ContactIcon from '/assets/svg/nav/nav_contact_normal_24.svg'; -import ContactActiveIcon from '/assets/svg/nav/nav_contact_active_24.svg'; -import SettingIcon from '/assets/svg/nav/nav_setting_normal_16.svg'; -import Collection from '/assets/svg/nav/collection_24.svg'; -import Menu from '/assets/svg/nav/menu_24.svg'; -import Folder from '/assets/svg/nav/folder_24.svg'; -import Lock from '/assets/svg/lock_24.svg'; -import Caution from '/assets/svg/caution_24.svg'; -import Esc from '/assets/svg/esc_24.svg'; -import Question from '/assets/svg/question_24.svg'; -import Update from '/assets/svg/update_24.svg'; -import arrowRightSmall from '/assets/svg/arrow_right_small_16.svg'; -import Close from '/assets/svg/close_24.svg'; -import Minimize from '/assets/svg/minimize_24.svg'; -import Max from '/assets/svg/max_24.svg'; -import Brush from '/assets/svg/brush_24.svg'; -import Search from '/assets/svg/search.svg'; -import Add from '/assets/svg/add_24.svg'; -import More from '/assets/svg/more_24.svg'; -// 图标 key 类型 -export type IconKey = - | 'message' - | 'messageActive' - | 'contact' - | 'contactActive' - | 'setting' - | 'collection' - | 'menu' - | 'folder' - | 'lock' - | 'caution' - | 'esc' - | 'question' - | 'update' - | 'arrowRightSmall' - | 'close' - | 'minimize' - | 'max' - | 'brush' - | 'search' - | 'add' - | 'more'; - -// 图标映射表 -export const iconMap: Record = { - message: MessageIcon, - messageActive: MessageActiveIcon, - contact: ContactIcon, - contactActive: ContactActiveIcon, - setting: SettingIcon, - collection: Collection, - menu: Menu, - folder: Folder, - lock: Lock, - caution: Caution, - esc :Esc, - question: Question, - update: Update, - arrowRightSmall: arrowRightSmall, - close: Close, - minimize: Minimize, - max: Max, - brush: Brush, - search: Search, - add: Add, - more: More, -}; - diff --git a/src/view/Login.vue b/src/view/Login.vue index c65aa55..e51e83f 100644 --- a/src/view/Login.vue +++ b/src/view/Login.vue @@ -30,7 +30,7 @@
记住我 - 注册 + 注册
@@ -54,7 +54,7 @@ {{ messageRegister }}
- +
@@ -228,7 +228,7 @@ const login = () => { return; } console.log('loginData', loginData.value); - Window.createNewWindow('/home/messagelist', 900, 700, false); + Window.createNewWindow('/home', 400, 400, true); } @@ -245,34 +245,20 @@ watch(isDark, (newValue) => { immediate: true, deep: true }) +watch(isLogin, (newValue) => { + if (newValue) { + // window.electron.setWindowFrameVisible(true); + Window.setWindowTitle('登录'); + Window.setWindowSize(350, 500); + } else { + window.electron.setWindowTitle('注册'); + window.electron.resizeWindow(350, 580); + } +}, { + immediate: true, + deep: true +}) -// watch(isLogin.value, (newValue) => { -// if (newValue) { -// // window.electron.setWindowFrameVisible(true); -// Window.setWindowTitle('登录'); -// Window.setWindowSize(350, 400); -// } else { -// window.electron.setWindowTitle('注册'); -// window.electron.resizeWindow(350, 580); -// } -// }, { -// immediate: true, -// deep: true -// }) - -const toggleState = (login: boolean) => { - Window.setWindowResizable(true); - if(login){ - Window.setWindowTitle('登录'); - - Window.setWindowSize(350, 500); - }else{ - window.electron.setWindowTitle('注册'); - window.electron.resizeWindow(350, 580); - } - isLogin.value = !isLogin.value; - Window.setWindowResizable(false); -} onMounted(() => { window.electron.setWindowTitle('登录'); //防止页面滚动 @@ -280,7 +266,6 @@ onMounted(() => { if (body) { body.style.overflow = 'hidden'; } - Window.setWindowResizable(false); }) diff --git a/src/view/MainWindow.vue b/src/view/MainWindow.vue index bee6ca8..e6000dc 100644 --- a/src/view/MainWindow.vue +++ b/src/view/MainWindow.vue @@ -1,73 +1,5 @@ - - - - - \ No newline at end of file + + \ No newline at end of file diff --git a/src/view/mainwindow/ChatView.vue b/src/view/mainwindow/ChatView.vue deleted file mode 100644 index 2a636a9..0000000 --- a/src/view/mainwindow/ChatView.vue +++ /dev/null @@ -1,26 +0,0 @@ - - - \ No newline at end of file diff --git a/src/view/mainwindow/ContactList.vue b/src/view/mainwindow/ContactList.vue deleted file mode 100644 index 250f44b..0000000 --- a/src/view/mainwindow/ContactList.vue +++ /dev/null @@ -1,6 +0,0 @@ - - \ No newline at end of file diff --git a/src/view/mainwindow/ListView.vue b/src/view/mainwindow/ListView.vue deleted file mode 100644 index f29ce65..0000000 --- a/src/view/mainwindow/ListView.vue +++ /dev/null @@ -1,63 +0,0 @@ - - - \ No newline at end of file diff --git a/src/view/mainwindow/MessageList.vue b/src/view/mainwindow/MessageList.vue deleted file mode 100644 index a80a024..0000000 --- a/src/view/mainwindow/MessageList.vue +++ /dev/null @@ -1,51 +0,0 @@ - - - - - \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json index c84de58..39a1578 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -21,19 +21,14 @@ "strict": false, "noUnusedLocals": true, "noUnusedParameters": true, - "noFallthroughCasesInSwitch": true, - "baseUrl": ".", - "paths": { - "@/*": ["src/*"] - } + "noFallthroughCasesInSwitch": true }, "include": [ "src/**/*.ts", "src/**/*.tsx", "src/**/*.vue", - "electron", + "electron" ], - "exclude": ["node_modules"], "references": [ { "path": "./tsconfig.node.json" diff --git a/vite.config.ts b/vite.config.ts index ac22c63..7ed6143 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -5,13 +5,11 @@ import vue from "@vitejs/plugin-vue"; import AutoImport from "unplugin-auto-import/vite"; import Components from "unplugin-vue-components/vite"; import { ElementPlusResolver } from "unplugin-vue-components/resolvers"; -import svgr from 'vite-plugin-svgr'; // https://vitejs.dev/config/ export default defineConfig({ plugins: [ vue(), - svgr(), electron({ main: { // Shortcut of `build.lib.entry`. @@ -38,9 +36,4 @@ export default defineConfig({ resolvers: [ElementPlusResolver()], }), ], - resolve: { - alias: { - '@': path.resolve(__dirname, 'src'), - }, - }, }); diff --git a/vite.config.ts.timestamp-1744225182689-98e3a8e5570f9.mjs b/vite.config.ts.timestamp-1744225182689-98e3a8e5570f9.mjs deleted file mode 100644 index f7832a4..0000000 --- a/vite.config.ts.timestamp-1744225182689-98e3a8e5570f9.mjs +++ /dev/null @@ -1,45 +0,0 @@ -// vite.config.ts -import { defineConfig } from "file:///E:/Document/Projects/flow_im/node_modules/.store/vite@5.4.17/node_modules/vite/dist/node/index.js"; -import path from "node:path"; -import electron from "file:///E:/Document/Projects/flow_im/node_modules/.store/vite-plugin-electron@0.28.8/node_modules/vite-plugin-electron/dist/simple.mjs"; -import vue from "file:///E:/Document/Projects/flow_im/node_modules/.store/@vitejs+plugin-vue@5.2.3/node_modules/@vitejs/plugin-vue/dist/index.mjs"; -import AutoImport from "file:///E:/Document/Projects/flow_im/node_modules/.store/unplugin-auto-import@19.1.2/node_modules/unplugin-auto-import/dist/vite.js"; -import Components from "file:///E:/Document/Projects/flow_im/node_modules/.store/unplugin-vue-components@28.4.1/node_modules/unplugin-vue-components/dist/vite.js"; -import { ElementPlusResolver } from "file:///E:/Document/Projects/flow_im/node_modules/.store/unplugin-vue-components@28.4.1/node_modules/unplugin-vue-components/dist/resolvers.js"; -var __vite_injected_original_dirname = "E:\\Document\\Projects\\flow_im"; -var vite_config_default = defineConfig({ - plugins: [ - vue(), - electron({ - main: { - // Shortcut of `build.lib.entry`. - entry: "electron/main.ts" - }, - preload: { - // Shortcut of `build.rollupOptions.input`. - // Preload scripts may contain Web assets, so use the `build.rollupOptions.input` instead `build.lib.entry`. - input: path.join(__vite_injected_original_dirname, "electron/preload.ts") - }, - // Ployfill the Electron and Node.js API for Renderer process. - // If you want use Node.js in Renderer process, the `nodeIntegration` needs to be enabled in the Main process. - // See 👉 https://github.com/electron-vite/vite-plugin-electron-renderer - renderer: process.env.NODE_ENV === "test" ? ( - // https://github.com/electron-vite/vite-plugin-electron-renderer/issues/78#issuecomment-2053600808 - void 0 - ) : {} - }), - AutoImport({ - resolvers: [ - ElementPlusResolver() - /* auto import element-plus */ - ] - }), - Components({ - resolvers: [ElementPlusResolver()] - }) - ] -}); -export { - vite_config_default as default -}; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsidml0ZS5jb25maWcudHMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbImNvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9kaXJuYW1lID0gXCJFOlxcXFxEb2N1bWVudFxcXFxQcm9qZWN0c1xcXFxmbG93X2ltXCI7Y29uc3QgX192aXRlX2luamVjdGVkX29yaWdpbmFsX2ZpbGVuYW1lID0gXCJFOlxcXFxEb2N1bWVudFxcXFxQcm9qZWN0c1xcXFxmbG93X2ltXFxcXHZpdGUuY29uZmlnLnRzXCI7Y29uc3QgX192aXRlX2luamVjdGVkX29yaWdpbmFsX2ltcG9ydF9tZXRhX3VybCA9IFwiZmlsZTovLy9FOi9Eb2N1bWVudC9Qcm9qZWN0cy9mbG93X2ltL3ZpdGUuY29uZmlnLnRzXCI7aW1wb3J0IHsgZGVmaW5lQ29uZmlnIH0gZnJvbSBcInZpdGVcIjtcbmltcG9ydCBwYXRoIGZyb20gXCJub2RlOnBhdGhcIjtcbmltcG9ydCBlbGVjdHJvbiBmcm9tIFwidml0ZS1wbHVnaW4tZWxlY3Ryb24vc2ltcGxlXCI7XG5pbXBvcnQgdnVlIGZyb20gXCJAdml0ZWpzL3BsdWdpbi12dWVcIjtcbmltcG9ydCBBdXRvSW1wb3J0IGZyb20gXCJ1bnBsdWdpbi1hdXRvLWltcG9ydC92aXRlXCI7XG5pbXBvcnQgQ29tcG9uZW50cyBmcm9tIFwidW5wbHVnaW4tdnVlLWNvbXBvbmVudHMvdml0ZVwiO1xuaW1wb3J0IHsgRWxlbWVudFBsdXNSZXNvbHZlciB9IGZyb20gXCJ1bnBsdWdpbi12dWUtY29tcG9uZW50cy9yZXNvbHZlcnNcIjtcblxuLy8gaHR0cHM6Ly92aXRlanMuZGV2L2NvbmZpZy9cbmV4cG9ydCBkZWZhdWx0IGRlZmluZUNvbmZpZyh7XG4gIHBsdWdpbnM6IFtcbiAgICB2dWUoKSxcbiAgICBlbGVjdHJvbih7XG4gICAgICBtYWluOiB7XG4gICAgICAgIC8vIFNob3J0Y3V0IG9mIGBidWlsZC5saWIuZW50cnlgLlxuICAgICAgICBlbnRyeTogXCJlbGVjdHJvbi9tYWluLnRzXCIsXG4gICAgICB9LFxuICAgICAgcHJlbG9hZDoge1xuICAgICAgICAvLyBTaG9ydGN1dCBvZiBgYnVpbGQucm9sbHVwT3B0aW9ucy5pbnB1dGAuXG4gICAgICAgIC8vIFByZWxvYWQgc2NyaXB0cyBtYXkgY29udGFpbiBXZWIgYXNzZXRzLCBzbyB1c2UgdGhlIGBidWlsZC5yb2xsdXBPcHRpb25zLmlucHV0YCBpbnN0ZWFkIGBidWlsZC5saWIuZW50cnlgLlxuICAgICAgICBpbnB1dDogcGF0aC5qb2luKF9fZGlybmFtZSwgXCJlbGVjdHJvbi9wcmVsb2FkLnRzXCIpLFxuICAgICAgfSxcbiAgICAgIC8vIFBsb3lmaWxsIHRoZSBFbGVjdHJvbiBhbmQgTm9kZS5qcyBBUEkgZm9yIFJlbmRlcmVyIHByb2Nlc3MuXG4gICAgICAvLyBJZiB5b3Ugd2FudCB1c2UgTm9kZS5qcyBpbiBSZW5kZXJlciBwcm9jZXNzLCB0aGUgYG5vZGVJbnRlZ3JhdGlvbmAgbmVlZHMgdG8gYmUgZW5hYmxlZCBpbiB0aGUgTWFpbiBwcm9jZXNzLlxuICAgICAgLy8gU2VlIFx1RDgzRFx1REM0OSBodHRwczovL2dpdGh1Yi5jb20vZWxlY3Ryb24tdml0ZS92aXRlLXBsdWdpbi1lbGVjdHJvbi1yZW5kZXJlclxuICAgICAgcmVuZGVyZXI6XG4gICAgICAgIHByb2Nlc3MuZW52Lk5PREVfRU5WID09PSBcInRlc3RcIlxuICAgICAgICAgID8gLy8gaHR0cHM6Ly9naXRodWIuY29tL2VsZWN0cm9uLXZpdGUvdml0ZS1wbHVnaW4tZWxlY3Ryb24tcmVuZGVyZXIvaXNzdWVzLzc4I2lzc3VlY29tbWVudC0yMDUzNjAwODA4XG4gICAgICAgICAgICB1bmRlZmluZWRcbiAgICAgICAgICA6IHt9LFxuICAgIH0pLFxuICAgIEF1dG9JbXBvcnQoe1xuICAgICAgcmVzb2x2ZXJzOiBbRWxlbWVudFBsdXNSZXNvbHZlcigpIC8qIGF1dG8gaW1wb3J0IGVsZW1lbnQtcGx1cyAqL10sXG4gICAgfSksXG4gICAgQ29tcG9uZW50cyh7XG4gICAgICByZXNvbHZlcnM6IFtFbGVtZW50UGx1c1Jlc29sdmVyKCldLFxuICAgIH0pLFxuICBdLFxufSk7XG4iXSwKICAibWFwcGluZ3MiOiAiO0FBQThRLFNBQVMsb0JBQW9CO0FBQzNTLE9BQU8sVUFBVTtBQUNqQixPQUFPLGNBQWM7QUFDckIsT0FBTyxTQUFTO0FBQ2hCLE9BQU8sZ0JBQWdCO0FBQ3ZCLE9BQU8sZ0JBQWdCO0FBQ3ZCLFNBQVMsMkJBQTJCO0FBTnBDLElBQU0sbUNBQW1DO0FBU3pDLElBQU8sc0JBQVEsYUFBYTtBQUFBLEVBQzFCLFNBQVM7QUFBQSxJQUNQLElBQUk7QUFBQSxJQUNKLFNBQVM7QUFBQSxNQUNQLE1BQU07QUFBQTtBQUFBLFFBRUosT0FBTztBQUFBLE1BQ1Q7QUFBQSxNQUNBLFNBQVM7QUFBQTtBQUFBO0FBQUEsUUFHUCxPQUFPLEtBQUssS0FBSyxrQ0FBVyxxQkFBcUI7QUFBQSxNQUNuRDtBQUFBO0FBQUE7QUFBQTtBQUFBLE1BSUEsVUFDRSxRQUFRLElBQUksYUFBYTtBQUFBO0FBQUEsUUFFckI7QUFBQSxVQUNBLENBQUM7QUFBQSxJQUNULENBQUM7QUFBQSxJQUNELFdBQVc7QUFBQSxNQUNULFdBQVc7QUFBQSxRQUFDLG9CQUFvQjtBQUFBO0FBQUEsTUFBZ0M7QUFBQSxJQUNsRSxDQUFDO0FBQUEsSUFDRCxXQUFXO0FBQUEsTUFDVCxXQUFXLENBQUMsb0JBQW9CLENBQUM7QUFBQSxJQUNuQyxDQUFDO0FBQUEsRUFDSDtBQUNGLENBQUM7IiwKICAibmFtZXMiOiBbXQp9Cg==