mirror of
https://github.com/thepaperpilot/Advent-Incremental.git
synced 2024-11-21 16:13:57 +00:00
Add modal to tell user to change the ignore date warning
This commit is contained in:
parent
cfa74e10af
commit
af53a1d012
2 changed files with 34 additions and 3 deletions
|
@ -42,6 +42,26 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</Modal>
|
</Modal>
|
||||||
|
<Modal
|
||||||
|
:modelValue="
|
||||||
|
player.ignoreDate === IgnoreDateSettings.AsIntended &&
|
||||||
|
new Date().getMonth() !== 11 &&
|
||||||
|
!main.dismissedIgnoreDateWarning.value
|
||||||
|
"
|
||||||
|
@update:model-value="value => (main.dismissedIgnoreDateWarning.value = !value)"
|
||||||
|
>
|
||||||
|
<template v-slot:header><h2>It's not December</h2></template>
|
||||||
|
<template v-slot:body>
|
||||||
|
<div>
|
||||||
|
This game is intended to be played as an advent calendar, but it is currently
|
||||||
|
not December. In order to allow players to still enjoy this game, there is a
|
||||||
|
field in the options menu to ignore the month and/or day. You can also change
|
||||||
|
that setting here:
|
||||||
|
</div>
|
||||||
|
<Spacer />
|
||||||
|
<Select title="Ignore Date" :options="ignoreDateOptions" v-model="ignoreDate" />
|
||||||
|
</template>
|
||||||
|
</Modal>
|
||||||
<Modal
|
<Modal
|
||||||
:modelValue="main.creditsOpen.value"
|
:modelValue="main.creditsOpen.value"
|
||||||
@update:model-value="value => (main.creditsOpen.value = value)"
|
@update:model-value="value => (main.creditsOpen.value = value)"
|
||||||
|
@ -51,10 +71,9 @@
|
||||||
</template>
|
</template>
|
||||||
<template v-slot:body>
|
<template v-slot:body>
|
||||||
<div>
|
<div>
|
||||||
<component :is=convertComputable(main.credits) />
|
<component :is="convertComputable(main.credits)" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<!--<div v-if="main.loreScene.value !== -1">
|
<!--<div v-if="main.loreScene.value !== -1">
|
||||||
<Scene :day="main.loreScene.value" />
|
<Scene :day="main.loreScene.value" />
|
||||||
<br />
|
<br />
|
||||||
|
@ -78,17 +97,20 @@
|
||||||
import { main } from "data/projEntry";
|
import { main } from "data/projEntry";
|
||||||
import projInfo from "data/projInfo.json";
|
import projInfo from "data/projInfo.json";
|
||||||
import Scene from "data/Scene.vue";
|
import Scene from "data/Scene.vue";
|
||||||
|
import Select from "./fields/Select.vue";
|
||||||
import type { GenericLayer } from "game/layers";
|
import type { GenericLayer } from "game/layers";
|
||||||
import { layers } from "game/layers";
|
import { layers } from "game/layers";
|
||||||
import player from "game/player";
|
import player, { IgnoreDateSettings } from "game/player";
|
||||||
import { convertComputable } from "util/computed";
|
import { convertComputable } from "util/computed";
|
||||||
import { computeOptionalComponent } from "util/vue";
|
import { computeOptionalComponent } from "util/vue";
|
||||||
import { computed, toRef, unref } from "vue";
|
import { computed, toRef, unref } from "vue";
|
||||||
import Layer from "./Layer.vue";
|
import Layer from "./Layer.vue";
|
||||||
import Modal from "./Modal.vue";
|
import Modal from "./Modal.vue";
|
||||||
import Nav from "./Nav.vue";
|
import Nav from "./Nav.vue";
|
||||||
|
import Spacer from "./layout/Spacer.vue";
|
||||||
|
|
||||||
const tabs = toRef(player, "tabs");
|
const tabs = toRef(player, "tabs");
|
||||||
|
const ignoreDate = toRef(player, "ignoreDate");
|
||||||
const layerKeys = computed(() => Object.keys(layers));
|
const layerKeys = computed(() => Object.keys(layers));
|
||||||
const useHeader = projInfo.useHeader;
|
const useHeader = projInfo.useHeader;
|
||||||
|
|
||||||
|
@ -98,6 +120,12 @@ function gatherLayerProps(layer: GenericLayer) {
|
||||||
const { display, minimized, name, color, minimizable, nodes, minimizedDisplay } = layer;
|
const { display, minimized, name, color, minimizable, nodes, minimizedDisplay } = layer;
|
||||||
return { display, minimized, name, color, minimizable, nodes, minimizedDisplay };
|
return { display, minimized, name, color, minimizable, nodes, minimizedDisplay };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const ignoreDateOptions = [
|
||||||
|
{ label: "Don't Ignore", value: IgnoreDateSettings.AsIntended },
|
||||||
|
{ label: "Ignore Month", value: IgnoreDateSettings.IgnoreMonth },
|
||||||
|
{ label: "Ignore Month and Day", value: IgnoreDateSettings.IgnoreDay }
|
||||||
|
];
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|
|
@ -101,6 +101,8 @@ export const main = createLayer("main", function (this: BaseLayer) {
|
||||||
const loreTitle = ref<string>("");
|
const loreTitle = ref<string>("");
|
||||||
const loreBody = ref<CoercableComponent | undefined>();
|
const loreBody = ref<CoercableComponent | undefined>();
|
||||||
|
|
||||||
|
const dismissedIgnoreDateWarning = ref(false);
|
||||||
|
|
||||||
const creditsOpen = ref<boolean>(false);
|
const creditsOpen = ref<boolean>(false);
|
||||||
|
|
||||||
// I don't understand how this works
|
// I don't understand how this works
|
||||||
|
@ -688,6 +690,7 @@ export const main = createLayer("main", function (this: BaseLayer) {
|
||||||
loreScene,
|
loreScene,
|
||||||
loreTitle,
|
loreTitle,
|
||||||
loreBody,
|
loreBody,
|
||||||
|
dismissedIgnoreDateWarning,
|
||||||
particles,
|
particles,
|
||||||
showLoreModal,
|
showLoreModal,
|
||||||
completeDay,
|
completeDay,
|
||||||
|
|
Loading…
Reference in a new issue