Files
akartonplanning/app/config/utils.js

17 lines
515 B
JavaScript
Raw Normal View History

2025-10-03 10:20:22 +02:00
import { app, dialog } from "electron";
import { setValue } from "./store.js";
export function setUserAgent(useragent) {
setValue("useragentstring", useragent);
const updatedialog = dialog.showMessageBoxSync({
type: "info",
title: "User-Agent string changed",
message: `You have switched to the ${useragent} User-Agent string.\n\nPlease restart the app for the changes to take effect.`,
buttons: ["Later", "Restart"],
});
if (updatedialog === 1) {
app.relaunch();
app.exit();
}
}