Browse Source

feat: Christmas theme config option

Owen Diffey 3 years ago
parent
commit
79e5ffc5d0

+ 1 - 0
.wiki/Configuration.md

@@ -71,6 +71,7 @@ Location: `frontend/dist/config/default.json`
 | `siteSettings.logo_blue` | Path to the blue logo image, by default it is `/assets/blue_wordmark.png`. |
 | `siteSettings.sitename` | Should be the name of the site. |
 | `siteSettings.github` | URL of GitHub repository, defaults to `https://github.com/Musare/MusareNode`. |
+| `siteSettings.christmas` | Whether to enable christmas theming. |
 | `messages.accountRemoval` | Message to return to users on account removal. |
 | `shortcutOverrides` | Overwrite keyboard shortcuts, for example `"editSong.useAllDiscogs": { "keyCode": 68, "ctrl": true, "alt": true, "shift": false, "preventDefault": true }`. |
 | `skipConfigVersionCheck` | Skips checking if the config version is outdated or not. Should almost always be set to false. |

+ 2 - 1
frontend/dist/config/template.json

@@ -22,7 +22,8 @@
 		"logo_white": "/assets/white_wordmark.png",
 		"logo_blue": "/assets/blue_wordmark.png",
 		"sitename": "Musare",
-		"github": "https://github.com/Musare/Musare"
+		"github": "https://github.com/Musare/Musare",
+		"christmas": false
 	},
 	"messages": {
 		"accountRemoval": "Your account will be deactivated instantly and your data will shortly be deleted by an admin."

+ 4 - 1
frontend/src/pages/Station/index.vue

@@ -908,7 +908,8 @@ export default {
 			socketConnected: null,
 			persistentToastCheckerInterval: null,
 			persistentToasts: [],
-			partyPlaylistLock: false
+			partyPlaylistLock: false,
+			christmas: false
 		};
 	},
 	computed: {
@@ -1041,6 +1042,8 @@ export default {
 
 		this.frontendDevMode = await lofig.get("mode");
 
+		this.christmas = await lofig.get("siteSettings.christmas");
+
 		this.socket.dispatch(
 			"stations.existsByName",
 			this.stationIdentifier,