Compare commits

...

7 Commits

Author SHA1 Message Date
DebaucheryLibrarian f58c07137a 1.149.0 2020-12-27 04:21:36 +01:00
DebaucheryLibrarian a7e6f470f7 Improved tooltip behavior and styling. 2020-12-27 04:21:10 +01:00
DebaucheryLibrarian 229d74d266 Using teleport for tooltips. Moved theme class to body tag with UI observer. 2020-12-27 02:15:06 +01:00
DebaucheryLibrarian 12f247a927 Fixed double anchor tags in header and sidebar nav. 2020-12-27 00:40:35 +01:00
DebaucheryLibrarian 2e95e1e32b Passing router as reactive object to store, so values are automatically unwrapped. 2020-12-27 00:32:42 +01:00
DebaucheryLibrarian c503e12adb Fixed scroll component so it uses slot props instead of the depcrecated . 2020-12-26 23:51:27 +01:00
DebaucheryLibrarian ced8f447a7 Added tooltip menu with header toggles and upcoming filter access. 2020-12-20 23:20:41 +01:00
47 changed files with 1919 additions and 1675 deletions

View File

@ -63,10 +63,7 @@
:items-per-page="limit" :items-per-page="limit"
/> />
<div <div class="tiles">
v-lazy-container="{ selector: '.lazy' }"
class="tiles"
>
<Actor <Actor
v-for="actor in actors" v-for="actor in actors"
:key="`actor-${actor.id}`" :key="`actor-${actor.id}`"

View File

@ -16,9 +16,9 @@
> >
<img <img
:src="sfw ? `/img/${actor.avatar.sfw.thumbnail}` : `/media/${actor.avatar.thumbnail}`" :src="sfw ? `/img/${actor.avatar.sfw.thumbnail}` : `/media/${actor.avatar.thumbnail}`"
:data-src="sfw ? `/img/${actor.avatar.sfw.thumbnail}` : `/media/${actor.avatar.thumbnail}`" :style="{ 'background-image': sfw ? `/img/${actor.avatar.sfw.lazy}` : `/media/${actor.avatar.lazy}` }"
:data-loading="sfw ? `/img/${actor.avatar.sfw.lazy}` : `/media/${actor.avatar.lazy}`"
:title="actor.avatar.credit && `© ${actor.avatar.credit}`" :title="actor.avatar.credit && `© ${actor.avatar.credit}`"
loading="lazy"
class="avatar photo" class="avatar photo"
@load="$parent.$emit('load')" @load="$parent.$emit('load')"
> >
@ -34,9 +34,9 @@
> >
<img <img
:src="sfw ? `/img/${photo.sfw.thumbnail}` : `/media/${photo.thumbnail}`" :src="sfw ? `/img/${photo.sfw.thumbnail}` : `/media/${photo.thumbnail}`"
:data-src="sfw ? `/img/${photo.sfw.thumbnail}` : `/media/${photo.thumbnail}`" :style="{ 'background-image': sfw ? `/img/${photo.sfw.lazy}` : `/media/${photo.lazy}` }"
:data-loading="sfw ? `/img/${photo.sfw.lazy}` : `/media/${photo.lazy}`"
:title="`© ${photo.credit || photo.entity.name}`" :title="`© ${photo.credit || photo.entity.name}`"
loading="lazy"
class="photo" class="photo"
@load="$parent.$emit('load')" @load="$parent.$emit('load')"
> >
@ -76,9 +76,6 @@ export default {
padding: .5rem 1rem; padding: .5rem 1rem;
margin: 0 1rem 0 0; margin: 0 1rem 0 0;
font-size: 0; font-size: 0;
overflow-x: scroll;
scroll-behavior: smooth;
scrollbar-width: none;
&.expanded { &.expanded {
flex-wrap: wrap; flex-wrap: wrap;
@ -101,10 +98,6 @@ export default {
.avatar-link { .avatar-link {
display: none; display: none;
} }
&::-webkit-scrollbar {
display: none;
}
} }
.photo-link { .photo-link {
@ -115,6 +108,7 @@ export default {
height: 15rem; height: 15rem;
box-shadow: 0 0 3px var(--darken-weak); box-shadow: 0 0 3px var(--darken-weak);
object-fit: cover; object-fit: cover;
background-size: cover;
} }
@media(max-width: $breakpoint3) { @media(max-width: $breakpoint3) {

View File

@ -45,9 +45,10 @@
<div class="avatar-container"> <div class="avatar-container">
<img <img
v-if="actor.avatar" v-if="actor.avatar"
:data-src="sfw ? `/img/${actor.avatar.sfw.thumbnail}` : `/media/${actor.avatar.thumbnail}`" :src="sfw ? `/img/${actor.avatar.sfw.thumbnail}` : `/media/${actor.avatar.thumbnail}`"
:data-loading="sfw ? `/img/${actor.avatar.sfw.lazy}` : `/media/${actor.avatar.lazy}`" :style="{ 'background-image': sfw ? `url(/img/${actor.avatar.sfw.lazy})`: `url(/img/${actor.avatar.lazy})` }"
class="avatar lazy" loading="lazy"
class="avatar"
> >
<span <span
@ -232,6 +233,7 @@ export default {
justify-content: center; justify-content: center;
object-fit: cover; object-fit: cover;
object-position: 50% 0; object-position: 50% 0;
background-size: cover;
} }
.avatar-fallback { .avatar-fallback {

View File

@ -1,8 +1,5 @@
<template> <template>
<div <div class="container">
class="container"
:class="theme"
>
<Warning <Warning
v-if="showWarning" v-if="showWarning"
class="warning-container" class="warning-container"
@ -26,18 +23,10 @@
</template> </template>
<script> <script>
import { mapState } from 'vuex';
import EventBus from '../../js/event-bus';
import Warning from './warning.vue'; import Warning from './warning.vue';
import Header from '../header/header.vue'; import Header from '../header/header.vue';
import Sidebar from '../sidebar/sidebar.vue'; import Sidebar from '../sidebar/sidebar.vue';
function theme(state) {
return state.ui.theme;
}
function toggleSidebar(state) { function toggleSidebar(state) {
this.showSidebar = typeof state === 'boolean' ? state : !this.showSidebar; this.showSidebar = typeof state === 'boolean' ? state : !this.showSidebar;
} }
@ -49,10 +38,22 @@ async function setConsent(consent) {
} }
} }
function blur(event) {
this.events.emit('blur', event);
}
function resize(event) {
this.events.emit('resize', event);
}
function mounted() { function mounted() {
document.addEventListener('click', () => { document.addEventListener('click', this.blur);
EventBus.$emit('blur'); window.addEventListener('resize', this.resize);
}); }
function beforeUnmount() {
document.removeEventListener('click', this.blur);
window.removeEventListener('resize', this.resize);
} }
export default { export default {
@ -67,15 +68,13 @@ export default {
showWarning: localStorage.getItem('consent') !== window.env.sessionId, showWarning: localStorage.getItem('consent') !== window.env.sessionId,
}; };
}, },
computed: {
...mapState({
theme,
}),
},
mounted, mounted,
beforeUnmount,
methods: { methods: {
toggleSidebar, toggleSidebar,
setConsent, setConsent,
blur,
resize,
}, },
}; };
</script> </script>

View File

@ -113,7 +113,7 @@
</template> </template>
<script> <script>
import Vue from 'vue'; import { nextTick } from 'vue';
import FilterBar from '../filters/filter-bar.vue'; import FilterBar from '../filters/filter-bar.vue';
import Pagination from '../pagination/pagination.vue'; import Pagination from '../pagination/pagination.vue';
@ -135,7 +135,7 @@ async function fetchEntity() {
this.pageTitle = entity.name; this.pageTitle = entity.name;
Vue.nextTick(() => { nextTick(() => {
this.$refs.content.scrollTop = 0; this.$refs.content.scrollTop = 0;
}); });
} }

View File

@ -1,5 +1,5 @@
<template> <template>
<v-popover class="filter-container"> <Tooltip class="filter-container">
<div class="filter"> <div class="filter">
<Icon icon="users" /> <Icon icon="users" />
@ -14,46 +14,48 @@
>Actors</div> >Actors</div>
</div> </div>
<div slot="popover"> <template v-slot:tooltip>
<router-link <div>
class="filter-clear" <router-link
:to="{ query: { ...$route.query, actors: undefined } }" class="filter-clear"
:class="{ active: selectedActors.length > 0 }" :to="{ query: { ...$route.query, actors: undefined } }"
>clear all<Icon icon="cross2" /></router-link> :class="{ active: selectedActors.length > 0 }"
>clear all<Icon icon="cross2" /></router-link>
<ul class="filter-items nolist"> <ul class="filter-items nolist">
<li <li
v-for="actor in availableActors" v-for="actor in availableActors"
:key="actor.id" :key="actor.id"
class="filter-item" class="filter-item"
:class="{ selected: selectedActors.includes(actor.slug) }" :class="{ selected: selectedActors.includes(actor.slug) }"
>
<router-link
:to="{ query: {
...$route.query,
actors: actor.slug,
}, params: { pageNumber: 1 } }"
class="filter-name"
>{{ actor.name }}</router-link>
<router-link
:to="{ query: { ...$route.query, ...getNewRange(actor) }, params: { pageNumber: 1 } }"
class="filter-include"
> >
<Icon <router-link
icon="checkmark" :to="{ query: {
class="filter-add" ...$route.query,
/> actors: actor.slug,
}, params: { pageNumber: 1 } }"
class="filter-name"
>{{ actor.name }}</router-link>
<Icon <router-link
icon="cross2" :to="{ query: { ...$route.query, ...getNewRange(actor) }, params: { pageNumber: 1 } }"
class="filter-remove" class="filter-include"
/> >
</router-link> <Icon
</li> icon="checkmark"
</ul> class="filter-add"
</div> />
</v-popover>
<Icon
icon="cross2"
class="filter-remove"
/>
</router-link>
</li>
</ul>
</div>
</template>
</Tooltip>
</template> </template>
<script> <script>

View File

@ -1,5 +1,5 @@
<template> <template>
<v-popover class="filter-container"> <Tooltip class="filter-container">
<div class="filter"> <div class="filter">
<Icon icon="antenna" /> <Icon icon="antenna" />
@ -14,60 +14,62 @@
>Channels</div> >Channels</div>
</div> </div>
<div slot="popover"> <template v-slot:popover>
<router-link <div slot="popover">
class="filter-clear" <router-link
:to="{ query: { ...$route.query, channels: undefined, networks: undefined } }" class="filter-clear"
:class="{ active: selectedLength > 0 }" :to="{ query: { ...$route.query, channels: undefined, networks: undefined } }"
>clear all<Icon icon="cross2" /></router-link> :class="{ active: selectedLength > 0 }"
>clear all<Icon icon="cross2" /></router-link>
<ul class="filter-items nolist"> <ul class="filter-items nolist">
<li <li
v-for="channel in channelsPerNetwork" v-for="channel in channelsPerNetwork"
:key="`channel-${channel.id}`" :key="`channel-${channel.id}`"
class="filter-item" class="filter-item"
:class="{ :class="{
[channel.type]: true, [channel.type]: true,
independent: channel.independent, independent: channel.independent,
selected: channel.type === 'network' ? selectedNetworks.includes(channel.slug) : selectedChannels.includes(channel.slug), selected: channel.type === 'network' ? selectedNetworks.includes(channel.slug) : selectedChannels.includes(channel.slug),
disabled: channel.parent && selectedNetworks.includes(channel.parent.slug), disabled: channel.parent && selectedNetworks.includes(channel.parent.slug),
}" }"
>
<router-link
:to="{ query: {
...$route.query,
[channel.type === 'network' ? 'networks' : 'channels']: channel.slug,
[channel.type === 'network' ? 'channels' : 'networks']: undefined,
}, params: { pageNumber: 1 } }"
class="filter-name"
> >
<img <router-link
v-if="channel.type === 'network' || channel.independent || !channel.parent " :to="{ query: {
:src="`/img/logos/${channel.slug}/favicon.png`" ...$route.query,
class="favicon" [channel.type === 'network' ? 'networks' : 'channels']: channel.slug,
[channel.type === 'network' ? 'channels' : 'networks']: undefined,
}, params: { pageNumber: 1 } }"
class="filter-name"
> >
<img
v-if="channel.type === 'network' || channel.independent || !channel.parent "
:src="`/img/logos/${channel.slug}/favicon.png`"
class="favicon"
>
{{ channel.name }} {{ channel.name }}
</router-link> </router-link>
<router-link <router-link
:to="{ query: { ...$route.query, ...getNewRange(channel) }, params: { pageNumber: 1 } }" :to="{ query: { ...$route.query, ...getNewRange(channel) }, params: { pageNumber: 1 } }"
class="filter-include" class="filter-include"
> >
<Icon <Icon
icon="checkmark" icon="checkmark"
class="filter-add" class="filter-add"
/> />
<Icon <Icon
icon="cross2" icon="cross2"
class="filter-remove" class="filter-remove"
/> />
</router-link> </router-link>
</li> </li>
</ul> </ul>
</div> </div>
</v-popover> </template>
</Tooltip>
</template> </template>
<script> <script>

View File

@ -1,5 +1,5 @@
<template> <template>
<v-popover class="filter-container"> <Tooltip class="filter-container">
<div class="filter"> <div class="filter">
<Icon icon="price-tag4" /> <Icon icon="price-tag4" />
@ -14,52 +14,54 @@
>Tags</div> >Tags</div>
</div> </div>
<div slot="popover"> <template v-slot:tooltip>
<select <div class="filter-options">
v-model="mode" <select
class="filter-mode" v-model="mode"
@change="$router.push({ query: { ...$route.query, mode }, params: { pageNumber: 1 } })" class="filter-mode"
> @change="$router.push({ query: { ...$route.query, mode }, params: { pageNumber: 1 } })"
<option value="all">match all selected</option>
<option value="any">match any selected</option>
</select>
<router-link
class="filter-clear"
:to="{ query: { ...$route.query, tags: undefined, mode: undefined } }"
:class="{ active: selectedTags.length > 0 }"
>clear all<Icon icon="cross2" /></router-link>
<ul class="filter-items nolist">
<li
v-for="tag in availableTags"
:key="`tag-${tag.id}`"
class="filter-item"
:class="{ selected: selectedTags.includes(tag.slug) }"
> >
<router-link <option value="all">match all selected</option>
:to="{ query: { ...$route.query, tags: tag.slug, mode }, params: { pageNumber: 1 } }" <option value="any">match any selected</option>
class="filter-name" </select>
>{{ tag.name }}</router-link>
<router-link <router-link
:to="{ query: { ...$route.query, ...getNewRange(tag.slug), mode }, params: { pageNumber: 1 } }" class="filter-clear"
class="filter-include" :to="{ query: { ...$route.query, tags: undefined, mode: undefined } }"
:class="{ active: selectedTags.length > 0 }"
>clear all<Icon icon="cross2" /></router-link>
<ul class="filter-items nolist">
<li
v-for="tag in availableTags"
:key="`tag-${tag.id}`"
class="filter-item"
:class="{ selected: selectedTags.includes(tag.slug) }"
> >
<Icon <router-link
icon="checkmark" :to="{ query: { ...$route.query, tags: tag.slug, mode }, params: { pageNumber: 1 } }"
class="filter-add" class="filter-name"
/> >{{ tag.name }}</router-link>
<Icon <router-link
icon="cross2" :to="{ query: { ...$route.query, ...getNewRange(tag.slug), mode }, params: { pageNumber: 1 } }"
class="filter-remove" class="filter-include"
/> >
</router-link> <Icon
</li> icon="checkmark"
</ul> class="filter-add"
</div> />
</v-popover>
<Icon
icon="cross2"
class="filter-remove"
/>
</router-link>
</li>
</ul>
</div>
</template>
</Tooltip>
</template> </template>
<script> <script>
@ -103,3 +105,9 @@ export default {
}, },
}; };
</script> </script>
<style lang="scss" scoped>
.filter-options {
width: 15rem;
}
</style>

View File

@ -17,6 +17,7 @@
<router-link <router-link
v-slot="{ href, isActive, navigate }" v-slot="{ href, isActive, navigate }"
to="/actors" to="/actors"
custom
> >
<a <a
class="nav-link" class="nav-link"
@ -31,6 +32,7 @@
<router-link <router-link
v-slot="{ href, isActive, navigate }" v-slot="{ href, isActive, navigate }"
to="/networks" to="/networks"
custom
> >
<a <a
class="nav-link" class="nav-link"
@ -45,6 +47,7 @@
<router-link <router-link
v-slot="{ href, isActive, navigate }" v-slot="{ href, isActive, navigate }"
to="/tags" to="/tags"
custom
> >
<a <a
class="nav-link" class="nav-link"
@ -59,6 +62,7 @@
<router-link <router-link
v-slot="{ href, isActive, navigate }" v-slot="{ href, isActive, navigate }"
to="/movies" to="/movies"
custom
> >
<a <a
class="nav-link" class="nav-link"
@ -78,43 +82,84 @@
@click.stop="toggleSidebar" @click.stop="toggleSidebar"
><Icon icon="menu" /></div> ><Icon icon="menu" /></div>
<div class="header-toggles"> <Tooltip>
<Icon <div class="header-account">
v-show="!sfw" <div class="account">
v-tooltip="'Hit S to enable safe mode'" <Icon
icon="flower" icon="user3-long"
class="toggle noselect" class="avatar"
@click.native="setSfw(true)" />
/> </div>
</div>
<Icon <template v-slot:tooltip>
v-show="sfw" <div class="menu">
v-tooltip="'Hit N to disable safe mode'" <ul class="menu-items noselect">
icon="fire" <li
class="toggle noselect" class="menu-item disabled"
@click.native="setSfw(false)" @click.stop
/> >
<Icon icon="enter2" />Sign in
</li>
<Icon <li
v-show="theme === 'light'" v-show="!sfw"
v-tooltip="'Hit D to use dark theme'" class="menu-item"
icon="moon" @click.stop="setSfw(true)"
class="toggle noselect" >
@click.native="setTheme('dark')" <Icon
/> icon="flower"
class="toggle noselect"
/>Safe mode
</li>
<Icon <li
v-show="theme === 'dark'" v-show="sfw"
v-tooltip="'Hit L to use light theme'" class="menu-item"
icon="sun" @click.stop="setSfw(false)"
class="toggle noselect" >
@click.native="setTheme('light')" <Icon
/> icon="fire"
</div> class="toggle noselect"
/>Filth mode
</li>
<li
v-show="theme === 'light'"
class="menu-item"
@click.stop="setTheme('dark')"
>
<Icon
icon="moon"
class="toggle noselect"
/>Dark theme
</li>
<li
v-show="theme === 'dark'"
class="menu-item"
@click.stop="setTheme('light')"
>
<Icon
icon="sun"
class="toggle noselect"
/>Light theme
</li>
<li
class="menu-item disabled"
@click.stop
>
<Icon icon="filter" />Filters
</li>
</ul>
</div>
</template>
</Tooltip>
<Search class="search-full" /> <Search class="search-full" />
<v-popover <Tooltip
class="search-compact" class="search-compact"
:open="searching" :open="searching"
@show="searching = true" @show="searching = true"
@ -128,12 +173,12 @@
/></button> /></button>
<Search <Search
slot="popover" slot="tooltip"
:searching="searching" :searching="searching"
class="compact" class="compact"
@search="searching = false" @search="searching = false"
/> />
</v-popover> </Tooltip>
</div> </div>
</header> </header>
</template> </template>
@ -318,6 +363,73 @@ export default {
} }
} }
.header-account {
padding: 1rem;
&:hover {
cursor: pointer;
.account {
border-color: var(--primary);
}
.avatar {
fill: var(--primary);
}
}
}
.account {
width: 1.25rem;
height: 1.25rem;
display: flex;
justify-content: center;
border: solid 2px var(--shadow);
border-radius: 1.5rem;
overflow: hidden;
.avatar {
width: 1rem;
height: 1rem;
margin: .3rem 0 0 0;
fill: var(--shadow);
}
}
.menu-items {
list-style: none;
padding: 0;
margin: 0;
}
.menu-item {
display: flex;
padding: .75rem 1rem .75rem .75rem;
.icon {
fill: var(--darken);
margin: 0 1rem 0 0;
}
&.disabled {
color: var(--darken-weak);
cursor: default;
.icon {
fill: var(--darken-weak);
}
}
&:hover:not(.disabled) {
cursor: pointer;
color: var(--primary);
.icon {
fill: var(--primary);
}
}
}
.search-compact { .search-compact {
display: none; display: none;
height: 100%; height: 100%;
@ -352,8 +464,8 @@ export default {
display: flex; display: flex;
} }
.header-toggles { .header-account {
margin: 0; padding: 1rem .5rem 1rem 1rem;
} }
} }
@ -374,16 +486,7 @@ export default {
display: none; display: none;
} }
.header-toggles { .header-account {
display: none;
}
}
@media(max-width: $breakpoint-micro) {
}
@media(max-width: $breakpoint-nano) {
.header-toggles {
display: none; display: none;
} }
} }

View File

@ -1,8 +1,5 @@
<template> <template>
<div <div class="media">
v-lazy-container
class="media"
>
<div <div
v-if="release.trailer || release.teaser" v-if="release.trailer || release.teaser"
class="trailer-container" class="trailer-container"
@ -33,8 +30,9 @@
<img <img
v-else-if="release.teaser && /^image\//.test(release.teaser.mime)" v-else-if="release.teaser && /^image\//.test(release.teaser.mime)"
:data-src="sfw ? `/img/${release.teaser.sfw.thumbnail}` : `/media/${release.teaser.path}`" :src="sfw ? `/img/${release.teaser.sfw.thumbnail}` : `/media/${release.teaser.path}`"
:alt="release.title" :alt="release.title"
loading="lazy"
class="item trailer" class="item trailer"
> >
@ -65,10 +63,11 @@
rel="noopener noreferrer" rel="noopener noreferrer"
> >
<img <img
:data-src="`/media/${cover.thumbnail}`" :src="`/media/${cover.thumbnail}`"
:data-loading="`/media/${cover.lazy}`" :style="{ background: sfw ? `/media/${cover.sfw.lazy}` : `/media/${cover.lazy}` }"
class="item cover" class="item cover"
@load="$parent.$emit('load')" loading="lazy"
@load="$emit('load', $event)"
> >
</a> </a>
</template> </template>
@ -86,11 +85,12 @@
rel="noopener noreferrer" rel="noopener noreferrer"
> >
<img <img
:data-src="sfw ? `/img/${photo.sfw.thumbnail}` : `/media/${photo.thumbnail}`" :src="sfw ? `/img/${photo.sfw.thumbnail}` : `/media/${photo.thumbnail}`"
:data-loading="sfw ? `/img/${photo.sfw.lazy}` : `/media/${photo.lazy}`" :style="{ background: sfw ? `/img/${photo.sfw.lazy}` : `/media/${photo.lazy}` }"
:alt="`Photo ${photo.index + 1}`" :alt="`Photo ${photo.index + 1}`"
loading="lazy"
class="item" class="item"
@load="$parent.$emit('load')" @load="$emit('load', $event)"
> >
<span <span
@ -139,6 +139,10 @@ export default {
type: Boolean, type: Boolean,
default: false, default: false,
}, },
test: {
type: String,
default: null,
},
}, },
data() { data() {
return { return {
@ -159,15 +163,8 @@ export default {
.media { .media {
flex-shrink: 0; flex-shrink: 0;
white-space: nowrap; white-space: nowrap;
overflow-x: auto;
scrollbar-width: none;
scroll-behavior: smooth;
font-size: 0; font-size: 0;
&::-webkit-scrollbar {
display: none;
}
&.expanded { &.expanded {
display: grid; display: grid;
grid-template-columns: repeat(auto-fill, minmax(32rem, 1fr)); grid-template-columns: repeat(auto-fill, minmax(32rem, 1fr));
@ -249,6 +246,7 @@ export default {
height: 18rem; height: 18rem;
max-width: 100%; max-width: 100%;
box-shadow: 0 0 3px var(--shadow-weak); box-shadow: 0 0 3px var(--shadow-weak);
background-size: cover;
} }
.trailer-container { .trailer-container {

View File

@ -11,12 +11,14 @@
/> />
<Scroll <Scroll
v-slot="slotProps"
class="scroll-light" class="scroll-light"
:expandable="false" :expandable="false"
> >
<Media <Media
:release="release" :release="release"
:class="{ expanded }" :class="{ expanded }"
@load="slotProps.loaded"
/> />
</Scroll> </Scroll>
@ -56,10 +58,7 @@
</div> </div>
<div class="row associations"> <div class="row associations">
<ul <ul class="actors nolist">
v-lazy-container="{ selector: '.lazy' }"
class="actors nolist"
>
<li <li
v-for="actor in release.actors" v-for="actor in release.actors"
:key="actor.id" :key="actor.id"

View File

@ -8,7 +8,6 @@
<ul <ul
v-if="releases.length > 0" v-if="releases.length > 0"
:key="sfw" :key="sfw"
v-lazy-container="{ selector: '.thumbnail' }"
class="nolist tiles" class="nolist tiles"
> >
<li <li

View File

@ -13,10 +13,10 @@
> >
<img <img
v-if="release.poster" v-if="release.poster"
:data-src="sfw ? `/img/${release.poster.sfw.thumbnail}` : `/media/${release.poster.thumbnail}`" :src="sfw ? `/img/${release.poster.sfw.thumbnail}` : `/media/${release.poster.thumbnail}`"
:data-loading="sfw ? `/img/${release.poster.sfw.lazy}` : `/media/${release.poster.lazy}`"
:alt="release.title" :alt="release.title"
class="thumbnail" class="thumbnail"
loading="lazy"
> >
<span <span
@ -26,10 +26,10 @@
<img <img
v-for="cover in release.covers" v-for="cover in release.covers"
:key="cover.id" :key="cover.id"
:data-src="sfw ? `/img/${cover.sfw.thumbnail}` : `/media/${cover.thumbnail}`" :src="sfw ? `/img/${cover.sfw.thumbnail}` : `/media/${cover.thumbnail}`"
:data-loading="sfw ? `/img/${cover.sfw.lazy}` : `/media/${cover.lazy}`"
:alt="release.title" :alt="release.title"
class="thumbnail cover" class="thumbnail cover"
loading="lazy"
> >
</span> </span>

View File

@ -22,7 +22,12 @@
@click="scroll('left')" @click="scroll('left')"
><Icon icon="arrow-left3" /></div> ><Icon icon="arrow-left3" /></div>
<slot /> <div
ref="content"
class="content"
>
<slot :loaded="loaded" />
</div>
<div <div
v-show="enabled && !expanded" v-show="enabled && !expanded"
@ -52,34 +57,35 @@
import Expand from '../expand/expand.vue'; import Expand from '../expand/expand.vue';
function updateScroll() { function updateScroll() {
this.scrollable = this.target.scrollWidth > this.target.clientWidth; this.scrollable = this.$refs.content.scrollWidth > this.$refs.content.clientWidth;
this.scrollAtStart = this.target.scrollLeft === 0; this.scrollAtStart = this.$refs.content.scrollLeft === 0;
this.scrollAtEnd = this.target.scrollWidth - this.target.clientWidth === this.target.scrollLeft; this.scrollAtEnd = this.$refs.content.scrollWidth - this.$refs.content.clientWidth === this.$refs.content.scrollLeft;
} }
function scroll(direction) { function scroll(direction) {
if (direction === 'right') { if (direction === 'right') {
this.target.scrollLeft = this.target.scrollLeft + this.target.clientWidth - 100; this.$refs.content.scrollLeft = this.$refs.content.scrollLeft + this.$refs.content.clientWidth - 100;
} }
if (direction === 'left') { if (direction === 'left') {
this.target.scrollLeft = this.target.scrollLeft - this.target.clientWidth + 100; this.$refs.content.scrollLeft = this.$refs.content.scrollLeft - this.$refs.content.clientWidth + 100;
} }
} }
function mounted() { function loaded(_event) {
this.target = this.$slots.default[0].elm; // typically triggered by slotted component when an image loads, affecting scrollWidth
this.updateScroll();
}
this.target.addEventListener('scroll', () => this.updateScroll()); function mounted() {
this.$refs.content.addEventListener('scroll', () => this.updateScroll());
window.addEventListener('resize', this.updateScroll); window.addEventListener('resize', this.updateScroll);
// typically triggered by slotted component when an image loads, affecting scrollWidth
this.$on('load', () => this.updateScroll());
this.updateScroll(); this.updateScroll();
} }
function beforeDestroy() { function beforeDestroy() {
this.target.removeEventListener('scroll', this.updateScroll); this.$refs.content.removeEventListener('scroll', this.updateScroll);
window.removeEventListener('resize', this.updateScroll); window.removeEventListener('resize', this.updateScroll);
} }
@ -108,7 +114,6 @@ export default {
}, },
data() { data() {
return { return {
target: null,
scrollable: true, scrollable: true,
scrollAtStart: true, scrollAtStart: true,
scrollAtEnd: false, scrollAtEnd: false,
@ -119,6 +124,7 @@ export default {
beforeDestroy, beforeDestroy,
methods: { methods: {
scroll, scroll,
loaded,
updateScroll, updateScroll,
}, },
}; };
@ -143,6 +149,16 @@ export default {
position: relative; position: relative;
} }
.content {
overflow-x: scroll;
scroll-behavior: smooth;
scrollbar-width: none;
&::-webkit-scrollbar {
display: none;
}
}
.expand-light { .expand-light {
display: none; display: none;
} }
@ -233,6 +249,14 @@ export default {
display: none; display: none;
} }
&.scroll-start {
left: 0;
}
&.scroll-end {
right: 0;
}
&:hover { &:hover {
display: flex; display: flex;
cursor: pointer; cursor: pointer;

View File

@ -40,6 +40,7 @@
<router-link <router-link
v-slot="{ href, isActive, navigate }" v-slot="{ href, isActive, navigate }"
to="/updates" to="/updates"
custom
@click.native="$emit('toggle', false)" @click.native="$emit('toggle', false)"
> >
<a <a
@ -55,6 +56,7 @@
<router-link <router-link
v-slot="{ href, isActive, navigate }" v-slot="{ href, isActive, navigate }"
to="/actors" to="/actors"
custom
@click.native="$emit('toggle', false)" @click.native="$emit('toggle', false)"
> >
<a <a
@ -70,6 +72,7 @@
<router-link <router-link
v-slot="{ href, isActive, navigate }" v-slot="{ href, isActive, navigate }"
to="/networks" to="/networks"
custom
@click.native="$emit('toggle', false)" @click.native="$emit('toggle', false)"
> >
<a <a
@ -85,6 +88,7 @@
<router-link <router-link
v-slot="{ href, isActive, navigate }" v-slot="{ href, isActive, navigate }"
to="/movies" to="/movies"
custom
@click.native="$emit('toggle', false)" @click.native="$emit('toggle', false)"
> >
<a <a
@ -100,6 +104,7 @@
<router-link <router-link
v-slot="{ href, isActive, navigate }" v-slot="{ href, isActive, navigate }"
to="/tags" to="/tags"
custom
@click.native="$emit('toggle', false)" @click.native="$emit('toggle', false)"
> >
<a <a
@ -249,7 +254,7 @@ export default {
fill: var(--primary); fill: var(--primary);
} }
::v-deep .search { :deep(.search) {
height: 3rem; height: 3rem;
border-bottom: solid 1px var(--shadow-hint); border-bottom: solid 1px var(--shadow-hint);
padding: 0; padding: 0;

View File

@ -9,7 +9,6 @@
<div <div
:key="sfw" :key="sfw"
v-lazy-container
class="tiles" class="tiles"
> >
<Tag <Tag

View File

@ -11,6 +11,7 @@
<img <img
v-if="!lazy && !sfw" v-if="!lazy && !sfw"
:src="`/img/${tag.poster.thumbnail}`" :src="`/img/${tag.poster.thumbnail}`"
:style="{ 'background-image': `url(/img/${tag.poster.lazy})` }"
:title="tag.poster.comment" :title="tag.poster.comment"
:alt="tag.name" :alt="tag.name"
class="poster" class="poster"
@ -19,6 +20,7 @@
<img <img
v-if="!lazy && sfw" v-if="!lazy && sfw"
:src="`/img/${tag.poster.sfw.thumbnail}`" :src="`/img/${tag.poster.sfw.thumbnail}`"
:style="{ 'background-image': `url(/img/${tag.poster.sfw.lazy})` }"
:title="tag.poster.sfw.comment" :title="tag.poster.sfw.comment"
:alt="tag.name" :alt="tag.name"
class="poster" class="poster"
@ -26,19 +28,21 @@
<img <img
v-if="lazy && !sfw" v-if="lazy && !sfw"
:data-src="`/img/${tag.poster.thumbnail}`" :src="`/img/${tag.poster.thumbnail}`"
:data-loading="`/img/${tag.poster.lazy}`" :style="{ 'background-image': `url(/img/${tag.poster.lazy})` }"
:title="tag.poster.comment" :title="tag.poster.comment"
:alt="tag.name" :alt="tag.name"
loading="lazy"
class="poster" class="poster"
> >
<img <img
v-if="lazy && sfw" v-if="lazy && sfw"
:data-src="`/img/${tag.poster.sfw.thumbnail}`" :src="`/img/${tag.poster.sfw.thumbnail}`"
:data-loading="`/img/${tag.poster.sfw.lazy}`" :style="{ 'background-image': `url(/img/${tag.poster.sfw.lazy})` }"
:title="tag.poster.sfw.comment" :title="tag.poster.sfw.comment"
:alt="tag.name" :alt="tag.name"
loading="lazy"
class="poster" class="poster"
> >
</router-link> </router-link>
@ -99,7 +103,11 @@ export default {
} }
.poster { .poster {
display: inline-block;
width: 100%; width: 100%;
height: 13.5rem;
object-fit: cover;
background-size: cover;
box-shadow: 0 0 3px var(--darken-weak); box-shadow: 0 0 3px var(--darken-weak);
} }

View File

@ -0,0 +1,151 @@
<template>
<div class="tooltip-container">
<div
ref="trigger"
class="trigger noselect"
@click.stop="toggle"
>
<slot />
</div>
<teleport to="body">
<div
v-if="opened"
ref="tooltip"
class="tooltip-wrapper"
:style="{ transform: `translate3d(${tooltipX}px, ${tooltipY}px, 0)` }"
>
<div class="tooltip-inner">
<div class="tooltip">
<slot name="tooltip" />
</div>
</div>
</div>
</teleport>
</div>
</template>
<script>
import { nextTick } from 'vue';
function getX(triggerBoundary, tooltipBoundary) {
const idealPosition = triggerBoundary.left + (triggerBoundary.width / 2) - (tooltipBoundary.width / 2);
// don't overflow left edge
if (idealPosition < 0) {
return 0;
}
// don't overflow right edge
if (idealPosition + tooltipBoundary.width > window.innerWidth) {
return window.innerWidth - tooltipBoundary.width;
}
// position at the center of trigger
return idealPosition;
}
async function calculate() {
if (!this.opened) {
return;
}
const triggerBoundary = this.$refs.trigger.getBoundingClientRect();
const tooltipBoundary = this.$refs.tooltip.getBoundingClientRect();
this.tooltipY = triggerBoundary.top + triggerBoundary.height;
this.tooltipX = this.getX(triggerBoundary, tooltipBoundary);
}
async function open() {
this.events.emit('blur');
await nextTick();
this.opened = true;
await nextTick();
this.calculate();
}
function close() {
this.opened = false;
this.tooltipY = 0;
this.tooltipX = 0;
}
function toggle() {
if (this.opened) {
this.close();
return;
}
this.open();
}
function mounted() {
this.events.on('blur', () => {
this.close();
});
this.events.on('resize', () => {
this.calculate();
});
}
export default {
data() {
return {
opened: false,
tooltipX: 0,
tooltipY: 0,
};
},
mounted,
methods: {
calculate,
getX,
open,
close,
toggle,
},
};
</script>
<style lang="scss" scoped>
.tooltip-wrapper {
display: flex;
top: 0;
left: 0;
flex-direction: column;
justify-content: center;
position: absolute;
z-index: 10;
}
.tooltip-inner {
position: relative;
box-shadow: 0 0 3px var(--darken-weak);
&:after {
content: '';
width: 0;
height: 0;
position: absolute;
z-index : 11;
top: -.5rem;
left: calc(50% - .5rem);
border-left: .5rem solid transparent;
border-right: .5rem solid transparent;
border-bottom: .5rem solid var(--background-light);
margin: 0 auto;
filter: drop-shadow(0 0 3px var(--darken-weak));
}
}
.tooltip {
position: relative;
background: var(--background-light);
}
</style>

View File

@ -12,6 +12,9 @@ $breakpoint4: 1500px;
--text-dark: #222; --text-dark: #222;
--text-light: #fff; --text-light: #fff;
--background-light: #fff;
--background-dark: #222;
--darken: rgba(0, 0, 0, .5); --darken: rgba(0, 0, 0, .5);
--darken-strong: rgba(0, 0, 0, .7); --darken-strong: rgba(0, 0, 0, .7);
--darken-extreme: rgba(0, 0, 0, .9); --darken-extreme: rgba(0, 0, 0, .9);
@ -40,7 +43,7 @@ $breakpoint4: 1500px;
--text: #222; --text: #222;
--text-contrast: #fff; --text-contrast: #fff;
--background: #fff; --background: var(--background-light);
--background-dim: #fafafa; --background-dim: #fafafa;
--background-soft: #fdfdfd; --background-soft: #fdfdfd;
@ -71,7 +74,7 @@ $breakpoint4: 1500px;
--text: #fff; --text: #fff;
--text-contrast: #222; --text-contrast: #222;
--background: #222; --background: var(--background-dark);
--background-dim: #181818; --background-dim: #181818;
--background-soft: #111; --background-soft: #111;

View File

@ -13,6 +13,10 @@ body {
font-family: Arial, Helvetica, sans-serif; font-family: Arial, Helvetica, sans-serif;
} }
#container {
height: 100%;
}
.nolist { .nolist {
list-style: none; list-style: none;
padding: 0; padding: 0;

View File

@ -0,0 +1,6 @@
<!-- Generated by IcoMoon.io -->
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
<title>enter</title>
<path d="M7 13l4.5-4.5-4.5-4.5v3h-7v3h7v3z"></path>
<path d="M15 16h-11v-2h10v-11h-10v-2h11c0.552 0 1 0.448 1 1v13c0 0.552-0.448 1-1 1z"></path>
</svg>

After

Width:  |  Height:  |  Size: 304 B

View File

@ -0,0 +1,5 @@
<!-- Generated by IcoMoon.io -->
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
<title>enter2</title>
<path d="M15 0v16h-12v-5h1v3h7v-12h-7v3h-1v-5zM6 9h-6v-2h6v-3l4 4-4 4z"></path>
</svg>

After

Width:  |  Height:  |  Size: 240 B

View File

@ -0,0 +1,5 @@
<!-- Generated by IcoMoon.io -->
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
<title>enter3</title>
<path d="M6 8h-5v-2h5v-2l3 3-3 3zM16 0v13l-6 3v-3h-6v-4h1v3h5v-9l4-2h-9v4h-1v-5z"></path>
</svg>

After

Width:  |  Height:  |  Size: 250 B

View File

@ -0,0 +1,6 @@
<!-- Generated by IcoMoon.io -->
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
<title>exit</title>
<path d="M11 13l4.5-4.5-4.5-4.5v3h-7v3h7v3z"></path>
<path d="M1 1h11v2h-10v11h10v2h-11c-0.552 0-1-0.448-1-1v-13c0-0.552 0.448-1 1-1z"></path>
</svg>

After

Width:  |  Height:  |  Size: 301 B

View File

@ -0,0 +1,5 @@
<!-- Generated by IcoMoon.io -->
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
<title>exit2</title>
<path d="M12 9h-7v-2h7v-3l4 4-4 4zM10 10v6h-10v-16h10v6h-1v-4h-5v12h5v-4z"></path>
</svg>

After

Width:  |  Height:  |  Size: 242 B

View File

@ -0,0 +1,5 @@
<!-- Generated by IcoMoon.io -->
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
<title>exit3</title>
<path d="M12 10v-2h-5v-2h5v-2l3 3zM11 9v4h-5v3l-6-3v-13h11v5h-1v-4h-8l4 2v9h4v-3z"></path>
</svg>

After

Width:  |  Height:  |  Size: 250 B

View File

@ -0,0 +1,5 @@
<!-- Generated by IcoMoon.io -->
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
<title>user-tie</title>
<path d="M5 3c0-1.657 1.343-3 3-3s3 1.343 3 3c0 1.657-1.343 3-3 3s-3-1.343-3-3zM12.001 7h-0.553l-3.111 6.316 1.163-5.816-1.5-1.5-1.5 1.5 1.163 5.816-3.111-6.316h-0.554c-1.999 0-1.999 1.344-1.999 3v5h12v-5c0-1.656 0-3-1.999-3z"></path>
</svg>

After

Width:  |  Height:  |  Size: 397 B

View File

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
version="1.1"
width="16"
height="19"
viewBox="0 0 16 19"
id="svg6">
<metadata
id="metadata12">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title>user3</dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs10" />
<title
id="title2">user3</title>
<path
d="M 4,4 C 4,1.791 5.791,0 8,0 10.209,0 12,1.791 12,4 12,6.209 10.209,8 8,8 5.791,8 4,6.209 4,4 Z m 8,5 H 4 C 1.791,9 0,10.791 0,13 v 6 H 16 V 13 C 16,10.791 14.209,9 12,9 Z"
id="path4" />
</svg>

After

Width:  |  Height:  |  Size: 953 B

View File

@ -0,0 +1,5 @@
<!-- Generated by IcoMoon.io -->
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
<title>user3</title>
<path d="M4 5c0-2.209 1.791-4 4-4s4 1.791 4 4c0 2.209-1.791 4-4 4s-4-1.791-4-4zM12 10h-8c-2.209 0-4 1.791-4 4v1h16v-1c0-2.209-1.791-4-4-4z"></path>
</svg>

After

Width:  |  Height:  |  Size: 307 B

View File

@ -0,0 +1,5 @@
<!-- Generated by IcoMoon.io -->
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
<title>user7</title>
<path d="M5 4c0-1.657 1.343-3 3-3s3 1.343 3 3c0 1.657-1.343 3-3 3s-3-1.343-3-3zM8 8c-3.314 0-6 3.134-6 7h2c0-2.761 1.791-5 4-5s4 2.239 4 5h2c0-3.866-2.686-7-6-7z"></path>
</svg>

After

Width:  |  Height:  |  Size: 330 B

View File

@ -0,0 +1,5 @@
<!-- Generated by IcoMoon.io -->
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
<title>users5</title>
<path d="M3 6c0-1.105 0.895-2 2-2s2 0.895 2 2c0 1.105-0.895 2-2 2s-2-0.895-2-2zM9 3c0-1.105 0.895-2 2-2s2 0.895 2 2c0 1.105-0.895 2-2 2s-2-0.895-2-2zM5 9c-2.761 0-5 2.686-5 6h1.5c0-0.64 0.103-1.258 0.308-1.837 0.192-0.546 0.465-1.032 0.809-1.446 0.654-0.785 1.501-1.218 2.383-1.218s1.729 0.432 2.383 1.218c0.345 0.414 0.617 0.9 0.809 1.446 0.204 0.579 0.308 1.197 0.308 1.837h1.5c0-3.314-2.239-6-5-6zM11 6c-1.472 0-2.794 0.763-3.709 1.977 0.112 0.049 0.224 0.101 0.335 0.157 0.34 0.173 0.664 0.376 0.97 0.61 0.007-0.009 0.014-0.018 0.022-0.027 0.654-0.785 1.501-1.218 2.383-1.218s1.729 0.432 2.383 1.218c0.345 0.414 0.617 0.9 0.809 1.446 0.204 0.579 0.308 1.197 0.308 1.837h1.5c0-3.314-2.239-6-5-6z"></path>
</svg>

After

Width:  |  Height:  |  Size: 868 B

View File

@ -1,5 +0,0 @@
import Vue from 'vue';
const EventBus = new Vue();
export default EventBus;

View File

@ -1,7 +1,7 @@
import Vue from 'vue'; import { createApp, reactive } from 'vue';
import VTooltip from 'v-tooltip';
import VueLazyLoad from 'vue-lazyload';
import dayjs from 'dayjs'; import dayjs from 'dayjs';
import mitt from 'mitt';
import router from './router'; import router from './router';
import initStore from './store'; import initStore from './store';
@ -14,9 +14,12 @@ import '../css/style.scss';
import Container from '../components/container/container.vue'; import Container from '../components/container/container.vue';
import Icon from '../components/icon/icon.vue'; import Icon from '../components/icon/icon.vue';
import Footer from '../components/footer/footer.vue'; import Footer from '../components/footer/footer.vue';
import Tooltip from '../components/tooltip/tooltip.vue';
function init() { async function init() {
const store = initStore(router); const store = initStore(reactive(router));
const app = createApp(Container);
const events = mitt();
initUiObservers(store, router); initUiObservers(store, router);
@ -24,10 +27,22 @@ function init() {
store.dispatch('setSfw', true); store.dispatch('setSfw', true);
} }
Vue.mixin({ app.use(store);
app.use(router);
await router.isReady();
app.mixin({
components: { components: {
Icon, Icon,
Footer, Footer,
Tooltip,
'v-popover': Tooltip,
},
data() {
return {
events,
};
}, },
watch: { watch: {
pageTitle(title) { pageTitle(title) {
@ -47,23 +62,14 @@ function init() {
}, },
}); });
Vue.use(VTooltip, { app.directive('tooltip', {
popover: { beforeMount(el, binding) {
defaultContainer: '.container', // console.log(binding.modifiers);
el.title = binding.value; // eslint-disable-line no-param-reassign
}, },
}); });
Vue.use(VueLazyLoad, {
throttleWait: 0,
});
new Vue({ // eslint-disable-line no-new app.mount('#container');
el: '#container',
store,
router,
render(createElement) {
return createElement(Container);
},
});
} }
init(); init();

View File

@ -1,14 +1 @@
import Vue from 'vue'; export default {};
function setCache(state, { target, releases }) {
Vue.set(state.cache, target, releases);
}
function deleteCache(state, target) {
Vue.delete(state.cache, target);
}
export default {
setCache,
deleteCache,
};

View File

@ -1,5 +1,4 @@
import Vue from 'vue'; import { createRouter, createWebHistory } from 'vue-router';
import VueRouter from 'vue-router';
import Home from '../components/home/home.vue'; import Home from '../components/home/home.vue';
import Release from '../components/releases/release.vue'; import Release from '../components/releases/release.vue';
@ -14,8 +13,6 @@ import Search from '../components/search/search.vue';
import Stats from '../components/stats/stats.vue'; import Stats from '../components/stats/stats.vue';
import NotFound from '../components/errors/404.vue'; import NotFound from '../components/errors/404.vue';
Vue.use(VueRouter);
const routes = [ const routes = [
{ {
path: '/', path: '/',
@ -184,15 +181,15 @@ const routes = [
component: NotFound, component: NotFound,
}, },
{ {
path: '*', path: '/:catchAll(.*)',
redirect: { redirect: {
name: 'not-found', name: 'not-found',
}, },
}, },
]; ];
const router = new VueRouter({ const router = createRouter({
mode: 'history', history: createWebHistory(),
routes, routes,
}); });

View File

@ -1,4 +1,3 @@
import Vue from 'vue';
import Vuex from 'vuex'; import Vuex from 'vuex';
import initUiStore from './ui/ui'; import initUiStore from './ui/ui';
@ -9,8 +8,6 @@ import initActorsStore from './actors/actors';
import initTagsStore from './tags/tags'; import initTagsStore from './tags/tags';
function initStore(router) { function initStore(router) {
Vue.use(Vuex);
const store = new Vuex.Store(); const store = new Vuex.Store();
store.registerModule('ui', initUiStore(store, router)); store.registerModule('ui', initUiStore(store, router));

View File

@ -1,4 +1,13 @@
function initUiObservers(store, _router) { function initUiObservers(store, _router) {
const body = document.querySelector('body');
body.classList.add(store.state.ui.theme);
store.watch(state => state.ui.theme, (newTheme, oldTheme) => {
body.classList.add(newTheme);
body.classList.remove(oldTheme);
});
document.addEventListener('keypress', (event) => { document.addEventListener('keypress', (event) => {
if (event.target.tagName === 'INPUT') { if (event.target.tagName === 'INPUT') {
return; return;

2566
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
{ {
"name": "traxxx", "name": "traxxx",
"version": "1.148.2", "version": "1.149.0",
"description": "All the latest porn releases in one place", "description": "All the latest porn releases in one place",
"main": "src/app.js", "main": "src/app.js",
"scripts": { "scripts": {
@ -43,11 +43,12 @@
"@babel/plugin-proposal-optional-chaining": "^7.8.3", "@babel/plugin-proposal-optional-chaining": "^7.8.3",
"@babel/preset-env": "^7.8.4", "@babel/preset-env": "^7.8.4",
"@babel/register": "^7.8.3", "@babel/register": "^7.8.3",
"@vue/compiler-sfc": "^3.0.4",
"autoprefixer": "^9.7.4", "autoprefixer": "^9.7.4",
"babel-eslint": "^10.1.0", "babel-eslint": "^10.1.0",
"babel-loader": "^8.0.6", "babel-loader": "^8.0.6",
"babel-preset-airbnb": "^3.3.2", "babel-preset-airbnb": "^3.3.2",
"css-loader": "^2.1.1", "css-loader": "^5.0.1",
"eslint": "^5.16.0", "eslint": "^5.16.0",
"eslint-config-airbnb": "^17.1.1", "eslint-config-airbnb": "^17.1.1",
"eslint-config-airbnb-base": "^13.2.0", "eslint-config-airbnb-base": "^13.2.0",
@ -57,15 +58,14 @@
"eslint-plugin-react": "^7.18.3", "eslint-plugin-react": "^7.18.3",
"eslint-plugin-vue": "^6.2.1", "eslint-plugin-vue": "^6.2.1",
"eslint-watch": "^4.0.2", "eslint-watch": "^4.0.2",
"mini-css-extract-plugin": "^0.7.0", "mini-css-extract-plugin": "^1.3.3",
"node-sass": "^4.13.1", "node-sass": "^4.13.1",
"postcss-loader": "^3.0.0", "postcss-loader": "^3.0.0",
"raw-loader": "^2.0.0", "raw-loader": "^4.0.2",
"sass-loader": "^7.3.1", "sass-loader": "^7.3.1",
"style-loader": "^0.23.1", "style-loader": "^0.23.1",
"vue-loader": "^15.9.0", "vue-loader": "^16.1.2",
"vue-template-compiler": "^2.6.11", "webpack": "^5.11.0",
"webpack": "^4.41.6",
"webpack-cli": "^3.3.11" "webpack-cli": "^3.3.11"
}, },
"dependencies": { "dependencies": {
@ -107,6 +107,7 @@
"knex-migrate": "^1.7.4", "knex-migrate": "^1.7.4",
"longjohn": "^0.2.12", "longjohn": "^0.2.12",
"mime": "^2.4.4", "mime": "^2.4.4",
"mitt": "^2.1.0",
"moment": "^2.24.0", "moment": "^2.24.0",
"nanoid": "^2.1.11", "nanoid": "^2.1.11",
"opn": "^5.5.0", "opn": "^5.5.0",
@ -126,10 +127,9 @@
"tunnel": "0.0.6", "tunnel": "0.0.6",
"url-pattern": "^1.0.3", "url-pattern": "^1.0.3",
"v-tooltip": "^2.0.3", "v-tooltip": "^2.0.3",
"vue": "^2.6.11", "vue": "^3.0.4",
"vue-lazyload": "^1.3.3", "vue-router": "^4.0.1",
"vue-router": "^3.1.6", "vuex": "^4.0.0-rc.2",
"vuex": "^3.1.2",
"winston": "^3.2.1", "winston": "^3.2.1",
"winston-daily-rotate-file": "^4.4.2", "winston-daily-rotate-file": "^4.4.2",
"yargs": "^13.3.0" "yargs": "^13.3.0"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 529 KiB

After

Width:  |  Height:  |  Size: 440 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 440 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 529 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

View File

@ -1,6 +1,6 @@
const webpack = require('webpack'); const webpack = require('webpack');
const path = require('path'); const path = require('path');
const VueLoaderPlugin = require('vue-loader/lib/plugin'); const { VueLoaderPlugin } = require('vue-loader');
const MiniCssExtractPlugin = require('mini-css-extract-plugin'); const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const autoprefixer = require('autoprefixer'); const autoprefixer = require('autoprefixer');
@ -42,7 +42,13 @@ module.exports = {
test: /\.scss$/, test: /\.scss$/,
use: [ use: [
MiniCssExtractPlugin.loader, MiniCssExtractPlugin.loader,
'css-loader?sourceMap', {
loader: 'css-loader',
options: {
sourceMap: true,
url: false,
},
},
{ {
loader: 'postcss-loader', loader: 'postcss-loader',
options: { options: {