diff --git a/model/usersettings.go b/model/usersettings.go index b4f1bab..fde0689 100644 --- a/model/usersettings.go +++ b/model/usersettings.go @@ -33,6 +33,12 @@ package happydns import () +const ( + ZONEVIEW_GRID = iota + ZONEVIEW_LIST + ZONEVIEW_RECORDS +) + // UserSettings represents the settings for an account. type UserSettings struct { // Language saves the locale defined by the user. @@ -43,6 +49,9 @@ type UserSettings struct { // FieldHint stores the way form hints are displayed. FieldHint int `json:"fieldhint"` + + // ZoneView keeps the view of the zone wanted by the user. + ZoneView int `json:"zoneview"` } func DefaultUserSettings() *UserSettings { @@ -50,5 +59,6 @@ func DefaultUserSettings() *UserSettings { Language: "en", Newsletter: false, FieldHint: 2, + ZoneView: ZONEVIEW_GRID, } } diff --git a/ui/src/locales/en.json b/ui/src/locales/en.json index dacdbca..bc531d2 100644 --- a/ui/src/locales/en.json +++ b/ui/src/locales/en.json @@ -106,20 +106,7 @@ "title": "View zone" }, "views": { - "grid": { - "title": "Grid view (easiest)", - "label": "Grid" - }, - "list": { - "title": "List view (fastest)", - "label": "List" - }, - "provider-parameters": "Hosting parameters", - "records": { - "title": "List records (advanced)", - "label": "Records" - }, - "as": "View as:" + "provider-parameters": "Hosting parameters" }, "alias-creation": "Add an alias pointing to {0}:", "alias-creation-sample": "This will create the alias:", @@ -276,7 +263,13 @@ "save": "Save settings", "title": "Settings", "success": "Continue to enjoy happyDNS.", - "success-change": "Your settings has been saved." + "success-change": "Your settings has been saved.", + "zoneview": { + "grid": "Grid view (easiest)", + "list": "List view (fastest)", + "records": "List with records (advanced)", + "title": "View zone as" + } }, "record": { "A": "IPv4 address", diff --git a/ui/src/locales/fr.json b/ui/src/locales/fr.json index efba47f..c4a5ea7 100644 --- a/ui/src/locales/fr.json +++ b/ui/src/locales/fr.json @@ -272,7 +272,13 @@ "save": "Enregistrer les paramètres", "title": "Paramètres", "success": "Vous pouvez continuer d'apprécier happyDNS.", - "success-change": "Vos paramètres ont été sauvegardés." + "success-change": "Vos paramètres ont été sauvegardés.", + "zoneview": { + "grid": "Grille (la plus lisible)", + "list": "Liste (la plus rapide)", + "records": "Liste avec les enregistrements (avancés)", + "title": "Voir comme :" + } }, "record": { "A": "Adresse IPv4", @@ -302,4 +308,4 @@ "ttl": "Temps de cache restant", "showDNSSEC": "Afficher les enregistrements DNSSEC dans la réponse (s'il y en a)" } -} \ No newline at end of file +} diff --git a/ui/src/views/domain.vue b/ui/src/views/domain.vue index f0739f8..ffdea04 100644 --- a/ui/src/views/domain.vue +++ b/ui/src/views/domain.vue @@ -79,27 +79,7 @@ -