Import legacy data. Show welcome screen when no database is configured. #198

Merged
savanni merged 4 commits from fitnesstrax/legacy-importer into main 2024-02-19 21:45:39 +00:00
2 changed files with 5 additions and 6 deletions
Showing only changes of commit 1c2f40c868 - Show all commits

View File

@ -25,8 +25,7 @@ mod views;
use adw::prelude::*; use adw::prelude::*;
use app_window::AppWindow; use app_window::AppWindow;
use components::ActionGroup; use gio::ActionEntry;
use gio::{Action, ActionEntry};
use std::{env, path::PathBuf}; use std::{env, path::PathBuf};
const APP_ID_DEV: &str = "com.luminescent-dreams.fitnesstrax.dev"; const APP_ID_DEV: &str = "com.luminescent-dreams.fitnesstrax.dev";
@ -81,7 +80,7 @@ fn main() {
let icon_theme = gtk::IconTheme::for_display(&gdk::Display::default().unwrap()); let icon_theme = gtk::IconTheme::for_display(&gdk::Display::default().unwrap());
icon_theme.add_resource_path(&(RESOURCE_BASE_PATH.to_owned() + "/icons/scalable/actions")); icon_theme.add_resource_path(&(RESOURCE_BASE_PATH.to_owned() + "/icons/scalable/actions"));
setup_app_close_action(&adw_app); setup_app_close_action(adw_app);
AppWindow::new(app_id, RESOURCE_BASE_PATH, adw_app, ft_app.clone()); AppWindow::new(app_id, RESOURCE_BASE_PATH, adw_app, ft_app.clone());
}); });

View File

@ -2,7 +2,7 @@ mod legacy;
mod types; mod types;
pub use types::{ pub use types::{
SetRep, SetRepActivity, Steps, TimeDistance, TimeDistanceActivity, TraxRecord, Weight, DurationWorkout, DurationWorkoutActivity, SetRep, SetRepActivity, Steps, TimeDistance,
DurationWorkoutActivity, DurationWorkout, TimeDistanceActivity, TraxRecord, Weight, DURATION_WORKOUT_ACTIVITIES, SET_REP_ACTIVITIES,
SET_REP_ACTIVITIES, TIME_DISTANCE_ACTIVITIES, TIME_DISTANCE_ACTIVITIES,
}; };