From 99acf91b25645670e345c5b53dfd32ee9a863acc Mon Sep 17 00:00:00 2001 From: supertiger1234 Date: Sun, 1 Sep 2019 13:08:49 +0100 Subject: [PATCH] added close buttons to some popups. --- .../ServerSettingsPanels/ServerSettings.vue | 35 +++++++++++++++++- .../app/Popouts/Popouts/Settings.vue | 2 +- .../Popouts/Popouts/userInformationPopout.vue | 36 +++++++++++++++++-- src/components/app/Tabs/Explore.vue | 16 +++++++-- src/utils/changelog.js | 10 +++++- 5 files changed, 92 insertions(+), 7 deletions(-) diff --git a/src/components/app/Popouts/Popouts/ServerSettingsPanels/ServerSettings.vue b/src/components/app/Popouts/Popouts/ServerSettingsPanels/ServerSettings.vue index 861f0fb..b7db7ce 100644 --- a/src/components/app/Popouts/Popouts/ServerSettingsPanels/ServerSettings.vue +++ b/src/components/app/Popouts/Popouts/ServerSettingsPanels/ServerSettings.vue @@ -5,7 +5,12 @@
{{tab.icon}}
{{tab.title}}
-
{{tabs[index].icon}}
{{tabs[index].title}}
+
+
{{tabs[index].icon}}
{{tabs[index].title}}
+
+
close
+
+
@@ -84,6 +89,7 @@ export default { color: white; overflow: hidden; border-radius: 10px; + position: relative; } @@ -141,8 +147,34 @@ export default { 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) { + .close-button { + top: 55px; + } .inner { + height: 100%; + border-radius: 0; + max-height: initial; flex-direction: column; } .tabs { @@ -155,4 +187,5 @@ export default { height: 5px; } } + diff --git a/src/components/app/Popouts/Popouts/Settings.vue b/src/components/app/Popouts/Popouts/Settings.vue index 9954400..a03061e 100644 --- a/src/components/app/Popouts/Popouts/Settings.vue +++ b/src/components/app/Popouts/Popouts/Settings.vue @@ -181,7 +181,7 @@ export default { display: flex; border-radius: 50%; padding: 5px; - cursor: default; + cursor: pointer; user-select: none; transition: 0.3s; } diff --git a/src/components/app/Popouts/Popouts/userInformationPopout.vue b/src/components/app/Popouts/Popouts/userInformationPopout.vue index 3267cb5..a4d3f1e 100644 --- a/src/components/app/Popouts/Popouts/userInformationPopout.vue +++ b/src/components/app/Popouts/Popouts/userInformationPopout.vue @@ -4,6 +4,11 @@ @click="backgroundClickEvent" >
+
+
+ keyboard_arrow_left +
+
@@ -74,9 +79,12 @@ export default { }; }, methods: { + close() { + this.$store.dispatch("setUserInformationPopout", null); + }, backgroundClickEvent(event) { if (event.target.classList.contains("drop-background")) { - this.$store.dispatch("setUserInformationPopout", null); + this.close(); } }, async AddFriendButton() { @@ -182,6 +190,7 @@ export default { flex-direction: row; background: rgba(22, 22, 22, 0.853); border-radius: 10px; + position: relative; } .spinner { @@ -389,9 +398,32 @@ export default { background: rgb(255, 53, 53); 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 { width: 100%; + height: 100%; + max-height: initial; + border-radius: 0; } } diff --git a/src/components/app/Tabs/Explore.vue b/src/components/app/Tabs/Explore.vue index d8f6075..e6f2b54 100644 --- a/src/components/app/Tabs/Explore.vue +++ b/src/components/app/Tabs/Explore.vue @@ -1,6 +1,9 @@