mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-03-07 14:36:13 +01:00
Fixed the mode not sticking
This commit is contained in:
parent
ca9fcf12b9
commit
c3883b23a9
3 changed files with 22 additions and 15 deletions
|
|
@ -57,15 +57,18 @@ class Countdowns extends HandlebarsApplicationMixin(ApplicationV2) {
|
|||
|
||||
async _preFirstRender(context, options) {
|
||||
options.position =
|
||||
game.user.getFlag(SYSTEM.id, SYSTEM.FLAGS.countdown.position) ?? Countdowns.DEFAULT_OPTIONS.position;
|
||||
game.user.getFlag(SYSTEM.id, SYSTEM.FLAGS[`${this.basePath}Countdown`].position) ??
|
||||
Countdowns.DEFAULT_OPTIONS.position;
|
||||
|
||||
const viewSetting = game.user.getFlag(SYSTEM.id, SYSTEM.FLAGS.countdown.simple) ?? !game.user.isGM;
|
||||
const viewSetting =
|
||||
game.user.getFlag(SYSTEM.id, SYSTEM.FLAGS[`${this.basePath}Countdown`].simple) ?? !game.user.isGM;
|
||||
this.simpleView =
|
||||
game.user.isGM || !this.testUserPermission(CONST.DOCUMENT_OWNERSHIP_LEVELS.OBSERVER) ? viewSetting : true;
|
||||
context.simple = this.simpleView;
|
||||
}
|
||||
|
||||
_onPosition(position) {
|
||||
game.user.setFlag(SYSTEM.id, SYSTEM.FLAGS.countdown.position, position);
|
||||
game.user.setFlag(SYSTEM.id, SYSTEM.FLAGS[`${this.basePath}Countdown`].position, position);
|
||||
}
|
||||
|
||||
async _renderFrame(options) {
|
||||
|
|
@ -228,9 +231,9 @@ class Countdowns extends HandlebarsApplicationMixin(ApplicationV2) {
|
|||
});
|
||||
}
|
||||
|
||||
static toggleSimpleView() {
|
||||
static async toggleSimpleView() {
|
||||
this.simpleView = !this.simpleView;
|
||||
game.user.setFlag(SYSTEM.id, SYSTEM.FLAGS.countdown.simple, this.simpleView);
|
||||
await game.user.setFlag(SYSTEM.id, SYSTEM.FLAGS[`${this.basePath}Countdown`].simple, this.simpleView);
|
||||
this.render();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,9 @@
|
|||
export const displayDomainCardsAsList = 'displayDomainCardsAsList';
|
||||
export const countdown = {
|
||||
simple: 'countdown-simple',
|
||||
position: 'countdown-position'
|
||||
export const narrativeCountdown = {
|
||||
simple: 'countdown-narrative-simple',
|
||||
position: 'countdown-narrative-position'
|
||||
};
|
||||
export const encounterCountdown = {
|
||||
simple: 'countdown-encounter-simple',
|
||||
position: 'countdown-encounter-position'
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1414,7 +1414,7 @@ fieldset.daggerheart.chat legend {
|
|||
fieldset.daggerheart.chat legend:before,
|
||||
fieldset.daggerheart.chat legend:after {
|
||||
content: '\f0d8';
|
||||
font-family: "Font Awesome 6 Pro";
|
||||
font-family: 'Font Awesome 6 Pro';
|
||||
}
|
||||
fieldset.daggerheart.chat.expanded legend:before,
|
||||
fieldset.daggerheart.chat.expanded legend:after {
|
||||
|
|
@ -1559,13 +1559,13 @@ fieldset.daggerheart.chat .daggerheart.chat {
|
|||
display: flex;
|
||||
justify-content: space-around;
|
||||
}
|
||||
.daggerheart.chat.roll .target-selection input[type="radio"] {
|
||||
.daggerheart.chat.roll .target-selection input[type='radio'] {
|
||||
display: none;
|
||||
}
|
||||
.daggerheart.chat.roll .target-selection input[type="radio"]:checked + label {
|
||||
text-shadow: 0px 0px 4px #CE5937;
|
||||
.daggerheart.chat.roll .target-selection input[type='radio']:checked + label {
|
||||
text-shadow: 0px 0px 4px #ce5937;
|
||||
}
|
||||
.daggerheart.chat.roll .target-selection input[type="radio"]:not(:checked) + label {
|
||||
.daggerheart.chat.roll .target-selection input[type='radio']:not(:checked) + label {
|
||||
opacity: 0.75;
|
||||
}
|
||||
.daggerheart.chat.roll .target-selection label {
|
||||
|
|
@ -1573,7 +1573,7 @@ fieldset.daggerheart.chat .daggerheart.chat {
|
|||
opacity: 0.75;
|
||||
}
|
||||
.daggerheart.chat.roll .target-selection label.target-selected {
|
||||
text-shadow: 0px 0px 4px #CE5937;
|
||||
text-shadow: 0px 0px 4px #ce5937;
|
||||
opacity: 1;
|
||||
}
|
||||
.daggerheart.chat.roll .target-section {
|
||||
|
|
@ -1700,7 +1700,7 @@ fieldset.daggerheart.chat .daggerheart.chat {
|
|||
display: none;
|
||||
}
|
||||
.daggerheart.chat [data-view-perm='false']::after {
|
||||
content: "??";
|
||||
content: '??';
|
||||
}
|
||||
.theme-colorful .chat-message.duality {
|
||||
border-color: black;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue