Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sheet/Bugfix/ageofficial #24

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion ageofficial/src/App.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<!-- {{ settings.gameSystem = undefined }} -->
<transition name="fade">
<NewSplashView v-if="!settings.gameSystem" />
<NewSplashView v-if="!settings.gameSystem" @close="setTheme" />
</transition>
<main v-if="settings.gameSystem" >
<div class="system-header">
Expand Down Expand Up @@ -187,6 +187,11 @@ const sidebarRef = ref(null);
const openSidebar = () => {
sidebarRef.value?.openSidebar(); // Optional chaining ensures sidebarRef is defined
};

const setTheme = () => {
const colorTheme = initValues.settings.colorTheme;
productLineStyle(settings.gameSystem,colorTheme);
}
</script>

<style scoped lang="scss">
Expand Down
2 changes: 1 addition & 1 deletion ageofficial/src/utility/productLineStyle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export function productLineStyle(gameSystem:string,lightDark:string,args?:any){
lightDarkMode(lightDark);
switch(gameSystem){
case 'fage1e':
case 'fage2e':
case 'fage2e':
document.body.classList.add("fantasyAge");
if(args?.cthulhuMythos){
document.documentElement.style.setProperty('--theme-primary', '#005a3f');
Expand Down
10 changes: 4 additions & 6 deletions ageofficial/src/views/NewSplashView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
<div class="age-splash-screen">
<h1>Select your game's ruleset</h1>
<div class="age-splash-rulesets">
<button class="age-ruleset-btn" aria-label="Fantasy AGE Ruleset" @click="selectSystem('fage2e')">
<img src="/src//assets/logos/fantasyage.png" alt="Fantasy AGE" role="presentation">
<button class="age-ruleset-btn" aria-label="Fantasy AGE Ruleset" @click="selectSystem('fage2e');$emit('close')">
<img src="/src/assets/logos/fantasyage.png" alt="Fantasy AGE" role="presentation">
</button>
<button class="age-ruleset-btn" aria-label="Modern AGE Ruleset" @click="selectSystem('mage')">
<button class="age-ruleset-btn" aria-label="Modern AGE Ruleset" @click="selectSystem('mage');$emit('close')">
<img src="/src/assets/logos/modernage.png" alt="Modern AGE" role="presentation">
</button>
<button class="age-ruleset-btn" aria-label="Blue Rose AGE Ruleset" @click="selectSystem('blue rose')">
<button class="age-ruleset-btn" aria-label="Blue Rose AGE Ruleset" @click="selectSystem('blue rose');$emit('close')">
<img src="/src/assets/logos/bluerose.png" alt="Blue Rose AGE" role="presentation">
</button>
</div>
Expand All @@ -23,8 +23,6 @@ const settings = useSettingsStore();

const selectSystem = (system) => {
settings.gameSystem = system;
const colorTheme = initValues.settings.colorTheme;
productLineStyle(settings.gameSystem,colorTheme);
}
</script>
<style scoped lang="scss">
Expand Down