summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--webapp/src/components/DashboardPage.vue4
-rw-r--r--webapp/src/components/GroupModuleClientList.vue54
-rw-r--r--webapp/src/components/GroupModuleClientView.vue44
-rw-r--r--webapp/src/components/GroupModuleDialog.vue56
-rw-r--r--webapp/src/components/GroupModuleGroupList.vue46
-rw-r--r--webapp/src/components/GroupModuleGroupView.vue34
-rw-r--r--webapp/src/components/GroupModuleHomeView.vue12
-rw-r--r--webapp/src/i18n.json50
-rw-r--r--webapp/src/main.js37
9 files changed, 236 insertions, 101 deletions
diff --git a/webapp/src/components/DashboardPage.vue b/webapp/src/components/DashboardPage.vue
index ccdda03..3fef1e9 100644
--- a/webapp/src/components/DashboardPage.vue
+++ b/webapp/src/components/DashboardPage.vue
@@ -1,7 +1,7 @@
<i18n>
{
"en": {
- "group": "Locations / Groups",
+ "group": "Groups / Clients",
"backend": "External Backends",
"permission": "Permissions",
"title": "Boot Selection Server",
@@ -10,7 +10,7 @@
"logout": "Logout"
},
"de": {
- "group": "Orte / Gruppen",
+ "group": "Gruppen / Clienten",
"backend": "Externe Backends",
"permission": "Rechteverwaltung",
"title": "Boot Auswahl Server",
diff --git a/webapp/src/components/GroupModuleClientList.vue b/webapp/src/components/GroupModuleClientList.vue
index 62b0d52..e8809d3 100644
--- a/webapp/src/components/GroupModuleClientList.vue
+++ b/webapp/src/components/GroupModuleClientList.vue
@@ -1,8 +1,28 @@
<i18n>
{
"en": {
+ "id": "ID",
+ "name": "Name",
+ "ip": "IP Address",
+ "mac": "MAC Address",
+ "uuid": "UUID",
+ "search": "Search",
+ "removeClients": "Remove one client | Remove {0} clients",
+ "addClients": "Add clients",
+ "deleteClients": "Delete one client | Delete {0} clients",
+ "createClient": "Create client"
},
"de": {
+ "id": "ID",
+ "name": "Name",
+ "ip": "IP Adresse",
+ "mac": "MAC Adresse",
+ "uuid": "UUID",
+ "search": "Suche",
+ "removeClients": "Entferne einen Clienten | Entferne {0} Clienten",
+ "addClients": "Füge Clienten hinzu",
+ "deleteClients": "Lösche einen Clienten | Lösche {0} Clienten",
+ "createClient": "Client erstellen"
}
}
</i18n>
@@ -12,7 +32,7 @@
<v-card>
<v-card-title v-if="tabIndex === 0 && showAll" class="search-container">
<div>
- <v-text-field class="search-field" v-model="search" hide-details prepend-inner-icon="search"></v-text-field>
+ <v-text-field class="search-field" :placeholder="$t('search')" v-model="search" hide-details prepend-inner-icon="search"></v-text-field>
</div>
</v-card-title>
<v-divider></v-divider>
@@ -49,12 +69,16 @@
</v-data-table>
</v-card>
<div v-if="tabIndex === 0" class="text-xs-right">
- <v-btn flat color="error" @click="deleteSelected" :disabled="selected.length === 0"><v-icon left>delete</v-icon>Delete selected clients</v-btn>
- <v-btn flat color="success" @click="newClient"><v-icon left>create</v-icon>Create client</v-btn>
+ <v-btn flat color="error" @click="deleteSelected" :disabled="selected.length === 0">
+ <v-icon left>delete</v-icon>{{ $tc('deleteClients', selected.length, [selected.length]) }}
+ </v-btn>
+ <v-btn flat color="success" @click="newClient"><v-icon left>create</v-icon>{{ $t('createClient') }}</v-btn>
</div>
<div v-else class="text-xs-right">
- <v-btn flat color="error" @click="removeSelected" :disabled="selected.length === 0"><v-icon left>remove_circle_outline</v-icon>Remove selected clients</v-btn>
- <v-btn flat color="success" @click="addExisting"><v-icon left>add_circle_outline</v-icon>Add clients</v-btn>
+ <v-btn flat color="error" @click="removeSelected" :disabled="selected.length === 0">
+ <v-icon left>remove_circle_outline</v-icon>{{ $tc('removeClients', selected.length, [selected.length]) }}
+ </v-btn>
+ <v-btn flat color="success" @click="addExisting"><v-icon left>add_circle_outline</v-icon>{{ $t('addClients') }}</v-btn>
</div>
</div>
</template>
@@ -67,20 +91,22 @@ export default {
props: ['tabIndex', 'groupId', 'clients'],
data () {
return {
- headers: [
- { text: 'ID', value: 'id' },
- { text: 'Name', value: 'name' },
- { text: 'IP Address', value: 'ip' },
- { text: 'MAC Address', value: 'mac' },
- { text: 'UUID', value: 'uuid' },
- { sortable: false }
- ],
selected: [],
search: ''
}
},
computed: {
- ...mapState('groups', ['showAll'])
+ ...mapState('groups', ['showAll']),
+ headers () {
+ return [
+ { text: this.$t('id'), value: 'id' },
+ { text: this.$t('name'), value: 'name' },
+ { text: this.$t('ip'), value: 'ip' },
+ { text: this.$t('mac'), value: 'mac' },
+ { text: this.$t('uuid'), value: 'uuid' },
+ { sortable: false }
+ ]
+ }
},
watch: {
showAll (value) {
diff --git a/webapp/src/components/GroupModuleClientView.vue b/webapp/src/components/GroupModuleClientView.vue
index 2f57fca..7a7a4a8 100644
--- a/webapp/src/components/GroupModuleClientView.vue
+++ b/webapp/src/components/GroupModuleClientView.vue
@@ -1,8 +1,20 @@
<i18n>
{
"en": {
+ "name": "Name",
+ "description": "Description",
+ "groups": "Groups",
+ "ip": "IP Address",
+ "mac": "MAC Address",
+ "uuid": "UUID"
},
"de": {
+ "name": "Name",
+ "description": "Beschreibung",
+ "groups": "Gruppen",
+ "ip": "IP Adresse",
+ "mac": "MAC Adresse",
+ "uuid": "UUID"
}
}
</i18n>
@@ -16,21 +28,21 @@
<v-flex lg4 md6 xs12 order-lg1 order-xs2>
<v-layout column>
<v-flex>
- <v-text-field v-if="editMode" prepend-icon="label" class="info-input" label="Name" color="primary" v-model="info.name"></v-text-field>
+ <v-text-field v-if="editMode" prepend-icon="label" class="info-input" :label="$t('name')" color="primary" v-model="info.name"></v-text-field>
<div v-else class="info-input">
- <div class="body-2 info-heading"><v-icon>label</v-icon><span>Name</span></div>
+ <div class="body-2 info-heading"><v-icon>label</v-icon><span>{{ $t('name') }}</span></div>
<div class="info-text">{{ client.name || '-' }}</div>
</div>
</v-flex>
<v-flex>
<v-autocomplete
- prepend-icon="group_work"
+ prepend-icon="device_hub"
v-if="editMode"
class="info-input"
:items="$store.state.groups.groupList"
v-model="groupIds"
offset-y
- label="Groups"
+ :label="$t('groups')"
color="primary"
multiple
item-value="id"
@@ -48,7 +60,7 @@
</template>
</v-autocomplete>
<div v-else class="info-input">
- <div class="body-2 info-heading"><v-icon>group_work</v-icon><span>Groups</span></div>
+ <div class="body-2 info-heading"><v-icon>device_hub</v-icon><span>{{ $t('groups') }}</span></div>
<div class="info-text">
<template v-if="client.groups && client.groups.length > 0">
<v-chip v-for="group in client.groups" :key="group.id" small>
@@ -62,21 +74,21 @@
</v-layout>
</v-flex>
<v-flex lg4 md6 xs12 order-lg2 order-xs3>
- <v-textarea prepend-icon="description" v-if="editMode" rows="1" auto-grow class="info-input" label="Description" color="primary" v-model="info.description"></v-textarea>
+ <v-textarea prepend-icon="description" v-if="editMode" rows="1" auto-grow class="info-input" :label="$t('description')" color="primary" v-model="info.description"></v-textarea>
<div v-else class="info-input">
- <div class="body-2 info-heading"><v-icon>description</v-icon><span>Description</span></div>
+ <div class="body-2 info-heading"><v-icon>description</v-icon><span>{{ $t('description') }}</span></div>
<pre class="info-text">{{ client.description || '-' }}</pre>
</div>
</v-flex>
<v-flex lg4 xs12 order-lg3 order-xs1 class="text-xs-right">
<div class="info-input">
<v-btn v-if="!editMode" color="primary" flat @click="editInfo" class="info-buttons">
- <v-icon left>create</v-icon>Edit
+ <v-icon left>create</v-icon>{{ $t('edit') }}
</v-btn>
<div v-else>
- <v-btn color="primary" flat @click="cancelEdit" class="info-buttons">Cancel</v-btn>
+ <v-btn color="primary" flat @click="cancelEdit" class="info-buttons">{{ $t('cancel') }}</v-btn>
<v-btn color="primary" @click="saveInfo" class="info-buttons">
- <v-icon left>save</v-icon>Save
+ <v-icon left>save</v-icon>{{ $t('save') }}
</v-btn>
</div>
</div>
@@ -84,23 +96,23 @@
</v-layout>
<v-layout wrap>
<v-flex lg4 md6 xs12>
- <v-text-field prepend-icon="language" v-if="editMode" class="info-input" label="IP Address" color="primary" v-model="info.ip"></v-text-field>
+ <v-text-field prepend-icon="language" v-if="editMode" class="info-input" :label="$t('ip')" color="primary" v-model="info.ip"></v-text-field>
<div v-else class="info-input">
- <div class="body-2 info-heading"><v-icon>language</v-icon><span>IP Address</span></div>
+ <div class="body-2 info-heading"><v-icon>language</v-icon><span>{{ $t('ip') }}</span></div>
<div class="info-text">{{ client.ip || '-' }}</div>
</div>
</v-flex>
<v-flex lg4 md6 xs12>
- <v-text-field prepend-icon="memory" v-if="editMode" class="info-input" label="MAC Address" color="primary" v-model="info.mac"></v-text-field>
+ <v-text-field prepend-icon="memory" v-if="editMode" class="info-input" :label="$t('mac')" color="primary" v-model="info.mac"></v-text-field>
<div v-else class="info-input">
- <div class="body-2 info-heading"><v-icon>memory</v-icon><span>MAC Address</span></div>
+ <div class="body-2 info-heading"><v-icon>memory</v-icon><span>{{ $t('mac') }}</span></div>
<div class="info-text">{{ client.mac || '-' }}</div>
</div>
</v-flex>
<v-flex lg4 md6 xs12>
- <v-text-field prepend-icon="fingerprint" v-if="editMode" class="info-input" label="UUID" color="primary" v-model="info.uuid"></v-text-field>
+ <v-text-field prepend-icon="fingerprint" v-if="editMode" class="info-input" :label="$t('uuid')" color="primary" v-model="info.uuid"></v-text-field>
<div v-else class="info-input">
- <div class="body-2 info-heading"><v-icon>fingerprint</v-icon><span>UUID</span></div>
+ <div class="body-2 info-heading"><v-icon>fingerprint</v-icon><span>{{ $t('uuid') }}</span></div>
<div class="info-text">{{ client.uuid || '-' }}</div>
</div>
</v-flex>
diff --git a/webapp/src/components/GroupModuleDialog.vue b/webapp/src/components/GroupModuleDialog.vue
index 97a3d20..69527b2 100644
--- a/webapp/src/components/GroupModuleDialog.vue
+++ b/webapp/src/components/GroupModuleDialog.vue
@@ -1,25 +1,45 @@
<i18n>
{
"en": {
- "title-delete-group": "Delete this group? | Delete these {0} groups?",
- "title-delete-client": "Delete this client? | Delete these {0} clients?",
- "title-remove-group": "Remove this subgroup? | Remove these {0} subgroups?",
- "title-remove-client": "Remove this client? | Remove these {0} clients?",
- "title-add-group": "Add groups | Add this group? | Add these {0} groups?",
- "title-add-client": "Add clients | Add this client? | Add these {0} clients?",
- "delete-instead-remove-group": "Permanently delete group | Permanently delete groups",
- "delete-instead-remove-client": "Permanently delete client | Permanently delete clients",
+ "title": {
+ "delete": {
+ "group": "Delete this group? | Delete these {0} groups?",
+ "client": "Delete this client? | Delete these {0} clients?"
+ },
+ "remove": {
+ "group": "Remove this subgroup? | Remove these {0} subgroups?",
+ "client": "Remove this client? | Remove these {0} clients?"
+ },
+ "add": {
+ "group": "Add groups | Add this group? | Add these {0} groups?",
+ "client": "Add clients | Add this client? | Add these {0} clients?"
+ }
+ },
+ "deletePermanently": {
+ "group": "Permanently delete group | Permanently delete groups",
+ "client": "Permanently delete client | Permanently delete clients"
+ },
"new": "New"
},
"de": {
- "title-delete-group": "Diese Gruppe löschen? | Diese {0} Gruppen löschen?",
- "title-delete-client": "Diesen Clienten löschen? | Diese {0} Clienten löschen?",
- "title-remove-group": "Diese Untergruppe entfernen? | Diese {0} Untergruppen entfernen?",
- "title-remove-client": "Diesen Clienten entfernen? | Diese {0} Clienten entfernen?",
- "title-add-group": "Gruppen hinzufügen | Diese Gruppe hinzufügen? | Diese {0} Gruppen hinzufügen?",
- "title-add-client": "Clienten hinzufügen | Diesen Clienten hinzufügen? | Diese {0} Clienten hinzufügen?",
- "delete-instead-remove-group": "Gruppe dauerhaft löschen | Gruppen dauerhaft löschen",
- "delete-instead-remove-client": "Client dauerhaft löschen | Clienten dauerhaft löschen",
+ "title": {
+ "delete": {
+ "group": "Diese Gruppe löschen? | Diese {0} Gruppen löschen?",
+ "client": "Diesen Clienten löschen? | Diese {0} Clienten löschen?"
+ },
+ "remove": {
+ "group": "Diese Untergruppe entfernen? | Diese {0} Untergruppen entfernen?",
+ "client": "Diesen Clienten entfernen? | Diese {0} Clienten entfernen?"
+ },
+ "add": {
+ "group": "Gruppen hinzufügen | Diese Gruppe hinzufügen? | Diese {0} Gruppen hinzufügen?",
+ "client": "Clienten hinzufügen | Diesen Clienten hinzufügen? | Diese {0} Clienten hinzufügen?"
+ }
+ },
+ "deletePermanently": {
+ "group": "Gruppe dauerhaft löschen | Gruppen dauerhaft löschen",
+ "client": "Client dauerhaft löschen | Clienten dauerhaft löschen"
+ },
"new": "Neu"
}
}
@@ -71,7 +91,7 @@
<v-checkbox
class="delete-checkbox"
v-if="dialog.info.action === 'remove'"
- :label="$tc('delete-instead-remove-' + dialog.info.type, selectedCount)"
+ :label="$tc('deletePermanently.' + dialog.info.type, selectedCount)"
color="error"
v-model="deleteInsteadOfRemove"
hide-details
@@ -113,7 +133,7 @@ export default {
return this.action === 'add' ? this.selected.length : (this.dialog.info.selected ? this.dialog.info.selected.length : 0)
},
title () {
- return this.$tc('title-' + this.action + '-' + this.dialog.info.type, this.selectedCount, [this.selectedCount])
+ return this.$tc('title.' + this.action + '.' + this.dialog.info.type, this.selectedCount, [this.selectedCount])
},
items () {
if (this.dialog.info.type === 'group') return this.$store.state.groups.groupList
diff --git a/webapp/src/components/GroupModuleGroupList.vue b/webapp/src/components/GroupModuleGroupList.vue
index f66bcbc..cb593df 100644
--- a/webapp/src/components/GroupModuleGroupList.vue
+++ b/webapp/src/components/GroupModuleGroupList.vue
@@ -1,8 +1,24 @@
<i18n>
{
"en": {
+ "id": "ID",
+ "name": "Name",
+ "description": "Description",
+ "search": "Search",
+ "removeSubgroups": "Remove one subgroup | Remove {0} subgroups",
+ "addSubgroups": "Add subgroups",
+ "deleteGroups": "Delete one group | Delete {0} groups",
+ "createGroup": "Create group"
},
"de": {
+ "id": "ID",
+ "name": "Name",
+ "description": "Beschreibung",
+ "search": "Suche",
+ "removeSubgroups": "Entferne eine Untergruppe | Entferne {0} Untergruppen",
+ "addSubgroups": "Füge Untergruppen hinzu",
+ "deleteGroups": "Lösche eine Gruppe | Lösche {0} Gruppen",
+ "createGroup": "Gruppe erstellen"
}
}
</i18n>
@@ -12,7 +28,7 @@
<v-card>
<v-card-title v-if="tabIndex === 0 && showAll" class="search-container">
<div>
- <v-text-field class="search-field" v-model="search" hide-details prepend-inner-icon="search"></v-text-field>
+ <v-text-field class="search-field" :placeholder="$t('search')" v-model="search" hide-details prepend-inner-icon="search"></v-text-field>
</div>
</v-card-title>
<v-divider></v-divider>
@@ -47,12 +63,16 @@
</v-data-table>
</v-card>
<div v-if="tabIndex === 0" class="text-xs-right">
- <v-btn flat color="error" @click="deleteSelected" :disabled="selected.length === 0"><v-icon left>delete</v-icon>Delete selected groups</v-btn>
- <v-btn flat color="success" @click="newGroup"><v-icon left>create</v-icon>Create group</v-btn>
+ <v-btn flat color="error" @click="deleteSelected" :disabled="selected.length === 0">
+ <v-icon left>delete</v-icon>{{ $tc('deleteGroups', selected.length, [selected.length]) }}
+ </v-btn>
+ <v-btn flat color="success" @click="newGroup"><v-icon left>create</v-icon>{{ $t('createGroup') }}</v-btn>
</div>
<div v-else class="text-xs-right">
- <v-btn flat color="error" @click="removeSelected" :disabled="selected.length === 0"><v-icon left>remove_circle_outline</v-icon>Remove selected subgroups</v-btn>
- <v-btn flat color="success" @click="addExisting"><v-icon left>add_circle_outline</v-icon>Add subgroups</v-btn>
+ <v-btn flat color="error" @click="removeSelected" :disabled="selected.length === 0">
+ <v-icon left>remove_circle_outline</v-icon>{{ $tc('removeSubgroups', selected.length, [selected.length]) }}
+ </v-btn>
+ <v-btn flat color="success" @click="addExisting"><v-icon left>add_circle_outline</v-icon>{{ $t('addSubgroups') }}</v-btn>
</div>
</div>
</template>
@@ -65,18 +85,20 @@ export default {
props: ['tabIndex', 'groupId', 'groups'],
data () {
return {
- headers: [
- { text: 'ID', value: 'id' },
- { text: 'Name', value: 'name' },
- { text: 'Description', value: 'description', width: '100000px' },
- { sortable: false }
- ],
selected: [],
search: ''
}
},
computed: {
- ...mapState('groups', ['showAll'])
+ ...mapState('groups', ['showAll']),
+ headers () {
+ return [
+ { text: this.$t('id'), value: 'id' },
+ { text: this.$t('name'), value: 'name' },
+ { text: this.$t('description'), value: 'description', width: '100000px' },
+ { sortable: false }
+ ]
+ }
},
watch: {
showAll (value) {
diff --git a/webapp/src/components/GroupModuleGroupView.vue b/webapp/src/components/GroupModuleGroupView.vue
index 602e05d..8f99b1c 100644
--- a/webapp/src/components/GroupModuleGroupView.vue
+++ b/webapp/src/components/GroupModuleGroupView.vue
@@ -1,8 +1,20 @@
<i18n>
{
"en": {
+ "info": "Info",
+ "subgroups": "Subgroups",
+ "clients": "Clients",
+ "name": "Name",
+ "description": "Description",
+ "parents": "Parents"
},
"de": {
+ "info": "Info",
+ "subgroups": "Untergruppen",
+ "clients": "Clienten",
+ "name": "Name",
+ "description": "Beschreibung",
+ "parents": "Übergruppen"
}
}
</i18n>
@@ -16,9 +28,9 @@
<v-flex lg4 md6 xs12 order-lg1 order-xs2>
<v-layout column>
<v-flex>
- <v-text-field prepend-icon="label" v-if="editMode" class="info-input" label="Name" color="primary" v-model="info.name"></v-text-field>
+ <v-text-field prepend-icon="label" v-if="editMode" class="info-input" :label="$t('name')" color="primary" v-model="info.name"></v-text-field>
<div v-else class="info-input">
- <div class="body-2 info-heading"><v-icon>label</v-icon><span>Name</span></div>
+ <div class="body-2 info-heading"><v-icon>label</v-icon><span>{{ $t('name') }}</span></div>
<div class="info-text">{{ group.name || '-' }}</div>
</div>
</v-flex>
@@ -30,7 +42,7 @@
:items="$store.state.groups.groupList"
v-model="parentIds"
offset-y
- label="Parents"
+ :label="$t('parents')"
color="primary"
multiple
item-value="id"
@@ -48,7 +60,7 @@
</template>
</v-autocomplete>
<div v-else class="info-input">
- <div class="body-2 info-heading"><v-icon>description</v-icon><span>Parents</span></div>
+ <div class="body-2 info-heading"><v-icon>group_work</v-icon><span>{{ $t('parents') }}</span></div>
<div class="info-text">
<template v-if="group.parents && group.parents.length > 0">
<v-chip v-for="parent in group.parents" :key="parent.id" small>
@@ -62,21 +74,21 @@
</v-layout>
</v-flex>
<v-flex lg4 md6 xs12 order-lg2 order-xs3>
- <v-textarea prepend-icon="description" v-if="editMode" rows="1" auto-grow class="info-input" label="Description" color="primary" v-model="info.description"></v-textarea>
+ <v-textarea prepend-icon="description" v-if="editMode" rows="1" auto-grow class="info-input" :label="$t('description')" color="primary" v-model="info.description"></v-textarea>
<div v-else class="info-input">
- <div class="body-2 info-heading"><v-icon>description</v-icon><span>Description</span></div>
+ <div class="body-2 info-heading"><v-icon>description</v-icon><span>{{ $t('description') }}</span></div>
<pre class="info-text">{{ group.description || '-' }}</pre>
</div>
</v-flex>
<v-flex lg4 xs12 order-lg3 order-xs1 class="text-xs-right">
<div class="info-input">
<v-btn v-if="!editMode" color="primary" flat @click="editInfo" class="info-buttons">
- <v-icon left>create</v-icon>Edit
+ <v-icon left>create</v-icon>{{ $t('edit') }}
</v-btn>
<div v-else>
- <v-btn color="primary" flat @click="cancelEdit" class="info-buttons">Cancel</v-btn>
+ <v-btn color="primary" flat @click="cancelEdit" class="info-buttons">{{ $t('cancel') }}</v-btn>
<v-btn color="primary" @click="saveInfo" class="info-buttons">
- <v-icon left>save</v-icon>Save
+ <v-icon left>save</v-icon>{{ $t('save') }}
</v-btn>
</div>
</div>
@@ -85,9 +97,9 @@
</v-card-text>
</v-card>
<template v-if="group.id">
- <v-subheader>{{ tabIndex === 0 ? 'Groups' : 'Subgoups' }}</v-subheader>
+ <v-subheader>{{ $t('subgroups') }}</v-subheader>
<group-module-group-list :tabIndex="tabIndex" :groupId="group.id" :groups="group.subgroups" />
- <v-subheader>Clients</v-subheader>
+ <v-subheader>{{ $t('clients') }}</v-subheader>
<group-module-client-list :tabIndex="tabIndex" :groupId="group.id" :clients="group.clients" />
</template>
</div>
diff --git a/webapp/src/components/GroupModuleHomeView.vue b/webapp/src/components/GroupModuleHomeView.vue
index af5af3b..94eb12f 100644
--- a/webapp/src/components/GroupModuleHomeView.vue
+++ b/webapp/src/components/GroupModuleHomeView.vue
@@ -1,8 +1,14 @@
<i18n>
{
"en": {
+ "showall": "Show All",
+ "groups": "Groups",
+ "clients": "Clients"
},
"de": {
+ "showall": "Alle anzeigen",
+ "groups": "Gruppen",
+ "clients": "Clienten"
}
}
</i18n>
@@ -11,11 +17,11 @@
<div>
<v-layout>
<v-spacer></v-spacer>
- <div><v-switch class="show-toggle" label="Show All" hide-details color="primary" :input-value="showAll" @change="setShowAll"></v-switch></div>
+ <div><v-switch class="show-toggle" :label="$t('showall')" hide-details color="primary" :input-value="showAll" @change="setShowAll"></v-switch></div>
</v-layout>
- <v-subheader>Groups</v-subheader>
+ <v-subheader>{{ $t('groups') }}</v-subheader>
<group-module-group-list :tabIndex="0" :groups="home.groups" />
- <v-subheader>Clients</v-subheader>
+ <v-subheader>{{ $t('clients') }}</v-subheader>
<group-module-client-list :tabIndex="0" :clients="home.clients" />
</div>
</template>
diff --git a/webapp/src/i18n.json b/webapp/src/i18n.json
new file mode 100644
index 0000000..4bf71c0
--- /dev/null
+++ b/webapp/src/i18n.json
@@ -0,0 +1,50 @@
+{
+ "en": {
+ "continue": "Continue",
+ "cancel": "Cancel",
+ "delete": "Delete",
+ "create": "Create",
+ "remove": "Remove",
+ "add": "Add",
+ "save": "Save",
+ "edit": "Edit",
+ "$vuetify": {
+ "dataIterator": {
+ "rowsPerPageText": "Items per page:",
+ "rowsPerPageAll": "All",
+ "pageText": "{0}-{1} of {2}",
+ "noResultsText": "No matching records found",
+ "nextPage": "Next page",
+ "prevPage": "Previous page"
+ },
+ "dataTable": {
+ "rowsPerPageText": "Rows per page:"
+ },
+ "noDataText": "No data available"
+ }
+ },
+ "de": {
+ "continue": "Weiter",
+ "cancel": "Abbrechen",
+ "delete": "Löschen",
+ "create": "Erstellen",
+ "remove": "Entfernen",
+ "add": "Hinzufügen",
+ "save": "Speichern",
+ "edit": "Bearbeiten",
+ "$vuetify": {
+ "dataIterator": {
+ "rowsPerPageText": "Einträge pro Seite:",
+ "rowsPerPageAll": "Alle",
+ "pageText": "{0}-{1} von {2}",
+ "noResultsText": "Keine übereinstimmenden Einträge gefunden",
+ "nextPage": "Nächste Seite",
+ "prevPage": "Vorherige Seite"
+ },
+ "dataTable": {
+ "rowsPerPageText": "Reihen pro Seite:"
+ },
+ "noDataText": "Keine Daten verfügbar"
+ }
+ }
+} \ No newline at end of file
diff --git a/webapp/src/main.js b/webapp/src/main.js
index bfedf3d..26c6b2c 100644
--- a/webapp/src/main.js
+++ b/webapp/src/main.js
@@ -6,43 +6,30 @@ import store from './store'
import axios from 'axios'
import router from './router'
import VueI18n from 'vue-i18n'
+import i18nMessages from './i18n.json'
import '@/assets/styles.css'
Vue.config.productionTip = false
-Vue.use(Vuetify, {
- theme: {
- primary: '#0195ff'
- }
-})
-
-Vue.use(VueTouch)
-
Vue.use(VueI18n)
const i18n = new VueI18n({
locale: store.state.settings.locale,
silentTranslationWarn: true,
- messages: {
- 'en': {
- 'continue': 'Continue',
- 'cancel': 'Cancel',
- 'delete': 'Delete',
- 'create': 'Create',
- 'remove': 'Remove',
- 'add': 'Add'
- },
- 'de': {
- 'continue': 'Weiter',
- 'cancel': 'Abbrechen',
- 'delete': 'Löschen',
- 'create': 'Erstellen',
- 'remove': 'Entfernen',
- 'add': 'Hinzufügen'
- }
+ messages: i18nMessages
+})
+
+Vue.use(Vuetify, {
+ theme: {
+ primary: '#0195ff'
+ },
+ lang: {
+ t: (key, ...params) => i18n.t(key, params)
}
})
+Vue.use(VueTouch)
+
axios.interceptors.response.use(null, error => {
if (error.response.data.status === 'TOKEN_INVALID' || error.response.data.status === 'TOKEN_MISSING') {
axios.post('/api/logout').then(response => { router.push('/login') })