return to Approve screen after cancelling unlock during request approval
This commit is contained in:
parent
87617a0726
commit
64a2927b94
@ -21,3 +21,4 @@
|
|||||||
* Make hotkey configuration a little more tolerant of slight mistiming
|
* Make hotkey configuration a little more tolerant of slight mistiming
|
||||||
* Distinguish between request that was denied and request that was canceled (e.g. due to error)
|
* Distinguish between request that was denied and request that was canceled (e.g. due to error)
|
||||||
* Use atomic types for primitive state values instead of RwLock'd types
|
* Use atomic types for primitive state values instead of RwLock'd types
|
||||||
|
* Rework approval flow to be a fullscreen overlay instead of mixing with normal navigation (as more views are added the pain of the current situation will only increase)
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "creddy",
|
"name": "creddy",
|
||||||
"version": "0.4.6",
|
"version": "0.4.7",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
"build": "vite build",
|
"build": "vite build",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "creddy"
|
name = "creddy"
|
||||||
version = "0.4.6"
|
version = "0.4.7"
|
||||||
description = "A friendly AWS credentials manager"
|
description = "A friendly AWS credentials manager"
|
||||||
authors = ["Joseph Montanaro"]
|
authors = ["Joseph Montanaro"]
|
||||||
license = ""
|
license = ""
|
||||||
|
@ -223,7 +223,7 @@ pub enum GetSessionError {
|
|||||||
EmptyResponse, // SDK returned successfully but credentials are None
|
EmptyResponse, // SDK returned successfully but credentials are None
|
||||||
#[error("Error response from AWS SDK: {0}")]
|
#[error("Error response from AWS SDK: {0}")]
|
||||||
SdkError(#[from] AwsSdkError<GetSessionTokenError>),
|
SdkError(#[from] AwsSdkError<GetSessionTokenError>),
|
||||||
#[error("Could not construt session: credentials are locked")]
|
#[error("Could not construct session: credentials are locked")]
|
||||||
CredentialsLocked,
|
CredentialsLocked,
|
||||||
#[error("Could not construct session: no credentials are known")]
|
#[error("Could not construct session: no credentials are known")]
|
||||||
CredentialsEmpty,
|
CredentialsEmpty,
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
},
|
},
|
||||||
"package": {
|
"package": {
|
||||||
"productName": "creddy",
|
"productName": "creddy",
|
||||||
"version": "0.4.6"
|
"version": "0.4.7"
|
||||||
},
|
},
|
||||||
"tauri": {
|
"tauri": {
|
||||||
"allowlist": {
|
"allowlist": {
|
||||||
|
@ -22,7 +22,7 @@ listen('credentials-request', (tauriEvent) => {
|
|||||||
listen('request-cancelled', (tauriEvent) => {
|
listen('request-cancelled', (tauriEvent) => {
|
||||||
const id = tauriEvent.payload;
|
const id = tauriEvent.payload;
|
||||||
if (id === $appState.currentRequest?.id) {
|
if (id === $appState.currentRequest?.id) {
|
||||||
cleanupRequest()
|
cleanupRequest();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
const found = $appState.pendingRequests.find_remove(r => r.id === id);
|
const found = $appState.pendingRequests.find_remove(r => r.id === id);
|
||||||
|
@ -43,13 +43,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function approve_base() {
|
|
||||||
approve(true);
|
|
||||||
}
|
|
||||||
function approve_session() {
|
|
||||||
approve(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Denial has only one
|
// Denial has only one
|
||||||
async function deny() {
|
async function deny() {
|
||||||
$appState.currentRequest.response = {approval: 'Denied', base: false};
|
$appState.currentRequest.response = {approval: 'Denied', base: false};
|
||||||
|
@ -55,7 +55,14 @@
|
|||||||
|
|
||||||
function cancel() {
|
function cancel() {
|
||||||
emit('credentials-event', 'unlock-canceled');
|
emit('credentials-event', 'unlock-canceled');
|
||||||
navigate('Home');
|
if ($appState.currentRequest !== null) {
|
||||||
|
// dirty hack to prevent spurious error when returning to approve screen
|
||||||
|
delete $appState.currentRequest.response;
|
||||||
|
navigate('Approve');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
navigate('Home');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onMount(() => {
|
onMount(() => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user