mirror of
https://github.com/tonytins/amtkstat.git
synced 2026-02-10 12:54:47 -05:00
Initial migration to Tauri 2.0
- Updated package.json with project metadata and moves dependencies to devDependencies. - Adds .editorconfig for consistent code style - Updated VSCode and .NET project settings for improved development workflow.
This commit is contained in:
parent
81799106f8
commit
2cd45c4a6c
13 changed files with 1243 additions and 664 deletions
12
.editorconfig
Normal file
12
.editorconfig
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
# EditorConfig is awesome: https://EditorConfig.org
|
||||||
|
|
||||||
|
# top-most EditorConfig file
|
||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
indent_style = tab
|
||||||
|
# indent_size = 4
|
||||||
|
end_of_line = lf
|
||||||
|
charset = utf-8
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
insert_final_newline = false
|
||||||
8
.vscode/tasks.json
vendored
8
.vscode/tasks.json
vendored
|
|
@ -41,9 +41,7 @@
|
||||||
"type": "cargo",
|
"type": "cargo",
|
||||||
"command": "tauri",
|
"command": "tauri",
|
||||||
"isBackground": true,
|
"isBackground": true,
|
||||||
"args": [
|
"args": ["dev"],
|
||||||
"dev"
|
|
||||||
],
|
|
||||||
"group": "build",
|
"group": "build",
|
||||||
"label": "tauri dev"
|
"label": "tauri dev"
|
||||||
},
|
},
|
||||||
|
|
@ -51,9 +49,7 @@
|
||||||
"type": "cargo",
|
"type": "cargo",
|
||||||
"command": "tauri",
|
"command": "tauri",
|
||||||
"isBackground": true,
|
"isBackground": true,
|
||||||
"args": [
|
"args": ["build"],
|
||||||
"build"
|
|
||||||
],
|
|
||||||
"group": "build",
|
"group": "build",
|
||||||
"label": "tauri build"
|
"label": "tauri build"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
10
README.md
10
README.md
|
|
@ -1,4 +1,4 @@
|
||||||
<img title="" src="./assets/banner.svg" alt="" data-align="center" width="718">
|
<img title="" src="assets/banner.svg" alt="" data-align="center" width="718">
|
||||||
|
|
||||||
Amtrak Status Boards, or AMTK Status, is a desktop front-end for accessing Dixieland Software's [station status boards](https://dixielandsoftware.net/Amtrak/solari/).
|
Amtrak Status Boards, or AMTK Status, is a desktop front-end for accessing Dixieland Software's [station status boards](https://dixielandsoftware.net/Amtrak/solari/).
|
||||||
|
|
||||||
|
|
@ -7,10 +7,10 @@ Amtrak Status Boards, or AMTK Status, is a desktop front-end for accessing Dixie
|
||||||
## 🗓️ Update Cycle
|
## 🗓️ Update Cycle
|
||||||
|
|
||||||
| Type | Frequency |
|
| Type | Frequency |
|
||||||
| ------------ | -------------------- |
|
| ----- | -------------------- |
|
||||||
| Minor Update | Every 3–6 months |
|
| Minor | Every 3–6 months |
|
||||||
| Patch Update | Monthly or as needed |
|
| Patch | Monthly or as needed |
|
||||||
| Major Update | As needed |
|
| Major | As needed |
|
||||||
|
|
||||||
## 🖥️ Platform Support
|
## 🖥️ Platform Support
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,12 @@
|
||||||
{
|
{
|
||||||
"dependencies": {
|
"name": "amtkstat",
|
||||||
|
"private": true,
|
||||||
|
"version": "0.1.0",
|
||||||
|
"type": "module",
|
||||||
|
"scripts": {
|
||||||
|
"tauri": "tauri"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
"@tauri-apps/cli": "^2.1.0",
|
"@tauri-apps/cli": "^2.1.0",
|
||||||
"@tauri-apps/plugin-shell": "~2"
|
"@tauri-apps/plugin-shell": "~2"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
1560
src-tauri/Cargo.lock
generated
1560
src-tauri/Cargo.lock
generated
File diff suppressed because it is too large
Load diff
|
|
@ -7,16 +7,19 @@ 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]
|
||||||
|
# The `_lib` suffix may seem redundant but it is necessary
|
||||||
|
# to make the lib name unique and wouldn't conflict with the bin name.
|
||||||
|
# This seems to be only an issue on Windows, see https://github.com/rust-lang/cargo/issues/8519
|
||||||
|
name = "entries_lib"
|
||||||
|
crate-type = ["staticlib", "cdylib", "rlib"]
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
tauri-build = { version = "2", features = [] }
|
tauri-build = { version = "2", features = [] }
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
tauri = { version = "2", features = [] }
|
tauri = { version = "2", features = [] }
|
||||||
|
tauri-plugin-opener = "2"
|
||||||
serde = { version = "1", features = ["derive"] }
|
serde = { version = "1", features = ["derive"] }
|
||||||
serde_json = "1"
|
serde_json = "1"
|
||||||
webbrowser = "1.0.2"
|
|
||||||
tauri-plugin-shell = "2"
|
|
||||||
|
|
||||||
[features]
|
|
||||||
# This feature is used for production builds or when a dev server is not specified, DO NOT REMOVE!!
|
|
||||||
custom-protocol = ["tauri/custom-protocol"]
|
|
||||||
|
|
|
||||||
33
src-tauri/src/lib.rs
Normal file
33
src-tauri/src/lib.rs
Normal file
|
|
@ -0,0 +1,33 @@
|
||||||
|
// Learn more about Tauri commands at https://tauri.app/develop/calling-rust/
|
||||||
|
use webbrowser;
|
||||||
|
// use tauri::menu::MenuBuilder;
|
||||||
|
|
||||||
|
#[tauri::command]
|
||||||
|
fn open_browser(address: &str) {
|
||||||
|
webbrowser::open(address).expect("Failed to open defualt browser.");
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg_attr(mobile, tauri::mobile_entry_point)]
|
||||||
|
fn main() {
|
||||||
|
tauri::Builder::default()
|
||||||
|
.plugin(tauri_plugin_shell::init())
|
||||||
|
.invoke_handler(tauri::generate_handler![open_browser])
|
||||||
|
.setup(|app| {
|
||||||
|
// TODO: Redo menu bar to return to home screen
|
||||||
|
/**
|
||||||
|
let menu = MenuBuilder::new(app)
|
||||||
|
.text("open", "Open")
|
||||||
|
.text("close", "Close")
|
||||||
|
.check("check_item", "Check Item")
|
||||||
|
.separator()
|
||||||
|
.text("disabled_item", "Disabled Item")
|
||||||
|
.text("status", "Status: Processing...")
|
||||||
|
.build()?;
|
||||||
|
|
||||||
|
app.set_menu(menu.clone())?;
|
||||||
|
**/
|
||||||
|
Ok(())
|
||||||
|
})
|
||||||
|
.run(tauri::generate_context!())
|
||||||
|
.expect("error while running tauri application");
|
||||||
|
}
|
||||||
|
|
@ -1,16 +1,6 @@
|
||||||
// Prevents additional console window on Windows in release, DO NOT REMOVE!!
|
// Prevents additional console window on Windows in release, DO NOT REMOVE!!
|
||||||
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
|
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
|
||||||
use webbrowser;
|
|
||||||
|
|
||||||
#[tauri::command]
|
|
||||||
fn open_browser(address: &str) {
|
|
||||||
webbrowser::open(address).expect("Failed to open defualt browser.");
|
|
||||||
}
|
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
tauri::Builder::default()
|
entries_lib::run()
|
||||||
.plugin(tauri_plugin_shell::init())
|
|
||||||
.invoke_handler(tauri::generate_handler![open_browser])
|
|
||||||
.run(tauri::generate_context!())
|
|
||||||
.expect("error while running tauri application");
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">
|
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net8.0</TargetFramework>
|
<TargetFramework>net10.0</TargetFramework>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue