Archived
2
0
This repository has been archived on 2024-06-24. You can view files and clone it, but cannot push or open issues or pull requests.
neko-custom/client/src/app.vue

184 lines
4.1 KiB
Vue
Raw Normal View History

2020-01-23 06:16:40 +13:00
<template>
2020-01-31 12:57:00 +13:00
<div id="neko" :class="[side ? 'expanded' : '']">
2020-01-29 14:27:35 +13:00
<template v-if="!$client.supported">
<neko-unsupported />
</template>
<template v-else>
<main class="neko-main">
<div class="header-container">
<neko-header />
</div>
<div class="video-container">
<neko-video ref="video" />
</div>
<div class="room-container">
<neko-members />
<div class="room-menu">
<div class="settings">
<neko-menu />
</div>
<div class="controls">
<neko-controls />
</div>
<div class="emotes">
<neko-emotes />
</div>
2020-01-23 06:16:40 +13:00
</div>
</div>
2020-01-29 14:27:35 +13:00
</main>
<neko-side v-if="side" />
<neko-connect v-if="!connected" />
<neko-about v-if="about" />
<notifications group="neko" position="top left" :ignoreDuplicates="true" style="top: 50px;pointer-events: none" />
2020-01-29 14:27:35 +13:00
</template>
2020-01-23 06:16:40 +13:00
</div>
</template>
<style lang="scss">
#neko {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
2020-01-31 12:57:00 +13:00
max-width: 100vw;
max-height: 100vh;
2020-01-23 06:16:40 +13:00
flex-direction: row;
display: flex;
.neko-main {
2020-01-31 12:57:00 +13:00
min-width: 360px;
2020-01-23 06:16:40 +13:00
max-width: 100%;
flex-grow: 1;
flex-direction: column;
display: flex;
overflow: auto;
.header-container {
background: $background-tertiary;
height: $menu-height;
flex-shrink: 0;
display: flex;
}
.video-container {
background: rgba($color: #000, $alpha: 0.4);
max-width: 100%;
flex-grow: 1;
display: flex;
}
.room-container {
background: $background-tertiary;
height: $controls-height;
max-width: 100%;
flex-shrink: 0;
flex-direction: column;
display: flex;
.room-menu {
max-width: 100%;
flex: 1;
display: flex;
.settings {
margin-left: 10px;
flex: 1;
justify-content: flex-start;
align-items: center;
display: flex;
}
.controls {
flex: 1;
justify-content: center;
align-items: center;
display: flex;
}
2020-01-24 04:23:26 +13:00
.emotes {
2020-01-23 06:16:40 +13:00
margin-right: 10px;
flex: 1;
justify-content: flex-end;
align-items: center;
display: flex;
}
}
}
}
}
2020-01-31 12:57:00 +13:00
@media only screen and (max-width: 600px) {
2021-02-14 01:01:51 +13:00
#neko.expanded {
.neko-main {
transform: translateX(calc(-100% + 65px));
video {
display: none;
2020-01-31 12:57:00 +13:00
}
}
2021-02-14 01:01:51 +13:00
.neko-menu {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 65px;
width: calc(100% - 65px);
}
2020-01-31 12:57:00 +13:00
}
}
@media only screen and (max-width: 768px) {
2021-02-14 01:01:51 +13:00
#neko .neko-main .room-container {
display: none;
2020-01-31 12:57:00 +13:00
}
}
2020-01-23 06:16:40 +13:00
</style>
<script lang="ts">
import { Vue, Component, Ref } from 'vue-property-decorator'
import Connect from '~/components/connect.vue'
import Video from '~/components/video.vue'
import Menu from '~/components/menu.vue'
import Side from '~/components/side.vue'
import Controls from '~/components/controls.vue'
import Members from '~/components/members.vue'
2020-01-24 04:23:26 +13:00
import Emotes from '~/components/emotes.vue'
2020-01-23 06:16:40 +13:00
import About from '~/components/about.vue'
2020-01-24 04:23:26 +13:00
import Header from '~/components/header.vue'
2020-01-29 14:27:35 +13:00
import Unsupported from '~/components/unsupported.vue'
2020-01-23 06:16:40 +13:00
@Component({
name: 'neko',
components: {
'neko-connect': Connect,
'neko-video': Video,
'neko-menu': Menu,
'neko-side': Side,
'neko-controls': Controls,
'neko-members': Members,
2020-01-24 04:23:26 +13:00
'neko-emotes': Emotes,
2020-01-23 06:16:40 +13:00
'neko-about': About,
2020-01-24 04:23:26 +13:00
'neko-header': Header,
2020-01-29 14:27:35 +13:00
'neko-unsupported': Unsupported,
2020-01-23 06:16:40 +13:00
},
})
export default class extends Vue {
@Ref('video') video!: Video
get about() {
return this.$accessor.client.about
}
get side() {
return this.$accessor.client.side
}
get connected() {
return this.$accessor.connected
}
}
</script>