#582 Attempted Fix
This commit is contained in:
parent
c874d09f8e
commit
3746ed0817
2 changed files with 40 additions and 23 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -146,6 +146,9 @@ dist
|
||||||
!.yarn/sdks
|
!.yarn/sdks
|
||||||
!.yarn/versions
|
!.yarn/versions
|
||||||
|
|
||||||
|
# pnpm
|
||||||
|
pnpm-lock.yaml
|
||||||
|
|
||||||
## JetBrains GitIgnore ##
|
## JetBrains GitIgnore ##
|
||||||
|
|
||||||
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
|
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
|
||||||
|
|
|
@ -309,8 +309,10 @@ export class BrowserWindow {
|
||||||
break;
|
break;
|
||||||
case "win32":
|
case "win32":
|
||||||
if (!(utils.getStoreValue('visual.transparent') ?? false)) {
|
if (!(utils.getStoreValue('visual.transparent') ?? false)) {
|
||||||
this.options.backgroundColor = "#1E1E1E";} else {
|
this.options.backgroundColor = "#1E1E1E";
|
||||||
this.options.transparent = true;}
|
} else {
|
||||||
|
this.options.transparent = true;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case "linux":
|
case "linux":
|
||||||
this.options.backgroundColor = "#1E1E1E";
|
this.options.backgroundColor = "#1E1E1E";
|
||||||
|
@ -889,8 +891,19 @@ export class BrowserWindow {
|
||||||
})
|
})
|
||||||
|
|
||||||
ipcMain.handle('relaunchApp', (_event, _) => {
|
ipcMain.handle('relaunchApp', (_event, _) => {
|
||||||
app.relaunch()
|
const opt: Electron.RelaunchOptions = {};
|
||||||
app.exit()
|
opt.args = process.argv.slice(1).concat(['--relaunch']);
|
||||||
|
opt.execPath = process.execPath;
|
||||||
|
if (app.isPackaged && process.env.PORTABLE_EXECUTABLE_FILE != undefined) {
|
||||||
|
opt.execPath = process.env.PORTABLE_EXECUTABLE_FILE;
|
||||||
|
} else if (app.isPackaged && process.env.APPIMAGE != undefined) {
|
||||||
|
opt.execPath = process.env.APPIMAGE;
|
||||||
|
opt.args.unshift('--appimage-extract-and-run');
|
||||||
|
} else if (app.isPackaged && process.env.CHROME_DESKTOP != undefined && process.env.PLATFORM == "Linux") {
|
||||||
|
opt.execPath = `gtk-launch cider`;
|
||||||
|
}
|
||||||
|
app.relaunch(opt);
|
||||||
|
app.quit();
|
||||||
})
|
})
|
||||||
|
|
||||||
app.on('before-quit', () => {
|
app.on('before-quit', () => {
|
||||||
|
@ -1067,7 +1080,6 @@ export class BrowserWindow {
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ipcMain.on('share-menu', async (_event, url) => {
|
ipcMain.on('share-menu', async (_event, url) => {
|
||||||
if (process.platform != 'darwin') return;
|
if (process.platform != 'darwin') return;
|
||||||
//https://www.electronjs.org/docs/latest/api/share-menu
|
//https://www.electronjs.org/docs/latest/api/share-menu
|
||||||
|
@ -1193,7 +1205,9 @@ export class BrowserWindow {
|
||||||
(ip2.startsWith('192.168.') && !ip.startsWith('192.168.')) &&
|
(ip2.startsWith('192.168.') && !ip.startsWith('192.168.')) &&
|
||||||
(ip2.startsWith('172.16.') && !ip.startsWith('192.168.') && !ip.startsWith('172.16.')) ||
|
(ip2.startsWith('172.16.') && !ip.startsWith('192.168.') && !ip.startsWith('172.16.')) ||
|
||||||
(ip2.startsWith('10.') && !ip.startsWith('192.168.') && !ip.startsWith('172.16.') && !ip.startsWith('10.'))
|
(ip2.startsWith('10.') && !ip.startsWith('192.168.') && !ip.startsWith('172.16.') && !ip.startsWith('10.'))
|
||||||
){ip = details.address;}
|
) {
|
||||||
|
ip = details.address;
|
||||||
|
}
|
||||||
++alias;
|
++alias;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue