From e0fbeee88edb29f04a3260560d10d1a812f84029 Mon Sep 17 00:00:00 2001
From: Henry Jameson
Date: Mon, 24 Apr 2023 21:57:31 +0300
Subject: finish up attachment setting (right now only for admin section only)
---
.../settings_modal/helpers/attachment_setting.js | 7 +--
.../settings_modal/helpers/attachment_setting.vue | 53 +++++++++++++++-------
2 files changed, 41 insertions(+), 19 deletions(-)
(limited to 'src/components/settings_modal')
diff --git a/src/components/settings_modal/helpers/attachment_setting.js b/src/components/settings_modal/helpers/attachment_setting.js
index a0a12ead..ac5c6f86 100644
--- a/src/components/settings_modal/helpers/attachment_setting.js
+++ b/src/components/settings_modal/helpers/attachment_setting.js
@@ -7,10 +7,10 @@ export default {
...Setting,
props: {
...Setting.props,
- type: {
- type: Array,
+ acceptTypes: {
+ type: String,
required: false,
- default: []
+ default: 'image/*'
}
},
components: {
@@ -22,6 +22,7 @@ export default {
...Setting.computed,
attachment () {
const path = this.realDraftMode ? this.draft : this.state
+ // The "server" part is primarily for local dev, but could be useful for alt-domain or multiuser usage.
const url = path.includes('://') ? path : this.$store.state.instance.server + path
return {
mimetype: fileTypeExt(url),
diff --git a/src/components/settings_modal/helpers/attachment_setting.vue b/src/components/settings_modal/helpers/attachment_setting.vue
index 3a933511..cc2278b0 100644
--- a/src/components/settings_modal/helpers/attachment_setting.vue
+++ b/src/components/settings_modal/helpers/attachment_setting.vue
@@ -20,6 +20,23 @@
{{ backendDescriptionDescription + ' ' }}
@@ -63,8 +68,24 @@
.AttachmentSetting {
.attachment {
display: block;
- width: 20em;
+ width: 100%;
height: 15em;
+ margin-bottom: 0.5em;
+ }
+
+ .attachment-input {
+ margin-left: 1em;
+ display: flex;
+ flex-direction: column;
+ width: 20em;
+ }
+
+ .controls {
+ margin-bottom: 0.5em;
+
+ input, button {
+ width: 100%;
+ }
}
}
--
cgit v1.2.3-70-g09d2