Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified app-icons/dev-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app-icons/release-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1,376 changes: 509 additions & 867 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "keeper-desktop",
"private": true,
"version": "0.2.0",
"version": "0.2.2",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down Expand Up @@ -51,6 +51,6 @@
"tar": "^7.4.3",
"tsx": "^4.19.1",
"typescript": "^5.2.2",
"vite": "^5.4.8"
"vite": "^6.3.2"
}
}
56 changes: 56 additions & 0 deletions public/btcpay.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>BTCPay</title>
<style>
body {
font-family: Arial, sans-serif;
padding: 20px;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
background-color: #f9f9f9;
}
.loader {
border: 16px solid #f3f3f3;
border-top: 16px solid #3498db;
border-radius: 50%;
width: 120px;
height: 120px;
animation: spin 2s linear infinite;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
</style>
</head>
<body>
<div class="loader" id="loader"></div>
<form id="btcpayForm" method="POST" action="" style="display: none;">
<input type="hidden" name="posData" id="posData" value="">
<input type="hidden" name="choiceKey" id="choiceKey" value="">
</form>
<script>
window.addEventListener('DOMContentLoaded', () => {
const urlParams = new URLSearchParams(window.location.search);
const action = urlParams.get('action');
const posData = urlParams.get('posData');
const choiceKey = urlParams.get('choiceKey');

document.getElementById('btcpayForm').action = action;
document.getElementById('posData').value = posData;
document.getElementById('choiceKey').value = choiceKey;

try {
document.getElementById('btcpayForm').submit();
} catch (error) {
console.error('Error submitting form:', error);
}
});
</script>
</body>
</html>
4 changes: 2 additions & 2 deletions src-tauri/Cargo.lock

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

4 changes: 2 additions & 2 deletions src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "keeper-desktop"
version = "0.2.0"
version = "0.2.2"
description = "Bitcoin Keeper Desktop App"
authors = ["Ben Kaufman"]
repository = "https://github.com/bithyve/keeper-desktop"
Expand All @@ -12,7 +12,7 @@ edition = "2021"
tauri-build = { version = "1", features = [] }

[dependencies]
tauri = { version = "1", features = [ "shell-sidecar", "process-command-api", "shell-open"] }
tauri = { version = "1", features = [ "window-create", "shell-sidecar", "process-command-api", "shell-open"] }
tokio = { version = "1", features = ["time"] }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
Expand Down
Binary file modified src-tauri/icons/128x128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-tauri/icons/128x128@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-tauri/icons/32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-tauri/icons/Square107x107Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-tauri/icons/Square142x142Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-tauri/icons/Square150x150Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-tauri/icons/Square284x284Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-tauri/icons/Square30x30Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-tauri/icons/Square310x310Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-tauri/icons/Square44x44Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-tauri/icons/Square71x71Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-tauri/icons/Square89x89Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-tauri/icons/StoreLogo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-tauri/icons/icon.icns
Binary file not shown.
Binary file modified src-tauri/icons/icon.ico
Binary file not shown.
Binary file modified src-tauri/icons/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions src-tauri/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ pub struct AppStateInner {
hwi: Option<HWIClientState>,
}

#[cfg(not(feature = "release"))]
static ENV: &str = "dev";

#[cfg(feature = "release")]
static ENV: &str = "prod";

// ==================== Channel Commands ====================

#[tauri::command]
Expand Down Expand Up @@ -487,6 +493,11 @@ fn check_udev_rules() -> Result<bool, String> {
Ok(udev_file.exists())
}

#[tauri::command]
fn get_environment() -> String {
ENV.into()
}

fn main() {
env_logger::init();
tauri::Builder::default()
Expand Down Expand Up @@ -524,6 +535,7 @@ fn main() {
hwi_send_pin,
hwi_prompt_pin,
async_hwi_enumerate,
get_environment,
])
.run(tauri::generate_context!())
.expect("error while running tauri application");
Expand Down
7 changes: 5 additions & 2 deletions src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
},
"package": {
"productName": "Keeper Desktop (Dev)",
"version": "0.2.0"
"version": "0.2.2"
},
"tauri": {
"allowlist": {
Expand All @@ -23,6 +23,9 @@
],
"all": false,
"open": true
},
"window": {
"create": true
}
},
"windows": [
Expand All @@ -35,7 +38,7 @@
}
],
"security": {
"csp": "default-src 'none'; script-src 'self'; style-src 'self'; img-src 'self' data: 'unsafe-inline'; font-src 'self'; connect-src 'self'; object-src 'none'; base-uri 'self'; form-action 'self'; require-trusted-types-for 'script';"
"csp": "default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; font-src 'self'; connect-src 'self' https://btcpay0.voltageapp.io https://testnet.demo.btcpayserver.org https://bithyve-dev-relay.el.r.appspot.com; object-src 'none'; base-uri 'self'; form-action 'self' https://btcpay0.voltageapp.io https://testnet.demo.btcpayserver.org; frame-ancestors 'self';"
},
"bundle": {
"active": true,
Expand Down
7 changes: 5 additions & 2 deletions src-tauri/tauri.release.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"package": {
"productName": "Keeper Desktop",
"version": "0.2.0"
"version": "0.2.2"
},
"tauri": {
"allowlist": {
Expand All @@ -24,6 +24,9 @@
],
"all": false,
"open": true
},
"window": {
"create": true
}
},
"windows": [
Expand All @@ -36,7 +39,7 @@
}
],
"security": {
"csp": "default-src 'none'; script-src 'self'; style-src 'self'; img-src 'self' data: 'unsafe-inline'; font-src 'self'; connect-src 'self'; object-src 'none'; base-uri 'self'; form-action 'self'; require-trusted-types-for 'script';"
"csp": "default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; font-src 'self'; connect-src 'self' https://btcpay0.voltageapp.io https://keeper-relay.uc.r.appspot.com; object-src 'none'; base-uri 'self'; form-action 'self' https://btcpay0.voltageapp.io; frame-ancestors 'self';"
},
"bundle": {
"active": true,
Expand Down
21 changes: 14 additions & 7 deletions src/assets/bithyve-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/assets/close-btn.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading