mirror of
https://gitea.shironeko-all.duckdns.org/shironeko/Hytale-F2P-2.git
synced 2026-02-26 02:31:46 -03:00
chore: delete unused get-env-var functions
This commit is contained in:
@@ -12,9 +12,7 @@ let modsTotalPages = 1;
|
|||||||
|
|
||||||
export async function initModsManager() {
|
export async function initModsManager() {
|
||||||
try {
|
try {
|
||||||
if (window.electronAPI && window.electronAPI.getEnvVar) {
|
console.log('Loaded API Key:', CF_API_KEY ? 'Yes' : 'No');
|
||||||
console.log('Loaded API Key:', CF_API_KEY ? 'Yes' : 'No');
|
|
||||||
}
|
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error('Failed to load API Key:', err);
|
console.error('Failed to load API Key:', err);
|
||||||
}
|
}
|
||||||
|
|||||||
5
main.js
5
main.js
@@ -1,5 +1,4 @@
|
|||||||
const path = require('path');
|
const path = require('path');
|
||||||
require('dotenv').config({ path: path.join(__dirname, '.env') });
|
|
||||||
const { app, BrowserWindow, ipcMain, dialog, shell } = require('electron');
|
const { app, BrowserWindow, ipcMain, dialog, shell } = require('electron');
|
||||||
const { autoUpdater } = require('electron-updater');
|
const { autoUpdater } = require('electron-updater');
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
@@ -931,10 +930,6 @@ ipcMain.handle('get-local-app-data', async () => {
|
|||||||
return process.env.LOCALAPPDATA || path.join(os.homedir(), 'AppData', 'Local');
|
return process.env.LOCALAPPDATA || path.join(os.homedir(), 'AppData', 'Local');
|
||||||
});
|
});
|
||||||
|
|
||||||
ipcMain.handle('get-env-var', async (event, key) => {
|
|
||||||
return process.env[key];
|
|
||||||
});
|
|
||||||
|
|
||||||
ipcMain.handle('get-user-id', async () => {
|
ipcMain.handle('get-user-id', async () => {
|
||||||
try {
|
try {
|
||||||
const { getOrCreatePlayerId } = require('./backend/launcher');
|
const { getOrCreatePlayerId } = require('./backend/launcher');
|
||||||
|
|||||||
@@ -69,8 +69,7 @@
|
|||||||
"preload.js",
|
"preload.js",
|
||||||
"backend/**/*",
|
"backend/**/*",
|
||||||
"GUI/**/*",
|
"GUI/**/*",
|
||||||
"package.json",
|
"package.json"
|
||||||
".env"
|
|
||||||
],
|
],
|
||||||
"win": {
|
"win": {
|
||||||
"target": [
|
"target": [
|
||||||
|
|||||||
@@ -35,7 +35,6 @@ contextBridge.exposeInMainWorld('electronAPI', {
|
|||||||
openGameLocation: () => ipcRenderer.invoke('open-game-location'),
|
openGameLocation: () => ipcRenderer.invoke('open-game-location'),
|
||||||
saveSettings: (settings) => ipcRenderer.invoke('save-settings', settings),
|
saveSettings: (settings) => ipcRenderer.invoke('save-settings', settings),
|
||||||
loadSettings: () => ipcRenderer.invoke('load-settings'),
|
loadSettings: () => ipcRenderer.invoke('load-settings'),
|
||||||
getEnvVar: (key) => ipcRenderer.invoke('get-env-var', key),
|
|
||||||
getLocalAppData: () => ipcRenderer.invoke('get-local-app-data'),
|
getLocalAppData: () => ipcRenderer.invoke('get-local-app-data'),
|
||||||
getModsPath: () => ipcRenderer.invoke('get-mods-path'),
|
getModsPath: () => ipcRenderer.invoke('get-mods-path'),
|
||||||
loadInstalledMods: (modsPath) => ipcRenderer.invoke('load-installed-mods', modsPath),
|
loadInstalledMods: (modsPath) => ipcRenderer.invoke('load-installed-mods', modsPath),
|
||||||
|
|||||||
Reference in New Issue
Block a user