Skip to content

Commit fd4ebbc

Browse files
committed
fix: polish build workflow
1 parent c6f123f commit fd4ebbc

7 files changed

Lines changed: 61 additions & 16 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "veskforge",
33
"private": true,
4-
"version": "0.1.14",
4+
"version": "0.1.15",
55
"description": "Unofficial custom Vencord build manager for Vesktop.",
66
"license": "MIT",
77
"type": "module",

src-tauri/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src-tauri/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "veskforge"
3-
version = "0.1.14"
3+
version = "0.1.15"
44
description = "Unofficial custom Vencord build manager for Vesktop."
55
authors = ["Microck"]
66
license = "MIT"

src-tauri/src/lib.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
use serde::{Deserialize, Serialize};
22
use serde_json::{json, Value};
3+
#[cfg(windows)]
4+
use std::os::windows::process::CommandExt;
35
use std::{
46
env,
57
ffi::{OsStr, OsString},
@@ -21,6 +23,8 @@ const REQUIRED_DIST_FILES: [&str; 4] = [
2123
const PLUGIN_ENTRYPOINT_FILES: [&str; 4] = ["index.ts", "index.tsx", "index.js", "index.jsx"];
2224
const PLUGIN_FILE_EXTENSIONS: [&str; 4] = ["ts", "tsx", "js", "jsx"];
2325
const BETTERDISCORD_PLUGIN_SUFFIX: &str = ".plugin.js";
26+
#[cfg(windows)]
27+
const CREATE_NO_WINDOW: u32 = 0x08000000;
2428
const IGNORED_PLUGIN_DISCOVERY_DIRS: [&str; 8] = [
2529
".git",
2630
"node_modules",
@@ -621,10 +625,19 @@ fn resolve_program(program: &str) -> Option<PathBuf> {
621625
.find(|candidate| candidate.is_file())
622626
}
623627

628+
#[cfg(windows)]
629+
fn hide_subprocess_window(command: &mut Command) {
630+
command.creation_flags(CREATE_NO_WINDOW);
631+
}
632+
633+
#[cfg(not(windows))]
634+
fn hide_subprocess_window(_command: &mut Command) {}
635+
624636
fn run_command(program: &str, args: &[&str], cwd: Option<&Path>) -> Result<String, String> {
625637
let resolved_program = resolve_program(program).unwrap_or_else(|| PathBuf::from(program));
626638
let mut command = Command::new(resolved_program);
627639
command.args(args);
640+
hide_subprocess_window(&mut command);
628641
if let Some(path) = command_path_env() {
629642
command.env("PATH", path);
630643
}

src-tauri/tauri.conf.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "https://schema.tauri.app/config/2",
33
"productName": "Veskforge",
4-
"version": "0.1.14",
4+
"version": "0.1.15",
55
"identifier": "dev.micr.veskforge",
66
"build": {
77
"beforeDevCommand": "pnpm dev",

src/App.css

Lines changed: 35 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,24 @@ select {
256256
background: rgba(236, 118, 151, 0.42);
257257
}
258258

259+
.build-view {
260+
overflow-y: scroll;
261+
padding: 34px 44px 28px 40px;
262+
}
263+
264+
.build-view .view-header {
265+
margin-bottom: 18px;
266+
}
267+
268+
.build-view .view-header h1 {
269+
font-size: 31px;
270+
}
271+
272+
.build-view .view-header span {
273+
margin-top: 10px;
274+
font-size: 15px;
275+
}
276+
259277
.view-header {
260278
margin-bottom: 22px;
261279
}
@@ -599,19 +617,19 @@ button:disabled {
599617
display: inline-grid;
600618
grid-template-columns: auto auto auto;
601619
width: fit-content;
602-
min-height: 48px;
620+
min-height: 43px;
603621
align-items: center;
604-
margin-bottom: 24px;
622+
margin-bottom: 18px;
605623
color: #b8c0ce;
606-
font-size: 14px;
624+
font-size: 13px;
607625
}
608626

609627
.build-summary > div {
610628
display: flex;
611629
align-items: center;
612-
gap: 14px;
630+
gap: 12px;
613631
border-right: 1px solid var(--line);
614-
padding: 0 24px 0 18px;
632+
padding: 0 20px 0 16px;
615633
}
616634

617635
.build-summary > div:last-child {
@@ -625,17 +643,22 @@ button:disabled {
625643

626644
.build-actions {
627645
display: grid;
628-
grid-template-columns: auto auto auto minmax(0, 1fr);
646+
grid-template-columns: auto auto auto auto minmax(0, 1fr);
629647
align-items: center;
630-
gap: 22px;
631-
margin-bottom: 24px;
648+
gap: 14px;
649+
margin-bottom: 18px;
632650
}
633651

634652
.build-now {
635653
justify-self: start;
636654
min-width: 170px;
637655
}
638656

657+
.update-build {
658+
width: 46px;
659+
padding: 0;
660+
}
661+
639662
.status-pill {
640663
display: inline-flex;
641664
min-height: 36px;
@@ -675,7 +698,7 @@ button:disabled {
675698
}
676699

677700
.data-section {
678-
margin-bottom: 22px;
701+
margin-bottom: 16px;
679702
}
680703

681704
.data-section h3,
@@ -689,13 +712,13 @@ button:disabled {
689712
}
690713

691714
.data-section h3 {
692-
margin-bottom: 13px;
715+
margin-bottom: 10px;
693716
}
694717

695718
.key-value {
696719
display: grid;
697720
grid-template-columns: minmax(150px, 0.7fr) minmax(0, 1.4fr);
698-
min-height: 50px;
721+
min-height: 45px;
699722
align-items: center;
700723
border-bottom: 1px solid var(--line);
701724
padding: 0 24px;
@@ -760,7 +783,7 @@ button:disabled {
760783

761784
.activity-log {
762785
font-family: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
763-
max-height: 260px;
786+
max-height: 238px;
764787
overflow-y: auto;
765788
overflow-x: hidden;
766789
}

src/App.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -548,6 +548,15 @@ function App() {
548548
</div>
549549

550550
<div className="build-actions">
551+
<button
552+
className="secondary update-build"
553+
disabled={!canBuild}
554+
onClick={() => runAction("Updating patched build", () => invoke("build_vencord"))}
555+
title="Update managed Vencord and build with enabled plugin sources"
556+
aria-label="Update patched build"
557+
>
558+
<ArrowClockwise size={22} />
559+
</button>
551560
<button className="primary build-now" disabled={!canBuild} onClick={() => runAction("Building Vencord", () => invoke("build_vencord"))}>
552561
<Play size={25} weight="regular" />
553562
Build now

0 commit comments

Comments
 (0)