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
|
||||
* 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
|
||||
* 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",
|
||||
"version": "0.4.6",
|
||||
"version": "0.4.7",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "vite build",
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "creddy"
|
||||
version = "0.4.6"
|
||||
version = "0.4.7"
|
||||
description = "A friendly AWS credentials manager"
|
||||
authors = ["Joseph Montanaro"]
|
||||
license = ""
|
||||
|
@ -223,7 +223,7 @@ pub enum GetSessionError {
|
||||
EmptyResponse, // SDK returned successfully but credentials are None
|
||||
#[error("Error response from AWS SDK: {0}")]
|
||||
SdkError(#[from] AwsSdkError<GetSessionTokenError>),
|
||||
#[error("Could not construt session: credentials are locked")]
|
||||
#[error("Could not construct session: credentials are locked")]
|
||||
CredentialsLocked,
|
||||
#[error("Could not construct session: no credentials are known")]
|
||||
CredentialsEmpty,
|
||||
|
@ -8,7 +8,7 @@
|
||||
},
|
||||
"package": {
|
||||
"productName": "creddy",
|
||||
"version": "0.4.6"
|
||||
"version": "0.4.7"
|
||||
},
|
||||
"tauri": {
|
||||
"allowlist": {
|
||||
|
@ -22,7 +22,7 @@ listen('credentials-request', (tauriEvent) => {
|
||||
listen('request-cancelled', (tauriEvent) => {
|
||||
const id = tauriEvent.payload;
|
||||
if (id === $appState.currentRequest?.id) {
|
||||
cleanupRequest()
|
||||
cleanupRequest();
|
||||
}
|
||||
else {
|
||||
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
|
||||
async function deny() {
|
||||
$appState.currentRequest.response = {approval: 'Denied', base: false};
|
||||
|
@ -55,7 +55,14 @@
|
||||
|
||||
function cancel() {
|
||||
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(() => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user