lint
This commit is contained in:
parent
0f2cc91230
commit
0dbc633ccd
3 changed files with 20 additions and 11 deletions
|
@ -7,9 +7,9 @@
|
||||||
import { app, dialog, ipcMain, session, shell } from "electron";
|
import { app, dialog, ipcMain, session, shell } from "electron";
|
||||||
import { existsSync, readFileSync, watch } from "fs";
|
import { existsSync, readFileSync, watch } from "fs";
|
||||||
import { open, readFile } from "fs/promises";
|
import { open, readFile } from "fs/promises";
|
||||||
|
import { release } from "os";
|
||||||
import { join } from "path";
|
import { join } from "path";
|
||||||
import { debounce } from "shared/utils/debounce";
|
import { debounce } from "shared/utils/debounce";
|
||||||
import { release } from "os";
|
|
||||||
|
|
||||||
import { IpcEvents } from "../shared/IpcEvents";
|
import { IpcEvents } from "../shared/IpcEvents";
|
||||||
import { setBadgeCount } from "./appBadge";
|
import { setBadgeCount } from "./appBadge";
|
||||||
|
@ -44,7 +44,7 @@ ipcMain.on(IpcEvents.GET_VERSION, e => {
|
||||||
|
|
||||||
ipcMain.on(IpcEvents.SUPPORTS_WINDOWS_TRANSPARENCY, e => {
|
ipcMain.on(IpcEvents.SUPPORTS_WINDOWS_TRANSPARENCY, e => {
|
||||||
e.returnValue = process.platform === "win32" && Number(release().split(".").pop()) >= 22621;
|
e.returnValue = process.platform === "win32" && Number(release().split(".").pop()) >= 22621;
|
||||||
})
|
});
|
||||||
|
|
||||||
ipcMain.on(IpcEvents.AUTOSTART_ENABLED, e => {
|
ipcMain.on(IpcEvents.AUTOSTART_ENABLED, e => {
|
||||||
e.returnValue = autoStart.isEnabled();
|
e.returnValue = autoStart.isEnabled();
|
||||||
|
|
|
@ -264,10 +264,10 @@ function createMainWindow() {
|
||||||
frame: VencordSettings.store.frameless !== true,
|
frame: VencordSettings.store.frameless !== true,
|
||||||
...(Settings.store.transparent
|
...(Settings.store.transparent
|
||||||
? {
|
? {
|
||||||
backgroundColor: "#00000000",
|
backgroundColor: "#00000000",
|
||||||
backgroundMaterial: Settings.store.transparencyOption,
|
backgroundMaterial: Settings.store.transparencyOption,
|
||||||
transparent: true
|
transparent: true
|
||||||
}
|
}
|
||||||
: {}),
|
: {}),
|
||||||
...(Settings.store.staticTitle ? { title: "Vencord" } : {}),
|
...(Settings.store.staticTitle ? { title: "Vencord" } : {}),
|
||||||
...(VencordSettings.store.macosTranslucency
|
...(VencordSettings.store.macosTranslucency
|
||||||
|
|
|
@ -98,7 +98,7 @@ export default function SettingsUi() {
|
||||||
</Switch>
|
</Switch>
|
||||||
))}
|
))}
|
||||||
|
|
||||||
{supportsWindowsTransparency &&
|
{supportsWindowsTransparency && (
|
||||||
<>
|
<>
|
||||||
<Switch
|
<Switch
|
||||||
value={Settings.transparent ?? false}
|
value={Settings.transparent ?? false}
|
||||||
|
@ -108,14 +108,23 @@ export default function SettingsUi() {
|
||||||
Enable window transparency
|
Enable window transparency
|
||||||
</Switch>
|
</Switch>
|
||||||
|
|
||||||
<Forms.FormTitle className={Margins.top16 + " " + Margins.bottom8}>Transparency Options</Forms.FormTitle>
|
<Forms.FormTitle className={Margins.top16 + " " + Margins.bottom8}>
|
||||||
|
Transparency Options
|
||||||
|
</Forms.FormTitle>
|
||||||
|
|
||||||
<Select
|
<Select
|
||||||
placeholder="Mica (incorporates system theme + desktop wallpaper to paint the background)"
|
placeholder="Mica (incorporates system theme + desktop wallpaper to paint the background)"
|
||||||
options={[
|
options={[
|
||||||
{ label: "Mica (incorporates system theme + desktop wallpaper to paint the background)", value: "mica", default: true },
|
{
|
||||||
|
label: "Mica (incorporates system theme + desktop wallpaper to paint the background)",
|
||||||
|
value: "mica",
|
||||||
|
default: true
|
||||||
|
},
|
||||||
{ label: "Tabbed (variant of Mica with stronger background tinting)", value: "tabbed" },
|
{ label: "Tabbed (variant of Mica with stronger background tinting)", value: "tabbed" },
|
||||||
{ label: "Acrylic (blurs the window behind Vencord Desktop for a translucent background)", value: "acrylic" }
|
{
|
||||||
|
label: "Acrylic (blurs the window behind Vencord Desktop for a translucent background)",
|
||||||
|
value: "acrylic"
|
||||||
|
}
|
||||||
]}
|
]}
|
||||||
closeOnSelect={true}
|
closeOnSelect={true}
|
||||||
select={v => (Settings.transparencyOption = v)}
|
select={v => (Settings.transparencyOption = v)}
|
||||||
|
@ -126,7 +135,7 @@ export default function SettingsUi() {
|
||||||
|
|
||||||
<Forms.FormDivider className={Margins.top16 + " " + Margins.bottom16} />
|
<Forms.FormDivider className={Margins.top16 + " " + Margins.bottom16} />
|
||||||
</>
|
</>
|
||||||
}
|
)}
|
||||||
|
|
||||||
<Forms.FormTitle>Vencord Location</Forms.FormTitle>
|
<Forms.FormTitle>Vencord Location</Forms.FormTitle>
|
||||||
<Forms.FormText>
|
<Forms.FormText>
|
||||||
|
|
Reference in a new issue