mirror of
https://github.com/Vencord/Vesktop.git
synced 2026-11-25 19:41:15 -08:00
init super basic recovery ui
This commit is contained in:
7 files changed
+112
-37
No files matched your search
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* Vesktop, a desktop app aiming to give you a snappier Discord Experience
|
||||
* Copyright (c) 2025 Vendicated and Vesktop contributors
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
import { BrowserWindow } from "electron";
|
||||
|
||||
import { loadView } from "./vesktopStatic";
|
||||
|
||||
export function createRecoveryModeWindow() {
|
||||
const width = 650;
|
||||
const height = width * (9 / 16);
|
||||
|
||||
const win = new BrowserWindow({
|
||||
center: true,
|
||||
autoHideMenuBar: true,
|
||||
height,
|
||||
width,
|
||||
resizable: false,
|
||||
webPreferences: {
|
||||
nodeIntegration: true
|
||||
}
|
||||
});
|
||||
|
||||
loadView(win, "recovery.html");
|
||||
}
|
||||
+3
-7
@@ -8,10 +8,10 @@ import { app, BrowserWindow, Menu, Tray } from "electron";
|
||||
|
||||
import { createAboutWindow } from "./about";
|
||||
import { AppEvents } from "./events";
|
||||
import { createRecoveryModeWindow } from "./recoveryMode";
|
||||
import { Settings } from "./settings";
|
||||
import { resolveAssetPath } from "./userAssets";
|
||||
import { clearData } from "./utils/clearData";
|
||||
import { downloadVencordFiles } from "./utils/vencordLoader";
|
||||
|
||||
let tray: Tray;
|
||||
let trayVariant: "tray" | "trayUnread" = "tray";
|
||||
@@ -53,12 +53,8 @@ export async function initTray(win: BrowserWindow, setIsQuitting: (val: boolean)
|
||||
click: createAboutWindow
|
||||
},
|
||||
{
|
||||
label: "Repair Vencord",
|
||||
async click() {
|
||||
await downloadVencordFiles();
|
||||
app.relaunch();
|
||||
app.quit();
|
||||
}
|
||||
label: "Recovery Mode",
|
||||
click: createRecoveryModeWindow
|
||||
},
|
||||
{
|
||||
label: "Reset Vesktop",
|
||||
|
||||
@@ -7,6 +7,9 @@
|
||||
--fg-semi-trans: light-dark(rgb(0 0 0 / 0.2), rgb(255 255 255 / 0.2));
|
||||
--link: light-dark(#006ce7, #00a8fc);
|
||||
--link-hover: light-dark(#005bb5, #0086c3);
|
||||
|
||||
--green: oklab(0.525938 -0.120357 0.0608586);
|
||||
--red: #d22d39;
|
||||
}
|
||||
|
||||
html,
|
||||
@@ -29,4 +32,32 @@ a {
|
||||
|
||||
a:hover {
|
||||
color: var(--link-hover);
|
||||
}
|
||||
|
||||
.button {
|
||||
cursor: pointer;
|
||||
padding: 0.5rem 1rem;
|
||||
font-size: 1.2em;
|
||||
color: var(--fg);
|
||||
border: none;
|
||||
border-radius: 3px;
|
||||
font-weight: bold;
|
||||
transition: filter 0.2 ease-in-out;
|
||||
|
||||
&:hover,
|
||||
&:active {
|
||||
filter: brightness(0.9);
|
||||
}
|
||||
|
||||
&.green {
|
||||
background-color: var(--green);
|
||||
}
|
||||
|
||||
&.grey {
|
||||
background-color: #97979f1f;
|
||||
}
|
||||
|
||||
&.red {
|
||||
background-color: var(--red);
|
||||
}
|
||||
}
|
||||
@@ -90,7 +90,7 @@
|
||||
|
||||
button {
|
||||
padding: 0.6em;
|
||||
background: red;
|
||||
background: var(--red);
|
||||
color: white;
|
||||
border-radius: 6px;
|
||||
border: none;
|
||||
@@ -103,7 +103,7 @@
|
||||
}
|
||||
|
||||
#submit {
|
||||
background: green;
|
||||
background: var(--green);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
<!doctype html>
|
||||
<meta charset="utf-8" />
|
||||
|
||||
<head>
|
||||
<title>Vesktop Recovery Mode</title>
|
||||
|
||||
<link rel="stylesheet" href="./common.css" type="text/css" />
|
||||
|
||||
<style>
|
||||
body {
|
||||
padding: 2em;
|
||||
}
|
||||
|
||||
h1 {
|
||||
text-align: center;
|
||||
margin-bottom: 2em;
|
||||
}
|
||||
|
||||
.red {
|
||||
background-color: var(--red);
|
||||
}
|
||||
|
||||
.buttons {
|
||||
display: grid;
|
||||
gap: 1em;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
margin-inline: auto;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1 id="title">Vesktop Recovery Mode</h1>
|
||||
|
||||
<div class="buttons">
|
||||
<button class="green button">Force Update Vencord</button>
|
||||
<button class="grey button">Disable all Themes</button>
|
||||
<button class="red button">Reset Vencord Settings</button>
|
||||
<button class="red button">Reset Vesktop Settings</button>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
<script>
|
||||
|
||||
</script>
|
||||
@@ -30,9 +30,9 @@
|
||||
|
||||
<footer>
|
||||
<section id="buttons">
|
||||
<button id="update-button" class="green">Install update & restart</button>
|
||||
<button id="later-button" class="grey">Remind me later</button>
|
||||
<button id="ignore-button" class="grey">Ignore this update</button>
|
||||
<button id="update-button" class="green button">Install update & restart</button>
|
||||
<button id="later-button" class="grey button">Remind me later</button>
|
||||
<button id="ignore-button" class="grey button">Ignore this update</button>
|
||||
</section>
|
||||
</footer>
|
||||
|
||||
|
||||
@@ -61,30 +61,6 @@ body {
|
||||
justify-content: end;
|
||||
}
|
||||
|
||||
button {
|
||||
cursor: pointer;
|
||||
padding: 0.5rem 1rem;
|
||||
font-size: 1.2em;
|
||||
color: var(--fg);
|
||||
border: none;
|
||||
border-radius: 3px;
|
||||
font-weight: bold;
|
||||
transition: filter 0.2 ease-in-out;
|
||||
}
|
||||
|
||||
button:hover,
|
||||
button:active {
|
||||
filter: brightness(0.9);
|
||||
}
|
||||
|
||||
.green {
|
||||
background-color: #248046;
|
||||
}
|
||||
|
||||
.grey {
|
||||
background-color: rgba(151, 151, 159, 0.12);
|
||||
}
|
||||
|
||||
.hidden {
|
||||
display: none;
|
||||
}
|
||||
@@ -118,7 +94,7 @@ progress {
|
||||
}
|
||||
|
||||
#error {
|
||||
color: red;
|
||||
color: var(--red);
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user