dashboard + a bit of adding. dashboard doesn't show actual data

This commit is contained in:
2026-06-27 17:33:36 -05:00
parent ea1819f96c
commit c9a7a4bdca
14 changed files with 707 additions and 9 deletions
+3 -3
View File
@@ -1,6 +1,6 @@
use diesel::prelude::*;
#[derive(Queryable, Selectable)]
#[derive(Queryable, Selectable, Debug)]
#[diesel(table_name = crate::db::schema::app)]
#[diesel(check_for_backend(diesel::sqlite::Sqlite))]
pub struct App {
@@ -11,7 +11,7 @@ pub struct App {
pub ssh_address: Option<String>, // default to normal address
}
#[derive(Queryable, Selectable)]
#[derive(Queryable, Selectable, Debug)]
#[diesel(table_name = crate::db::schema::blog)]
#[diesel(check_for_backend(diesel::sqlite::Sqlite))]
pub struct Blog {
@@ -21,7 +21,7 @@ pub struct Blog {
pub reference: Option<String>, // uuid
}
#[derive(Queryable, Selectable)]
#[derive(Queryable, Selectable, Debug)]
#[diesel(table_name = crate::db::schema::identities)]
#[diesel(check_for_backend(diesel::sqlite::Sqlite))]
pub struct Identity {
+19 -4
View File
@@ -1,16 +1,31 @@
use db::models::App;
use uuid::Uuid;
mod db;
// Learn more about Tauri commands at https://tauri.app/develop/calling-rust/
#[tauri::command]
fn greet(name: &str) -> String {
format!("Hello, {}! You've been greeted from Rust!", name)
fn new_app(
name: String,
address: String,
description: Option<String>,
ssh_address: Option<String>,
) {
let uuid = Uuid::new_v4();
let app = App {
id: uuid.to_string(),
name,
description,
address,
ssh_address,
};
println!("{:#?}", app);
}
#[cfg_attr(mobile, tauri::mobile_entry_point)]
pub fn run() {
tauri::Builder::default()
.plugin(tauri_plugin_opener::init())
.invoke_handler(tauri::generate_handler![greet])
.invoke_handler(tauri::generate_handler![new_app])
.run(tauri::generate_context!())
.expect("error while running tauri application");
}