init: tauri

This commit is contained in:
Mylloon 2024-05-23 19:43:44 +02:00
commit f23a7fc58c
Signed by: Anri
GPG key ID: A82D63DFF8D1317F
12 changed files with 3877 additions and 0 deletions

1
README.md Normal file
View file

@ -0,0 +1 @@
# xtoyr

1
src-tauri/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
/target/

3752
src-tauri/Cargo.lock generated Normal file

File diff suppressed because it is too large Load diff

20
src-tauri/Cargo.toml Normal file
View file

@ -0,0 +1,20 @@
[package]
name = "xtoyr"
version = "0.0.1"
description = "Write french words"
authors = ["Mylloon"]
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"
[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
src-tauri/build.rs Normal file
View file

@ -0,0 +1,3 @@
fn main() {
tauri_build::build()
}

BIN
src-tauri/icons/icon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

BIN
src-tauri/icons/icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

8
src-tauri/src/main.rs Normal file
View file

@ -0,0 +1,8 @@
// Prevents additional console window on Windows in release
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
fn main() {
tauri::Builder::default()
.run(tauri::generate_context!())
.expect("error while running tauri application");
}

36
src-tauri/tauri.conf.json Normal file
View file

@ -0,0 +1,36 @@
{
"build": {
"devPath": "../src",
"distDir": "../src",
"withGlobalTauri": true
},
"package": {
"productName": "xtoyr",
"version": "0.0.1"
},
"tauri": {
"allowlist": {
"all": false,
"shell": {
"all": false,
"open": true
}
},
"windows": [
{
"title": "xtoyr",
"width": 1280,
"height": 720
}
],
"security": {
"csp": null
},
"bundle": {
"active": true,
"targets": "all",
"identifier": "fr.mylloon",
"icon": ["icons/icon.png", "icons/icon.ico"]
}
}
}

16
src/index.html Normal file
View file

@ -0,0 +1,16 @@
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8" />
<link rel="stylesheet" href="styles.css" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>xtoyr</title>
<script type="module" src="/main.js" defer></script>
</head>
<body>
<h1>xtoyr</h1>
<p>Salut la team.</p>
</body>
</html>

3
src/main.js Normal file
View file

@ -0,0 +1,3 @@
const { invoke } = window.__TAURI__.tauri;
window.addEventListener("DOMContentLoaded", () => {});

37
src/styles.css Normal file
View file

@ -0,0 +1,37 @@
:root {
font-family: Inter, Avenir, Helvetica, Arial, sans-serif;
font-size: 16px;
line-height: 24px;
font-weight: 400;
color: #0f0f0f;
background-color: #f6f6f6;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
}
a {
font-weight: 500;
color: #646cff;
text-decoration: inherit;
}
a:hover {
color: #535bf2;
}
h1 {
text-align: center;
}
@media (prefers-color-scheme: dark) {
:root {
color: #f6f6f6;
background-color: #2f2f2f;
}
a:hover {
color: #24c8db;
}
}