Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updated styles(info-bar), updated component to add new Re-Sync column… #120

Merged
merged 4 commits into from
Jul 5, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const defaultStyles = (pfx?: string): ThemeStyleFn => ({ theme }) => css`
border-bottom: solid 1px ${theme.palette.divider};
display: flex;
flex-wrap: wrap;
justify-content: space-between;
justify-content: flex-start;
gap: ${theme.spacing["6x"]};
padding: ${theme.spacing["4x"]};

Expand Down
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",
cubeddu marked this conversation as resolved.
Show resolved Hide resolved
icon: <SyncIcon />,
cubeddu marked this conversation as resolved.
Show resolved Hide resolved
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 @@ -170,21 +180,6 @@ const ConnectionDetail = ({ isSync, onSyncChange }: ConnectionDetailProps) => {
)}
</div>
)}
<div className={pfx("item")}>
<div className={pfx("ft-end-adornment")}>
<div className={pfx("tag")}>Re-Sync</div>
<div className={pfx("value")}>
<IconButton
icon={<SyncIcon className={isSync ? "animate-spin" : ""} />}
tooltipText={"Synchronize Database"}
variant={"text"}
size={"base"}
isDisabled={isSync}
onPress={onConfigSync}
/>
</div>
</div>
</div>
</div>
{!isSync && !!lastSyncUpdate && <ConnectionData />}
{!lastSyncUpdate && !isSync && (
Expand Down