giving up on tauri but saving the minimal progress i have just in case
@ -1,24 +1,26 @@
|
||||
# Logs
|
||||
logs
|
||||
*.log
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
pnpm-debug.log*
|
||||
lerna-debug.log*
|
||||
tauri-project/logs
|
||||
tauri-project/*.log
|
||||
tauri-project/npm-debug.log*
|
||||
tauri-project/yarn-debug.log*
|
||||
tauri-project/yarn-error.log*
|
||||
tauri-project/pnpm-debug.log*
|
||||
tauri-project/lerna-debug.log*
|
||||
|
||||
node_modules
|
||||
dist
|
||||
dist-ssr
|
||||
*.local
|
||||
tauri-project/node_modules
|
||||
tauri-project/dist
|
||||
tauri-project/dist-ssr
|
||||
tauri-project/*.local
|
||||
|
||||
# Editor directories and files
|
||||
.vscode/*
|
||||
!.vscode/extensions.json
|
||||
.idea
|
||||
.DS_Store
|
||||
*.suo
|
||||
*.ntvs*
|
||||
*.njsproj
|
||||
*.sln
|
||||
*.sw?
|
||||
tauri-project/.vscode/*
|
||||
tauri-project/!.vscode/extensions.json
|
||||
tauri-project/.idea
|
||||
tauri-project/.DS_Store
|
||||
tauri-project/*.suo
|
||||
tauri-project/*.ntvs*
|
||||
tauri-project/*.njsproj
|
||||
tauri-project/*.sln
|
||||
tauri-project/*.sw?
|
||||
|
||||
NONGfisher/target
|
||||
|
@ -1,3 +0,0 @@
|
||||
{
|
||||
"recommendations": ["tauri-apps.tauri-vscode", "rust-lang.rust-analyzer"]
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
[package]
|
||||
name = "nong_fisher"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
eframe = "0.22.0"
|
||||
notify = "6.1.1"
|
||||
serde = { version = "1.0.186", features = ["derive"] }
|
||||
serde_json = "1.0.105"
|
||||
ureq = "2.7.1"
|
@ -0,0 +1,96 @@
|
||||
#![allow(dead_code)]
|
||||
use eframe::{
|
||||
egui::{CentralPanel, Context, Layout, TextFormat},
|
||||
emath::Align,
|
||||
epaint::{text::LayoutJob, Color32, FontId},
|
||||
Frame,
|
||||
};
|
||||
use serde::Deserialize;
|
||||
|
||||
#[derive(Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
struct SfhSong {
|
||||
song_name: String,
|
||||
file: Option<String>,
|
||||
is_mashup: bool,
|
||||
name: String,
|
||||
#[serde(rename = "$key")]
|
||||
key: String,
|
||||
name_lowercase: String,
|
||||
state: String,
|
||||
#[serde(rename = "songID")]
|
||||
song_id: String,
|
||||
song_name_lowercase: String,
|
||||
#[serde(rename = "ytVideoID")]
|
||||
yt_video_id: String,
|
||||
level_name_mobile: String,
|
||||
song_name_mobile: String,
|
||||
download_url: String,
|
||||
song_name_caps: String,
|
||||
level_name_caps: String,
|
||||
#[serde(rename = "songURL")]
|
||||
song_url: String,
|
||||
}
|
||||
|
||||
#[derive(Deserialize)]
|
||||
struct SfhResponse {
|
||||
status: i32,
|
||||
songs: Vec<SfhSong>,
|
||||
}
|
||||
|
||||
enum App {
|
||||
IdSelect { search_string: String },
|
||||
}
|
||||
|
||||
impl App {
|
||||
fn new() -> Self {
|
||||
Self::IdSelect {
|
||||
search_string: String::new(),
|
||||
}
|
||||
}
|
||||
|
||||
fn update(&mut self, ctx: &Context, frame: &mut Frame) {
|
||||
let mut title_text = LayoutJob::default();
|
||||
title_text.append(
|
||||
"NONG",
|
||||
0.0,
|
||||
TextFormat {
|
||||
color: Color32::from_rgb(0xff, 0x80, 0x00),
|
||||
font_id: FontId::new(48.0, Default::default()),
|
||||
..Default::default()
|
||||
},
|
||||
);
|
||||
title_text.append(
|
||||
"fisher",
|
||||
0.0,
|
||||
TextFormat {
|
||||
color: Color32::from_rgb(0x60, 0x80, 0xd0),
|
||||
font_id: FontId::new(48.0, Default::default()),
|
||||
..Default::default()
|
||||
},
|
||||
);
|
||||
|
||||
|
||||
CentralPanel::default().show(ctx, |ui| {
|
||||
ui.with_layout(Layout::top_down(Align::Center), |ui| {
|
||||
ui.label(title_text);
|
||||
|
||||
match self {
|
||||
Self::IdSelect { search_string } => {
|
||||
ui.horizontal(|ui| {
|
||||
ui.text_edit_singleline(search_string);
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {
|
||||
let mut app = App::new();
|
||||
eframe::run_simple_native("NONGfisher", Default::default(), move |ctx, frame| {
|
||||
app.update(ctx, frame)
|
||||
})
|
||||
.unwrap();
|
||||
}
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 6.8 KiB After Width: | Height: | Size: 6.8 KiB |
Before Width: | Height: | Size: 974 B After Width: | Height: | Size: 974 B |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.8 KiB |
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 7.6 KiB After Width: | Height: | Size: 7.6 KiB |
Before Width: | Height: | Size: 903 B After Width: | Height: | Size: 903 B |
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 8.4 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 85 KiB After Width: | Height: | Size: 85 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |