2019-11-10 03:20:22 +00:00
|
|
|
<template>
|
2020-05-14 02:26:05 +00:00
|
|
|
<div
|
|
|
|
v-if="network"
|
|
|
|
class="content"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
class="network"
|
|
|
|
:class="{ nosites: sites.length === 0 && networks.length === 0 }"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
v-show="sites.length > 0 || networks.length > 0"
|
|
|
|
class="sidebar"
|
|
|
|
:class="{ expanded }"
|
|
|
|
>
|
|
|
|
<a
|
|
|
|
v-tooltip.bottom="`Go to ${network.url}`"
|
|
|
|
:href="network.url"
|
|
|
|
target="_blank"
|
|
|
|
rel="noopener noreferrer"
|
|
|
|
class="title"
|
|
|
|
>
|
|
|
|
<img
|
|
|
|
:src="`/img/logos/${network.slug}/thumbs/network.png`"
|
|
|
|
class="logo"
|
|
|
|
>
|
|
|
|
</a>
|
|
|
|
|
|
|
|
<p
|
|
|
|
v-if="network.description"
|
|
|
|
class="description"
|
|
|
|
>{{ network.description }}</p>
|
|
|
|
|
|
|
|
<Sites
|
|
|
|
v-if="sites.length"
|
|
|
|
:sites="sites"
|
|
|
|
:class="{ expanded }"
|
|
|
|
/>
|
|
|
|
|
|
|
|
<div
|
|
|
|
v-if="networks.length > 0"
|
|
|
|
class="networks"
|
|
|
|
>
|
|
|
|
<Network
|
|
|
|
v-for="childNetwork in networks"
|
|
|
|
:key="`network-${childNetwork.id}`"
|
|
|
|
:network="childNetwork"
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<Network
|
|
|
|
v-if="network.parent"
|
|
|
|
:network="network.parent"
|
|
|
|
class="parent"
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<template v-if="sites.length > 0 || networks.length > 0">
|
|
|
|
<span
|
|
|
|
v-show="!expanded"
|
|
|
|
class="expand expand-sidebar noselect"
|
|
|
|
@click="expanded = true"
|
|
|
|
><Icon icon="arrow-right3" /></span>
|
|
|
|
|
|
|
|
<span
|
|
|
|
v-show="expanded"
|
|
|
|
class="expand expand-sidebar noselect"
|
|
|
|
@click="expanded = false"
|
|
|
|
><Icon icon="arrow-left3" /></span>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<div
|
|
|
|
class="header"
|
|
|
|
:class="{ hideable: sites.length > 0 || networks.length > 0 }"
|
|
|
|
>
|
|
|
|
<a
|
|
|
|
v-tooltip.bottom="`Go to ${network.url}`"
|
|
|
|
:href="network.url"
|
|
|
|
target="_blank"
|
|
|
|
rel="noopener noreferrer"
|
|
|
|
class="title"
|
|
|
|
>
|
|
|
|
<img
|
|
|
|
:src="`/img/logos/${network.slug}/thumbs/network.png`"
|
|
|
|
class="logo"
|
|
|
|
>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="content-inner">
|
2020-05-26 02:11:29 +00:00
|
|
|
<FilterBar
|
|
|
|
:fetch-releases="fetchNetwork"
|
|
|
|
:items-total="totalCount"
|
|
|
|
:items-per-page="10"
|
|
|
|
/>
|
|
|
|
|
2020-05-14 02:26:05 +00:00
|
|
|
<template v-if="sites.length > 0 || networks.length > 0">
|
|
|
|
<span
|
|
|
|
v-show="expanded"
|
|
|
|
class="expand collapse-header noselect"
|
|
|
|
@click="expanded = false"
|
|
|
|
><Icon icon="arrow-up3" /></span>
|
|
|
|
|
|
|
|
<Sites
|
|
|
|
:sites="sites"
|
|
|
|
:class="{ expanded }"
|
|
|
|
class="compact"
|
|
|
|
/>
|
|
|
|
|
|
|
|
<span
|
|
|
|
v-show="!expanded"
|
|
|
|
class="expand expand-header noselect"
|
|
|
|
@click="expanded = true"
|
|
|
|
><Icon icon="arrow-down3" /></span>
|
|
|
|
|
|
|
|
<span
|
|
|
|
v-show="expanded"
|
|
|
|
class="expand expand-header noselect"
|
|
|
|
@click="expanded = false"
|
|
|
|
><Icon icon="arrow-up3" /></span>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<Releases :releases="releases" />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2019-11-10 03:20:22 +00:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2019-11-15 01:37:17 +00:00
|
|
|
import FilterBar from '../header/filter-bar.vue';
|
2019-11-16 02:33:36 +00:00
|
|
|
import Releases from '../releases/releases.vue';
|
2020-01-05 00:07:32 +00:00
|
|
|
import Sites from '../sites/sites.vue';
|
2020-02-20 01:35:23 +00:00
|
|
|
import Network from '../tile/network.vue';
|
2019-11-10 03:20:22 +00:00
|
|
|
|
2020-01-02 23:59:02 +00:00
|
|
|
async function fetchNetwork() {
|
2020-06-27 00:57:30 +00:00
|
|
|
const { entity, totalCount } = await this.$store.dispatch('fetchEntityBySlugAndType', {
|
|
|
|
entitySlug: this.$route.params.networkSlug,
|
|
|
|
entityType: 'network',
|
2020-05-26 02:11:29 +00:00
|
|
|
limit: this.limit,
|
2020-05-14 02:26:05 +00:00
|
|
|
range: this.$route.params.range,
|
2020-05-26 02:11:29 +00:00
|
|
|
pageNumber: Number(this.$route.params.pageNumber),
|
2020-05-14 02:26:05 +00:00
|
|
|
});
|
|
|
|
|
2020-06-27 00:57:30 +00:00
|
|
|
this.network = entity;
|
|
|
|
this.networks = this.network.children;
|
2020-05-14 02:26:05 +00:00
|
|
|
this.releases = this.network.releases;
|
2020-06-27 00:57:30 +00:00
|
|
|
|
|
|
|
this.totalCount = totalCount;
|
2020-01-02 23:59:02 +00:00
|
|
|
}
|
|
|
|
|
2020-05-08 23:42:10 +00:00
|
|
|
async function route() {
|
2020-05-14 02:26:05 +00:00
|
|
|
await this.fetchNetwork();
|
2020-05-08 23:42:10 +00:00
|
|
|
}
|
|
|
|
|
2020-01-02 23:59:02 +00:00
|
|
|
async function mounted() {
|
2020-05-14 02:26:05 +00:00
|
|
|
await this.fetchNetwork();
|
|
|
|
this.pageTitle = this.network.name;
|
2019-11-10 03:20:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
export default {
|
2020-05-14 02:26:05 +00:00
|
|
|
components: {
|
|
|
|
FilterBar,
|
|
|
|
Releases,
|
|
|
|
Sites,
|
|
|
|
Network,
|
|
|
|
},
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
network: null,
|
|
|
|
sites: [],
|
|
|
|
networks: [],
|
|
|
|
studios: [],
|
|
|
|
releases: [],
|
2020-05-26 02:11:29 +00:00
|
|
|
totalCount: null,
|
|
|
|
limit: 10,
|
2020-05-14 02:26:05 +00:00
|
|
|
pageTitle: null,
|
|
|
|
expanded: false,
|
|
|
|
};
|
|
|
|
},
|
|
|
|
watch: {
|
|
|
|
$route: route,
|
|
|
|
},
|
|
|
|
mounted,
|
|
|
|
methods: {
|
|
|
|
fetchNetwork,
|
|
|
|
},
|
2019-11-10 03:20:22 +00:00
|
|
|
};
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
@import 'theme';
|
|
|
|
|
2020-01-04 03:58:56 +00:00
|
|
|
.network {
|
2019-11-10 03:20:22 +00:00
|
|
|
display: flex;
|
2020-01-04 03:58:56 +00:00
|
|
|
flex-direction: row;
|
|
|
|
flex-grow: 1;
|
|
|
|
justify-content: stretch;
|
|
|
|
overflow-y: auto;
|
2020-01-06 23:30:51 +00:00
|
|
|
|
|
|
|
&.nosites {
|
|
|
|
flex-direction: column;
|
|
|
|
}
|
2019-11-10 03:20:22 +00:00
|
|
|
}
|
|
|
|
|
2020-01-05 01:50:55 +00:00
|
|
|
.content-inner {
|
|
|
|
padding: 0;
|
2020-05-26 23:40:10 +00:00
|
|
|
overflow-y: auto;
|
2020-01-05 01:50:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.releases {
|
2020-01-11 04:31:04 +00:00
|
|
|
padding: 1rem 1rem 1rem .5rem;
|
2020-05-26 23:40:10 +00:00
|
|
|
border-top: solid 1px var(--crease);
|
2020-01-05 01:50:55 +00:00
|
|
|
}
|
|
|
|
|
2020-01-04 03:58:56 +00:00
|
|
|
.sidebar {
|
2020-05-25 00:02:28 +00:00
|
|
|
background: var(--profile);
|
2020-01-04 03:58:56 +00:00
|
|
|
height: 100%;
|
2020-01-05 00:07:32 +00:00
|
|
|
width: 18rem;
|
2020-01-04 03:58:56 +00:00
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
2020-01-05 00:07:32 +00:00
|
|
|
flex-shrink: 0;
|
2020-05-25 00:02:28 +00:00
|
|
|
color: var(--text-light);
|
2020-01-04 03:58:56 +00:00
|
|
|
overflow: hidden;
|
2019-11-10 03:20:22 +00:00
|
|
|
|
2020-01-09 02:23:16 +00:00
|
|
|
.title {
|
|
|
|
display: flex;
|
|
|
|
justify-content: center;
|
2020-05-25 00:02:28 +00:00
|
|
|
border-bottom: solid 1px var(--highlight-hint);
|
2020-01-09 02:23:16 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&.expanded {
|
|
|
|
width: calc(100% - 25rem);
|
|
|
|
|
|
|
|
.logo {
|
|
|
|
max-width: 18rem;
|
|
|
|
}
|
|
|
|
}
|
2020-01-05 00:07:32 +00:00
|
|
|
}
|
|
|
|
|
2020-03-01 04:28:08 +00:00
|
|
|
.networks {
|
|
|
|
display: grid;
|
|
|
|
grid-gap: 0 1rem;
|
|
|
|
flex-grow: 1;
|
|
|
|
padding: 1rem;
|
|
|
|
grid-template-columns: 1fr;
|
2020-03-06 02:15:49 +00:00
|
|
|
grid-template-rows: repeat(auto-fit, 6rem);
|
2020-03-01 04:28:08 +00:00
|
|
|
overflow-y: auto;
|
2020-05-25 00:02:28 +00:00
|
|
|
scrollbar-color: var(--highlight-weak) var(--profile);
|
2020-03-01 04:28:08 +00:00
|
|
|
}
|
|
|
|
|
2019-11-10 03:20:22 +00:00
|
|
|
.logo {
|
2020-01-04 03:58:56 +00:00
|
|
|
width: 100%;
|
2019-11-12 00:22:20 +00:00
|
|
|
max-height: 8rem;
|
2020-01-05 00:07:32 +00:00
|
|
|
display: flex;
|
|
|
|
justify-content: center;
|
2019-11-12 00:22:20 +00:00
|
|
|
object-fit: contain;
|
2020-01-04 03:58:56 +00:00
|
|
|
box-sizing: border-box;
|
2020-01-05 00:07:32 +00:00
|
|
|
padding: 1rem;
|
2020-05-25 00:02:28 +00:00
|
|
|
filter: var(--logo-highlight);
|
2019-11-10 03:20:22 +00:00
|
|
|
}
|
|
|
|
|
2020-02-20 01:35:23 +00:00
|
|
|
.parent {
|
|
|
|
display: inline-block;
|
|
|
|
height: 3rem;
|
|
|
|
}
|
|
|
|
|
2020-01-05 00:07:32 +00:00
|
|
|
.header {
|
|
|
|
width: 100%;
|
2020-01-06 23:30:51 +00:00
|
|
|
display: flex;
|
2020-01-09 02:23:16 +00:00
|
|
|
flex-direction: column;
|
|
|
|
align-items: center;
|
2020-01-09 00:59:30 +00:00
|
|
|
flex-shrink: 0;
|
2020-05-25 00:02:28 +00:00
|
|
|
border-bottom: solid 1px var(--shadow-hint);
|
|
|
|
background: var(--profile);
|
2020-01-06 23:30:51 +00:00
|
|
|
|
|
|
|
&.hideable {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
.logo {
|
|
|
|
max-width: 20rem;
|
2020-01-09 02:23:16 +00:00
|
|
|
max-height: 3rem;
|
2020-01-06 23:30:51 +00:00
|
|
|
padding: .5rem;
|
|
|
|
}
|
2019-11-10 03:20:22 +00:00
|
|
|
}
|
2019-11-12 00:22:20 +00:00
|
|
|
|
2020-01-24 22:36:06 +00:00
|
|
|
.sites.compact {
|
2020-01-09 14:47:45 +00:00
|
|
|
display: none;
|
2020-05-25 00:02:28 +00:00
|
|
|
background: var(--profile);
|
2020-01-24 22:36:06 +00:00
|
|
|
grid-row: 1;
|
2020-01-05 01:50:55 +00:00
|
|
|
}
|
|
|
|
|
2020-01-24 22:36:06 +00:00
|
|
|
.collapse-header {
|
2020-01-05 01:50:55 +00:00
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
2020-01-07 03:23:28 +00:00
|
|
|
@media(max-width: $breakpoint3) {
|
2020-01-06 23:30:51 +00:00
|
|
|
.header,
|
|
|
|
.header.hideable {
|
2020-01-05 00:07:32 +00:00
|
|
|
display: flex;
|
|
|
|
}
|
|
|
|
|
|
|
|
.sites.compact {
|
|
|
|
display: flex;
|
2020-01-05 01:50:55 +00:00
|
|
|
|
|
|
|
&.expanded {
|
|
|
|
display: grid;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-01-09 14:47:45 +00:00
|
|
|
.expand-header,
|
|
|
|
.collapse-header {
|
2020-01-09 01:40:02 +00:00
|
|
|
display: flex;
|
2020-01-05 00:07:32 +00:00
|
|
|
}
|
|
|
|
|
2020-01-09 02:23:16 +00:00
|
|
|
.expand-sidebar,
|
|
|
|
.collapse-sidebar {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
2020-01-04 03:58:56 +00:00
|
|
|
.network {
|
|
|
|
flex-direction: column;
|
|
|
|
}
|
|
|
|
|
2020-01-05 00:07:32 +00:00
|
|
|
.sidebar {
|
|
|
|
display: none;
|
|
|
|
height: auto;
|
|
|
|
width: 100%;
|
|
|
|
overflow: hidden;
|
2019-11-12 00:22:20 +00:00
|
|
|
}
|
|
|
|
}
|
2019-11-10 03:20:22 +00:00
|
|
|
</style>
|