Skip to content

Commit

Permalink
updated styles(info-bar), updated component to add new Re-Sync column… (
Browse files Browse the repository at this point in the history
#120)

* updated styles(info-bar), updated component to add new Re-Sync column to info-bar div

* updates to have sync button in HEADER_ACTIONS, re-adjusted styles back to flex-start

* sync label change

* updates to have button animation when on sync, revert sync label
  • Loading branch information
cubeddu authored Jul 5, 2023
1 parent 972f4e7 commit dc3d14f
Showing 1 changed file with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ export type ConnectionDetailProps = {
};

const HEADER_ACTIONS = (isSync: boolean, isFileBased: boolean) => [
{
label: "Synchronize Database",
icon: <SyncIcon className={isSync ? "animate-spin" : ""} />,
value: "sync",
isDisabled: isSync,
},
{
label: "Export Connection",
icon: <TrayArrowIcon />,
Expand Down Expand Up @@ -120,6 +126,10 @@ const ConnectionDetail = ({ isSync, onSyncChange }: ConnectionDetailProps) => {
if (value === "export") {
return onConfigExport();
}

if (value === "sync") {
return onConfigSync();
}
},
[onConfigDelete, onConfigExport]
);
Expand Down Expand Up @@ -154,14 +164,6 @@ const ConnectionDetail = ({ isSync, onSyncChange }: ConnectionDetailProps) => {
<div className={pfx("item")}>
<div className={pfx("tag")}>
<div>Last Synchronization</div>
<IconButton
icon={<SyncIcon className={isSync ? "animate-spin" : ""} />}
tooltipText={"Synchronize Database"}
variant={"text"}
size={"small"}
isDisabled={isSync}
onPress={onConfigSync}
/>
</div>
{!lastSyncFail && (
<div className={pfx("value")}>{formatDate(lastSyncUpdate)}</div>
Expand Down

0 comments on commit dc3d14f

Please sign in to comment.