Add Notification badge
This commit is contained in:
62
static/views/about.html
Normal file
62
static/views/about.html
Normal file
@@ -0,0 +1,62 @@
|
||||
<head>
|
||||
<style>
|
||||
body {
|
||||
padding: 2em;
|
||||
font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell,
|
||||
"Open Sans", "Helvetica Neue", sans-serif;
|
||||
}
|
||||
|
||||
h1 {
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1>Vencord Desktop %VERSION%</h1>
|
||||
<p>
|
||||
Vencord Desktop is a free/libre cross platform desktop app aiming to give you a snappier Discord experience with
|
||||
Vencord pre-installed
|
||||
</p>
|
||||
|
||||
<section>
|
||||
<h2>Links</h2>
|
||||
<ul>
|
||||
<li>
|
||||
<a href="https://vencord.dev" target="_blank">Vencord Website</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://github.com/Vencord/Desktop" target="_blank">Source Code</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://github.com/Vencord/Desktop/issues" target="_blank">Report bugs / Request features</a>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2>Acknowledgements</h2>
|
||||
<p>These awesome libraries empower Vencord Desktop</p>
|
||||
<ul>
|
||||
<li>
|
||||
<a href="https://github.com/electron/electron" target="_blank">Electron</a>
|
||||
- Build cross-platform desktop apps with JavaScript, HTML, and CSS
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://github.com/electron-userland/electron-builder" target="_blank">Electron Builder</a>
|
||||
- A complete solution to package and build a ready for distribution Electron app with “auto update”
|
||||
support out of the box
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://github.com/OpenAsar/arrpc" target="_blank">arrpc</a>
|
||||
- An open implementation of Discord's Rich Presence server
|
||||
</li>
|
||||
<li>
|
||||
And many
|
||||
<a href="https://github.com/Vencord/Desktop/blob/main/pnpm-lock.yaml" target="_blank"
|
||||
>more awesome open source libraries</a
|
||||
>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
</body>
|
||||
194
static/views/first-launch.html
Normal file
194
static/views/first-launch.html
Normal file
@@ -0,0 +1,194 @@
|
||||
<head>
|
||||
<style>
|
||||
:root {
|
||||
--bg: white;
|
||||
--fg: black;
|
||||
--fg-secondary: #313338;
|
||||
--fg-semi-trans: rgb(0 0 0 / 0.2);
|
||||
--link: #006ce7;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
:root {
|
||||
--bg: hsl(223 6.7% 20.6%);
|
||||
--fg: white;
|
||||
--fg-secondary: #b5bac1;
|
||||
--fg-semi-trans: rgb(255 255 255 / 0.2);
|
||||
--link: #00a8fc;
|
||||
}
|
||||
}
|
||||
|
||||
body {
|
||||
height: 100vh;
|
||||
|
||||
font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell,
|
||||
"Open Sans", "Helvetica Neue", sans-serif;
|
||||
margin: 0;
|
||||
padding: 1.5em;
|
||||
padding-bottom: 1em;
|
||||
|
||||
border: 1px solid var(--fg-semi-trans);
|
||||
border-top: none;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body,
|
||||
select {
|
||||
background: var(--bg);
|
||||
color: var(--fg);
|
||||
}
|
||||
|
||||
select {
|
||||
padding: 0.3em;
|
||||
margin: -0.3em;
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin: 0.4em 0 0;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 1em 0 2em;
|
||||
}
|
||||
|
||||
a {
|
||||
color: var(--link);
|
||||
}
|
||||
|
||||
form {
|
||||
display: grid;
|
||||
gap: 1em;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
label {
|
||||
position: relative;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
label:has(input[type="checkbox"]),
|
||||
select {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
label:not(:last-child)::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
bottom: -10px;
|
||||
width: 100%;
|
||||
height: 1px;
|
||||
background-color: var(--fg-secondary);
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
label div {
|
||||
display: grid;
|
||||
gap: 0.2em;
|
||||
}
|
||||
|
||||
label h2 {
|
||||
margin: 0;
|
||||
font-weight: normal;
|
||||
font-size: 1.1rem;
|
||||
line-height: 1rem;
|
||||
}
|
||||
|
||||
label span {
|
||||
font-size: 0.9rem;
|
||||
font-weight: 400;
|
||||
color: var(--fg-secondary);
|
||||
}
|
||||
|
||||
#buttons {
|
||||
display: flex;
|
||||
justify-content: end;
|
||||
gap: 0.5em;
|
||||
margin-top: auto;
|
||||
}
|
||||
|
||||
button {
|
||||
padding: 0.6em;
|
||||
background: red;
|
||||
color: white;
|
||||
border-radius: 6px;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
transition: 200ms filter;
|
||||
}
|
||||
|
||||
button:hover {
|
||||
filter: brightness(0.8);
|
||||
}
|
||||
|
||||
#submit {
|
||||
background: green;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1>Welcome to Vencord Desktop</h1>
|
||||
<p>Let's customise your experience!</p>
|
||||
|
||||
<form>
|
||||
<label>
|
||||
<h2>Discord Branch</h2>
|
||||
<select name="discordBranch">
|
||||
<option value="stable">stable</option>
|
||||
<option value="canary">canary</option>
|
||||
<option value="ptb">ptb</option>
|
||||
</select>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<div>
|
||||
<h2>Start with System</h2>
|
||||
<span>Automatically open Vencord Desktop when your computer starts</span>
|
||||
</div>
|
||||
<input type="checkbox" name="autoStart" />
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<div>
|
||||
<h2>Rich Presence</h2>
|
||||
<span>Enable Rich presence (game activity) via arRPC</span>
|
||||
</div>
|
||||
<input type="checkbox" name="richPresence" checked />
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<div>
|
||||
<h2>Import Settings</h2>
|
||||
<span>Import Settings from existing Vencord install (if found)</span>
|
||||
</div>
|
||||
<input type="checkbox" name="importSettings" checked />
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<div>
|
||||
<h2>Minimise to Tray</h2>
|
||||
<span>Minimise to Tray when closing</span>
|
||||
</div>
|
||||
<input type="checkbox" name="minimizeToTray" checked />
|
||||
</label>
|
||||
</form>
|
||||
<div id="buttons">
|
||||
<button id="cancel">Quit</button>
|
||||
<button id="submit">Submit</button>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
<script>
|
||||
cancel.onclick = () => console.info("cancel");
|
||||
submit.onclick = e => {
|
||||
const form = document.querySelector("form");
|
||||
const formData = new FormData(form);
|
||||
const data = Object.fromEntries(formData.entries());
|
||||
console.info("form:" + JSON.stringify(data));
|
||||
e.preventDefault();
|
||||
};
|
||||
</script>
|
||||
48
static/views/splash.html
Normal file
48
static/views/splash.html
Normal file
@@ -0,0 +1,48 @@
|
||||
<head>
|
||||
<style>
|
||||
* {
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell,
|
||||
"Open Sans", "Helvetica Neue", sans-serif;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.wrapper {
|
||||
box-sizing: border-box;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background-color: hsl(223 6.7% 20.6%);
|
||||
border-radius: 8px;
|
||||
border: 1px solid hsl(220 6.5% 18%);
|
||||
}
|
||||
|
||||
p {
|
||||
color: rgb(219, 222, 225);
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
img {
|
||||
width: 6em;
|
||||
height: 6em;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="wrapper">
|
||||
<img
|
||||
draggable="false"
|
||||
src="https://cdn.discordapp.com/emojis/1024751291504791654.gif?size=512"
|
||||
alt="shiggy"
|
||||
role="presentation"
|
||||
/>
|
||||
<p>Loading Vencord Desktop...</p>
|
||||
</div>
|
||||
</body>
|
||||
115
static/views/updater.html
Normal file
115
static/views/updater.html
Normal file
@@ -0,0 +1,115 @@
|
||||
<head>
|
||||
<style>
|
||||
body {
|
||||
font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell,
|
||||
"Open Sans", "Helvetica Neue", sans-serif;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
color: rgb(219, 222, 225);
|
||||
}
|
||||
|
||||
.wrapper {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
box-sizing: border-box;
|
||||
height: 100%;
|
||||
background-color: #313338;
|
||||
border-radius: 8px;
|
||||
border: 1px solid #248046;
|
||||
padding: 1em;
|
||||
}
|
||||
|
||||
h1 {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.buttons {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: 0.5em;
|
||||
margin-top: 0.25em;
|
||||
}
|
||||
|
||||
button {
|
||||
cursor: pointer;
|
||||
padding: 0.5em;
|
||||
color: white;
|
||||
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;
|
||||
}
|
||||
|
||||
.red {
|
||||
background-color: #ed4245;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="wrapper">
|
||||
<section>
|
||||
<h1>Update Available</h1>
|
||||
<p>There's a new update for Vencord Desktop! Update now to get new fixes and features!</p>
|
||||
<p>
|
||||
Current: <span id="current"></span>
|
||||
<br />
|
||||
Latest: <span id="latest"></span>
|
||||
</p>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<label id="disable-remind">
|
||||
<input type="checkbox" />
|
||||
<span>Do not remind again for </span>
|
||||
</label>
|
||||
|
||||
<div class="buttons">
|
||||
<button name="download" class="green">Download Update</button>
|
||||
<button name="close" class="red">Close</button>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
<script type="module">
|
||||
const data = await Updater.getData();
|
||||
document.getElementById("current").textContent = data.currentVersion;
|
||||
document.getElementById("latest").textContent = data.latestVersion;
|
||||
|
||||
document.querySelector("#disable-remind > span").textContent += data.latestVersion;
|
||||
|
||||
function checkDisableRemind() {
|
||||
const checkbox = document.querySelector("#disable-remind > input");
|
||||
if (checkbox.checked) {
|
||||
Updater.ignore();
|
||||
}
|
||||
}
|
||||
|
||||
const onClicks = {
|
||||
download() {
|
||||
checkDisableRemind();
|
||||
Updater.download();
|
||||
},
|
||||
close() {
|
||||
checkDisableRemind();
|
||||
Updater.close();
|
||||
}
|
||||
};
|
||||
|
||||
for (const name in onClicks) {
|
||||
document.querySelectorAll(`button[name="${name}"]`).forEach(button => {
|
||||
button.addEventListener("click", onClicks[name]);
|
||||
});
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user