diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2022-10-27 12:38:02 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2022-10-27 12:38:02 -0700 |
commit | 3b1b394e1651fdc62dcd026a9453017c11e20a2c (patch) | |
tree | 2fb5a328a466472e952d0659a7538019866878ee /adenosine-tauri-gui | |
parent | b169d130ea80f6954b77a2921c50e8587eadd1ae (diff) | |
download | adenosine-3b1b394e1651fdc62dcd026a9453017c11e20a2c.tar.gz adenosine-3b1b394e1651fdc62dcd026a9453017c11e20a2c.zip |
start skeleton of adenosine-tauri-gui crate
Diffstat (limited to 'adenosine-tauri-gui')
22 files changed, 145 insertions, 0 deletions
diff --git a/adenosine-tauri-gui/Cargo.toml b/adenosine-tauri-gui/Cargo.toml new file mode 100644 index 0000000..eb606da --- /dev/null +++ b/adenosine-tauri-gui/Cargo.toml @@ -0,0 +1,39 @@ +[package] +name = "adenosine-tauri-gui" +description = "Simple informal GUI client for AT protocol and bsky.app" +#default-run = "adenosine-tauri-gui" +keywords = ["atproto"] +categories = [] + +# NOTE: these workspace vars are not working with tauri for some reason? +#version.workspace = true +#edition.workspace = true +#rust-version.workspace = true +#authors.workspace = true +#license.workspace = true +#readme.workspace = true +#repository.workspace = true + +version = "0.1.0-dev.0" +edition = "2021" +rust-version = "1.57" +authors = ["Bryan Newbold <bnewbold@robocracy.org>"] +license = "AGPLv3" +readme = "../README.md" +repository = "https://gitlab.com/bnewbold/adenosine" + +[build-dependencies] +tauri-build = { version = "1.1.1", features = [] } + +[dependencies] +serde_json = "1.0" +serde = { version = "1.0", features = ["derive"] } +tauri = { version = "1.1.1", features = ["api-all"] } + +[features] +# by default Tauri runs in production mode +# when `tauri dev` runs it is executed with `cargo run --no-default-features` if `devPath` is an URL +default = [ "custom-protocol" ] +# this feature is used for production builds where `devPath` points to the filesystem +# DO NOT remove this +custom-protocol = [ "tauri/custom-protocol" ] diff --git a/adenosine-tauri-gui/app-icon.png b/adenosine-tauri-gui/app-icon.png Binary files differnew file mode 100644 index 0000000..6c5392a --- /dev/null +++ b/adenosine-tauri-gui/app-icon.png diff --git a/adenosine-tauri-gui/build.rs b/adenosine-tauri-gui/build.rs new file mode 100644 index 0000000..795b9b7 --- /dev/null +++ b/adenosine-tauri-gui/build.rs @@ -0,0 +1,3 @@ +fn main() { + tauri_build::build() +} diff --git a/adenosine-tauri-gui/icons/128x128.png b/adenosine-tauri-gui/icons/128x128.png Binary files differnew file mode 100644 index 0000000..39ea824 --- /dev/null +++ b/adenosine-tauri-gui/icons/128x128.png diff --git a/adenosine-tauri-gui/icons/128x128@2x.png b/adenosine-tauri-gui/icons/128x128@2x.png Binary files differnew file mode 100644 index 0000000..1db3a13 --- /dev/null +++ b/adenosine-tauri-gui/icons/128x128@2x.png diff --git a/adenosine-tauri-gui/icons/32x32.png b/adenosine-tauri-gui/icons/32x32.png Binary files differnew file mode 100644 index 0000000..5be4e16 --- /dev/null +++ b/adenosine-tauri-gui/icons/32x32.png diff --git a/adenosine-tauri-gui/icons/Square107x107Logo.png b/adenosine-tauri-gui/icons/Square107x107Logo.png Binary files differnew file mode 100644 index 0000000..78f731e --- /dev/null +++ b/adenosine-tauri-gui/icons/Square107x107Logo.png diff --git a/adenosine-tauri-gui/icons/Square142x142Logo.png b/adenosine-tauri-gui/icons/Square142x142Logo.png Binary files differnew file mode 100644 index 0000000..3aa1b34 --- /dev/null +++ b/adenosine-tauri-gui/icons/Square142x142Logo.png diff --git a/adenosine-tauri-gui/icons/Square150x150Logo.png b/adenosine-tauri-gui/icons/Square150x150Logo.png Binary files differnew file mode 100644 index 0000000..cb3d33b --- /dev/null +++ b/adenosine-tauri-gui/icons/Square150x150Logo.png diff --git a/adenosine-tauri-gui/icons/Square284x284Logo.png b/adenosine-tauri-gui/icons/Square284x284Logo.png Binary files differnew file mode 100644 index 0000000..b108cbf --- /dev/null +++ b/adenosine-tauri-gui/icons/Square284x284Logo.png diff --git a/adenosine-tauri-gui/icons/Square30x30Logo.png b/adenosine-tauri-gui/icons/Square30x30Logo.png Binary files differnew file mode 100644 index 0000000..608885e --- /dev/null +++ b/adenosine-tauri-gui/icons/Square30x30Logo.png diff --git a/adenosine-tauri-gui/icons/Square310x310Logo.png b/adenosine-tauri-gui/icons/Square310x310Logo.png Binary files differnew file mode 100644 index 0000000..197dedc --- /dev/null +++ b/adenosine-tauri-gui/icons/Square310x310Logo.png diff --git a/adenosine-tauri-gui/icons/Square44x44Logo.png b/adenosine-tauri-gui/icons/Square44x44Logo.png Binary files differnew file mode 100644 index 0000000..29e5067 --- /dev/null +++ b/adenosine-tauri-gui/icons/Square44x44Logo.png diff --git a/adenosine-tauri-gui/icons/Square71x71Logo.png b/adenosine-tauri-gui/icons/Square71x71Logo.png Binary files differnew file mode 100644 index 0000000..9c91219 --- /dev/null +++ b/adenosine-tauri-gui/icons/Square71x71Logo.png diff --git a/adenosine-tauri-gui/icons/Square89x89Logo.png b/adenosine-tauri-gui/icons/Square89x89Logo.png Binary files differnew file mode 100644 index 0000000..92109b0 --- /dev/null +++ b/adenosine-tauri-gui/icons/Square89x89Logo.png diff --git a/adenosine-tauri-gui/icons/StoreLogo.png b/adenosine-tauri-gui/icons/StoreLogo.png Binary files differnew file mode 100644 index 0000000..b9e37be --- /dev/null +++ b/adenosine-tauri-gui/icons/StoreLogo.png diff --git a/adenosine-tauri-gui/icons/icon.icns b/adenosine-tauri-gui/icons/icon.icns Binary files differnew file mode 100644 index 0000000..5454b3a --- /dev/null +++ b/adenosine-tauri-gui/icons/icon.icns diff --git a/adenosine-tauri-gui/icons/icon.ico b/adenosine-tauri-gui/icons/icon.ico Binary files differnew file mode 100644 index 0000000..5770b81 --- /dev/null +++ b/adenosine-tauri-gui/icons/icon.ico diff --git a/adenosine-tauri-gui/icons/icon.png b/adenosine-tauri-gui/icons/icon.png Binary files differnew file mode 100644 index 0000000..4fcb03b --- /dev/null +++ b/adenosine-tauri-gui/icons/icon.png diff --git a/adenosine-tauri-gui/src/main.rs b/adenosine-tauri-gui/src/main.rs new file mode 100644 index 0000000..d0ef258 --- /dev/null +++ b/adenosine-tauri-gui/src/main.rs @@ -0,0 +1,16 @@ +#![cfg_attr( + all(not(debug_assertions), target_os = "windows"), + windows_subsystem = "windows" +)] + +#[tauri::command] +fn greet(name: &str) -> String { + format!("Hello, {}!", name) +} + +fn main() { + tauri::Builder::default() + .invoke_handler(tauri::generate_handler![greet]) + .run(tauri::generate_context!()) + .expect("error while running tauri application"); +} diff --git a/adenosine-tauri-gui/tauri.conf.json b/adenosine-tauri-gui/tauri.conf.json new file mode 100644 index 0000000..b9ba4df --- /dev/null +++ b/adenosine-tauri-gui/tauri.conf.json @@ -0,0 +1,65 @@ +{ + "build": { + "beforeBuildCommand": "", + "beforeDevCommand": "", + "devPath": "web/", + "distDir": "web/" + }, + "package": { + "productName": "adenosine-tauri-gui", + "version": "0.1.0" + }, + "tauri": { + "allowlist": { + "all": true + }, + "bundle": { + "active": true, + "category": "DeveloperTool", + "copyright": "", + "deb": { + "depends": [] + }, + "externalBin": [], + "icon": [ + "icons/32x32.png", + "icons/128x128.png", + "icons/128x128@2x.png", + "icons/icon.icns", + "icons/icon.ico" + ], + "identifier": "com.tauri.dev", + "longDescription": "", + "macOS": { + "entitlements": null, + "exceptionDomain": "", + "frameworks": [], + "providerShortName": null, + "signingIdentity": null + }, + "resources": [], + "shortDescription": "", + "targets": "all", + "windows": { + "certificateThumbprint": null, + "digestAlgorithm": "sha256", + "timestampUrl": "" + } + }, + "security": { + "csp": null + }, + "updater": { + "active": false + }, + "windows": [ + { + "fullscreen": false, + "height": 600, + "resizable": true, + "title": "adenosine", + "width": 800 + } + ] + } +} diff --git a/adenosine-tauri-gui/web/index.html b/adenosine-tauri-gui/web/index.html new file mode 100644 index 0000000..0e227c5 --- /dev/null +++ b/adenosine-tauri-gui/web/index.html @@ -0,0 +1,22 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <meta charset="UTF-8" /> + <meta name="viewport" content="width=device-width, initial-scale=1.0" /> + <title>Document</title> + </head> + <body> + <h1>Welcome from Tauri!</h1> + <script> + // access the pre-bundled global API functions + const invoke = window.__TAURI_INVOKE__ + + // now we can call our Command! + // Right-click the application background and open the developer tools. + // You will see "Hello, World!" printed in the console! + invoke('greet', { name: 'World' }) + // `invoke` returns a Promise + .then((response) => console.log(response)) + </script> + </body> +</html> |