diff options
| author | Shpuld Shpuldson <shp@cock.li> | 2020-07-06 14:01:03 +0300 |
|---|---|---|
| committer | Shpuld Shpuldson <shp@cock.li> | 2020-07-06 14:01:03 +0300 |
| commit | 87b5f828d769a5b2c34a4ad61f249c314a8bbb23 (patch) | |
| tree | f09e6fce0c7549470d31d201534040df155c7fd2 /src/main.js | |
| parent | 4d25be7cb35f86ba2abe883116dc6442c93a1d9d (diff) | |
| parent | b761bcf3334e1f464e63a87de40eb75d0906d545 (diff) | |
fix conflicts, use file icon instead of link, add support for audio and file icon in cw'd posts
Diffstat (limited to 'src/main.js')
| -rw-r--r-- | src/main.js | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/main.js b/src/main.js index 9a201e4f..5bddc76e 100644 --- a/src/main.js +++ b/src/main.js @@ -62,7 +62,15 @@ const persistedStateOptions = { }; (async () => { - const persistedState = await createPersistedState(persistedStateOptions) + let storageError = false + const plugins = [pushNotifications] + try { + const persistedState = await createPersistedState(persistedStateOptions) + plugins.push(persistedState) + } catch (e) { + console.error(e) + storageError = true + } const store = new Vuex.Store({ modules: { i18n: { @@ -85,11 +93,13 @@ const persistedStateOptions = { polls: pollsModule, postStatus: postStatusModule }, - plugins: [persistedState, pushNotifications], + plugins, strict: false // Socket modifies itself, let's ignore this for now. // strict: process.env.NODE_ENV !== 'production' }) - + if (storageError) { + store.dispatch('pushGlobalNotice', { messageKey: 'errors.storage_unavailable', level: 'error' }) + } afterStoreSetup({ store, i18n }) })() |
