[SalvageUnion] add notes tab

This commit is contained in:
Stexinator
2023-02-17 08:39:40 +01:00
parent b484c228ce
commit 6494d51296
2 changed files with 21 additions and 7 deletions
+6
View File
@@ -69,6 +69,12 @@ input[type="checkbox"] {
.show-crawler:checked ~ button.crawler-button {
}
.show-notes:not(:checked) ~ button.notes-button {
display:none;
}
.show-notes:checked ~ button.notes-button {
}
/**
sheet content
+15 -7
View File
@@ -1,15 +1,18 @@
<div class="wrapper">
<input type="hidden" class="tabstoggle" name="attr_sheetTab" value="settings"/>
<div>
<input class="show-pilot" name="attr_isPilot" type="checkbox" checked hidden/>
<input class="show-pilot" name="attr_is-pilot" type="checkbox" checked hidden/>
<button type="action" name="act_pilot" class="tabs pilot-button">Pilot</button>
<input class="show-mech" name="attr_isMech" type="checkbox" hidden/>
<input class="show-mech" name="attr_is-mech" type="checkbox" hidden/>
<button type="action" name="act_mech" class="tabs mech-button">Mech</button>
<input class="show-crawler" name="attr_isCrawler" type="checkbox" hidden/>
<input class="show-crawler" name="attr_iscrawler" type="checkbox" hidden/>
<button type="action" name="act_crawler" class="tabs crawler-button">Union Crawler</button>
<input class="show-notes" name="attr_show-notes-tab" type="checkbox" hidden/>
<button type="action" name="act_notes" class="tabs notes-button">Notes</button>
<button type="action" name="act_settings" class="tabs">Settings</button>
</div>
@@ -448,17 +451,22 @@
<br>
<label for="isPilot" class="settings-checkbox">
<span>Is Pilot</span>
<input id="isPilot" name="attr_isPilot" type="checkbox" checked/>
<input id="isPilot" name="attr_is-pilot" type="checkbox" checked/>
</label>
<br>
<label for="isMech" class="settings-checkbox">
<span>Is Mech</span>
<input id="isMech" name="attr_isMech" type="checkbox"/>
<input id="isMech" name="attr_is-mech" type="checkbox"/>
</label>
<br>
<label for="isCrawler" class="settings-checkbox">
<span>Is Crawler</span>
<input id="isCrawler" name="attr_isCrawler" type="checkbox"/>
<input id="isCrawler" name="attr_is-crawler" type="checkbox"/>
</label>
<br>
<label for="showNotesTab" class="settings-checkbox">
<span>Show Notes Tab</span>
<input id="showNotesTab" name="attr_show-notes-tab" type="checkbox"/>
</label>
</div>
</div>
@@ -472,7 +480,7 @@
<script type="text/worker">
const buttonlist = ["pilot","mech","crawler","settings"];
const buttonlist = ["pilot","mech","crawler","notes","settings"];
buttonlist.forEach(button => {
on(`clicked:${button}`, function() {
setAttrs({