@lvce-editor/main-process 6.37.15 → 6.38.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/mainProcessMain.js +17 -3
- package/package.json +1 -1
package/dist/mainProcessMain.js
CHANGED
|
@@ -3818,9 +3818,15 @@ const handleBeforeQuit = () => {
|
|
|
3818
3818
|
|
|
3819
3819
|
const Base64 = 'base64';
|
|
3820
3820
|
|
|
3821
|
+
const getSelectedStorageBackend = () => {
|
|
3822
|
+
return safeStorage.getSelectedStorageBackend();
|
|
3823
|
+
};
|
|
3821
3824
|
const isEncryptionAvailable = () => {
|
|
3822
3825
|
return safeStorage.isEncryptionAvailable();
|
|
3823
3826
|
};
|
|
3827
|
+
const setUsePlainTextEncryption = usePlainText => {
|
|
3828
|
+
safeStorage.setUsePlainTextEncryption(usePlainText);
|
|
3829
|
+
};
|
|
3824
3830
|
const encrypt = plainText => {
|
|
3825
3831
|
return safeStorage.encryptString(plainText).toString(Base64);
|
|
3826
3832
|
};
|
|
@@ -3836,6 +3842,10 @@ const ensurePersistentSecretStorage = argv => {
|
|
|
3836
3842
|
if (!isLinux || isEncryptionAvailable()) {
|
|
3837
3843
|
return true;
|
|
3838
3844
|
}
|
|
3845
|
+
if (getSelectedStorageBackend() === 'basic_text') {
|
|
3846
|
+
setUsePlainTextEncryption(true);
|
|
3847
|
+
return true;
|
|
3848
|
+
}
|
|
3839
3849
|
if (hasPasswordStoreArgument(argv)) {
|
|
3840
3850
|
throw new Error('Persistent secret storage is unavailable');
|
|
3841
3851
|
}
|
|
@@ -6994,7 +7004,7 @@ const attachEventListenersToWebContents = (webContentsId, webContents, browserWi
|
|
|
6994
7004
|
const wrappedListener = (...args) => {
|
|
6995
7005
|
// @ts-ignore
|
|
6996
7006
|
const createWindow = (options, url, disposition) => {
|
|
6997
|
-
const view = createWebContentsViewForWindow(browserWindow, options
|
|
7007
|
+
const view = createWebContentsViewForWindow(browserWindow, options);
|
|
6998
7008
|
send('ElectronWebContents.handleWindowOpen', webContentsId, view.webContents.id, url, disposition);
|
|
6999
7009
|
return view.webContents;
|
|
7000
7010
|
};
|
|
@@ -7009,10 +7019,14 @@ const attachEventListenersToWebContents = (webContentsId, webContents, browserWi
|
|
|
7009
7019
|
}
|
|
7010
7020
|
webContentsWithEventListeners.add(webContents);
|
|
7011
7021
|
};
|
|
7012
|
-
const createWebContentsViewForWindow = (browserWindow,
|
|
7022
|
+
const createWebContentsViewForWindow = (browserWindow, options = {}) => {
|
|
7013
7023
|
const view = new WebContentsView({
|
|
7024
|
+
// Electron's popup contents carry the opener relationship and pending navigation.
|
|
7025
|
+
...(options.webContents && {
|
|
7026
|
+
webContents: options.webContents
|
|
7027
|
+
}),
|
|
7014
7028
|
webPreferences: {
|
|
7015
|
-
...webPreferences,
|
|
7029
|
+
...options.webPreferences,
|
|
7016
7030
|
session: getSession()
|
|
7017
7031
|
}
|
|
7018
7032
|
});
|