Files
akartonplanning/app/config/utils.js
Daan Selen 93f67bc9ae
Some checks failed
Build/release / action-release (push) Has been cancelled
chore: cleanup code and remove bloat
2025-10-03 10:20:22 +02:00

17 lines
515 B
JavaScript

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();
}
}