Skip to content

Commit

Permalink
Merge pull request #119 from Concordium/company-gui
Browse files Browse the repository at this point in the history
Fix save file extension on Windows
  • Loading branch information
lassemoldrup authored Nov 22, 2023
2 parents 75df48b + 697ad48 commit 10c73d8
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion company-id-gui/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "company-id-gui",
"private": true,
"version": "1.0.0",
"version": "1.0.1",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
2 changes: 1 addition & 1 deletion company-id-gui/src-tauri/Cargo.lock

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

2 changes: 1 addition & 1 deletion company-id-gui/src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "company-id-gui"
version = "1.0.0"
version = "1.0.1"
description = "Concordium Company ID GUI"
authors = ["Concordium <developers@concordium.com>"]
license = "Apache-2.0"
Expand Down
8 changes: 6 additions & 2 deletions company-id-gui/src-tauri/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ async fn set_node_and_network(
return Err(Error::NotCaughtUp);
}

* state.node.lock().await = Some(client);
*state.node.lock().await = Some(client);
*state.net.lock().await = Some(net);

Ok(())
Expand Down Expand Up @@ -254,7 +254,8 @@ async fn save_request_file(state: tauri::State<'_, State>, net: Net) -> Result<(

let mut file_builder = FileDialogBuilder::new()
.set_file_name("request.json")
.set_title("Save request file");
.set_title("Save request file")
.add_filter("JSON", &["json"]);
if let Ok(cd) = std::env::current_dir() {
file_builder = file_builder.set_directory(cd);
} else {
Expand Down Expand Up @@ -440,6 +441,7 @@ async fn create_account(
let Some(path) = FileDialogBuilder::new()
.set_file_name("account-keys.json")
.set_title("Save account key file")
.add_filter("JSON", &["json"])
.save_file()
else {
return Ok(account);
Expand Down Expand Up @@ -590,6 +592,7 @@ async fn save_keys(
let Some(path) = FileDialogBuilder::new()
.set_file_name("account-keys.json")
.set_title("Save account key file")
.add_filter("JSON", &["json"])
.save_file()
else {
return Ok(());
Expand Down Expand Up @@ -720,6 +723,7 @@ async fn generate_recovery_request(
let Some(path) = FileDialogBuilder::new()
.set_file_name("recovery-request.json")
.set_title("Save recovery request file")
.add_filter("JSON", &["json"])
.save_file()
else {
return Ok(());
Expand Down

0 comments on commit 10c73d8

Please sign in to comment.