aboutsummaryrefslogtreecommitdiff
path: root/src/boot
diff options
context:
space:
mode:
authorHJ <spam@hjkos.com>2018-12-13 13:46:57 +0000
committerHJ <spam@hjkos.com>2018-12-13 13:46:57 +0000
commit8e4777ccc6bf72b56a0905ca491c8e0e97fb73cf (patch)
tree53e98662ef34b8bccc845f627c125528c1c1436c /src/boot
parente443716bcd616ad61efae161624dd970841a935c (diff)
parenta8521fc8d99ee7ee5142e2c7c642eee0fc14ed93 (diff)
Merge branch 'feature/push-subscriptions' into 'develop'
add service worker and push notifications See merge request pleroma/pleroma-fe!404
Diffstat (limited to 'src/boot')
-rw-r--r--src/boot/after_store.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/boot/after_store.js b/src/boot/after_store.js
index a80baaf5..0d1cabd5 100644
--- a/src/boot/after_store.js
+++ b/src/boot/after_store.js
@@ -17,17 +17,21 @@ import FollowRequests from '../components/follow_requests/follow_requests.vue'
import OAuthCallback from '../components/oauth_callback/oauth_callback.vue'
import UserSearch from '../components/user_search/user_search.vue'
-const afterStoreSetup = ({store, i18n}) => {
+const afterStoreSetup = ({ store, i18n }) => {
window.fetch('/api/statusnet/config.json')
.then((res) => res.json())
.then((data) => {
- const {name, closed: registrationClosed, textlimit, server} = data.site
+ const { name, closed: registrationClosed, textlimit, 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: 'server', value: server })
+ if (vapidPublicKey) {
+ store.dispatch('setInstanceOption', { name: 'vapidPublicKey', value: vapidPublicKey })
+ }
+
var apiConfig = data.site.pleromafe
window.fetch('/static/config.json')