mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-19 21:16:00 +00:00
wokring electron app build + simplified web build
This commit is contained in:
@@ -12,8 +12,7 @@ export function extractPluginIcon(packageManifest) {
|
||||
return `https://raw.githubusercontent.com/${match[1]}/${match[2]}/master/icon.svg`;
|
||||
}
|
||||
}
|
||||
// eslint-disable-next-line no-undef
|
||||
return `${process.env.PUBLIC_URL}/unknown.svg`;
|
||||
return 'unknown.svg';
|
||||
}
|
||||
|
||||
export function extractPluginAuthor(packageManifest) {
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
let apiUrl = null;
|
||||
try {
|
||||
apiUrl = process.env.API_URL;
|
||||
} catch {}
|
||||
|
||||
export default function resolveApi() {
|
||||
if (window['require']) {
|
||||
const electron = window['require']('electron');
|
||||
@@ -10,12 +15,8 @@ export default function resolveApi() {
|
||||
}
|
||||
}
|
||||
|
||||
// // eslint-disable-next-line
|
||||
// const apiUrl = process.env.REACT_APP_API_URL;
|
||||
// if (apiUrl) {
|
||||
// if (apiUrl == 'ORIGIN') return window.location.origin;
|
||||
// return apiUrl;
|
||||
// }
|
||||
|
||||
return 'http://localhost:3000';
|
||||
if (apiUrl) {
|
||||
return apiUrl;
|
||||
}
|
||||
return window.location.origin;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user