mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-21 06:59:09 +00:00
chore: cleanup merge
This commit is contained in:
@@ -74,6 +74,10 @@ export const externalsStartDirectory = isProduction ? getAppDataPath() : join(cu
|
|||||||
//TODO: we only need one when they are all in the same folder
|
//TODO: we only need one when they are all in the same folder
|
||||||
export const resolveExternalsDirectory = join(isProduction ? getAppDataPath() : currentDirectory, 'external');
|
export const resolveExternalsDirectory = join(isProduction ? getAppDataPath() : currentDirectory, 'external');
|
||||||
|
|
||||||
|
// project files
|
||||||
|
export const lastLoadedProjectConfigPath = join(getAppDataPath(), 'config.json');
|
||||||
|
export const uploadsFolderPath = join(getAppDataPath(), 'uploads');
|
||||||
|
|
||||||
const getLastLoadedProject = () => {
|
const getLastLoadedProject = () => {
|
||||||
try {
|
try {
|
||||||
return JSON.parse(fs.readFileSync(lastLoadedProjectConfigPath, 'utf8')).lastLoadedProject;
|
return JSON.parse(fs.readFileSync(lastLoadedProjectConfigPath, 'utf8')).lastLoadedProject;
|
||||||
@@ -91,11 +95,6 @@ const configDbDirectory = lastLoadedProject ? 'uploads' : config.database.direct
|
|||||||
// path to public db
|
// path to public db
|
||||||
export const resolveDbDirectory = join(testDbStartDirectory, isTest ? config.database.testdb : configDbDirectory);
|
export const resolveDbDirectory = join(testDbStartDirectory, isTest ? config.database.testdb : configDbDirectory);
|
||||||
export const resolveDbPath = join(resolveDbDirectory, lastLoadedProject ? lastLoadedProject : config.database.filename);
|
export const resolveDbPath = join(resolveDbDirectory, lastLoadedProject ? lastLoadedProject : config.database.filename);
|
||||||
|
|
||||||
// project files
|
|
||||||
export const lastLoadedProjectConfigPath = join(getAppDataPath(), 'config.json');
|
|
||||||
export const uploadsFolderPath = join(getAppDataPath(), 'uploads');
|
|
||||||
|
|
||||||
export const pathToStartDb = isTest
|
export const pathToStartDb = isTest
|
||||||
? join(currentDirectory, '../', config.database.testdb, config.database.filename)
|
? join(currentDirectory, '../', config.database.testdb, config.database.filename)
|
||||||
: join(currentDirectory, '/preloaded-db/', config.database.filename);
|
: join(currentDirectory, '/preloaded-db/', config.database.filename);
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ export function cellRequestFromEvent(
|
|||||||
});
|
});
|
||||||
} else if (typeof event[key] === 'number') {
|
} else if (typeof event[key] === 'number') {
|
||||||
returnRows.push({
|
returnRows.push({
|
||||||
userEnteredValue: { stringValue: millisToString(event[key], true) },
|
userEnteredValue: { stringValue: millisToString(event[key]) },
|
||||||
});
|
});
|
||||||
} else if (typeof event[key] === 'string') {
|
} else if (typeof event[key] === 'string') {
|
||||||
returnRows.push({
|
returnRows.push({
|
||||||
|
|||||||
Reference in New Issue
Block a user