Add saves manager button to NaN detected screen
This commit is contained in:
parent
3671a072a1
commit
43790603d4
3 changed files with 36 additions and 56 deletions
|
@ -53,18 +53,19 @@ export default {
|
|||
.container > * {
|
||||
margin: 0 4px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<style>
|
||||
.danger {
|
||||
position: relative;
|
||||
border: solid 2px var(--danger);
|
||||
padding-right: 0;
|
||||
border-right-width: 16px;
|
||||
}
|
||||
|
||||
.danger::after {
|
||||
position: absolute;
|
||||
content: "!";
|
||||
color: white;
|
||||
background: var(--danger);
|
||||
padding: 2px;
|
||||
margin-left: 6px;
|
||||
height: 100%;
|
||||
right: -13px;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -98,18 +98,4 @@ export default {
|
|||
margin: 0;
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
.danger {
|
||||
border: solid 2px var(--danger);
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
.danger::after {
|
||||
content: "!";
|
||||
color: white;
|
||||
background: var(--danger);
|
||||
padding: 2px;
|
||||
margin-left: 6px;
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<template>
|
||||
<div v-frag>
|
||||
<Modal :show="show">
|
||||
<div slot="header" class="nan-modal-header">
|
||||
<h2>NaN value detected!</h2>
|
||||
|
@ -16,12 +17,15 @@
|
|||
<Toggle title="Autosave" :value="autosave" @change="setAutosave" />
|
||||
</div>
|
||||
<div slot="footer" class="nan-footer">
|
||||
<button @click="toggleSavesManager" class="button">Open Saves Manager</button>
|
||||
<button @click="setZero" class="button">Set to 0</button>
|
||||
<button @click="setOne" class="button">Set to 1</button>
|
||||
<button @click="setPrev" class="button" v-if="previous && previous.neq(0) && previous.neq(1)">Set to previous</button>
|
||||
<button @click="ignore" class="button danger">Ignore</button>
|
||||
</div>
|
||||
</Modal>
|
||||
<SavesManager :show="showSaves" @closeDialog="toggleSavesManager" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
@ -33,7 +37,7 @@ export default {
|
|||
name: 'NaNScreen',
|
||||
data() {
|
||||
const { discordName, discordLink } = modInfo;
|
||||
return { discordName, discordLink, format };
|
||||
return { discordName, discordLink, format, showSaves: false };
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
|
@ -67,6 +71,9 @@ export default {
|
|||
},
|
||||
setAutosave(autosave) {
|
||||
player.autosave = autosave;
|
||||
},
|
||||
toggleSavesManager() {
|
||||
this.showSaves = !this.showSaves;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -97,18 +104,4 @@ export default {
|
|||
margin: 0;
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
.danger {
|
||||
border: solid 2px var(--danger);
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
.danger::after {
|
||||
content: "!";
|
||||
color: white;
|
||||
background: var(--danger);
|
||||
padding: 2px;
|
||||
margin-left: 6px;
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
|
|
Loading…
Reference in a new issue