mirror of
https://git.sr.ht/~cadence/cloudtube
synced 2026-05-26 12:32:25 +00:00
Add theme support, light theme, and edgeless light
This commit is contained in:
parent
4e1f2b3607
commit
0d23d66700
45 changed files with 433 additions and 212 deletions
|
|
@ -111,7 +111,7 @@ module.exports = [
|
|||
// Check if playback is allowed
|
||||
const videoTakedownInfo = db.prepare("SELECT id, org, url FROM TakedownVideos WHERE id = ?").get(id)
|
||||
if (videoTakedownInfo) {
|
||||
return render(451, "pug/takedown-video.pug", videoTakedownInfo)
|
||||
return render(451, "pug/takedown-video.pug", Object.assign({settings}, videoTakedownInfo))
|
||||
}
|
||||
|
||||
// Media fragment
|
||||
|
|
@ -129,7 +129,7 @@ module.exports = [
|
|||
// Work out how to fetch the video
|
||||
if (req.method === "GET") {
|
||||
if (settings.local) { // skip to the local fetching page, which will then POST video data in a moment
|
||||
return render(200, "pug/local-video.pug", {id})
|
||||
return render(200, "pug/local-video.pug", {settings, id})
|
||||
}
|
||||
var instanceOrigin = settings.instance
|
||||
var outURL = `${instanceOrigin}/api/v1/videos/${id}`
|
||||
|
|
@ -153,7 +153,7 @@ module.exports = [
|
|||
// automatically add the entry to the videos list, so it won't be fetched again
|
||||
const args = {id, ...channelTakedownInfo}
|
||||
db.prepare("INSERT INTO TakedownVideos (id, org, url) VALUES (@id, @org, @url)").run(args)
|
||||
return render(451, "pug/takedown-video.pug", channelTakedownInfo)
|
||||
return render(451, "pug/takedown-video.pug", Object.assign({settings}, channelTakedownInfo))
|
||||
}
|
||||
|
||||
// process stream list ordering
|
||||
|
|
@ -225,7 +225,7 @@ module.exports = [
|
|||
// Create appropriate formatted message
|
||||
const message = render(0, `pug/errors/${errorType}.pug`, locals).content
|
||||
|
||||
return render(500, "pug/video.pug", {video: {videoId: id}, error: true, message})
|
||||
return render(500, "pug/video.pug", {video: {videoId: id}, error: true, message, settings})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue