diff --git a/app/src/i18n/locales/en.json b/app/src/i18n/locales/en.json index 9bff7d56..8d451b9e 100644 --- a/app/src/i18n/locales/en.json +++ b/app/src/i18n/locales/en.json @@ -491,6 +491,7 @@ "users_new": "New user", "users_no": "No users.", "users_import": "Import users", + "users_export": "Export users", "users_import_csv_file": "CSV File", "users_import_update": "Update existing users", "users_import_delete": "Delete non listed users", diff --git a/app/src/scss/main.scss b/app/src/scss/main.scss index 83096b46..dbf1163c 100644 --- a/app/src/scss/main.scss +++ b/app/src/scss/main.scss @@ -117,6 +117,42 @@ body { width: 1.25em !important; } +// custom css +.actions { + margin-bottom: 2rem; + display: flex; + justify-content: space-between; + + @include media-breakpoint-down(xs) { + .buttons { + flex-direction: column; + justify-content: space-between; + } + } + + @include media-breakpoint-down(sm) { + flex-direction: column-reverse; + margin-bottom: 2rem; + + .buttons { + display: flex; + justify-content: space-between; + + .btn { + margin-bottom: .5rem; + } + } + } + + @include media-breakpoint-up(md) { + .btn ~ .btn { + margin-left: .5rem; + } + .btn ~ .dropdown-toggle-split { + margin-left: 0; + } + } +} // Do not display ligatures in invalid-feedback to avoid confusion. .invalid-feedback { code { diff --git a/app/src/views/user/UserList.vue b/app/src/views/user/UserList.vue index 2b81fbb5..77af2cbd 100644 --- a/app/src/views/user/UserList.vue +++ b/app/src/views/user/UserList.vue @@ -12,10 +12,30 @@ {{ $t('groups_and_permissions_manage') }} - - - {{ $t('users_new') }} - +
+ + + + {{ $t('users_import') }} + + + {{ $t('users_export') }} + + +
+ + + + + @@ -53,7 +73,12 @@ export default { search: '' } }, - + methods: { + downloadExport () { + const host = this.$store.getters.host + window.open(`https://${host}/yunohost/api/users/export`, '_blank') + } + }, computed: { ...mapGetters(['users']),