Skip to content

Commit

Permalink
fix(ui): Pre-release bug fix 2 (#712)
Browse files Browse the repository at this point in the history
* fix: bug 1

* fix: archive button cut off

* fix: creds placeholder missing

* fix: connection notes color and margin top issues

* fix: select all issue in revoked creds
  • Loading branch information
sdisalvo-crd authored Sep 12, 2024
1 parent 61e9cc5 commit 1344e38
Show file tree
Hide file tree
Showing 9 changed files with 39 additions and 32 deletions.
7 changes: 3 additions & 4 deletions src/ui/components/ArchivedCredentials/ArchivedCredentials.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,20 +58,16 @@ const ArchivedCredentialsContainer = forwardRef<
const dispatch = useAppDispatch();
const credsCache = useAppSelector(getCredsCache);
const notifications = useAppSelector(getNotificationsCache);

const [activeList, setActiveList] = useState(false);
const [selectedCredentials, setSelectedCredentials] = useState<string[]>([]);
const [verifyIsOpen, setVerifyIsOpen] = useState(false);
const [alertDeleteIsOpen, setAlertDeleteIsOpen] = useState(false);
const [alertRestoreIsOpen, setAlertRestoreIsOpen] = useState(false);
const [alertRestoreRevoked, setAlertRestoreRevoked] = useState(false);

const [viewCred, setViewCred] = useState("");
const [isOpenCredModal, setIsOpenCredModal] = useState(false);

const haveRevokedCreds = revokedCreds.length > 0;
const haveArchivedCreds = archivedCreds.length > 0;

const hasData = haveArchivedCreds || haveRevokedCreds;

useEffect(() => {
Expand All @@ -92,6 +88,9 @@ const ArchivedCredentialsContainer = forwardRef<
for (const i in archivedCreds) {
data.push(archivedCreds[i].id);
}
for (const i in revokedCreds) {
data.push(revokedCreds[i].id);
}
return data;
};

Expand Down
2 changes: 0 additions & 2 deletions src/ui/components/Scanner/Scanner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import {
} from "@ionic/react";
import { scanOutline } from "ionicons/icons";
import { forwardRef, useEffect, useImperativeHandle, useState } from "react";
import { useHistory } from "react-router-dom";
import { Agent } from "../../../core/agent/agent";
import { KeriConnectionType } from "../../../core/agent/agent.types";
import { StorageMessage } from "../../../core/storage/storage.types";
Expand Down Expand Up @@ -63,7 +62,6 @@ const Scanner = forwardRef(
ref
) => {
const componentId = "scanner";
const history = useHistory();
const platforms = getPlatforms();
const dispatch = useAppDispatch();
const multiSigGroupCache = useAppSelector(getMultiSigGroupCache);
Expand Down
1 change: 1 addition & 0 deletions src/ui/pages/ConnectionDetails/ConnectionDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ const ConnectionDetails = () => {
ToastMsgType.DELETE_CONNECTION_FAIL
);
}
dispatch(setCurrentOperation(OperationType.IDLE));
}
deleteConnection();
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.edit-connections-modal {
margin-top: constant(safe-area-inset-top);
margin-top: env(safe-area-inset-top);
--safe-area-inset-top: env(safe-area-inset-top);
.scrollable-page-layout {
background: var(--ion-color-light-grey);
}

.page-header {
ion-toolbar {
Expand Down
1 change: 1 addition & 0 deletions src/ui/pages/Connections/Connections.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,7 @@ const Connections = forwardRef<ConnectionsOptionRef, ConnectionsComponentProps>(
ToastMsgType.DELETE_CONNECTION_FAIL
);
}
dispatch(setCurrentOperation(OperationType.IDLE));
};

const ConnectionsBody = () => {
Expand Down
9 changes: 5 additions & 4 deletions src/ui/pages/Credentials/Credentials.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@
margin-top: 2.5rem;
}

.archived-credentials-button-container {
height: 2.5rem;
}

ion-content {
display: flex;
flex-direction: column;
Expand All @@ -17,6 +13,7 @@
display: flex;
flex-direction: row;
justify-content: center;
height: 3.5rem;

&.hidden {
visibility: hidden;
Expand Down Expand Up @@ -45,6 +42,10 @@
}

@media screen and (min-width: 250px) and (max-width: 370px) {
.archived-credentials-button-container {
height: 2.5rem;
}

.credentials-tab-content-block {
margin-bottom: 1.6rem;

Expand Down
4 changes: 2 additions & 2 deletions src/ui/pages/Credentials/Credentials.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,8 @@ const Credentials = () => {
}, [dispatch]);

useEffect(() => {
setShowPlaceholder(credsCache.length === 0 && revokedCreds.length === 0);
}, [credsCache.length, revokedCreds.length]);
setShowPlaceholder(confirmedCreds.length + pendingCreds.length === 0);
}, [credsCache]);

useOnlineStatusEffect(fetchArchivedCreds);

Expand Down
6 changes: 5 additions & 1 deletion src/ui/pages/Identifiers/Identifiers.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
}

.placeholder-spacer {
height: 2.5rem;
height: 3.5rem;
}

.identifiers-tab-content-block {
Expand Down Expand Up @@ -101,6 +101,10 @@
}

@media screen and (min-width: 250px) and (max-width: 370px) {
.placeholder-spacer {
height: 2.5rem;
}

.identifiers-tab-content-block {
margin-bottom: 1.6rem;

Expand Down
35 changes: 19 additions & 16 deletions src/ui/pages/Identifiers/Identifiers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -133,12 +133,15 @@ const Identifiers = () => {
) {
setCreateIdentifierModalIsOpen(true);
}
OperationType.RECEIVE_CONNECTION === currentOperation &&
setShowConnections(true);
}, [
currentOperation,
dispatch,
history.location.pathname,
identifiersData,
multisigGroupCache,
setShowConnections,
]);

useEffect(() => {
Expand Down Expand Up @@ -227,25 +230,25 @@ const Identifiers = () => {
navAnimation === "cards"
? "cards-identifier-nav"
: navAnimation === "favourite"
? "favorite-identifier-nav"
: ""
? "favorite-identifier-nav"
: ""
}`;
const handleCloseCreateIdentifier = () => {
switch (currentOperation) {
case OperationType.CREATE_IDENTIFIER_CONNECT_WALLET:
dispatch(setCurrentOperation(OperationType.BACK_TO_CONNECT_WALLET));
history.push(TabsRoutePath.MENU);
break;
case OperationType.CREATE_IDENTIFIER_SHARE_CONNECTION_FROM_IDENTIFIERS:
dispatch(setCurrentOperation(OperationType.BACK_TO_SHARE_CONNECTION));
break;
case OperationType.CREATE_IDENTIFIER_SHARE_CONNECTION_FROM_CREDENTIALS:
dispatch(setCurrentOperation(OperationType.BACK_TO_SHARE_CONNECTION));
history.push(TabsRoutePath.CREDENTIALS);
break;
default:
dispatch(setCurrentOperation(OperationType.IDLE));
break;
case OperationType.CREATE_IDENTIFIER_CONNECT_WALLET:
dispatch(setCurrentOperation(OperationType.BACK_TO_CONNECT_WALLET));
history.push(TabsRoutePath.MENU);
break;
case OperationType.CREATE_IDENTIFIER_SHARE_CONNECTION_FROM_IDENTIFIERS:
dispatch(setCurrentOperation(OperationType.BACK_TO_SHARE_CONNECTION));
break;
case OperationType.CREATE_IDENTIFIER_SHARE_CONNECTION_FROM_CREDENTIALS:
dispatch(setCurrentOperation(OperationType.BACK_TO_SHARE_CONNECTION));
history.push(TabsRoutePath.CREDENTIALS);
break;
default:
dispatch(setCurrentOperation(OperationType.IDLE));
break;
}
setCreateIdentifierModalIsOpen(false);
};
Expand Down

0 comments on commit 1344e38

Please sign in to comment.