init super basic recovery ui

This commit is contained in:
Vendicated committed 2025-12-24 23:34:38 +01:00
1 parent 3b6db23697
commit 11ba2fb3b9
7 files changed
+112 -37

No files matched your search

+27
View File
@@ -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
View File
@@ -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",
+31
View File
@@ -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);
}
}
+2 -2
View File
@@ -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>
+45
View File
@@ -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>
+3 -3
View File
@@ -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>
+1 -25
View File
@@ -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;
}