mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-01 02:02:43 +00:00
Merge pull request #4438 from G-Ambatte/fixDefaultSaveLocation-#4437
Fix default save location functionality
This commit is contained in:
@@ -23,7 +23,7 @@ import { printCurrentBrew, fetchThemeBundle, splitTextStyleAndMetadata } from '.
|
|||||||
const BREWKEY = 'homebrewery-new';
|
const BREWKEY = 'homebrewery-new';
|
||||||
const STYLEKEY = 'homebrewery-new-style';
|
const STYLEKEY = 'homebrewery-new-style';
|
||||||
const METAKEY = 'homebrewery-new-meta';
|
const METAKEY = 'homebrewery-new-meta';
|
||||||
const SAVEKEY = `HOMEBREWERY-DEFAULT-SAVE-LOCATION-${global.account?.username || ''}`;
|
const SAVEKEYPREFIX = 'HOMEBREWERY-DEFAULT-SAVE-LOCATION-';
|
||||||
|
|
||||||
const NewPage = (props) => {
|
const NewPage = (props) => {
|
||||||
props = {
|
props = {
|
||||||
@@ -67,6 +67,7 @@ const NewPage = (props) => {
|
|||||||
brew.lang = metaStorage?.lang ?? brew.lang;
|
brew.lang = metaStorage?.lang ?? brew.lang;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const SAVEKEY = `${SAVEKEYPREFIX}${global.account?.username}`;
|
||||||
const saveStorage = localStorage.getItem(SAVEKEY) || 'HOMEBREWERY';
|
const saveStorage = localStorage.getItem(SAVEKEY) || 'HOMEBREWERY';
|
||||||
|
|
||||||
setCurrentBrew(brew);
|
setCurrentBrew(brew);
|
||||||
|
|||||||
Reference in New Issue
Block a user