mirror of
https://github.com/BobbyWibowo/lolisafe.git
synced 2025-01-19 01:31:34 +00:00
Updates
Patching albums for installations which serve files through a different domain (experimental).
This commit is contained in:
parent
efbaa24b30
commit
62f142a046
@ -27,6 +27,12 @@ module.exports = {
|
|||||||
serveFilesWithNode: false,
|
serveFilesWithNode: false,
|
||||||
domain: 'https://lolisafe.moe',
|
domain: 'https://lolisafe.moe',
|
||||||
|
|
||||||
|
/*
|
||||||
|
If you are serving your files with a different domain than your lolisafe homepage,
|
||||||
|
then fill this option with your lolisafe homepage, otherwise leave it null (or other falsy value).
|
||||||
|
*/
|
||||||
|
albumDomain: null,
|
||||||
|
|
||||||
// Port on which to run the server
|
// Port on which to run the server
|
||||||
port: 9999,
|
port: 9999,
|
||||||
|
|
||||||
|
@ -8,6 +8,7 @@ const Zip = require('jszip')
|
|||||||
const albumsController = {}
|
const albumsController = {}
|
||||||
|
|
||||||
albumsController.list = async (req, res, next) => {
|
albumsController.list = async (req, res, next) => {
|
||||||
|
const albumDomain = config.albumDomain || config.domain
|
||||||
const user = await utils.authorize(req, res)
|
const user = await utils.authorize(req, res)
|
||||||
|
|
||||||
const fields = ['id', 'name']
|
const fields = ['id', 'name']
|
||||||
@ -26,7 +27,7 @@ albumsController.list = async (req, res, next) => {
|
|||||||
album.date = new Date(album.timestamp * 1000)
|
album.date = new Date(album.timestamp * 1000)
|
||||||
album.date = utils.getPrettyDate(album.date)
|
album.date = utils.getPrettyDate(album.date)
|
||||||
|
|
||||||
album.identifier = `${config.domain}/a/${album.identifier}`
|
album.identifier = `${albumDomain}/a/${album.identifier}`
|
||||||
ids.push(album.id)
|
ids.push(album.id)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10,13 +10,13 @@
|
|||||||
<title>{{ title }}</title>
|
<title>{{ title }}</title>
|
||||||
|
|
||||||
<!-- Stylesheets and scripts -->
|
<!-- Stylesheets and scripts -->
|
||||||
<link rel="stylesheet" type="text/css" href="libs/bulma/bulma.min.css">
|
<link rel="stylesheet" type="text/css" href="../libs/bulma/bulma.min.css">
|
||||||
<link rel="stylesheet" type="text/css" href="libs/sweetalert/sweetalert.min.css">
|
<link rel="stylesheet" type="text/css" href="../libs/sweetalert/sweetalert.min.css">
|
||||||
<link rel="stylesheet" type="text/css" href="css/style.css">
|
<link rel="stylesheet" type="text/css" href="../css/style.css">
|
||||||
<script type="text/javascript" src="libs/sweetalert/sweetalert.min.js"></script>
|
<script type="text/javascript" src="../libs/sweetalert/sweetalert.min.js"></script>
|
||||||
<script type="text/javascript" src="libs/dropzone/dropzone.min.js"></script>
|
<script type="text/javascript" src="../libs/dropzone/dropzone.min.js"></script>
|
||||||
<script type="text/javascript" src="libs/axios/axios.min.js"></script>
|
<script type="text/javascript" src="../libs/axios/axios.min.js"></script>
|
||||||
<script type="text/javascript" src="js/home.js"></script>
|
<script type="text/javascript" src="../js/home.js"></script>
|
||||||
|
|
||||||
<!-- Open Graph tags -->
|
<!-- Open Graph tags -->
|
||||||
<meta property="og:type" content="website" />
|
<meta property="og:type" content="website" />
|
||||||
|
Loading…
Reference in New Issue
Block a user