added url, apikey to lockscreen
This commit is contained in:
parent
dbcdce5296
commit
2eb80e0da9
@ -20,7 +20,8 @@ const config = new ConfigManager(__path + '/config.json', true, {
|
||||
database: 'hydrationhub'
|
||||
},
|
||||
devmode: false,
|
||||
devmode_fileupload: false
|
||||
devmode_fileupload: false,
|
||||
galleryApiKey: '',
|
||||
});//, log.core); // Disabled due to Cyclic dependencies with log handler (specifically-> devmode for loglevel)
|
||||
|
||||
|
||||
|
@ -1,7 +1,8 @@
|
||||
import express, { Request, Response } from 'express';
|
||||
import config from '../../handlers/config.js';
|
||||
|
||||
function get(req: Request, res: Response) {
|
||||
res.render("screensaver")
|
||||
res.render("screensaver", { apikey: config.global.galleryApiKey })
|
||||
}
|
||||
|
||||
export default { get };
|
||||
|
@ -26,7 +26,8 @@ function handleImage() {
|
||||
orientation: 'landscape',
|
||||
height: window.screen.availHeight,
|
||||
width: window.screen.availWidth,
|
||||
cropCenteringMode: 'sm'
|
||||
cropCenteringMode: 'sm',
|
||||
apikey: apiKey
|
||||
};
|
||||
|
||||
const apiUrl = `https://photo.thegreydiamond.de/api/images/random.php?${new URLSearchParams(apiParams).toString()}`;
|
||||
|
@ -10,6 +10,9 @@
|
||||
<div id="date"></div>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
const apiKey = "<%= it.apikey %>";
|
||||
</script>
|
||||
<script src="/static/apiWrapper.js"></script>
|
||||
<script src="/static/pageDriver.js"></script>
|
||||
<script src="/static/js/lockscreenBgHandler.js"></script>
|
||||
|
Loading…
x
Reference in New Issue
Block a user