From 4a5eaf3f6bc64061725709d9e291a9fd2dd11749 Mon Sep 17 00:00:00 2001
From: "John Molakvoæ (skjnldsv)" <skjnldsv@protonmail.com>
Date: Thu, 21 Feb 2019 12:02:49 +0100
Subject: Automatically select newly created group
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
---
 settings/src/views/Users.vue | 6 ++++++
 1 file changed, 6 insertions(+)

(limited to 'settings/src/views/Users.vue')

diff --git a/settings/src/views/Users.vue b/settings/src/views/Users.vue
index 49d37faa4ae..438dd3d13da 100644
--- a/settings/src/views/Users.vue
+++ b/settings/src/views/Users.vue
@@ -227,6 +227,12 @@ export default {
 				.then(() => {
 					this.showAddGroupEntry = false;
 					this.loadingAddGroup = false;
+					this.$router.push({
+						name: 'group',
+						params: {
+							selectedGroup: gid
+						}
+					})
 				})
 				.catch(() => {
 					this.loadingAddGroup = false;
-- 
cgit v1.2.3


From e5cc147d69c53504c0a6ede4e50be60eb697deb7 Mon Sep 17 00:00:00 2001
From: "John Molakvoæ (skjnldsv)" <skjnldsv@protonmail.com>
Date: Thu, 21 Feb 2019 12:22:25 +0100
Subject: Fix app-navigation loading
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
---
 settings/src/views/Users.vue | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

(limited to 'settings/src/views/Users.vue')

diff --git a/settings/src/views/Users.vue b/settings/src/views/Users.vue
index 438dd3d13da..a1116749117 100644
--- a/settings/src/views/Users.vue
+++ b/settings/src/views/Users.vue
@@ -21,7 +21,7 @@
   -->
 
 <template>
-	<AppContent app-name="settings" :navigation-class="{ 'icon-loading': loading }">
+	<AppContent app-name="settings" :navigation-class="{ 'icon-loading': loadingAddGroup }">
 		<template #navigation>
 			<AppNavigationNew button-id="new-user-button" :text="t('settings','New user')" button-class="icon-add" @click="toggleNewUserMenu" />
 			<ul id="usergrouplist">
@@ -243,9 +243,6 @@ export default {
 		users() {
 			return this.$store.getters.getUsers;
 		},
-		loading() {
-			return Object.keys(this.users).length === 0;
-		},
 		usersOffset() {
 			return this.$store.getters.getUsersOffset;
 		},
-- 
cgit v1.2.3


From 798ecf76458b3204cca3841c6127770587cf2808 Mon Sep 17 00:00:00 2001
From: "John Molakvoæ (skjnldsv)" <skjnldsv@protonmail.com>
Date: Thu, 21 Feb 2019 12:29:49 +0100
Subject: Focus new group input on show
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
---
 settings/src/views/Users.vue | 4 ++++
 1 file changed, 4 insertions(+)

(limited to 'settings/src/views/Users.vue')

diff --git a/settings/src/views/Users.vue b/settings/src/views/Users.vue
index a1116749117..5963881b9b9 100644
--- a/settings/src/views/Users.vue
+++ b/settings/src/views/Users.vue
@@ -425,6 +425,10 @@ export default {
 			} else {
 				Vue.set(addGroup, 'action', function() {
 					self.showAddGroupEntry = true
+					// focus input
+					Vue.nextTick(() => {
+						window.addgroup.querySelector('form > input[type="text"]').focus()
+					})
 				})
 			}
 			groups.unshift(addGroup);
-- 
cgit v1.2.3

