From 59daeeb37a69a4e8364d20156ec0426b4f67893e Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Sat, 6 Apr 2024 17:43:59 +0300 Subject: [PATCH] Move default backgrounds to content manager --- .../content}/backgrounds/__transparent.png | Bin .../content}/backgrounds/_black.jpg | Bin .../content}/backgrounds/_white.jpg | Bin .../content}/backgrounds/bedroom clean.jpg | Bin .../backgrounds/bedroom cyberpunk.jpg | Bin .../content}/backgrounds/bedroom red.jpg | Bin .../content}/backgrounds/bedroom tatami.jpg | Bin .../backgrounds/cityscape medieval market.jpg | Bin .../backgrounds/cityscape medieval night.jpg | Bin .../backgrounds/cityscape postapoc.jpg | Bin ...fireworks air baloons (by kallmeflocc).jpg | Bin .../backgrounds/japan classroom side.jpg | Bin .../content}/backgrounds/japan classroom.jpg | Bin .../backgrounds/japan path cherry blossom.jpg | Bin .../content}/backgrounds/japan university.jpg | Bin .../landscape autumn great tree.jpg | Bin .../backgrounds/landscape beach day.png | Bin .../backgrounds/landscape beach night.jpg | Bin .../backgrounds/landscape mountain lake.jpg | Bin .../backgrounds/landscape postapoc.jpg | Bin .../landscape winter lake house.jpg | Bin .../content}/backgrounds/royal.jpg | Bin .../content}/backgrounds/tavern day.jpg | Bin default/content/index.json | 93 +++++++++++++++++- public/style.css | 2 +- server.js | 2 +- 26 files changed, 94 insertions(+), 3 deletions(-) rename {public => default/content}/backgrounds/__transparent.png (100%) rename {public => default/content}/backgrounds/_black.jpg (100%) rename {public => default/content}/backgrounds/_white.jpg (100%) rename {public => default/content}/backgrounds/bedroom clean.jpg (100%) rename {public => default/content}/backgrounds/bedroom cyberpunk.jpg (100%) rename {public => default/content}/backgrounds/bedroom red.jpg (100%) rename {public => default/content}/backgrounds/bedroom tatami.jpg (100%) rename {public => default/content}/backgrounds/cityscape medieval market.jpg (100%) rename {public => default/content}/backgrounds/cityscape medieval night.jpg (100%) rename {public => default/content}/backgrounds/cityscape postapoc.jpg (100%) rename {public => default/content}/backgrounds/forest treehouse fireworks air baloons (by kallmeflocc).jpg (100%) rename {public => default/content}/backgrounds/japan classroom side.jpg (100%) rename {public => default/content}/backgrounds/japan classroom.jpg (100%) rename {public => default/content}/backgrounds/japan path cherry blossom.jpg (100%) rename {public => default/content}/backgrounds/japan university.jpg (100%) rename {public => default/content}/backgrounds/landscape autumn great tree.jpg (100%) rename {public => default/content}/backgrounds/landscape beach day.png (100%) rename {public => default/content}/backgrounds/landscape beach night.jpg (100%) rename {public => default/content}/backgrounds/landscape mountain lake.jpg (100%) rename {public => default/content}/backgrounds/landscape postapoc.jpg (100%) rename {public => default/content}/backgrounds/landscape winter lake house.jpg (100%) rename {public => default/content}/backgrounds/royal.jpg (100%) rename {public => default/content}/backgrounds/tavern day.jpg (100%) diff --git a/public/backgrounds/__transparent.png b/default/content/backgrounds/__transparent.png similarity index 100% rename from public/backgrounds/__transparent.png rename to default/content/backgrounds/__transparent.png diff --git a/public/backgrounds/_black.jpg b/default/content/backgrounds/_black.jpg similarity index 100% rename from public/backgrounds/_black.jpg rename to default/content/backgrounds/_black.jpg diff --git a/public/backgrounds/_white.jpg b/default/content/backgrounds/_white.jpg similarity index 100% rename from public/backgrounds/_white.jpg rename to default/content/backgrounds/_white.jpg diff --git a/public/backgrounds/bedroom clean.jpg b/default/content/backgrounds/bedroom clean.jpg similarity index 100% rename from public/backgrounds/bedroom clean.jpg rename to default/content/backgrounds/bedroom clean.jpg diff --git a/public/backgrounds/bedroom cyberpunk.jpg b/default/content/backgrounds/bedroom cyberpunk.jpg similarity index 100% rename from public/backgrounds/bedroom cyberpunk.jpg rename to default/content/backgrounds/bedroom cyberpunk.jpg diff --git a/public/backgrounds/bedroom red.jpg b/default/content/backgrounds/bedroom red.jpg similarity index 100% rename from public/backgrounds/bedroom red.jpg rename to default/content/backgrounds/bedroom red.jpg diff --git a/public/backgrounds/bedroom tatami.jpg b/default/content/backgrounds/bedroom tatami.jpg similarity index 100% rename from public/backgrounds/bedroom tatami.jpg rename to default/content/backgrounds/bedroom tatami.jpg diff --git a/public/backgrounds/cityscape medieval market.jpg b/default/content/backgrounds/cityscape medieval market.jpg similarity index 100% rename from public/backgrounds/cityscape medieval market.jpg rename to default/content/backgrounds/cityscape medieval market.jpg diff --git a/public/backgrounds/cityscape medieval night.jpg b/default/content/backgrounds/cityscape medieval night.jpg similarity index 100% rename from public/backgrounds/cityscape medieval night.jpg rename to default/content/backgrounds/cityscape medieval night.jpg diff --git a/public/backgrounds/cityscape postapoc.jpg b/default/content/backgrounds/cityscape postapoc.jpg similarity index 100% rename from public/backgrounds/cityscape postapoc.jpg rename to default/content/backgrounds/cityscape postapoc.jpg diff --git a/public/backgrounds/forest treehouse fireworks air baloons (by kallmeflocc).jpg b/default/content/backgrounds/forest treehouse fireworks air baloons (by kallmeflocc).jpg similarity index 100% rename from public/backgrounds/forest treehouse fireworks air baloons (by kallmeflocc).jpg rename to default/content/backgrounds/forest treehouse fireworks air baloons (by kallmeflocc).jpg diff --git a/public/backgrounds/japan classroom side.jpg b/default/content/backgrounds/japan classroom side.jpg similarity index 100% rename from public/backgrounds/japan classroom side.jpg rename to default/content/backgrounds/japan classroom side.jpg diff --git a/public/backgrounds/japan classroom.jpg b/default/content/backgrounds/japan classroom.jpg similarity index 100% rename from public/backgrounds/japan classroom.jpg rename to default/content/backgrounds/japan classroom.jpg diff --git a/public/backgrounds/japan path cherry blossom.jpg b/default/content/backgrounds/japan path cherry blossom.jpg similarity index 100% rename from public/backgrounds/japan path cherry blossom.jpg rename to default/content/backgrounds/japan path cherry blossom.jpg diff --git a/public/backgrounds/japan university.jpg b/default/content/backgrounds/japan university.jpg similarity index 100% rename from public/backgrounds/japan university.jpg rename to default/content/backgrounds/japan university.jpg diff --git a/public/backgrounds/landscape autumn great tree.jpg b/default/content/backgrounds/landscape autumn great tree.jpg similarity index 100% rename from public/backgrounds/landscape autumn great tree.jpg rename to default/content/backgrounds/landscape autumn great tree.jpg diff --git a/public/backgrounds/landscape beach day.png b/default/content/backgrounds/landscape beach day.png similarity index 100% rename from public/backgrounds/landscape beach day.png rename to default/content/backgrounds/landscape beach day.png diff --git a/public/backgrounds/landscape beach night.jpg b/default/content/backgrounds/landscape beach night.jpg similarity index 100% rename from public/backgrounds/landscape beach night.jpg rename to default/content/backgrounds/landscape beach night.jpg diff --git a/public/backgrounds/landscape mountain lake.jpg b/default/content/backgrounds/landscape mountain lake.jpg similarity index 100% rename from public/backgrounds/landscape mountain lake.jpg rename to default/content/backgrounds/landscape mountain lake.jpg diff --git a/public/backgrounds/landscape postapoc.jpg b/default/content/backgrounds/landscape postapoc.jpg similarity index 100% rename from public/backgrounds/landscape postapoc.jpg rename to default/content/backgrounds/landscape postapoc.jpg diff --git a/public/backgrounds/landscape winter lake house.jpg b/default/content/backgrounds/landscape winter lake house.jpg similarity index 100% rename from public/backgrounds/landscape winter lake house.jpg rename to default/content/backgrounds/landscape winter lake house.jpg diff --git a/public/backgrounds/royal.jpg b/default/content/backgrounds/royal.jpg similarity index 100% rename from public/backgrounds/royal.jpg rename to default/content/backgrounds/royal.jpg diff --git a/public/backgrounds/tavern day.jpg b/default/content/backgrounds/tavern day.jpg similarity index 100% rename from public/backgrounds/tavern day.jpg rename to default/content/backgrounds/tavern day.jpg diff --git a/default/content/index.json b/default/content/index.json index 1ea4d7b95..3cb55f8be 100644 --- a/default/content/index.json +++ b/default/content/index.json @@ -7,6 +7,98 @@ "filename": "themes/Cappuccino.json", "type": "theme" }, + { + "filename": "backgrounds/__transparent.png", + "type": "background" + }, + { + "filename": "backgrounds/_black.jpg", + "type": "background" + }, + { + "filename": "backgrounds/_white.jpg", + "type": "background" + }, + { + "filename": "backgrounds/bedroom clean.jpg", + "type": "background" + }, + { + "filename": "backgrounds/bedroom cyberpunk.jpg", + "type": "background" + }, + { + "filename": "backgrounds/bedroom red.jpg", + "type": "background" + }, + { + "filename": "backgrounds/bedroom tatami.jpg", + "type": "background" + }, + { + "filename": "backgrounds/cityscape medieval market.jpg", + "type": "background" + }, + { + "filename": "backgrounds/cityscape medieval night.jpg", + "type": "background" + }, + { + "filename": "backgrounds/cityscape postapoc.jpg", + "type": "background" + }, + { + "filename": "backgrounds/forest treehouse fireworks air baloons (by kallmeflocc).jpg", + "type": "background" + }, + { + "filename": "backgrounds/japan classroom side.jpg", + "type": "background" + }, + { + "filename": "backgrounds/japan classroom.jpg", + "type": "background" + }, + { + "filename": "backgrounds/japan path cherry blossom.jpg", + "type": "background" + }, + { + "filename": "backgrounds/japan university.jpg", + "type": "background" + }, + { + "filename": "backgrounds/landscape autumn great tree.jpg", + "type": "background" + }, + { + "filename": "backgrounds/landscape beach day.png", + "type": "background" + }, + { + "filename": "backgrounds/landscape beach night.jpg", + "type": "background" + }, + { + "filename": "backgrounds/landscape mountain lake.jpg", + "type": "background" + }, + { + "filename": "backgrounds/landscape postapoc.jpg", + "type": "background" + }, + { + "filename": "backgrounds/landscape winter lake house.jpg", + "type": "background" + }, + { + "filename": "backgrounds/royal.jpg", + "type": "background" + }, + { + "filename": "backgrounds/tavern day.jpg", + "type": "background" + }, { "filename": "default_Seraphina.png", "type": "character" @@ -219,7 +311,6 @@ "filename": "presets/novel/Writers-Daemon-Kayra.json", "type": "novel_preset" }, - { "filename": "presets/textgen/Asterism.json", "type": "textgen_preset" diff --git a/public/style.css b/public/style.css index f6516beed..dedc2460b 100644 --- a/public/style.css +++ b/public/style.css @@ -456,7 +456,7 @@ body.reduced-motion #bg_custom { } #bg1 { - background-image: url('backgrounds/__transparent.png'); + background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII='); z-index: -3; } diff --git a/server.js b/server.js index b6f59f0a3..85ebf555f 100644 --- a/server.js +++ b/server.js @@ -489,8 +489,8 @@ const setupTasks = async function () { // in any order for encapsulation reasons, but right now it's unknown if that would break anything. await settingsEndpoint.init(); ensurePublicDirectoriesExist(); - await ensureThumbnailCache(); contentManager.checkForNewContent(); + await ensureThumbnailCache(); cleanUploads(); await loadTokenizers();