mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-02-10 05:58:59 -06:00
Fix layout on empty settings
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -7,8 +7,8 @@
|
||||
</div>
|
||||
<hr />
|
||||
<oc-alert v-if="extensions.length === 0" variation="primary" no-close>
|
||||
<p>
|
||||
<oc-icon name="info" />
|
||||
<p class="uk-flex uk-flex-middle">
|
||||
<oc-icon name="info" class="uk-margin-xsmall-right" />
|
||||
<translate>No settings available</translate>
|
||||
</p>
|
||||
</oc-alert>
|
||||
|
||||
@@ -39,24 +39,28 @@ const actions = {
|
||||
if (response.status === 200) {
|
||||
// the settings markup has implicit typing. inject an explicit type variable here
|
||||
const settingsBundles = response.data.settingsBundles
|
||||
settingsBundles.forEach(bundle => {
|
||||
bundle.settings.forEach(setting => {
|
||||
if (setting['intValue']) {
|
||||
setting.type = 'number'
|
||||
} else if (setting['stringValue']) {
|
||||
setting.type = 'string'
|
||||
} else if (setting['boolValue']) {
|
||||
setting.type = 'boolean'
|
||||
} else if (setting['singleChoiceValue']) {
|
||||
setting.type = 'singleChoice'
|
||||
} else if (setting['multiChoiceValue']) {
|
||||
setting.type = 'multiChoice'
|
||||
} else {
|
||||
setting.type = 'unknown'
|
||||
}
|
||||
if (settingsBundles) {
|
||||
settingsBundles.forEach(bundle => {
|
||||
bundle.settings.forEach(setting => {
|
||||
if (setting['intValue']) {
|
||||
setting.type = 'number'
|
||||
} else if (setting['stringValue']) {
|
||||
setting.type = 'string'
|
||||
} else if (setting['boolValue']) {
|
||||
setting.type = 'boolean'
|
||||
} else if (setting['singleChoiceValue']) {
|
||||
setting.type = 'singleChoice'
|
||||
} else if (setting['multiChoiceValue']) {
|
||||
setting.type = 'multiChoice'
|
||||
} else {
|
||||
setting.type = 'unknown'
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
commit('SET_SETTINGS_BUNDLES', settingsBundles)
|
||||
commit('SET_SETTINGS_BUNDLES', settingsBundles)
|
||||
} else {
|
||||
commit('SET_SETTINGS_BUNDLES', [])
|
||||
}
|
||||
} else {
|
||||
dispatch('showMessage', {
|
||||
title: 'Failed to fetch settings bundles.',
|
||||
|
||||
Reference in New Issue
Block a user