From 7cda8b00bc76bc09a5d2d114e0d8a469024544a8 Mon Sep 17 00:00:00 2001
From: Axolotle
Date: Sat, 8 Aug 2020 15:04:49 +0200
Subject: [PATCH] add api getAll method and fixed toolbar button positionning
---
app/src/helpers/api.js | 10 +++++++---
app/src/scss/main.scss | 2 +-
app/src/views/domain/DomainCert.vue | 2 +-
app/src/views/domain/DomainDns.vue | 5 ++++-
4 files changed, 13 insertions(+), 6 deletions(-)
diff --git a/app/src/helpers/api.js b/app/src/helpers/api.js
index 9ccf4e9f..f17aebaa 100644
--- a/app/src/helpers/api.js
+++ b/app/src/helpers/api.js
@@ -42,7 +42,11 @@ export default {
})
},
- post (uri, data) {
+ getAll (uris) {
+ return Promise.all(uris.map((uri) => this.get(uri)))
+ },
+
+ post (uri, data = {}) {
return fetch('/api/' + uri, {
...this.options,
method: 'POST',
@@ -50,7 +54,7 @@ export default {
}).then(response => handleResponse(response))
},
- put (uri, data) {
+ put (uri, data = {}) {
return fetch('/api/' + uri, {
...this.options,
method: 'PUT',
@@ -58,7 +62,7 @@ export default {
}).then(response => handleResponse(response))
},
- delete (uri, data) {
+ delete (uri, data = {}) {
return fetch('/api/' + uri, {
...this.options,
method: 'DELETE',
diff --git a/app/src/scss/main.scss b/app/src/scss/main.scss
index a2134683..27305cbd 100644
--- a/app/src/scss/main.scss
+++ b/app/src/scss/main.scss
@@ -93,7 +93,7 @@ body {
}
@include media-breakpoint-up(md) {
- .btn-success {
+ .btn ~ .btn {
margin-left: .5rem;
}
}
diff --git a/app/src/views/domain/DomainCert.vue b/app/src/views/domain/DomainCert.vue
index 8bb152de..17aa9730 100644
--- a/app/src/views/domain/DomainCert.vue
+++ b/app/src/views/domain/DomainCert.vue
@@ -9,7 +9,7 @@
{{ $t('certificate_alert_' + cert.alert.trad) }}
-
+
- {{ cert.type }} ({{ name }})
diff --git a/app/src/views/domain/DomainDns.vue b/app/src/views/domain/DomainDns.vue
index e3dede92..6c30e9be 100644
--- a/app/src/views/domain/DomainDns.vue
+++ b/app/src/views/domain/DomainDns.vue
@@ -7,7 +7,7 @@
{{ $t('domain_dns_config') }}
- {{ dnsConfig }}
+ {{ dnsConfig }}
@@ -38,4 +38,7 @@ export default {