summaryrefslogtreecommitdiffstats
path: root/src/views
diff options
context:
space:
mode:
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2020-09-06 18:23:02 +0200
committerJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2020-09-06 18:23:02 +0200
commitc1ec4fce4182cfad4533481464ebe8e7ab766650 (patch)
tree867735455b2cdeca02f0bd1398fe34209098c017 /src/views
parent61443420ebb0135654f933563361d95fc97fbcac (diff)
Add back the app details toggle
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'src/views')
-rw-r--r--src/views/Contacts.vue44
1 files changed, 44 insertions, 0 deletions
diff --git a/src/views/Contacts.vue b/src/views/Contacts.vue
index ff3167ba..97f33223 100644
--- a/src/views/Contacts.vue
+++ b/src/views/Contacts.vue
@@ -23,6 +23,12 @@
<template>
<Content app-name="contacts">
+ <!-- go back to list when in details mode -->
+ <a v-if="selectedContact && isMobile"
+ class="app-details-toggle icon-confirm"
+ href="#"
+ @click.stop.prevent="showList" />
+
<!-- new-contact-button + navigation + settings -->
<AppNavigation>
<!-- new-contact-button -->
@@ -688,6 +694,20 @@ export default {
},
/**
+ * Show the list and deselect contact
+ */
+ showList() {
+ // Reset the selected contact
+ this.$router.push({
+ name: 'contact',
+ params: {
+ selectedGroup: this.selectedGroup,
+ selectedContact: undefined,
+ },
+ })
+ },
+
+ /**
* Done importing, the user closed the import status screen
*/
closeImport() {
@@ -833,4 +853,28 @@ export default {
#app-content-wrapper {
display: flex;
}
+
+.app-details-toggle {
+ position: absolute;
+ width: 44px;
+ height: 44px;
+ padding: 14px;
+ cursor: pointer;
+ opacity: .6;
+ font-size: 16px;
+ line-height: 17px;
+ transform: rotate(180deg);
+ background-color: var(--color-main-background);
+ z-index: 2000;
+ &:active,
+ &:hover,
+ &:focus {
+ opacity: 1;
+ }
+
+ // Hide app-navigation toggle if shown
+ &::v-deep + .app-navigation .app-navigation-toggle {
+ display: none;
+ }
+}
</style>