mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-19 15:25:59 +00:00
@@ -164,14 +164,19 @@ const authTypesLoader = ({ engine }) => ({
|
||||
url: 'plugins/auth-types',
|
||||
params: { engine },
|
||||
reloadTrigger: `installed-plugins-changed`,
|
||||
errorValue: null,
|
||||
});
|
||||
|
||||
async function getCore(loader, args) {
|
||||
const { url, params, reloadTrigger, transform, onLoaded } = loader(args);
|
||||
const { url, params, reloadTrigger, transform, onLoaded, errorValue } = loader(args);
|
||||
const key = stableStringify({ url, ...params });
|
||||
|
||||
async function doLoad() {
|
||||
const resp = await apiCall(url, params);
|
||||
if (resp?.errorMessage && errorValue !== undefined) {
|
||||
if (onLoaded) onLoaded(errorValue);
|
||||
return errorValue;
|
||||
}
|
||||
const res = (transform || (x => x))(resp);
|
||||
if (onLoaded) onLoaded(res);
|
||||
return res;
|
||||
|
||||
@@ -139,6 +139,7 @@ export async function openElectronFile() {
|
||||
{ name: `SQLite database`, extensions: ['sqlite', 'db', 'sqlite3'] },
|
||||
...getFileFormatFilters(ext),
|
||||
],
|
||||
properties: ['showHiddenFiles', 'openFile'],
|
||||
});
|
||||
const filePath = filePaths && filePaths[0];
|
||||
if (canOpenByElectron(filePath, ext)) {
|
||||
|
||||
Reference in New Issue
Block a user