diff --git a/src/App.js b/src/App.js
index 040138c9..da66fe21 100644
--- a/src/App.js
+++ b/src/App.js
@@ -107,6 +107,9 @@ export default {
return {
'order': this.$store.state.instance.sidebarRight ? 99 : 0
}
+ },
+ showStorageError () {
+ return this.$store.state.interface.storageError === 'show'
}
},
methods: {
@@ -129,6 +132,9 @@ export default {
if (changed) {
this.$store.dispatch('setMobileLayout', mobileLayout)
}
+ },
+ hideStorageError () {
+ this.$store.dispatch('setStorageError', 'hide')
}
}
}
diff --git a/src/App.scss b/src/App.scss
index f2972eda..db447f1c 100644
--- a/src/App.scss
+++ b/src/App.scss
@@ -806,6 +806,15 @@ nav {
}
}
+.storage-error-notice {
+ text-align: center;
+ i {
+ cursor: pointer;
+ color: $fallback--text;
+ color: var(--alertErrorText, $fallback--text);
+ }
+}
+
.button-icon {
font-size: 1.2em;
}
diff --git a/src/App.vue b/src/App.vue
index 7b9ad3dc..23991eac 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -101,6 +101,16 @@
+
+ {{ $t("errors.storage_unavailable") }}
+
+
{
- const persistedState = await createPersistedState(persistedStateOptions)
+ console.log('before perse state')
+ let persistedState
+ let storageError = 'none'
+ try {
+ persistedState = await createPersistedState(persistedStateOptions)
+ } catch (e) {
+ console.error(e)
+ storageError = 'show'
+ persistedState = _ => _
+ }
const store = new Vuex.Store({
modules: {
i18n: {
@@ -89,7 +98,7 @@ const persistedStateOptions = {
strict: false // Socket modifies itself, let's ignore this for now.
// strict: process.env.NODE_ENV !== 'production'
})
-
+ store.dispatch('setStorageError', storageError)
afterStoreSetup({ store, i18n })
})()
diff --git a/src/modules/instance.js b/src/modules/instance.js
index ec5f4e54..cc884317 100644
--- a/src/modules/instance.js
+++ b/src/modules/instance.js
@@ -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,
diff --git a/src/modules/interface.js b/src/modules/interface.js
index eeebd65e..4b5b5b5d 100644
--- a/src/modules/interface.js
+++ b/src/modules/interface.js
@@ -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)
}
}
}