Development Branch on new Machine

This commit is contained in:
brotoskyj
2024-12-24 16:25:56 -05:00
commit db5ad6351a
31 changed files with 6341 additions and 0 deletions
+7
View File
@@ -0,0 +1,7 @@
# Generated by Cargo
# will have compiled files and executables
/target/
# Generated by Tauri
# will have schema files for capabilities auto-completion
/gen/schemas
+3808
View File
File diff suppressed because it is too large Load Diff
+21
View File
@@ -0,0 +1,21 @@
[package]
name = "champ"
version = "2024.10.1"
description = "Central Helpdesk Application and Management Platform"
authors = ["James Brotosky, Joe Linnemeier"]
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[build-dependencies]
tauri-build = { version = "1", features = [] }
[dependencies]
tauri = { version = "1", features = ["shell-open"] }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
azul = "0.1.0"
[features]
# This feature is used for production builds or when a dev server is not specified, DO NOT REMOVE!!
custom-protocol = ["tauri/custom-protocol"]
+3
View File
@@ -0,0 +1,3 @@
fn main() {
tauri_build::build()
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 974 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 903 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

+51
View File
@@ -0,0 +1,51 @@
use azul::prelude::*;
use azul::str::String as AzString;
use azul::widgets::{Button, Label};
struct DataModel {
counter: usize,
}
extern "C" fn myLayoutFunc(
data: &mut RefAny,
_: &mut LayoutCallbackInfo
) -> StyledDom {
let counter = match data.downcast_ref::<DataModel>() {
Some(d) => format!("{}", d.counter),
None => return StyledDom::default(),
};
let mut label = Dom::text(counter.into());
label.set_inline_style("font-size: 50px");
let mut button = Button::new("Update counter".into());
button.set_on_click(data.clone(), myOnClick);
let mut button = button.dom();
button.set_inline_style("flex-grow: 1");
Dom::body()
.with_child(label)
.with_child(button)
.style(Css::empty())
}
extern "C"
fn myOnClick(data: &mut RefAny, _: &mut CallbackInfo) -> Update {
let mut data = match data.downcast_mut::<DataModel>() {
Some(s) => s,
None => return Update::DoNothing, // error
};
data.counter += 1;
Update::RefreshDom
}
fn main() {
let data = DataModel { counter: 0 };
let config = AppConfig::new(LayoutSolver::Default);
let app = App::new(RefAny::new(data), config);
let window = WindowCreateOptions::new(myLayoutFunc);
app.run(window);
}
+42
View File
@@ -0,0 +1,42 @@
{
"build": {
"devPath": "../src",
"distDir": "../src",
"withGlobalTauri": true
},
"package": {
"productName": "champ",
"version": "0.0.0"
},
"tauri": {
"allowlist": {
"all": false,
"shell": {
"all": false,
"open": true
}
},
"windows": [
{
"title": "champ",
"width": 800,
"height": 600
}
],
"security": {
"csp": null
},
"bundle": {
"active": true,
"targets": "all",
"identifier": "com.tauri.dev",
"icon": [
"icons/32x32.png",
"icons/128x128.png",
"icons/128x128@2x.png",
"icons/icon.icns",
"icons/icon.ico"
]
}
}
}