adding plussy mconeface fabled and fixing role name font size based on length

This commit is contained in:
Dave 2023-05-27 13:51:34 +01:00
parent 753864ccf3
commit 8a481dfbf3
3 changed files with 14 additions and 13 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

View file

@ -1,7 +1,5 @@
<template> <template>
<div class="token" @click="setRole" :class="[role.id]"> <div class="token" @click="setRole" :class="[role.id]">
<span <span
class="icon" class="icon"
v-if="role.id" v-if="role.id"
@ -29,7 +27,6 @@
<span class="leaf-orange" v-if="role.setup"></span> <span class="leaf-orange" v-if="role.setup"></span>
<svg viewBox="0 0 150 150" class="name"> <svg viewBox="0 0 150 150" class="name">
<path <path
d="M 13 75 C 13 160, 138 160, 138 75" d="M 13 75 C 13 160, 138 160, 138 75"
id="curve" id="curve"
@ -43,19 +40,14 @@
class="label mozilla" class="label mozilla"
:font-size="nameToFontSize(role.name)" :font-size="nameToFontSize(role.name)"
> >
<textPath xlink:href="#curve">{{ role.name }}</textPath>
<textPath xlink:href="#curve"> {{ role.name }} </textPath>
</text> </text>
</svg> </svg>
<div class="edition" :class="[`edition-${role.edition}`, role.team]"></div> <div class="edition" :class="[`edition-${role.edition}`, role.team]"></div>
<div class="ability" v-if="role.ability"> {{ role.ability }} </div> <div class="ability" v-if="role.ability">{{ role.ability }}</div>
</div> </div>
</template> </template>
<script> <script>
@ -70,7 +62,7 @@ export default {
}, },
}, },
computed: { computed: {
reminderLeaves: function() { reminderLeaves: function () {
return ( return (
(this.role.reminders || []).length + (this.role.reminders || []).length +
(this.role.remindersGlobal || []).length (this.role.remindersGlobal || []).length
@ -83,7 +75,7 @@ export default {
}, },
methods: { methods: {
nameToFontSize(name) { nameToFontSize(name) {
name && name.length > 10 ? "90%" : "110%"; return name && name.length > 10 ? "90%" : "110%";
}, },
setRole() { setRole() {
this.$emit("set-role"); this.$emit("set-role");
@ -245,4 +237,3 @@ export default {
} }
} }
</style> </style>

View file

@ -142,5 +142,15 @@
"name": "Deus ex Fiasco", "name": "Deus ex Fiasco",
"team": "fabled", "team": "fabled",
"ability": "Once per game, the Storyteller will make a \"mistake\", correct it and publicly admit to it." "ability": "Once per game, the Storyteller will make a \"mistake\", correct it and publicly admit to it."
},
{
"id": "plusone",
"firstNightReminder": "",
"otherNightReminder": "",
"reminders": [],
"setup": true,
"name": "Plussy McOneface",
"team": "fabled",
"ability": "One role from off the script will be in play, it can be either a player or a demon bluff."
} }
] ]