Add spellcheck option

This commit is contained in:
smartfrigde 2023-05-13 23:48:11 +02:00
parent a90b348443
commit f4b394ecd4
5 changed files with 24 additions and 9 deletions

View file

@ -126,9 +126,10 @@
dynamicIcon: false,
trayIcon: "default",
startMinimized: false,
spellcheck: true,
performanceMode: "none"
});
setTimeout(() => window.armcordinternal.restart(), 5000);
setTimeout(() => window.armcordinternal.restart(), 500);
});
// Full
@ -159,6 +160,7 @@
useLegacyCapturer: false,
alternativePaste: false,
dynamicIcon: false,
spellcheck: true,
disableAutogain: false,
startMinimized: false,
trayIcon: "default",
@ -175,6 +177,7 @@
minimizeToTray: true,
automaticPatches: false,
mobileMode: false,
spellcheck: true,
disableAutogain: false,
mods: "none",
dynamicIcon: false,

View file

@ -112,6 +112,14 @@
</div>
<br />
<div class="switch acSpellcheck">
<label class="header" data-string="settings-spellcheck"></label>
<input id="spellcheck" class="tgl tgl-light left" data-setting="spellcheck" type="checkbox" />
<label class="tgl-btn left" for="spellcheck"></label>
<p class="description" data-string="settings-spellcheck-desc"></p>
</div>
<br />
<div class="switch acChannel">
<select name="channel" data-setting="channel" class="left dropdown">
<option value="stable" selected>Stable</option>

View file

@ -46,6 +46,7 @@ export function setup(): void {
automaticPatches: false,
alternativePaste: false,
mods: "none",
spellcheck: true,
performanceMode: "none",
skipSplash: false,
inviteWebsocket: true,
@ -251,6 +252,7 @@ export interface Settings {
minimizeToTray: boolean;
automaticPatches: boolean;
alternativePaste: boolean;
spellcheck: boolean;
mods: string;
dynamicIcon: boolean;
mobileMode: boolean;

View file

@ -286,7 +286,7 @@ async function doAfterDefiningTheWindow(): Promise<void> {
mainWindow.show();
}
}
export function createCustomWindow(): void {
export async function createCustomWindow(): Promise<void> {
mainWindow = new BrowserWindow({
width: 300,
height: 350,
@ -300,12 +300,12 @@ export function createCustomWindow(): void {
webPreferences: {
sandbox: false,
preload: path.join(__dirname, "preload/preload.js"),
spellcheck: true
spellcheck: await getConfig("spellcheck")
}
});
doAfterDefiningTheWindow();
}
export function createNativeWindow(): void {
export async function createNativeWindow(): Promise<void> {
mainWindow = new BrowserWindow({
width: 300,
height: 350,
@ -319,12 +319,12 @@ export function createNativeWindow(): void {
webPreferences: {
sandbox: false,
preload: path.join(__dirname, "preload/preload.js"),
spellcheck: true
spellcheck: await getConfig("spellcheck")
}
});
doAfterDefiningTheWindow();
}
export function createTransparentWindow(): void {
export async function createTransparentWindow(): Promise<void> {
mainWindow = new BrowserWindow({
width: 300,
height: 350,
@ -338,12 +338,12 @@ export function createTransparentWindow(): void {
webPreferences: {
sandbox: false,
preload: path.join(__dirname, "preload/preload.js"),
spellcheck: true
spellcheck: await getConfig("spellcheck")
}
});
doAfterDefiningTheWindow();
}
export function createInviteWindow(code: string): void {
export async function createInviteWindow(code: string): Promise<void> {
inviteWindow = new BrowserWindow({
width: 800,
height: 600,
@ -354,7 +354,7 @@ export function createInviteWindow(code: string): void {
autoHideMenuBar: true,
webPreferences: {
sandbox: false,
spellcheck: true
spellcheck: await getConfig("spellcheck")
}
});
let formInviteURL = `https://discord.com/invite/${code}`;