Create a new app for fitnesstrax and start setting up the record data structures #114
|
@ -976,8 +976,15 @@ name = "fitnesstrax"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"chrono",
|
"chrono",
|
||||||
|
"chrono-tz",
|
||||||
"dimensioned 0.8.0",
|
"dimensioned 0.8.0",
|
||||||
"emseries",
|
"emseries",
|
||||||
|
"gio",
|
||||||
|
"glib",
|
||||||
|
"glib-build-tools 0.18.0",
|
||||||
|
"gtk4",
|
||||||
|
"libadwaita",
|
||||||
|
"tokio",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|
|
@ -5,7 +5,26 @@ edition = "2021"
|
||||||
|
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
|
[lib]
|
||||||
|
name = "fitnesstrax"
|
||||||
|
path = "src/lib.rs"
|
||||||
|
|
||||||
|
[[bin]]
|
||||||
|
name = "fitnesstrax"
|
||||||
|
path = "src/main.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
adw = { version = "0.5", package = "libadwaita", features = [ "v1_2" ] }
|
||||||
chrono = { version = "0.4" }
|
chrono = { version = "0.4" }
|
||||||
dimensioned = {version = "0.8" }
|
chrono-tz = { version = "0.8" }
|
||||||
|
dimensioned = { version = "0.8" }
|
||||||
emseries = { path = "../emseries" }
|
emseries = { path = "../emseries" }
|
||||||
|
gio = { version = "0.18" }
|
||||||
|
glib = { version = "0.18" }
|
||||||
|
gtk = { version = "0.7", package = "gtk4", features = [ "v4_8" ] }
|
||||||
|
tokio = { version = "1.34", features = [ "full" ] }
|
||||||
|
|
||||||
|
[build-dependencies]
|
||||||
|
glib-build-tools = "0.18"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,38 @@
|
||||||
|
use fitnesstrax;
|
||||||
|
use gtk::prelude::*;
|
||||||
|
use std::env;
|
||||||
|
|
||||||
|
struct AppState {}
|
||||||
|
|
||||||
|
struct AppWindow {
|
||||||
|
window: adw::ApplicationWindow,
|
||||||
|
}
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
println!("Hello, world!");
|
println!("Hello, world!");
|
||||||
|
|
||||||
|
let app = adw::Application::builder()
|
||||||
|
.application_id("com.luminescent-dreams.fitnesstrax")
|
||||||
|
.resource_base_path("/com/luminescent-dreams/fitnesstrax")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
/*
|
||||||
|
let runtime = tokio::runtime::Builder::new_multi_thread()
|
||||||
|
.enable_all()
|
||||||
|
.build()
|
||||||
|
.unwrap();
|
||||||
|
*/
|
||||||
|
|
||||||
|
let app = adw::Application::builder()
|
||||||
|
.application_id("com.luminescent-dreams.fitnesstrax")
|
||||||
|
.resource_base_path("/com/luminescent-dreams/fitnesstrax")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
app.connect_activate(move |app| {
|
||||||
|
let window = adw::ApplicationWindow::new(app);
|
||||||
|
window.present();
|
||||||
|
});
|
||||||
|
|
||||||
|
let args: Vec<String> = env::args().collect();
|
||||||
|
ApplicationExtManual::run_with_args(&app, &args);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
use chrono::NaiveDate;
|
||||||
|
use dimensioned::si;
|
||||||
|
use emseries::DateTimeTz;
|
||||||
|
|
||||||
/// SetRep represents workouts like pushups or situps, which involve doing a "set" of a number of
|
/// SetRep represents workouts like pushups or situps, which involve doing a "set" of a number of
|
||||||
/// actions, resting, and then doing another set.
|
/// actions, resting, and then doing another set.
|
||||||
pub struct SetRep {
|
pub struct SetRep {
|
||||||
|
|
Loading…
Reference in New Issue