Add reset all tabs button in tab modify modal

This commit is contained in:
Hirame1 2024-04-16 16:34:30 +07:00
parent 6fd7a59330
commit 9fc6ecf312

View File

@ -1,12 +1,14 @@
<script>
import HiddenTabGroup from "@/components/modals/options/hidden-tabs/HiddenTabGroup";
import ModalWrapperOptions from "@/components/modals/options/ModalWrapperOptions";
import PrimaryButton from "@/components/PrimaryButton";
export default {
name: "HiddenTabsModal",
components: {
HiddenTabGroup,
ModalWrapperOptions,
PrimaryButton,
},
data() {
return {
@ -22,6 +24,13 @@ export default {
this.isEnslaved = Enslaved.isRunning;
this.isAlmostEnd = Pelle.hasGalaxyGenerator;
},
resetAllTabs() {
for (const tab of this.tabs) {
tab.unhideTab();
for (const subtab of tab.subtabs)
subtab.unhideTab();
}
}
},
};
</script>
@ -48,6 +57,11 @@ export default {
<br>
(You cannot hide your tabs within this Reality)
</div>
<PrimaryButton
@click="resetAllTabs"
>
Reset all tabs
</PrimaryButton>
<HiddenTabGroup
v-for="(tab, index) in tabs"
:key="index"