mirror of
https://github.com/Drop-OSS/drop.git
synced 2025-11-12 15:52:39 +10:00
feat: allow clients to fetch drop version
This commit is contained in:
@ -1,13 +1,23 @@
|
||||
class SystemConfig {
|
||||
private libraryFolder = process.env.LIBRARY ?? "./.data/library";
|
||||
private dataFolder = process.env.DATA ?? "./.data/data";
|
||||
private dropVersion = "v0.3.0";
|
||||
|
||||
private dropVersion;
|
||||
private gitRef;
|
||||
|
||||
private checkForUpdates =
|
||||
process.env.CHECK_FOR_UPDATES !== undefined &&
|
||||
process.env.CHECK_FOR_UPDATES.toLocaleLowerCase() === "true"
|
||||
? true
|
||||
: false;
|
||||
|
||||
constructor() {
|
||||
// get drop version and git ref from nuxt config
|
||||
const config = useRuntimeConfig();
|
||||
this.dropVersion = config.dropVersion;
|
||||
this.gitRef = config.gitRef;
|
||||
}
|
||||
|
||||
getLibraryFolder() {
|
||||
return this.libraryFolder;
|
||||
}
|
||||
@ -20,6 +30,10 @@ class SystemConfig {
|
||||
return this.dropVersion;
|
||||
}
|
||||
|
||||
getGitRef() {
|
||||
return this.gitRef;
|
||||
}
|
||||
|
||||
shouldCheckForUpdates() {
|
||||
return this.checkForUpdates;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user