forked from DebaucheryLibrarian/traxxx
Added filter presets to consent warning. Updating scenes when tag filter changes.
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<Warning
|
||||
v-if="showWarning"
|
||||
class="warning-container"
|
||||
@enter="setConsent(true)"
|
||||
@enter="(includeQueer) => setConsent(true, includeQueer)"
|
||||
@leave="setConsent(false)"
|
||||
/>
|
||||
|
||||
@@ -46,11 +46,18 @@ function toggleFilters(state) {
|
||||
this.showSidebar = false;
|
||||
}
|
||||
|
||||
async function setConsent(consent) {
|
||||
async function setConsent(consent, includeQueer) {
|
||||
if (consent) {
|
||||
this.showWarning = false;
|
||||
localStorage.setItem('consent', window.env.sessionId);
|
||||
}
|
||||
|
||||
if (includeQueer) {
|
||||
this.$store.dispatch('setTagFilter', this.$store.state.ui.tagFilter.filter(tag => !['gay', 'bisexual', 'transsexual'].includes(tag)));
|
||||
return;
|
||||
}
|
||||
|
||||
this.$store.dispatch('setTagFilter', this.$store.state.ui.tagFilter.concat(['gay', 'bisexual', 'transsexual']));
|
||||
}
|
||||
|
||||
function blur(event) {
|
||||
|
||||
Reference in New Issue
Block a user