mirror of
https://github.com/danbulant/Nertivia-Client
synced 2026-06-24 17:11:43 +00:00
added close buttons to some popups.
This commit is contained in:
parent
f856eb9023
commit
99acf91b25
5 changed files with 92 additions and 7 deletions
|
|
@ -5,7 +5,12 @@
|
||||||
<div class="tab" v-for="(tab, _index) in tabs" :key="_index" :class="{selected: index === _index, critical: tab.critical}" @click="index = _index"><div class="material-icons">{{tab.icon}}</div><div>{{tab.title}}</div></div>
|
<div class="tab" v-for="(tab, _index) in tabs" :key="_index" :class="{selected: index === _index, critical: tab.critical}" @click="index = _index"><div class="material-icons">{{tab.icon}}</div><div>{{tab.title}}</div></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="header" :class="{critical: tabs[index].critical}"><div class="material-icons">{{tabs[index].icon}}</div><div>{{tabs[index].title}}</div></div>
|
<div class="header" :class="{critical: tabs[index].critical}">
|
||||||
|
<div class="material-icons">{{tabs[index].icon}}</div><div>{{tabs[index].title}}</div>
|
||||||
|
<div class="close-button" @click="closeMenu">
|
||||||
|
<div class="material-icons">close</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<general v-if="index === 0"/>
|
<general v-if="index === 0"/>
|
||||||
<manage-channels v-if="index === 1"/>
|
<manage-channels v-if="index === 1"/>
|
||||||
<server-visibility v-if="index === 2"/>
|
<server-visibility v-if="index === 2"/>
|
||||||
|
|
@ -84,6 +89,7 @@ export default {
|
||||||
color: white;
|
color: white;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -141,8 +147,34 @@ export default {
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.close-button {
|
||||||
|
display: flex;
|
||||||
|
border-radius: 50%;
|
||||||
|
padding: 5px;
|
||||||
|
cursor: pointer;
|
||||||
|
user-select: none;
|
||||||
|
transition: 0.3s;
|
||||||
|
position: absolute;
|
||||||
|
top: 5px;
|
||||||
|
right: 5px;
|
||||||
|
|
||||||
|
}
|
||||||
|
.close-button:hover {
|
||||||
|
background: rgba(37, 37, 37, 0.692);
|
||||||
|
}
|
||||||
|
.close-button .material-icons {
|
||||||
|
margin: auto;
|
||||||
|
font-size: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
@media (max-width: 614px) {
|
@media (max-width: 614px) {
|
||||||
|
.close-button {
|
||||||
|
top: 55px;
|
||||||
|
}
|
||||||
.inner {
|
.inner {
|
||||||
|
height: 100%;
|
||||||
|
border-radius: 0;
|
||||||
|
max-height: initial;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
.tabs {
|
.tabs {
|
||||||
|
|
@ -155,4 +187,5 @@ export default {
|
||||||
height: 5px;
|
height: 5px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -181,7 +181,7 @@ export default {
|
||||||
display: flex;
|
display: flex;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
cursor: default;
|
cursor: pointer;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
transition: 0.3s;
|
transition: 0.3s;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,11 @@
|
||||||
@click="backgroundClickEvent"
|
@click="backgroundClickEvent"
|
||||||
>
|
>
|
||||||
<div class="box">
|
<div class="box">
|
||||||
|
<div class="back-button" @click="close">
|
||||||
|
<div class="material-icons">
|
||||||
|
keyboard_arrow_left
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<spinner class="spinner" v-if="!user" />
|
<spinner class="spinner" v-if="!user" />
|
||||||
<div class="inner" v-if="user">
|
<div class="inner" v-if="user">
|
||||||
<div class="profile">
|
<div class="profile">
|
||||||
|
|
@ -74,9 +79,12 @@ export default {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
close() {
|
||||||
|
this.$store.dispatch("setUserInformationPopout", null);
|
||||||
|
},
|
||||||
backgroundClickEvent(event) {
|
backgroundClickEvent(event) {
|
||||||
if (event.target.classList.contains("drop-background")) {
|
if (event.target.classList.contains("drop-background")) {
|
||||||
this.$store.dispatch("setUserInformationPopout", null);
|
this.close();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async AddFriendButton() {
|
async AddFriendButton() {
|
||||||
|
|
@ -182,6 +190,7 @@ export default {
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
background: rgba(22, 22, 22, 0.853);
|
background: rgba(22, 22, 22, 0.853);
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
}
|
}
|
||||||
.spinner {
|
.spinner {
|
||||||
|
|
@ -389,9 +398,32 @@ export default {
|
||||||
background: rgb(255, 53, 53);
|
background: rgb(255, 53, 53);
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
}
|
}
|
||||||
@media (max-width: 352px) {
|
|
||||||
|
.back-button {
|
||||||
|
display: flex;
|
||||||
|
position: absolute;
|
||||||
|
left: 20px;
|
||||||
|
top: 20px;
|
||||||
|
cursor: pointer;
|
||||||
|
height: 30px;
|
||||||
|
width: 30px;
|
||||||
|
border-radius: 50%;
|
||||||
|
flex-shrink: 0;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
align-content: center;
|
||||||
|
transition: 0.2s;
|
||||||
|
user-select: none;
|
||||||
|
}
|
||||||
|
.back-button:hover {
|
||||||
|
background: rgba(49, 49, 49, 0.712);
|
||||||
|
}
|
||||||
|
@media (max-width: 432px) {
|
||||||
.box {
|
.box {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
max-height: initial;
|
||||||
|
border-radius: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,9 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="explore-tab">
|
<div class="explore-tab">
|
||||||
<div class="left-panel">
|
<div class="left-panel"
|
||||||
|
v-show="$mq === 'mobile' && showLeftPanel || ($mq !== 'mobile')"
|
||||||
|
v-click-outside="hideLeftPanel"
|
||||||
|
>
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<div class="icon">
|
<div class="icon">
|
||||||
<i class="material-icons">explore</i>
|
<i class="material-icons">explore</i>
|
||||||
|
|
@ -43,6 +46,7 @@ export default {
|
||||||
components: { Servers },
|
components: { Servers },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
showLeftPanel: false,
|
||||||
selectedTab: 0,
|
selectedTab: 0,
|
||||||
tabs: [
|
tabs: [
|
||||||
// {icon: "home", name: "home", component: ""},
|
// {icon: "home", name: "home", component: ""},
|
||||||
|
|
@ -54,7 +58,15 @@ export default {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {},
|
mounted() {},
|
||||||
methods: {},
|
methods: {
|
||||||
|
hideLeftPanel(event) {
|
||||||
|
if (this.showLeftPanel) {
|
||||||
|
if (event.target.closest(".show-menu-button") == null) {
|
||||||
|
this.showLeftPanel = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
computed: {}
|
computed: {}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -14,12 +14,20 @@
|
||||||
|
|
||||||
const config = [
|
const config = [
|
||||||
|
|
||||||
|
{
|
||||||
|
version: 6.8,
|
||||||
|
title: "New Explore tab!",
|
||||||
|
shortTitle: "",
|
||||||
|
date: "01/09/2019",
|
||||||
|
headColor: "rgba(25, 130, 255, 0.77)",
|
||||||
|
new: ['You can now make your servers go public by posting them in the explore tab.', 'Some pop ups have been improved for mobile users.',],
|
||||||
|
fix: ['Some bugs have been fixed.']
|
||||||
|
},
|
||||||
{
|
{
|
||||||
version: 6.6,
|
version: 6.6,
|
||||||
title: "Performance improvements",
|
title: "Performance improvements",
|
||||||
shortTitle: "",
|
shortTitle: "",
|
||||||
date: "29/08/2019",
|
date: "29/08/2019",
|
||||||
headColor: "rgba(25, 130, 255, 0.77)",
|
|
||||||
new: ['Sneak peak of the new "Explore" tab :D (Unfinished)'],
|
new: ['Sneak peak of the new "Explore" tab :D (Unfinished)'],
|
||||||
fix: [
|
fix: [
|
||||||
'Improved backend code. This should improve performance.',
|
'Improved backend code. This should improve performance.',
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue