Fix release build colors and avoid unnecessary install elevation

This commit is contained in:
2026-10-06 21:01:44 -05:00
parent 56b357fb3a
commit 2d723d9151
4 changed files with 25 additions and 12 deletions
@@ -647,7 +647,7 @@ fn render_orchestration_providers(
let checkbox = appearance.ui_builder() let checkbox = appearance.ui_builder()
.checkbox(view.all_providers_checkbox.clone(), Some(14.)) .checkbox(view.all_providers_checkbox.clone(), Some(14.))
.with_label(Span::new("All providers", Default::default())) .with_label(Span::new("All providers", Default::default()))
.with_label_style(UiComponentStyles { font_color: Some(appearance.theme().active_ui_text_color()), ..Default::default() }) .with_label_style(UiComponentStyles { font_color: Some(appearance.theme().active_ui_text_color().into()), ..Default::default() })
.check(all) .check(all)
.build() .build()
.on_click(move |ctx, _, _| { .on_click(move |ctx, _, _| {
@@ -671,7 +671,7 @@ fn render_orchestration_providers(
let checkbox = appearance.ui_builder() let checkbox = appearance.ui_builder()
.checkbox(state.clone(), Some(14.)) .checkbox(state.clone(), Some(14.))
.with_label(Span::new(name.clone(), Default::default())) .with_label(Span::new(name.clone(), Default::default()))
.with_label_style(UiComponentStyles { font_color: Some(appearance.theme().active_ui_text_color()), ..Default::default() }) .with_label_style(UiComponentStyles { font_color: Some(appearance.theme().active_ui_text_color().into()), ..Default::default() })
.check(included) .check(included)
.build() .build()
.on_click(move |ctx, _, _| { .on_click(move |ctx, _, _| {
@@ -4,6 +4,7 @@ use pathfinder_geometry::vector::{vec2f, Vector2F};
use super::util::{scroll_clipped_scrollable_handle_with_delta, scroll_delta_for_axis}; use super::util::{scroll_clipped_scrollable_handle_with_delta, scroll_delta_for_axis};
use super::{NewScrollableElement, SingleAxisConfig}; use super::{NewScrollableElement, SingleAxisConfig};
use crate::elements::new_scrollable::util::child_constraint_for_axis; use crate::elements::new_scrollable::util::child_constraint_for_axis;
#[cfg(debug_assertions)]
use crate::elements::new_scrollable::ScrollableAxis; use crate::elements::new_scrollable::ScrollableAxis;
use crate::elements::{ use crate::elements::{
Axis, ClippedScrollStateHandle, ScrollData, ScrollStateHandle, ScrollTarget, SelectableElement, Axis, ClippedScrollStateHandle, ScrollData, ScrollStateHandle, ScrollTarget, SelectableElement,
@@ -2,7 +2,9 @@ use pathfinder_geometry::rect::RectF;
use pathfinder_geometry::vector::Vector2F; use pathfinder_geometry::vector::Vector2F;
use super::util::{scroll_clipped_scrollable_handle_with_delta, scroll_delta_for_axis}; use super::util::{scroll_clipped_scrollable_handle_with_delta, scroll_delta_for_axis};
use super::{NewScrollableElement, ScrollableAxis}; use super::NewScrollableElement;
#[cfg(debug_assertions)]
use super::ScrollableAxis;
use crate::elements::new_scrollable::util::child_constraint_for_axis; use crate::elements::new_scrollable::util::child_constraint_for_axis;
use crate::elements::{ use crate::elements::{
Axis, ClippedScrollStateHandle, F32Ext, ScrollData, ScrollStateHandle, ScrollTarget, Axis, ClippedScrollStateHandle, F32Ext, ScrollData, ScrollStateHandle, ScrollTarget,
@@ -237,18 +237,28 @@ function App() {
await stopApp("Galaxy", (line) => appendLog(3, line)); await stopApp("Galaxy", (line) => appendLog(3, line));
appendLog(3, "Administrator password required to install in /Applications"); let needsAdministrator = false;
await runCommandStreaming( try {
"sudo -k && sudo -v", fs.accessSync(path.dirname(destPath), fs.constants.W_OK);
WORKSPACE_ROOT, if (fs.existsSync(destPath)) fs.accessSync(destPath, fs.constants.W_OK);
(line) => appendLog(3, line), } catch {
true needsAdministrator = true;
); }
const installPrefix = needsAdministrator ? "sudo -n " : "";
if (needsAdministrator) {
appendLog(3, "Administrator password required to install in /Applications");
await runCommandStreaming(
"sudo -v",
WORKSPACE_ROOT,
(line) => appendLog(3, line),
true
);
}
if (fs.existsSync(destPath)) { if (fs.existsSync(destPath)) {
appendLog(3, `Removing existing ${destPath}`); appendLog(3, `Removing existing ${destPath}`);
await runCommandStreaming( await runCommandStreaming(
`sudo -n rm -rf "${destPath}"`, `${installPrefix}rm -rf "${destPath}"`,
WORKSPACE_ROOT, WORKSPACE_ROOT,
(line) => appendLog(3, line) (line) => appendLog(3, line)
); );
@@ -256,7 +266,7 @@ function App() {
appendLog(3, `Copying ${appPath} → ${destPath}`); appendLog(3, `Copying ${appPath} → ${destPath}`);
await runCommandStreaming( await runCommandStreaming(
`sudo -n ditto "${appPath}" "${destPath}"`, `${installPrefix}ditto "${appPath}" "${destPath}"`,
WORKSPACE_ROOT, WORKSPACE_ROOT,
(line) => appendLog(3, line) (line) => appendLog(3, line)
); );