diff options
| author | Shpuld Shpludson <shp@cock.li> | 2018-12-18 18:26:14 +0000 |
|---|---|---|
| committer | Shpuld Shpludson <shp@cock.li> | 2018-12-18 18:26:14 +0000 |
| commit | f62ff2d894d87c7e9c200687eb2a91bcb111e7e1 (patch) | |
| tree | 05ff84c240bd66c0086b7c8633513d2246874740 /src/boot/after_store.js | |
| parent | 2f28bf95fdce6a215961fe264c236c111e4a1e66 (diff) | |
| parent | 67c2a607aa960abb23cc6ba3c4014891bb67097d (diff) | |
Merge branch 'feature/bigger-icons-for-mobile' into 'develop'
Feature/bigger icons for mobile / #211
See merge request pleroma/pleroma-fe!423
Diffstat (limited to 'src/boot/after_store.js')
| -rw-r--r-- | src/boot/after_store.js | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/boot/after_store.js b/src/boot/after_store.js index 8cd13df7..5b9e5c96 100644 --- a/src/boot/after_store.js +++ b/src/boot/after_store.js @@ -13,12 +13,17 @@ const afterStoreSetup = ({ store, i18n }) => { 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 }) + // TODO: default values for this stuff, added if to not make it break on + // my dev config out of the box. + if (uploadlimit) { + 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) }) + } + if (data.nsfwCensorImage) { store.dispatch('setInstanceOption', { name: 'nsfwCensorImage', value: data.nsfwCensorImage }) } |
