townsquare/src/components/Gradients.vue
MRegnard 3e859a8850
Adding the Organ Grinder (#42)
* Adding Organ Grinder's icon

* Adding Organ Grinder's English description

* Adding Organ Grinder's French Description

* Adding Organ Grinder's English Jinxes

* Adding Organ Grinder's French Jinxes

* Correcting a typo

* Correcting a typo

* Adding a new icon

* Temporary change to test presence of new icon

* Adding some texts

They will be useful later

* Adding some texts, useful later

* Adding print in History for hidden vote

* Correcting history's print

* Adding new token for Organ Grinder

* New token for Organ Grinder

* Adding new (boolean) parameter for hidden vote

* Adding a new option in the menue

Without effect for now

* Cancelling previous update

* Adding new option in the menue

For now, without the bad effect

* Test: is the variable "isOrganGrinder" detected?

* The option in the menue can now change a variable

* Updating the saving of vote history

Taking account the possibility of Organ Grinder

* Correcting the previous commit

Deleting an unexpected "locale"

* Testing new way

Because of its folder, this file doesn't have access to the grimoire. I test now to give the boolean "organVote" as a parameter.

* Testing giving "organGrinder" as a parameter

* Testing to find the "grimoire" variable

* Adding a print for debbug

* Deleting the console.log, but adding a new test

* Test to know if the bool variable is seen

* End of test, get back to the normal type

* Test

* Cancelling all changes in Vote.vue

* Trying to access to the grimoire with an import

* Testing again to import grimoire

* Testing to print organGrinder

* Gone back to the first changes

Now, we just have to know where is the grimoire, for the import

* Test for access to the grimoire

* New test to find the grimoire

* Trying to import 'state' instead of 'grimoire'

* maybe the import is useless

* Trying what happens if organGrinder=true

* Trying access to index.js/state without conflict

* Update session.js

* Update session.js

* Update session.js

* Correcting typo

* Update session.js

* Update session.js

* Update session.js

* Update session.js

* Update session.js

* Update session.js

* Update session.js

* Update session.js

* Update session.js

* Update session.js

* Final version of this file

* Updating a sentence in singular

* Correcting Organ Grinder's ability

The Organ Grinder's ability is not active for exiles.

* Hiding the number of votes if Organ Grinder

* Trying new bool, maybe better that "isStoryTeller"

* Update Vote.vue

* Update Vote.vue

* Just for a test

* Update Vote.vue

* It's just for a test

* Cancelling all changes, I'll see it later

* Updating to take account isOrganGrinderVoteMode

* Allowing Story Teller to see history

(even if there is an Organ Grinder)

* Correcting ?:

An "else" condition is necessary.

* Trying to correct the error with new parenthesis

* Hidding the number of hands up during vote

Only for players, and only if there is an Organ Grinder

* Test for hide vote

* Update Player.vue

* Cancelling changes

* Test for icons

* New test to confirm the "v-if" is detected

* New test

* Trying to add the "?"

* Testing adding some new elements to print the "?"

* Finishing the print of "?"

The print wasn't printed for other players before the vote lock.

* Corecting a careless mistake

* Finalising the hidden votes

- Correcting the conditions (the previous ones was for tests
- Changing the colour of "?"

* Adding a new colour

* Removing the previous (and without effect) change

* Adding a new colour
2023-05-09 17:32:02 +00:00

44 lines
898 B
Vue

<template>
<!-- SVG Gradients -->
<div id="gradients">
<svg
width="0"
height="0"
v-for="(gradient, index) in gradients"
:key="index"
>
<linearGradient :id="gradient[0]" x1="50%" y1="100%" x2="50%" y2="0%">
<stop
offset="0%"
:style="{ 'stop-color': gradient[2], 'stop-opacity': 1 }"
></stop>
<stop
offset="100%"
:style="{ 'stop-color': gradient[1], 'stop-opacity': 1 }"
></stop>
</linearGradient>
</svg>
</div>
</template>
<script>
export default {
data() {
return {
gradients: [
["demon", "#ce0100", "#000"],
["townsfolk", "#1f65ff", "#000"],
["minion", "#ff6900", "#000"],
["default", "#4E4E4E", "#000"]
]
};
}
};
</script>
<style lang="scss" scoped>
svg {
position: absolute;
z-index: -1;
}
</style>