initial: LAN IM desktop app (Electron 32 + Vue 3 + TS + SQLite)

This commit is contained in:
2026-07-15 18:31:13 +08:00
commit 07c7260a3c
43 changed files with 12320 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
// 把候选 logo 处理成 app icon:
// - 转 PNG (白色背景填充为透明)
// - 缩放到 1024x1024 (electron-builder 推荐)
// - 顺便输出 256x256 给 renderer 用
const sharp = require('sharp')
const path = require('node:path')
const SRC = path.resolve(__dirname, '..', 'resources', 'logo-candidate_004.jpg')
async function main() {
const out1024 = path.resolve(__dirname, '..', 'resources', 'icon.png')
const out256 = path.resolve(__dirname, '..', 'resources', 'icon-256.png')
// 缩放到 1024x1024, JPEG 白色背景保持 (Windows 图标习惯)
await sharp(SRC)
.resize(1024, 1024, { fit: 'cover', position: 'center' })
.png({ quality: 95 })
.toFile(out1024)
await sharp(SRC)
.resize(256, 256, { fit: 'cover', position: 'center' })
.png()
.toFile(out256)
console.log('Generated:', out1024, out256)
}
main().catch(e => { console.error(e); process.exit(1) })