Web: added store to webpack.config, fixed Firefox store problems

This commit is contained in:
Nikita Gopienko 2021-04-30 15:19:11 +03:00
parent ca819a930c
commit 9f3f03a963
4 changed files with 8 additions and 4 deletions

View File

@ -127,7 +127,7 @@ const Files = inject(({ auth, filesStore }) => {
setEncryptionKeys: auth.settingsStore.setEncryptionKeys,
loadFilesInfo: async () => {
//await auth.init();
await filesStore.initFiles(auth.isAuthenticated); //TODO: fixed Firefox isAuthenticated bug
await filesStore.initFiles();
auth.setProductVersion(config.version);
},
};

View File

@ -118,9 +118,10 @@ class FilesStore {
: { label: "TooltipElementsMoveMessage", filesCount };
}
initFiles = (isAuthenticated) => {
initFiles = () => {
if (this.isInit) return;
//TODO: this.authStore.isAuthenticated returned false in Firefox
const { isAuthenticated } = this.authStore;
const {
getPortalCultures,

View File

@ -17,7 +17,7 @@ import PrimaryProgressDataStore from "./PrimaryProgressDataStore";
import VersionHistoryStore from "./VersionHistoryStore";
import dialogsStore from "./DialogsStore";
import store from "studio/store"; //TODO: creates a new store (FireFox problem)
import store from "studio/store";
const formatsStore = new FormatsStore(
iconFormatsStore,

View File

@ -166,6 +166,9 @@ const config = {
singleton: true,
requiredVersion: deps["react-dom"],
},
"./src/store": {
singleton: true,
},
},
}),
new HtmlWebpackPlugin({