Skip to content

Commit a64a453

Browse files
authored
Merge pull request #52 from KunalSin9h/issues
Issues
2 parents e593569 + 03fc394 commit a64a453

9 files changed

Lines changed: 227 additions & 213 deletions

File tree

.husky/pre-commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33

44

55
# For checking version validity and showing the current version
6-
go run scripts/secops.go version
6+
go run scripts/secops.go version

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@
2525
"devDependencies": {
2626
"@tauri-apps/cli": "^1.5.6",
2727
"@types/node": "^20.8.10",
28-
"@types/react": "^18.2.33",
28+
"@types/react": "^18.2.34",
2929
"@types/react-dom": "^18.2.14",
3030
"@typescript-eslint/eslint-plugin": "^6.9.1",
31-
"@vitejs/plugin-react": "^4.1.0",
31+
"@vitejs/plugin-react": "^4.1.1",
3232
"autoprefixer": "^10.4.16",
3333
"eslint": "^8.52.0",
3434
"eslint-config-prettier": "^9.0.0",
@@ -58,5 +58,5 @@
5858
"preview": "vite preview",
5959
"tauri": "tauri"
6060
},
61-
"version": "0.13.0"
61+
"version": "0.13.1"
6262
}

pnpm-lock.yaml

Lines changed: 188 additions & 188 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src-tauri/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src-tauri/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ edition = '2021'
3535
license = 'MIT'
3636
name = 'secops'
3737
repository = 'https://github.com/kunalsin9h/secops'
38-
version = '0.13.0'
38+
version = '0.13.1'
3939

4040
[profile]
4141
[profile.ci]

src-tauri/src/core/app.rs

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
use std::path::PathBuf;
2+
use std::process::exit;
23
use std::sync::Mutex;
34
use tauri::{Manager, Window};
45

@@ -10,15 +11,24 @@ pub struct Application {
1011
#[tauri::command]
1112
pub async fn close_loading(window: Window) {
1213
// Close loading splashscreen
13-
window
14-
.get_window("loading")
15-
.expect("no window labeled 'loading' found")
16-
.close()
17-
.unwrap();
14+
match window.get_window("loading") {
15+
Some(frame) => {
16+
if let Err(e) = frame.close() {
17+
log::error!("{}", e);
18+
}
19+
}
20+
None => log::warn!("no window labeled 'loading' found, maybe the app is reloaded"),
21+
};
22+
1823
// Show main window
19-
window
20-
.get_window("main")
21-
.expect("no window labeled 'main' found")
22-
.show()
23-
.unwrap();
24+
match window.get_window("main") {
25+
Some(frame) => {
26+
if let Err(e) = frame.show() {
27+
log::error!("{}", e);
28+
log::info!("Exiting...");
29+
exit(1);
30+
}
31+
}
32+
None => log::warn!("no window labeled 'main' found"),
33+
};
2434
}

src-tauri/tauri.conf.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
},
99
"package": {
1010
"productName": "Secops",
11-
"version": "0.13.0"
11+
"version": "0.13.1"
1212
},
1313
"tauri": {
1414
"allowlist": {

src/components/Header/ExportCommit.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,13 +109,13 @@ function CommitBox({
109109
>
110110
<div
111111
className={`${
112-
status ? "bg-green-100" : "bg-green-200"
112+
status ? "bg-green-100" : "bg-green-300"
113113
} text-black
114114
hover:bg-green-500/50
115115
px-3 py-2 rounded-md `}
116116
>
117117
<span className="text-xs uppercase font-bold">
118-
{status ? "All Good" : "Commit"}
118+
{status ? "All Good" : "Commit..."}
119119
</span>
120120
</div>
121121
</DialogTrigger>
@@ -174,7 +174,7 @@ function RevertBox({
174174
{states.map((value, index) => (
175175
<div
176176
key={index}
177-
className="flex flex-col gap-4 px-4 xl:px-8 my-4 xl:my-8"
177+
className="flex flex-col gap-2 px-4 xl:px-8 my-4 xl:my-8 border-t pt-2 xl:pt-4"
178178
>
179179
<span className="text-md font-bold">{value.message}</span>
180180
<div className="flex gap-4 items-center">

src/components/Header/Import.tsx

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ function Import() {
5959
<div>
6060
<div
6161
className={`h-36 w-full p-4 flex justify-center items-center rounded-xl border border-2 ${
62-
selectedFile ? "border-green-200" : ""
62+
selectedFile ? "border-green-400 border-dashed border-4" : ""
6363
}`}
6464
>
6565
<div className="flex flex-col gap-4 items-center">
@@ -93,7 +93,9 @@ function Import() {
9393
</div>
9494
<div className="mt-4">
9595
<Button
96-
className={`${processing ? "opacity-60 cursor-wait" : ""}`}
96+
className={`${
97+
processing ? "opacity-60 cursor-wait pointer-events-none" : ""
98+
}`}
9799
variant={"default"}
98100
onClick={async (e) => {
99101
e.preventDefault();
@@ -102,10 +104,12 @@ function Import() {
102104
toastError(
103105
"Commit the current settings first before applying new settings!",
104106
);
107+
setProcessing(false);
105108
return;
106109
}
107110
if (!selectedFile) {
108111
toastError("No file selected");
112+
setProcessing(false);
109113
return;
110114
}
111115

@@ -115,13 +119,13 @@ function Import() {
115119
title: "Settings Imported successfully",
116120
desc: "Reload the window to update UI",
117121
});
118-
} catch (err) {
119-
toastError(err);
122+
} catch (e) {
123+
toastError(e);
120124
}
121125
setProcessing(false);
122126
}}
123127
>
124-
{processing ? "Applying" : "Apply"}
128+
{processing ? "Applying..." : "Apply"}
125129
</Button>
126130
</div>
127131
</div>

0 commit comments

Comments
 (0)