fix: No x64 appimage and server config displaying in electron webview
This commit is contained in:
6
.github/workflows/electron.yml
vendored
6
.github/workflows/electron.yml
vendored
@@ -201,11 +201,15 @@ jobs:
|
|||||||
if [ -f "termix-${VERSION}-armv7l.tar.gz" ]; then
|
if [ -f "termix-${VERSION}-armv7l.tar.gz" ]; then
|
||||||
mv "termix-${VERSION}-armv7l.tar.gz" "termix_linux_armv7l_portable.tar.gz"
|
mv "termix-${VERSION}-armv7l.tar.gz" "termix_linux_armv7l_portable.tar.gz"
|
||||||
fi
|
fi
|
||||||
# Rename Debian amd64 to x64 for consistency
|
|
||||||
if [ -f "termix_linux_amd64_deb.deb" ]; then
|
if [ -f "termix_linux_amd64_deb.deb" ]; then
|
||||||
mv "termix_linux_amd64_deb.deb" "termix_linux_x64_deb.deb"
|
mv "termix_linux_amd64_deb.deb" "termix_linux_x64_deb.deb"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -f "termix_linux_x86_64_appimage.AppImage" ]; then
|
||||||
|
mv "termix_linux_x86_64_appimage.AppImage" "termix_linux_x64_appimage.AppImage"
|
||||||
|
fi
|
||||||
|
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
- name: List release files
|
- name: List release files
|
||||||
|
|||||||
@@ -59,6 +59,9 @@ export function Auth({
|
|||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
const isInElectronWebView = () => {
|
const isInElectronWebView = () => {
|
||||||
|
if ((window as any).IS_ELECTRON_WEBVIEW) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
if (window.self !== window.top) {
|
if (window.self !== window.top) {
|
||||||
return true;
|
return true;
|
||||||
@@ -140,12 +143,6 @@ export function Auth({
|
|||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (isInElectronWebView()) {
|
|
||||||
setDbHealthChecking(false);
|
|
||||||
setDbConnectionFailed(false);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
setDbHealthChecking(true);
|
setDbHealthChecking(true);
|
||||||
getSetupRequired()
|
getSetupRequired()
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|||||||
@@ -168,6 +168,7 @@ export function ElectronLoginForm({
|
|||||||
const injectedScript = `
|
const injectedScript = `
|
||||||
(function() {
|
(function() {
|
||||||
window.IS_ELECTRON = true;
|
window.IS_ELECTRON = true;
|
||||||
|
window.IS_ELECTRON_WEBVIEW = true;
|
||||||
if (typeof window.electronAPI === 'undefined') {
|
if (typeof window.electronAPI === 'undefined') {
|
||||||
window.electronAPI = { isElectron: true };
|
window.electronAPI = { isElectron: true };
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user