add separate reset tab

This commit is contained in:
perennial
2024-10-01 13:34:06 +10:00
parent 0b5645ab9f
commit 95a3103bb8
+27 -13
View File
@@ -18,6 +18,8 @@
<button class="btn btn-dark rounded-pill border-0 flex-fill fw-bold mb-1" id="novels-tab" data-bs-toggle="tab" data-bs-target="#novels" type="button" role="tab" aria-controls="novels" aria-selected="false">Novels</button>
<button class="btn btn-dark rounded-pill border-0 flex-fill fw-bold" id="advanced-settings-tab" data-bs-toggle="tab" data-bs-target="#advanced-settings" type="button" role="tab" aria-controls="advanced-settings" aria-selected="false">Advanced settings</button>
<button class="btn btn-dark rounded-pill border-0 flex-fill fw-bold" id="reset-tab" data-bs-toggle="tab" data-bs-target="#reset" type="button" role="tab" aria-controls="reset" aria-selected="false">Reset</button>
</nav>
</div>
@@ -259,7 +261,6 @@
<li class="list-group-item bg-body-tertiary pt-4 pb-0 px-0">
<h3 class="h5 fw-bold mb-3">Force text orientation</h3>
<form action="/settings/novelViewMode" method="post">
<div class="mb-3">
<div class="form-check mb-3">
<input class="form-check-input" type="radio" name="view-mode" id="tx-ori-h" value="1">
<label class="form-check-label" for="tx-ori-h">Horizontal</label>
@@ -275,7 +276,6 @@
<label class="form-check-label" for="tx-ori-n">Don't force (default from Pixiv)</label>
<div id="tx-ori-n-help" class="form-text">Uses the original text orientation as set by the author on Pixiv. This is the default option and respects the intended layout of the novel.</div>
</div>
</div>
<button type="submit" class="btn btn-secondary fw-bold rounded-pill">Submit</button>
</form>
</li>
@@ -286,17 +286,16 @@
<!-- Advanced settings tab -->
<div class="tab-pane fade" id="advanced-settings" role="tabpanel" aria-labelledby="advanced-settings-tab">
<ul class="list-group list-group-flush">
<li class="list-group-item bg-body-tertiary p-0 mb-4">
<h2 class="h4 fw-bold mb-4">Advanced settings</h2>
<h2 class="h4 fw-bold mb-4">Advanced settings</h2>
<li class="list-group-item bg-body-tertiary pt-0 pb-4 px-0">
<h3 class="h5 fw-bold mb-3">Cookie values</h3>
<p class="mb-4">
<p>
Please note that some cookies here such as ShowArtR18,
ShowArtR18G, and ShowArtAI are for features still under development.
</p>
{{- range k, v := CookieList }}
<div class="mb-3">
<h3 class="h6 fw-bold">{{k}}</h3>
<h4 class="h6 fw-bold">{{k}}</h4>
<form action="/settings/set-cookie" method="post" class="row g-2">
<div class="col-auto">
<input type="hidden" name="key" value="{{k}}" />
@@ -309,7 +308,7 @@
</div>
{{- end }}
</li>
<li class="list-group-item bg-body-tertiary p-0">
<li class="list-group-item bg-body-tertiary pt-4 pb-0 px-0">
<h3 class="h5 fw-bold mb-3">Raw settings</h3>
<p>
You can save your current cookie values to quickly set your settings on other compatible instances,
@@ -324,15 +323,30 @@
</div>
<button type="submit" class="btn btn-secondary fw-bold rounded-pill">Set raw settings</button>
</form>
<!-- Reset all -->
<form action="/settings/reset-all" method="post" class="mt-3">
<button type="submit" class="btn btn-danger">Reset all cookies/preferences</button>
</form>
</li>
</ul>
</div>
<!-- Reset tab -->
<div class="tab-pane fade" id="reset" role="tabpanel" aria-labelledby="reset-tab">
<ul class="list-group list-group-flush">
<h2 class="h4 fw-bold mb-4">Reset</h2>
<!-- Reset all prefererences -->
<li class="list-group-item bg-body-tertiary px-0">
<h3 class="h5 fw-bold mb-3">Reset all preferences</h3>
<p>
You can reset all cookies and use PixivFE's default preferences instead.
</p>
<form action="/settings/reset-all" method="post">
<button type="submit" class="btn btn-danger rounded-pill">
Reset all preferences
</button>
</form>
</li>
</ul>
</div>
</div>
</div>
</div>