catch localforage error and let the application work, add an alert for user to dismiss

This commit is contained in:
Shpuld Shpuldson 2020-07-01 19:15:28 +03:00
parent beb160bd53
commit d30b0b28c9
7 changed files with 47 additions and 3 deletions

View file

@ -8,7 +8,7 @@ const defaultState = {
// Stuff from apiConfig
name: 'Pleroma FE',
registrationOpen: true,
server: 'http://localhost:4040/',
server: 'http://lain.com:4040',
textlimit: 5000,
themeData: undefined,
vapidPublicKey: undefined,

View file

@ -8,6 +8,7 @@ const defaultState = {
noticeClearTimeout: null,
notificationPermission: null
},
storageError: 'none',
browserSupport: {
cssFilter: window.CSS && window.CSS.supports && (
window.CSS.supports('filter', 'drop-shadow(0 0)') ||
@ -58,6 +59,9 @@ const interfaceMod = {
if (!state.settingsModalLoaded) {
state.settingsModalLoaded = true
}
},
setStorageError (state, value) {
state.storageError = value
}
},
actions: {
@ -81,6 +85,9 @@ const interfaceMod = {
},
togglePeekSettingsModal ({ commit }) {
commit('togglePeekSettingsModal')
},
setStorageError ({ commit }, value) {
commit('setStorageError', value)
}
}
}