feat(theme): add dedicated popup_import theme section
This commit is contained in:
1 parent
9070bef585
commit
f7349cada3
4 files changed
+171
-119
No files matched your search
@@ -1,8 +1,6 @@
|
||||
use serde::Deserialize;
|
||||
use std::collections::HashMap;
|
||||
|
||||
// --- Modrinth API response types ---
|
||||
|
||||
#[derive(Debug, Clone, Deserialize)]
|
||||
pub struct ProjectInfo {
|
||||
pub id: String,
|
||||
@@ -28,8 +26,6 @@ pub struct VersionFile {
|
||||
pub primary: bool,
|
||||
}
|
||||
|
||||
// --- .mrpack manifest types ---
|
||||
|
||||
#[derive(Debug, Clone, Deserialize)]
|
||||
pub struct MrpackIndex {
|
||||
#[serde(rename = "formatVersion")]
|
||||
@@ -52,8 +48,6 @@ pub struct MrpackFile {
|
||||
pub file_size: u64,
|
||||
}
|
||||
|
||||
// --- URL parsing ---
|
||||
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
pub enum ModrinthInput {
|
||||
ProjectSlug(String),
|
||||
@@ -89,8 +83,6 @@ pub fn parse_input(input: &str) -> ModrinthInput {
|
||||
ModrinthInput::ProjectSlug(input.to_string())
|
||||
}
|
||||
|
||||
// --- Dependency key → ModLoader mapping ---
|
||||
|
||||
use crate::instance::models::ModLoader;
|
||||
|
||||
pub fn loader_from_dependencies(deps: &HashMap<String, String>) -> (Option<ModLoader>, Option<String>) {
|
||||
@@ -112,8 +104,6 @@ pub fn game_version_from_dependencies(deps: &HashMap<String, String>) -> Option<
|
||||
deps.get("minecraft").cloned()
|
||||
}
|
||||
|
||||
// --- API client functions ---
|
||||
|
||||
const API_BASE: &str = "https://api.modrinth.com/v2";
|
||||
|
||||
pub async fn fetch_project(
|
||||
|
||||
@@ -252,6 +252,14 @@ color_default!(default_popup_new_instance_text_fg, Color::White);
|
||||
color_default!(default_popup_new_instance_error_fg, Color::Red);
|
||||
color_default!(default_popup_new_instance_accent_fg, Color::Yellow);
|
||||
|
||||
color_default!(default_popup_import_bg, Color::Rgb(0x1e, 0x1e, 0x1e));
|
||||
color_default!(default_popup_import_border_fg, Color::Rgb(0x71, 0xa5, 0xde));
|
||||
color_default!(default_popup_import_text_fg, Color::White);
|
||||
color_default!(default_popup_import_label_fg, Color::DarkGray);
|
||||
color_default!(default_popup_import_accent_fg, Color::Rgb(0x71, 0xa5, 0xde));
|
||||
color_default!(default_popup_import_cursor_fg, Color::Rgb(0x71, 0xa5, 0xde));
|
||||
color_default!(default_popup_import_placeholder_fg, Color::DarkGray);
|
||||
|
||||
fn default_general_border_type() -> BorderStyle {
|
||||
BorderStyle::Rounded
|
||||
}
|
||||
@@ -745,6 +753,38 @@ impl Default for PopupNewInstanceTheme {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
|
||||
pub struct PopupImportTheme {
|
||||
#[serde(default = "default_popup_import_bg")]
|
||||
pub bg: Color,
|
||||
#[serde(default = "default_popup_import_border_fg")]
|
||||
pub border_fg: Color,
|
||||
#[serde(default = "default_popup_import_text_fg")]
|
||||
pub text_fg: Color,
|
||||
#[serde(default = "default_popup_import_label_fg")]
|
||||
pub label_fg: Color,
|
||||
#[serde(default = "default_popup_import_accent_fg")]
|
||||
pub accent_fg: Color,
|
||||
#[serde(default = "default_popup_import_cursor_fg")]
|
||||
pub cursor_fg: Color,
|
||||
#[serde(default = "default_popup_import_placeholder_fg")]
|
||||
pub placeholder_fg: Color,
|
||||
}
|
||||
|
||||
impl Default for PopupImportTheme {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
bg: default_popup_import_bg(),
|
||||
border_fg: default_popup_import_border_fg(),
|
||||
text_fg: default_popup_import_text_fg(),
|
||||
label_fg: default_popup_import_label_fg(),
|
||||
accent_fg: default_popup_import_accent_fg(),
|
||||
cursor_fg: default_popup_import_cursor_fg(),
|
||||
placeholder_fg: default_popup_import_placeholder_fg(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize, Default)]
|
||||
struct RawGeneralTheme {
|
||||
border_type: Option<String>,
|
||||
@@ -913,6 +953,17 @@ struct RawPopupNewInstanceTheme {
|
||||
accent_fg: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize, Default)]
|
||||
struct RawPopupImportTheme {
|
||||
bg: Option<String>,
|
||||
border_fg: Option<String>,
|
||||
text_fg: Option<String>,
|
||||
label_fg: Option<String>,
|
||||
accent_fg: Option<String>,
|
||||
cursor_fg: Option<String>,
|
||||
placeholder_fg: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize, Default)]
|
||||
struct RawTheme {
|
||||
#[serde(default)]
|
||||
@@ -947,6 +998,8 @@ struct RawTheme {
|
||||
popup_error: RawPopupErrorTheme,
|
||||
#[serde(default)]
|
||||
popup_new_instance: RawPopupNewInstanceTheme,
|
||||
#[serde(default)]
|
||||
popup_import: RawPopupImportTheme,
|
||||
}
|
||||
|
||||
fn resolve_theme(raw: RawTheme) -> Theme {
|
||||
@@ -1248,6 +1301,18 @@ fn resolve_theme(raw: RawTheme) -> Theme {
|
||||
defaults.popup_new_instance.accent_fg,
|
||||
),
|
||||
},
|
||||
popup_import: PopupImportTheme {
|
||||
bg: rc(&raw.popup_import.bg, defaults.popup_import.bg),
|
||||
border_fg: rc(&raw.popup_import.border_fg, defaults.popup_import.border_fg),
|
||||
text_fg: rc(&raw.popup_import.text_fg, defaults.popup_import.text_fg),
|
||||
label_fg: rc(&raw.popup_import.label_fg, defaults.popup_import.label_fg),
|
||||
accent_fg: rc(&raw.popup_import.accent_fg, defaults.popup_import.accent_fg),
|
||||
cursor_fg: rc(&raw.popup_import.cursor_fg, defaults.popup_import.cursor_fg),
|
||||
placeholder_fg: rc(
|
||||
&raw.popup_import.placeholder_fg,
|
||||
defaults.popup_import.placeholder_fg,
|
||||
),
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1311,6 +1376,10 @@ fn default_theme_popup_new_instance() -> PopupNewInstanceTheme {
|
||||
PopupNewInstanceTheme::default()
|
||||
}
|
||||
|
||||
fn default_theme_popup_import() -> PopupImportTheme {
|
||||
PopupImportTheme::default()
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
|
||||
pub struct Theme {
|
||||
#[serde(default = "default_theme_general")]
|
||||
@@ -1343,6 +1412,8 @@ pub struct Theme {
|
||||
pub popup_error: PopupErrorTheme,
|
||||
#[serde(default = "default_theme_popup_new_instance")]
|
||||
pub popup_new_instance: PopupNewInstanceTheme,
|
||||
#[serde(default = "default_theme_popup_import")]
|
||||
pub popup_import: PopupImportTheme,
|
||||
}
|
||||
|
||||
impl Default for Theme {
|
||||
@@ -1363,6 +1434,7 @@ impl Default for Theme {
|
||||
popup_confirm: default_theme_popup_confirm(),
|
||||
popup_error: default_theme_popup_error(),
|
||||
popup_new_instance: default_theme_popup_new_instance(),
|
||||
popup_import: default_theme_popup_import(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -69,8 +69,6 @@ impl ImportWizardState {
|
||||
}
|
||||
}
|
||||
|
||||
// --- Public API ---
|
||||
|
||||
pub fn render(frame: &mut Frame, area: Rect, _focused: FocusedArea) {
|
||||
let snapshot = match IMPORT_STATE.lock() {
|
||||
Ok(state) => state.clone(),
|
||||
@@ -90,8 +88,8 @@ pub fn render(frame: &mut Frame, area: Rect, _focused: FocusedArea) {
|
||||
|
||||
let popup = PopupFrame {
|
||||
title: wizard_title(&snapshot),
|
||||
border_color: THEME.popup_new_instance.border_fg,
|
||||
bg: Some(THEME.popup_new_instance.bg),
|
||||
border_color: THEME.popup_import.border_fg,
|
||||
bg: Some(THEME.popup_import.bg),
|
||||
keybinds: Some(keybinds),
|
||||
search_line,
|
||||
content: Box::new(move |popup_area, buf| {
|
||||
@@ -166,8 +164,6 @@ pub fn take_result() -> Option<ImportResult> {
|
||||
}
|
||||
}
|
||||
|
||||
// --- Step handlers ---
|
||||
|
||||
fn handle_input_key(
|
||||
state: &mut ImportWizardState,
|
||||
key_event: &KeyEvent,
|
||||
@@ -206,7 +202,6 @@ fn handle_version_key(
|
||||
key_event: &KeyEvent,
|
||||
profiles_state: &mut profiles::State,
|
||||
) {
|
||||
// Search mode: route char input to search query
|
||||
if state.version_search.active {
|
||||
match key_event.code {
|
||||
KeyCode::Esc => {
|
||||
@@ -219,12 +214,8 @@ fn handle_version_key(
|
||||
clamp_version_index(state);
|
||||
return;
|
||||
}
|
||||
KeyCode::Char('j') | KeyCode::Down => {
|
||||
// fall through to navigation below
|
||||
}
|
||||
KeyCode::Char('k') | KeyCode::Up => {
|
||||
// fall through to navigation below
|
||||
}
|
||||
KeyCode::Char('j') | KeyCode::Down => {}
|
||||
KeyCode::Char('k') | KeyCode::Up => {}
|
||||
KeyCode::Enter => {
|
||||
state.version_search.active = false;
|
||||
return;
|
||||
@@ -279,7 +270,6 @@ fn handle_confirm_key(
|
||||
match key_event.code {
|
||||
KeyCode::Esc => close_popup(state, profiles_state),
|
||||
KeyCode::Left | KeyCode::Char('h') => {
|
||||
// Go back -- if we had versions, go to Version; otherwise go to Input
|
||||
if matches!(state.versions, LoadState::Loaded(_)) {
|
||||
state.step = ImportStep::Version;
|
||||
} else {
|
||||
@@ -307,7 +297,12 @@ fn handle_confirm_key(
|
||||
}
|
||||
}
|
||||
|
||||
// --- Async resolution ---
|
||||
fn set_error_and_back(state_arc: &Arc<Mutex<ImportWizardState>>, msg: String, step: ImportStep) {
|
||||
push_import_error(msg);
|
||||
if let Ok(mut s) = state_arc.lock() {
|
||||
s.step = step;
|
||||
}
|
||||
}
|
||||
|
||||
fn start_resolve(state: &mut ImportWizardState) {
|
||||
let input_text = state.input.clone();
|
||||
@@ -352,19 +347,17 @@ async fn resolve_project_slug(
|
||||
s.step = ImportStep::Version;
|
||||
}
|
||||
}
|
||||
Err(e) => {
|
||||
if let Ok(mut s) = state_arc.lock() {
|
||||
push_import_error(format!("Failed to fetch versions: {}", e));
|
||||
s.step = ImportStep::Input;
|
||||
}
|
||||
}
|
||||
Err(e) => set_error_and_back(
|
||||
&state_arc,
|
||||
format!("Failed to fetch versions: {}", e),
|
||||
ImportStep::Input,
|
||||
),
|
||||
},
|
||||
Err(e) => {
|
||||
if let Ok(mut s) = state_arc.lock() {
|
||||
push_import_error(format!("Failed to fetch project: {}", e));
|
||||
s.step = ImportStep::Input;
|
||||
}
|
||||
}
|
||||
Err(e) => set_error_and_back(
|
||||
&state_arc,
|
||||
format!("Failed to fetch project: {}", e),
|
||||
ImportStep::Input,
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -378,10 +371,11 @@ async fn resolve_version_id(
|
||||
let meta_dir = crate::config::SETTINGS.paths.resolve_meta_dir();
|
||||
let tmp_dir = meta_dir.join("tmp");
|
||||
if let Err(e) = tokio::fs::create_dir_all(&tmp_dir).await {
|
||||
if let Ok(mut s) = state_arc.lock() {
|
||||
push_import_error(format!("Failed to create tmp dir: {}", e));
|
||||
s.step = ImportStep::Input;
|
||||
}
|
||||
set_error_and_back(
|
||||
&state_arc,
|
||||
format!("Failed to create tmp dir: {}", e),
|
||||
ImportStep::Input,
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -395,35 +389,31 @@ async fn resolve_version_id(
|
||||
s.step = ImportStep::Confirm;
|
||||
}
|
||||
}
|
||||
Err(e) => {
|
||||
if let Ok(mut s) = state_arc.lock() {
|
||||
push_import_error(format!("Failed to build summary: {}", e));
|
||||
s.step = ImportStep::Input;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Err(e) => {
|
||||
if let Ok(mut s) = state_arc.lock() {
|
||||
push_import_error(format!("Failed to parse mrpack: {}", e));
|
||||
s.step = ImportStep::Input;
|
||||
Err(e) => set_error_and_back(
|
||||
&state_arc,
|
||||
format!("Failed to build summary: {}", e),
|
||||
ImportStep::Input,
|
||||
),
|
||||
}
|
||||
}
|
||||
Err(e) => set_error_and_back(
|
||||
&state_arc,
|
||||
format!("Failed to parse mrpack: {}", e),
|
||||
ImportStep::Input,
|
||||
),
|
||||
},
|
||||
Err(e) => {
|
||||
if let Ok(mut s) = state_arc.lock() {
|
||||
push_import_error(format!("Failed to download mrpack: {}", e));
|
||||
s.step = ImportStep::Input;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Err(e) => {
|
||||
if let Ok(mut s) = state_arc.lock() {
|
||||
push_import_error(format!("Failed to fetch version: {}", e));
|
||||
s.step = ImportStep::Input;
|
||||
Err(e) => set_error_and_back(
|
||||
&state_arc,
|
||||
format!("Failed to download mrpack: {}", e),
|
||||
ImportStep::Input,
|
||||
),
|
||||
}
|
||||
}
|
||||
Err(e) => set_error_and_back(
|
||||
&state_arc,
|
||||
format!("Failed to fetch version: {}", e),
|
||||
ImportStep::Input,
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -446,20 +436,18 @@ fn resolve_local_file(state_arc: Arc<Mutex<ImportWizardState>>, path: &str) {
|
||||
s.step = ImportStep::Confirm;
|
||||
}
|
||||
}
|
||||
Err(e) => {
|
||||
if let Ok(mut s) = state_arc.lock() {
|
||||
push_import_error(format!("Failed to build summary: {}", e));
|
||||
s.step = ImportStep::Input;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Err(e) => {
|
||||
if let Ok(mut s) = state_arc.lock() {
|
||||
push_import_error(format!("Failed to parse mrpack: {}", e));
|
||||
s.step = ImportStep::Input;
|
||||
Err(e) => set_error_and_back(
|
||||
&state_arc,
|
||||
format!("Failed to build summary: {}", e),
|
||||
ImportStep::Input,
|
||||
),
|
||||
}
|
||||
}
|
||||
Err(e) => set_error_and_back(
|
||||
&state_arc,
|
||||
format!("Failed to parse mrpack: {}", e),
|
||||
ImportStep::Input,
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -478,10 +466,11 @@ fn start_version_download(state: &mut ImportWizardState) {
|
||||
let meta_dir = crate::config::SETTINGS.paths.resolve_meta_dir();
|
||||
let tmp_dir = meta_dir.join("tmp");
|
||||
if let Err(e) = tokio::fs::create_dir_all(&tmp_dir).await {
|
||||
if let Ok(mut s) = state_arc.lock() {
|
||||
push_import_error(format!("Failed to create tmp dir: {}", e));
|
||||
s.step = ImportStep::Version;
|
||||
}
|
||||
set_error_and_back(
|
||||
&state_arc,
|
||||
format!("Failed to create tmp dir: {}", e),
|
||||
ImportStep::Version,
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -495,33 +484,28 @@ fn start_version_download(state: &mut ImportWizardState) {
|
||||
s.step = ImportStep::Confirm;
|
||||
}
|
||||
}
|
||||
Err(e) => {
|
||||
if let Ok(mut s) = state_arc.lock() {
|
||||
push_import_error(format!("Failed to build summary: {}", e));
|
||||
s.step = ImportStep::Version;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Err(e) => {
|
||||
if let Ok(mut s) = state_arc.lock() {
|
||||
push_import_error(format!("Failed to parse mrpack: {}", e));
|
||||
s.step = ImportStep::Version;
|
||||
Err(e) => set_error_and_back(
|
||||
&state_arc,
|
||||
format!("Failed to build summary: {}", e),
|
||||
ImportStep::Version,
|
||||
),
|
||||
}
|
||||
}
|
||||
Err(e) => set_error_and_back(
|
||||
&state_arc,
|
||||
format!("Failed to parse mrpack: {}", e),
|
||||
ImportStep::Version,
|
||||
),
|
||||
},
|
||||
Err(e) => {
|
||||
if let Ok(mut s) = state_arc.lock() {
|
||||
push_import_error(format!("Failed to download mrpack: {}", e));
|
||||
s.step = ImportStep::Version;
|
||||
}
|
||||
}
|
||||
Err(e) => set_error_and_back(
|
||||
&state_arc,
|
||||
format!("Failed to download mrpack: {}", e),
|
||||
ImportStep::Version,
|
||||
),
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// --- Render helpers ---
|
||||
|
||||
fn render_input_step(
|
||||
state: &ImportWizardState,
|
||||
area: Rect,
|
||||
@@ -530,23 +514,22 @@ fn render_input_step(
|
||||
let chunks = Layout::default()
|
||||
.direction(Direction::Vertical)
|
||||
.constraints([
|
||||
Constraint::Length(1), // input line
|
||||
Constraint::Length(1), // error (only shown if present)
|
||||
Constraint::Min(0), // remaining space
|
||||
Constraint::Length(1),
|
||||
Constraint::Length(1),
|
||||
Constraint::Min(0),
|
||||
])
|
||||
.split(area);
|
||||
|
||||
// Input line with blinking cursor
|
||||
let input_line = if state.input.is_empty() {
|
||||
Line::from(vec![
|
||||
Span::styled(
|
||||
"URL, slug, or .mrpack path...",
|
||||
Style::default().fg(THEME.popup_new_instance.field_inactive_border_fg),
|
||||
Style::default().fg(THEME.popup_import.placeholder_fg),
|
||||
),
|
||||
Span::styled(
|
||||
"\u{2588}",
|
||||
Style::default()
|
||||
.fg(THEME.popup_new_instance.border_fg)
|
||||
.fg(THEME.popup_import.cursor_fg)
|
||||
.add_modifier(Modifier::SLOW_BLINK),
|
||||
),
|
||||
])
|
||||
@@ -554,12 +537,12 @@ fn render_input_step(
|
||||
Line::from(vec![
|
||||
Span::styled(
|
||||
state.input.clone(),
|
||||
Style::default().fg(THEME.popup_new_instance.text_fg),
|
||||
Style::default().fg(THEME.popup_import.text_fg),
|
||||
),
|
||||
Span::styled(
|
||||
"\u{2588}",
|
||||
Style::default()
|
||||
.fg(THEME.popup_new_instance.border_fg)
|
||||
.fg(THEME.popup_import.cursor_fg)
|
||||
.add_modifier(Modifier::SLOW_BLINK),
|
||||
),
|
||||
])
|
||||
@@ -569,7 +552,7 @@ fn render_input_step(
|
||||
|
||||
fn render_fetching_step(area: Rect, buf: &mut ratatui::buffer::Buffer) {
|
||||
Paragraph::new("Fetching modpack info...")
|
||||
.style(Style::default().fg(THEME.popup_new_instance.field_inactive_border_fg))
|
||||
.style(Style::default().fg(THEME.popup_import.placeholder_fg))
|
||||
.render(area, buf);
|
||||
}
|
||||
|
||||
@@ -581,13 +564,13 @@ fn render_version_step(
|
||||
match &state.versions {
|
||||
LoadState::Idle | LoadState::Loading => {
|
||||
Paragraph::new("Loading versions...")
|
||||
.style(Style::default().fg(THEME.popup_new_instance.field_inactive_border_fg))
|
||||
.style(Style::default().fg(THEME.popup_import.placeholder_fg))
|
||||
.render(area, buf);
|
||||
}
|
||||
LoadState::Error(message) => {
|
||||
Paragraph::new(message.as_str())
|
||||
.wrap(Wrap { trim: true })
|
||||
.style(Style::default().fg(THEME.popup_new_instance.error_fg))
|
||||
.style(Style::default().fg(THEME.general.error))
|
||||
.render(area, buf);
|
||||
}
|
||||
LoadState::Loaded(_) => {
|
||||
@@ -598,7 +581,7 @@ fn render_version_step(
|
||||
let loader = version.loaders.first().cloned().unwrap_or_default();
|
||||
ListItem::new(Line::from(Span::styled(
|
||||
format!("{} {} {}", version.version_number, game_ver, loader),
|
||||
Style::default().fg(THEME.popup_new_instance.text_fg),
|
||||
Style::default().fg(THEME.popup_import.text_fg),
|
||||
)))
|
||||
})
|
||||
.collect();
|
||||
@@ -606,7 +589,7 @@ fn render_version_step(
|
||||
let list = List::new(items)
|
||||
.highlight_style(
|
||||
Style::default()
|
||||
.fg(THEME.popup_new_instance.accent_fg)
|
||||
.fg(THEME.popup_import.accent_fg)
|
||||
.add_modifier(Modifier::BOLD),
|
||||
)
|
||||
.highlight_symbol("\u{25b6} ");
|
||||
@@ -626,13 +609,13 @@ fn render_confirm_step(
|
||||
Some(s) => s,
|
||||
None => {
|
||||
Paragraph::new("No summary available")
|
||||
.style(Style::default().fg(THEME.popup_new_instance.field_inactive_border_fg))
|
||||
.style(Style::default().fg(THEME.popup_import.placeholder_fg))
|
||||
.render(area, buf);
|
||||
return;
|
||||
}
|
||||
};
|
||||
|
||||
let label_style = Style::default().fg(THEME.popup_new_instance.border_fg);
|
||||
let label_style = Style::default().fg(THEME.popup_import.label_fg);
|
||||
|
||||
let loader_display = if let Some(ref lv) = summary.loader_version {
|
||||
format!("{} {}", summary.loader, lv)
|
||||
@@ -666,13 +649,11 @@ fn render_confirm_step(
|
||||
Span::raw(format!("{} files", summary.override_count)),
|
||||
]),
|
||||
])
|
||||
.style(Style::default().fg(THEME.popup_new_instance.text_fg))
|
||||
.style(Style::default().fg(THEME.popup_import.text_fg))
|
||||
.wrap(Wrap { trim: true })
|
||||
.render(area, buf);
|
||||
}
|
||||
|
||||
// --- Helpers ---
|
||||
|
||||
fn close_popup(state: &mut ImportWizardState, profiles_state: &mut profiles::State) {
|
||||
state.reset();
|
||||
profiles_state.show_import_popup = false;
|
||||
|
||||
Reference in new issue
Block a user