Skip to content
This repository has been archived by the owner on Jan 27, 2021. It is now read-only.

Commit

Permalink
Make ui more failsafe
Browse files Browse the repository at this point in the history
  • Loading branch information
kulmann committed Jun 9, 2020
1 parent d22d06c commit 3b0f220
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ui/components/SettingsApp.vue
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ export default {
* TODO:
* a) set up a map with possible extensions and icons?
* or b) let extensions register app info like displayName + icon?
* https://github.com/owncloud/ocis-settings/issues/27
*/
const navItem = {
name: this.getExtensionName(extension),
Expand All @@ -102,6 +103,7 @@ export default {
})
},
getExtensionName (extension) {
extension = extension || ''
switch (extension) {
case 'ocis-accounts': return this.$gettext('Account')
case 'ocis-hello': return this.$gettext('Hello')
Expand All @@ -112,6 +114,7 @@ export default {
}
},
getExtensionIcon (extension) {
extension = extension || ''
switch (extension) {
case 'ocis-accounts': return 'account_circle'
case 'ocis-hello': return 'tag_faces'
Expand All @@ -121,6 +124,8 @@ export default {
},
async created () {
await this.initialize()
this.resetMenuItems()
this.resetSelectedExtension()
},
watch: {
initialized () {
Expand Down

0 comments on commit 3b0f220

Please sign in to comment.