diff --git a/src/components/settings_modal/admin_tabs/links_tab.js b/src/components/settings_modal/admin_tabs/links_tab.js
new file mode 100644
index 000000000..3771a4f37
--- /dev/null
+++ b/src/components/settings_modal/admin_tabs/links_tab.js
@@ -0,0 +1,36 @@
+import BooleanSetting from '../helpers/boolean_setting.vue'
+import ChoiceSetting from '../helpers/choice_setting.vue'
+import IntegerSetting from '../helpers/integer_setting.vue'
+import StringSetting from '../helpers/string_setting.vue'
+import GroupSetting from '../helpers/group_setting.vue'
+import AttachmentSetting from '../helpers/attachment_setting.vue'
+
+import SharedComputedObject from '../helpers/shared_computed_object.js'
+
+const MediaProxyTab = {
+ provide () {
+ return {
+ defaultDraftMode: true,
+ defaultSource: 'admin'
+ }
+ },
+ components: {
+ BooleanSetting,
+ ChoiceSetting,
+ IntegerSetting,
+ StringSetting,
+ AttachmentSetting,
+ GroupSetting
+ },
+ computed: {
+ mediaProxyEnabled () {
+ return this.$store.state.adminSettings.draft[':pleroma'][':media_proxy'][':enabled']
+ },
+ mediaInvalidationProvider () {
+ return this.$store.state.adminSettings.draft[':pleroma'][':media_proxy'][':invalidation'][':provider']
+ },
+ ...SharedComputedObject()
+ }
+}
+
+export default MediaProxyTab
diff --git a/src/components/settings_modal/admin_tabs/links_tab.vue b/src/components/settings_modal/admin_tabs/links_tab.vue
new file mode 100644
index 000000000..0bd2dadf6
--- /dev/null
+++ b/src/components/settings_modal/admin_tabs/links_tab.vue
@@ -0,0 +1,115 @@
+
+
+
+
{{ $t('admin_dash.media_proxy.basic') }}
+
+
+ {{ $t('admin_dash.media_proxy.invalidation') }}
+
+ -
+
+
+ -
+
+
+ {{ $t('admin_dash.media_proxy.invalidation_settings') }}
+
+
+
+ -
+
+
+
+
+
+
+
+ -
+
+
+ -
+
+
+
+
+
+
+
+ {{ $t('admin_dash.media_proxy.limits') }}
+
+
+ {{ $t('admin_dash.media_proxy.thumbnails') }}
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/settings_modal/admin_tabs/mailer_tab.js b/src/components/settings_modal/admin_tabs/mailer_tab.js
index 9fe2ebd1a..b67dc58ac 100644
--- a/src/components/settings_modal/admin_tabs/mailer_tab.js
+++ b/src/components/settings_modal/admin_tabs/mailer_tab.js
@@ -45,6 +45,9 @@ const MailerTab = {
adapter () {
return this.$store.state.adminSettings.draft[':pleroma']['Pleroma.Emails.Mailer'][':adapter']
},
+ mailerEnabled () {
+ return this.$store.state.adminSettings.draft[':pleroma']['Pleroma.Emails.Mailer'][':enabled']
+ },
...SharedComputedObject()
},
methods: {
diff --git a/src/components/settings_modal/admin_tabs/mailer_tab.vue b/src/components/settings_modal/admin_tabs/mailer_tab.vue
index b6d3dc496..df2456b4d 100644
--- a/src/components/settings_modal/admin_tabs/mailer_tab.vue
+++ b/src/components/settings_modal/admin_tabs/mailer_tab.vue
@@ -4,140 +4,144 @@
{{ $t('admin_dash.mailer.adapter') }}
-
-
+
- -
-
-
- {{ $t('admin_dash.mailer.auth') }}
- -
-
-
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
+
-
+
-
+ {{ $t('admin_dash.mailer.auth') }}
+
+ -
+
+
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+
+
+
diff --git a/src/components/settings_modal/admin_tabs/media_proxy_tab.vue b/src/components/settings_modal/admin_tabs/media_proxy_tab.vue
index 0bd2dadf6..064d13ecd 100644
--- a/src/components/settings_modal/admin_tabs/media_proxy_tab.vue
+++ b/src/components/settings_modal/admin_tabs/media_proxy_tab.vue
@@ -5,11 +5,12 @@
-
-
@@ -35,7 +36,7 @@
+ />
diff --git a/src/components/settings_modal/helpers/list_setting.js b/src/components/settings_modal/helpers/list_setting.js
new file mode 100644
index 000000000..0ded0c36f
--- /dev/null
+++ b/src/components/settings_modal/helpers/list_setting.js
@@ -0,0 +1,21 @@
+import Setting from './setting.js'
+
+export default {
+ ...Setting,
+ components: {
+ ...Setting.components
+ },
+ props: {
+ ...Setting.props
+ },
+ computed: {
+ ...Setting.computed
+ },
+ methods: {
+ ...Setting.methods,
+ updateValue (e) {
+ console.log(e.target.value)
+ //this.configSink(this.path, parseFloat(e.target.value) + this.stateUnit)
+ }
+ }
+}
diff --git a/src/components/settings_modal/helpers/list_setting.vue b/src/components/settings_modal/helpers/list_setting.vue
new file mode 100644
index 000000000..1a86e2aae
--- /dev/null
+++ b/src/components/settings_modal/helpers/list_setting.vue
@@ -0,0 +1,45 @@
+
+
+
+
+
diff --git a/src/components/settings_modal/helpers/setting.js b/src/components/settings_modal/helpers/setting.js
index ed80708f9..d4a0dff56 100644
--- a/src/components/settings_modal/helpers/setting.js
+++ b/src/components/settings_modal/helpers/setting.js
@@ -77,7 +77,7 @@ export default {
},
created () {
if (this.realDraftMode && (this.realSource !== 'admin' || this.path == null)) {
- this.draft = this.state
+ this.draft = cloneDeep(this.state)
}
},
computed: {
@@ -158,7 +158,14 @@ export default {
if (this.path == null) {
return this.disabled
}
- const parentValue = this.parentPath !== undefined ? get(this.configSource, this.parentPath) : null
+ let parentValue = null
+ if (this.parentPath !== undefined && this.realSource === 'admin') {
+ if (this.realDraftMode) {
+ parentValue = get(this.$store.state.adminSettings.draft, this.parentPath)
+ } else {
+ parentValue = get(this.configSource, this.parentPath)
+ }
+ }
return this.disabled || (parentValue !== null ? (this.parentInvert ? parentValue : !parentValue) : false)
},
configSource () {
diff --git a/src/modules/adminSettings.js b/src/modules/adminSettings.js
index a6729f645..3f443d594 100644
--- a/src/modules/adminSettings.js
+++ b/src/modules/adminSettings.js
@@ -105,7 +105,7 @@ const adminSettingsStorage = {
}
set(config, path, convert(c.value))
})
- console.log('CONFIG', config)
+ console.log('CONFIG', JSON.parse(JSON.stringify(config)))
commit('updateAdminSettings', { config, modifiedPaths })
commit('resetAdminDraft')
},
@@ -208,7 +208,7 @@ const adminSettingsStorage = {
.then(backendDbConfig => dispatch('setInstanceAdminSettings', { backendDbConfig }))
},
resetAdminSetting ({ rootState, state, dispatch }, { path }) {
- const [group, key, subkey] = path.split(/\./g)
+ const [group, key, subkey] = Array.isArray(path) ? path : path.split(/\./g)
state.modifiedPaths.delete(path)