updated
This commit is contained in:
1 parent
b8d3b6aadc
commit
5be126dc47
4 files changed
+18
-15
No files matched your search
+1
-1
@@ -6,13 +6,13 @@ All notable changes to this project will be documented in this file. For commit
|
||||
|
||||
**New Features**:
|
||||
- Remember folder view type (and sorting) for each folder #966
|
||||
- heic is supported in preview and viewer (via conversion) when on non-safari browser #1191
|
||||
|
||||
**Notes**:
|
||||
|
||||
**BugFixes**:
|
||||
- Access Management: issue with access settings #1195
|
||||
- fix shutdown panic related to sse connection
|
||||
- .heic files can't be previewed nor opened #1191
|
||||
|
||||
## v0.8.4-beta
|
||||
|
||||
|
||||
@@ -281,14 +281,6 @@ export default {
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
currentPrompt: {
|
||||
handler(prompt) {
|
||||
if (prompt && prompt.name === "ContextMenu") {
|
||||
this.setPositions();
|
||||
}
|
||||
},
|
||||
deep: true,
|
||||
},
|
||||
hasOverflowItems: {
|
||||
handler(hasItems) {
|
||||
mutations.setContextMenuHasItems(hasItems);
|
||||
|
||||
@@ -242,7 +242,7 @@ export const mutations = {
|
||||
emitStateChanged();
|
||||
return;
|
||||
}
|
||||
if (value.username != "anonymous") {
|
||||
if (value.username !== "anonymous") {
|
||||
mutations.setSources(value);
|
||||
}
|
||||
// Ensure locale exists and is valid
|
||||
@@ -255,6 +255,11 @@ export const mutations = {
|
||||
state.user.sorting = {};
|
||||
state.user.sorting.by = "name";
|
||||
state.user.sorting.asc = true;
|
||||
|
||||
// Load display preferences for the current user
|
||||
const allPreferences = JSON.parse(localStorage.getItem("displayPreferences") || "{}");
|
||||
state.displayPreferences = allPreferences[state.user.username] || {};
|
||||
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
@@ -498,7 +503,13 @@ export const mutations = {
|
||||
...payload,
|
||||
};
|
||||
|
||||
localStorage.setItem("displayPreferences", JSON.stringify(state.displayPreferences));
|
||||
const allPreferences = JSON.parse(localStorage.getItem("displayPreferences") || "{}");
|
||||
if (!allPreferences[state.user.username]) {
|
||||
allPreferences[state.user.username] = {};
|
||||
}
|
||||
allPreferences[state.user.username] = state.displayPreferences;
|
||||
localStorage.setItem("displayPreferences", JSON.stringify(allPreferences));
|
||||
|
||||
emitStateChanged();
|
||||
},
|
||||
};
|
||||
@@ -1,9 +1,9 @@
|
||||
import { reactive } from 'vue';
|
||||
import { detectLocale } from "@/i18n";
|
||||
|
||||
function loadDisplayPreferences() {
|
||||
const history = localStorage.getItem("displayPreferences");
|
||||
return history ? JSON.parse(history) : {};
|
||||
function loadDisplayPreferences(username) {
|
||||
const allPreferences = JSON.parse(localStorage.getItem("displayPreferences") || "{}");
|
||||
return allPreferences[username] || {};
|
||||
}
|
||||
|
||||
export const state = reactive({
|
||||
@@ -29,7 +29,7 @@ export const state = reactive({
|
||||
isMobile: window.innerWidth <= 800,
|
||||
isSearchActive: false,
|
||||
showSidebar: false,
|
||||
displayPreferences: loadDisplayPreferences(),
|
||||
displayPreferences: {},
|
||||
usages: {},
|
||||
editor: null,
|
||||
serverHasMultipleSources: false,
|
||||
|
||||
Reference in new issue
Block a user