aboutsummaryrefslogtreecommitdiff
path: root/src/boot/after_store.js
diff options
context:
space:
mode:
authorHJ <spam@hjkos.com>2018-12-13 21:02:17 +0000
committerHJ <spam@hjkos.com>2018-12-13 21:02:17 +0000
commit99b2b7a20358a1324ea139353109784213ebd5d3 (patch)
tree9b57ad2f701b1f5df4dc3061a1ad5e155dccec62 /src/boot/after_store.js
parentdcca4617d5647e0570b359c4e1b14737c552bc7b (diff)
parentdd6a9ae6458784b36ffe2376492284ae4e79fece (diff)
Merge branch 'feature/file-size-checking' into 'develop'
[pleroma#36] Add errors when file uploading fails See merge request pleroma/pleroma-fe!405
Diffstat (limited to 'src/boot/after_store.js')
-rw-r--r--src/boot/after_store.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/boot/after_store.js b/src/boot/after_store.js
index a8594a64..24a8d3ac 100644
--- a/src/boot/after_store.js
+++ b/src/boot/after_store.js
@@ -21,11 +21,15 @@ const afterStoreSetup = ({ store, i18n }) => {
window.fetch('/api/statusnet/config.json')
.then((res) => res.json())
.then((data) => {
- const { name, closed: registrationClosed, textlimit, server, vapidPublicKey } = data.site
+ const { name, closed: registrationClosed, textlimit, uploadlimit, server, vapidPublicKey } = data.site
store.dispatch('setInstanceOption', { name: 'name', value: name })
store.dispatch('setInstanceOption', { name: 'registrationOpen', value: (registrationClosed === '0') })
store.dispatch('setInstanceOption', { name: 'textlimit', value: parseInt(textlimit) })
+ store.dispatch('setInstanceOption', { name: 'uploadlimit', value: parseInt(uploadlimit.uploadlimit) })
+ store.dispatch('setInstanceOption', { name: 'avatarlimit', value: parseInt(uploadlimit.avatarlimit) })
+ store.dispatch('setInstanceOption', { name: 'backgroundlimit', value: parseInt(uploadlimit.backgroundlimit) })
+ store.dispatch('setInstanceOption', { name: 'bannerlimit', value: parseInt(uploadlimit.bannerlimit) })
store.dispatch('setInstanceOption', { name: 'server', value: server })
if (data.nsfwCensorImage) {