feat: overhaul application to APM 应用商店 with enhanced download management

- Removed CHANGELOG.md and electron-vite-vue.gif files.
- Updated LICENSE to reflect new copyright holder.
- Transformed README.md to reflect new project identity and features.
- Introduced DownloadQueue and DownloadDetail components for managing downloads.
- Implemented download simulation and management logic in App.vue.
- Added URL scheme handling in Electron main process.
- Integrated electron-app-universal-protocol-client for protocol handling.
- Updated package.json to include new dependencies.
This commit is contained in:
Elysia
2026-01-17 23:17:14 +08:00
parent 4dd3bd321c
commit 9b17c57c5c
10 changed files with 1296 additions and 97 deletions

View File

@@ -1,8 +1,15 @@
import { app, BrowserWindow, shell, ipcMain } from 'electron'
import { app, BrowserWindow, shell, ipcMain, dialog } from 'electron'
import { createRequire } from 'node:module'
import { fileURLToPath } from 'node:url'
import path from 'node:path'
import os from 'node:os'
import { electronAppUniversalProtocolClient } from 'electron-app-universal-protocol-client'
import { handleUrlScheme } from './handle-url-scheme.js'
if (!app.requestSingleInstanceLock()) {
app.exit(0);
}
const require = createRequire(import.meta.url)
const __dirname = path.dirname(fileURLToPath(import.meta.url))
@@ -76,6 +83,17 @@ async function createWindow() {
return { action: 'deny' }
})
// win.webContents.on('will-navigate', (event, url) => { }) #344
// Initialize universal protocol client
electronAppUniversalProtocolClient.on(
'request',
handleUrlScheme
);
await electronAppUniversalProtocolClient.initialize({
protocol: 'apmstore',
mode: 'development', // Make sure to use 'production' when script is executed in bundled app
});
}
app.whenReady().then(createWindow)