d6cdac0895
- Updated configuration to exclude additional directories from electron-builder's build process. - Dropped the creation of the "files" table in the database schema. - Improved code organization and extracted the data path into a reusable function. - Updated database migration configuration to use a new migration manager. - Added database migration to create a table for file management. - A migration to remove the "files" table has been applied.
30 lines
594 B
TypeScript
30 lines
594 B
TypeScript
import fs from 'node:fs'
|
|
|
|
import { app } from 'electron'
|
|
import Store from 'electron-store'
|
|
import path from 'path'
|
|
|
|
const getDataPath = () => {
|
|
const dataPath = path.join(app.getPath('userData'), 'Data')
|
|
if (!fs.existsSync(dataPath)) {
|
|
fs.mkdirSync(dataPath, { recursive: true })
|
|
}
|
|
return dataPath
|
|
}
|
|
|
|
export const DATA_PATH = getDataPath()
|
|
|
|
export const appConfig = new Store()
|
|
|
|
export const titleBarOverlayDark = {
|
|
height: 41,
|
|
color: '#00000000',
|
|
symbolColor: '#ffffff'
|
|
}
|
|
|
|
export const titleBarOverlayLight = {
|
|
height: 41,
|
|
color: '#00000000',
|
|
symbolColor: '#000000'
|
|
}
|