Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
donbwhite authored Dec 3, 2024
2 parents b10f98f + 36285e2 commit d978c40
Show file tree
Hide file tree
Showing 137 changed files with 43 additions and 17 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Original file line number Diff line number Diff line change
@@ -1 +1 @@
@import url("https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,[email protected],100..700,0..1,-50..200&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,[email protected],100..700,0..1,-50..200&display=swap");
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Binary file added magiknights/src/assets/no-character-access.png
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,14 @@ export const useSheetStore = defineStore('sheet',() => {
const prof = ref(false);
const defaultAbility = ref(skillDetails[skillName][0]);
const abilitiesList = skillDetails[skillName];
const overrideValue = ref('');

m[skillName] = {
name:skillName,
proficiency: prof,
ability: defaultAbility,
abilitiesList: abilitiesList,
overrideValue: overrideValue,
value: computed(() =>
abilityScores[defaultAbility.value].mod.value + (prof.value ? proficiency.value : 0))
};
Expand Down Expand Up @@ -499,6 +501,7 @@ export const useSheetStore = defineStore('sheet',() => {
dehydratedSkills[skillName] = {
proficiency: skillData.proficiency.value,
ability: skillData.ability.value,
overrideValue: skillData.overrideValue.value,
};
}
return dehydratedSkills;
Expand All @@ -509,6 +512,7 @@ export const useSheetStore = defineStore('sheet',() => {
if (skills[skillName]) {
skills[skillName].proficiency.value = skillData.proficiency ?? skills[skillName].proficiency.value;
skills[skillName].ability.value = skillData.ability ?? skills[skillName].ability.value;
skills[skillName].overrideValue.value = skillData.overrideValue ?? skills[skillName].overrideValue.value;
}
}
}
Expand Down Expand Up @@ -831,13 +835,14 @@ export const useSheetStore = defineStore('sheet',() => {
const rollSkill = (name) => {
const abilityName = skills[name].ability.value;
const formattedTitle = toTitleCase(name.replace(/_/g, ' '));
if (skills[name].overrideValue !== '' && skills[name].overrideValue !== undefined){
var skillOverrideValue = skills[name].overrideValue.value;
if (skillOverrideValue !== '' && skillOverrideValue !== undefined){
const rollObj = {
title: formattedTitle,
characterName: metaStore.name,
components: [
{label:'1d20',sides:20,alwaysShowInBreakdown: true},
{label:'Skill Value Override', value:Number(skills[name].overrideValue),alwaysShowInBreakdown: true}
{label:'Skill Value Override', value:Number(skillOverrideValue) || 0,alwaysShowInBreakdown: true}
]
};
rollToChat({rollObj});
Expand All @@ -851,7 +856,7 @@ export const useSheetStore = defineStore('sheet',() => {
]
};
if(skills[name].proficiency.value){
rollObj.components.push({label: 'Prof',value: proficiency.value,alwaysShowInBreakdown: true});
rollObj.components.push({label: 'Prof',value:Number(proficiency.value),alwaysShowInBreakdown: true});
}
rollToChat({rollObj});
}
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,26 +1,33 @@
<script setup>
import { useMetaStore } from '@/stores/metaStore.js';
import MasterHeader from '@/components/MasterHeader.vue';
import HPContainer from '@/components/HPContainer.vue';
import BaseSplit from '@/components/BaseSplit.vue';
import KnightNav from '@/components/KnightNav.vue';
import SkillSection from '@/components/SkillSection.vue';
let permissions = useMetaStore().permissions;
</script>

<template>
<div class="player-view">
<div class="top-section">
<MasterHeader />
<BaseSplit class="base-split" />
<KnightNav />
<div v-if="permissions.isOwner || permissions.isGM" class="player-view">
<div class="top-section">
<MasterHeader />
<BaseSplit class="base-split" />
<KnightNav />
</div>
<div class="column">
<HPContainer />
<SkillSection />
</div>
<div class="specific-view column">
<RouterView />
</div>
</div>
<div class="column">
<HPContainer />
<SkillSection />
<div v-else class="no-permissions">
<img class="centered-image" src="@/assets/no-character-access.png" alt="You do not have access to this character">
</div>
<div class="specific-view column">
<RouterView />
</div>
</div>
</template>

<style lang="scss">
Expand Down Expand Up @@ -67,4 +74,18 @@ import SkillSection from '@/components/SkillSection.vue';
background: var(--masterBack);
}
}
.no-permissions {
display: flex;
justify-content: center;
align-items: center;
height: 100vh; /* Full viewport height */
background-color: #000; /* Optional background color */
}
.centered-image {
max-width: 80%; /* Ensure the image scales for smaller screens */
max-height: 80%;
object-fit: contain; /* Maintain aspect ratio */
}
</style>
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import VueDevTools from 'vite-plugin-vue-devtools'

const DISCORD_ACTIVITY_CLIENT_ID = process.env.DISCORD_ACTIVITY_CLIENT_ID || "1199270539278164008";
const DISCORD_ACTIVITY_CLIENT_ID = process.env.DISCORD_ACTIVITY_CLIENT_ID || "1199271093882589195";
const SHORT_NAME = process.env.VITE_SHEET_SHORT_NAME || 'magiknightawake';

// https://vitejs.dev/config/
Expand Down

0 comments on commit d978c40

Please sign in to comment.