mirror of
https://github.com/fosrl/pangolin.git
synced 2025-07-13 23:45:00 +02:00
show qr code in share link and add version to footer
This commit is contained in:
parent
9e50a580a5
commit
ccc2e3358c
8 changed files with 104 additions and 40 deletions
|
@ -132,6 +132,17 @@ if (!parsedConfig.success) {
|
|||
throw new Error(`Invalid configuration file: ${errors}`);
|
||||
}
|
||||
|
||||
const packageJsonPath = path.join(__DIRNAME, "..", "package.json");
|
||||
let packageJson: any;
|
||||
if (fs.existsSync && fs.existsSync(packageJsonPath)) {
|
||||
const packageJsonContent = fs.readFileSync(packageJsonPath, "utf8");
|
||||
packageJson = JSON.parse(packageJsonContent);
|
||||
|
||||
if (packageJson.version) {
|
||||
process.env.APP_VERSION = packageJson.version;
|
||||
}
|
||||
}
|
||||
|
||||
process.env.NEXT_PORT = parsedConfig.data.server.next_port.toString();
|
||||
process.env.SERVER_EXTERNAL_PORT =
|
||||
parsedConfig.data.server.external_port.toString();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue