const { app, BrowserWindow, session } = require('electron');
const path = require('path');
function createWindow() {
const win = new BrowserWindow({
width: 1280,
height: 800,
autoHideMenuBar: true, // ซ่อนเมนูบาร์ด้านบน
webPreferences: {
nodeIntegration: true,
contextIsolation: false
}
});
// อนุญาตการใช้ไมค์และกล้องอัตโนมัติ
session.defaultSession.setPermissionRequestHandler((webContents, permission, callback) => {
if (permission === 'media') {
callback(true);
} else {
callback(false);
}
});
// โหลดหน้าเว็บ (ปรับ URL ตอนรัน dev หรือไฟล์ index.html ตอน build)
win.loadURL(
app.isPackaged
? `file://${path.join(__dirname, 'build/index.html')}`
: 'http://localhost:3000'
);
}
app.whenReady().then(createWindow);
app.on('window-all-closed', () => {
if (process.platform !== 'darwin') app.quit();
});
top of page
นมถั่วลายเสือ
สำหรับ
สายฟิต
จากร้าน Vegan Home
เสริมสร้างกล้ามเนื้อ
ฟื้นฟูหลังออกกำลังกาย
แหล่งเกลือแร่ และ Zinc
หมดทุกปัญหาสุขภาพ
ขณะตั้งครรภ์ด้วย
เครื่องดื่มถั่วลิงสงค์ลายเสือ!
ㆍ แหล่งเกลือแร่ และ Zinc
ㆍ แหล่งโปรตีน
ㆍ เสริมสร้างกระดูก
ลูกและแม่
ให้แข็งแรง
bottom of page