diff --git a/src/App.scss b/src/App.scss index 149d640ff6..ef68ac50b5 100644 --- a/src/App.scss +++ b/src/App.scss @@ -646,6 +646,7 @@ option { } .cards-list { + list-style: none; display: grid; grid-auto-flow: row dense; grid-template-columns: 1fr 1fr; diff --git a/src/components/settings_modal/admin_tabs/frontends_tab.js b/src/components/settings_modal/admin_tabs/frontends_tab.js index a5d33cbe35..a2c27c2a4c 100644 --- a/src/components/settings_modal/admin_tabs/frontends_tab.js +++ b/src/components/settings_modal/admin_tabs/frontends_tab.js @@ -51,6 +51,12 @@ const FrontendsTab = { .then((externalUser) => { this.$store.dispatch('loadFrontendsStuff') }) + }, + setDefault (frontend, suggestRef) { + const ref = suggestRef || frontend.refs[0] + const { name } = frontend + + this.$store.commit('updateAdminDraft', { path: [':pleroma', ':frontends', ':primary'], value: { name, ref } }) } } } diff --git a/src/components/settings_modal/admin_tabs/frontends_tab.scss b/src/components/settings_modal/admin_tabs/frontends_tab.scss index 1e1881ff8a..e3e04bc6f4 100644 --- a/src/components/settings_modal/admin_tabs/frontends_tab.scss +++ b/src/components/settings_modal/admin_tabs/frontends_tab.scss @@ -8,6 +8,6 @@ word-wrap: nowrap; white-space: nowrap; overflow-x: hidden; - max-width: 80%; + max-width: 10em; } } diff --git a/src/components/settings_modal/admin_tabs/frontends_tab.vue b/src/components/settings_modal/admin_tabs/frontends_tab.vue index 48649dfba9..71bbfa69e2 100644 --- a/src/components/settings_modal/admin_tabs/frontends_tab.vue +++ b/src/components/settings_modal/admin_tabs/frontends_tab.vue @@ -2,67 +2,157 @@

{{ $t('admin_dash.tabs.frontends') }}

-
diff --git a/src/components/settings_modal/helpers/group_setting.js b/src/components/settings_modal/helpers/group_setting.js index 12a4900072..23a2a20257 100644 --- a/src/components/settings_modal/helpers/group_setting.js +++ b/src/components/settings_modal/helpers/group_setting.js @@ -7,7 +7,6 @@ export default { computed: { ...Setting.computed, isDirty () { - console.log(this.state, this.draft) return !isEqual(this.state, this.draft) } } diff --git a/src/components/settings_modal/helpers/setting.js b/src/components/settings_modal/helpers/setting.js index d2e1a6f43c..4f0be448c7 100644 --- a/src/components/settings_modal/helpers/setting.js +++ b/src/components/settings_modal/helpers/setting.js @@ -61,7 +61,7 @@ export default { // TODO allow passing shared draft object? get () { if (this.realSource === 'admin') { - return get(this.$store.state.adminSettings.draft, this.path) + return get(this.$store.state.adminSettings.draft, this.canonPath) } else { return this.localDraft } @@ -75,7 +75,7 @@ export default { } }, state () { - const value = get(this.configSource, this.path) + const value = get(this.configSource, this.canonPath) if (value === undefined) { return this.defaultState } else { diff --git a/src/components/settings_modal/helpers/shared_computed_object.js b/src/components/settings_modal/helpers/shared_computed_object.js index d02db542af..bb3d36ac4f 100644 --- a/src/components/settings_modal/helpers/shared_computed_object.js +++ b/src/components/settings_modal/helpers/shared_computed_object.js @@ -10,6 +10,9 @@ const SharedComputedObject = () => ({ }, adminConfig () { return this.$store.state.adminSettings.config + }, + adminDraft () { + return this.$store.state.adminSettings.draft } }) diff --git a/src/components/settings_modal/settings_modal.scss b/src/components/settings_modal/settings_modal.scss index 98de736bfb..49ef83e014 100644 --- a/src/components/settings_modal/settings_modal.scss +++ b/src/components/settings_modal/settings_modal.scss @@ -43,6 +43,9 @@ .btn { min-height: 2em; + } + + .btn:not(.dropdown-button) { padding: 0 2em; } } diff --git a/src/components/settings_modal/settings_modal_admin_content.js b/src/components/settings_modal/settings_modal_admin_content.js index b7c0de576a..f94721ec78 100644 --- a/src/components/settings_modal/settings_modal_admin_content.js +++ b/src/components/settings_modal/settings_modal_admin_content.js @@ -51,6 +51,9 @@ const SettingsModalAdminContent = { adminDbLoaded () { return this.$store.state.adminSettings.loaded }, + adminDescriptionsLoaded () { + return this.$store.state.adminSettings.descriptions !== null + }, noDb () { return this.$store.state.adminSettings.dbConfigEnabled === false } diff --git a/src/components/settings_modal/settings_modal_admin_content.vue b/src/components/settings_modal/settings_modal_admin_content.vue index ae670a9096..a7a2ac9ad0 100644 --- a/src/components/settings_modal/settings_modal_admin_content.vue +++ b/src/components/settings_modal/settings_modal_admin_content.vue @@ -1,5 +1,6 @@