Skip to content

Commit

Permalink
feat: ✨ changes
Browse files Browse the repository at this point in the history
  • Loading branch information
dfrnoch committed Dec 13, 2023
1 parent 1151981 commit 52d4366
Show file tree
Hide file tree
Showing 12 changed files with 232 additions and 61 deletions.
Binary file modified bun.lockb
Binary file not shown.
13 changes: 3 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@solid-primitives/context": "^0.2.1",
"@solid-primitives/i18n": "^2",
"@solid-primitives/storage": "^2.1.1",
"@solidjs/router": "^0.9.1",
"@solidjs/router": "^0.10",
"@tauri-apps/api": "2.0.0-alpha.12",
"@tauri-apps/plugin-autostart": "github:tauri-apps/tauri-plugin-autostart#v2",
"@tauri-apps/plugin-clipboard-manager": "github:tauri-apps/tauri-plugin-clipboard-manager#v2",
Expand All @@ -27,6 +27,7 @@
"@tauri-apps/plugin-process": "github:tauri-apps/tauri-plugin-process#v2",
"@tauri-apps/plugin-store": "github:tauri-apps/tauri-plugin-store#v2",
"@tauri-apps/plugin-updater": "github:tauri-apps/tauri-plugin-updater#v2",
"@tauri-apps/plugin-shell": "github:tauri-apps/tauri-plugin-shell#v2",
"@unocss/reset": "^0.58.0",
"solid-chartjs": "^1.3.8",
"solid-headless": "^0.13.1",
Expand All @@ -41,16 +42,8 @@
"@unocss/preset-uno": "^0.58.0",
"@unocss/transformer-variant-group": "^0.58.0",
"@unocss/vite": "^0.58.0",
"autoprefixer": "^10.4",
"postcss": "^8.4",
"tailwindcss": "^3",
"typescript": "^5.3",
"vite": "5",
"vite-plugin-solid": "^2.7.2"
},
"overrides": {
"vite-plugin-solid": {
"vite": "^5.0.0"
}
"vite-plugin-solid": "^2.8"
}
}
106 changes: 90 additions & 16 deletions src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ tauri-plugin-fs = { git = "https://github.com/tauri-apps/plugins-workspace", bra
tauri-plugin-clipboard-manager = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
tauri-plugin-process = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
tauri-plugin-os = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
tauri-plugin-shell = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
tauri-plugin-store = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
pretty_env_logger = "0.5.0"
log = "0.4"
Expand Down
6 changes: 4 additions & 2 deletions src-tauri/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,12 @@ async fn get_company(
#[derive(Deserialize)]
struct CreateCompanyData {
name: String,
cin: Option<String>,
}

// #[specta::specta]
#[tauri::command]
async fn create_post(client: DbState<'_>, data: CreateCompanyData) -> Result<test::Data, ()> {
async fn create_company(client: DbState<'_>, data: CreateCompanyData) -> Result<test::Data, ()> {
client
.test()
.create(data.name, vec![])
Expand Down Expand Up @@ -130,6 +131,7 @@ async fn main() {
.plugin(tauri_plugin_fs::init())
.plugin(tauri_plugin_clipboard_manager::init())
.plugin(tauri_plugin_process::init())
.plugin(tauri_plugin_shell::init())
.plugin(tauri_plugin_os::init())
.plugin(tauri_plugin_store::Builder::default().build())
.setup(|app| {
Expand All @@ -150,7 +152,7 @@ async fn main() {
check_db,
get_company,
migrate_and_populate,
create_post,
create_company,
])
.manage(Arc::new(client))
.run(tauri::generate_context!())
Expand Down
11 changes: 9 additions & 2 deletions src/i18n/dict/cs.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,16 @@
"setup": {
"welcome": "Vítejte",
"get_started": "Začít",

"continue": "Pokračovat",
"step1": {
"create_company": "Pojďme vytvořit firmu"
"select_language": "Vyberte jazyk",
"select_currency": "Vyberte měnu",
"improve": "Pomozte nám zlepšit"
},
"step2": {
"create_company": "Pojďme vytvořit firmu",
"company_name": "Název firmy / podnikatele",
"CIN": "IČO"
}
},
"sidebar": {
Expand Down
11 changes: 9 additions & 2 deletions src/i18n/dict/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,16 @@
"setup": {
"welcome": "Welcome to the app",
"get_started": "Get started",

"continue": "Continue",
"step1": {
"create_company": "Let's create your company"
"select_language": "Select your language",
"select_currency": "Select your currency",
"improve": "Help us improve"
},
"step2": {
"create_company": "Let's create your company",
"company_name": "Company name",
"CIN": "CIN"
}
},
"sidebar": {
Expand Down
10 changes: 1 addition & 9 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import "@unocss/reset/tailwind-compat.css";
import "uno.css";

import { render } from "solid-js/web";
import { Router } from "@solidjs/router";

import App from "./App";
import { Theme, getTheme, setTheme } from "./utils/theme";
Expand All @@ -14,11 +13,4 @@ window
.matchMedia("(prefers-color-scheme: light)")
.addEventListener("change", (e) => e.matches && setTheme(Theme.Light));

render(
() => (
<Router>
<App />
</Router>
),
document.getElementById("root") as HTMLElement,
);
render(() => <App />, document.getElementById("root") as HTMLElement);
Loading

0 comments on commit 52d4366

Please sign in to comment.