Skip to content

Commit

Permalink
change icon button style part III
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielburnworth committed Dec 7, 2023
1 parent 9c29f88 commit 5cfdb75
Show file tree
Hide file tree
Showing 42 changed files with 208 additions and 130 deletions.
2 changes: 1 addition & 1 deletion frontend/controls/move/move_controls.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const MoveControls = (props: MoveControlsProps) => {
const { busy, locked } = props.bot.hardware.informational_settings;
return <div className={"move"}>
<Popover position={Position.LEFT_TOP} className={"move-settings"}
target={<i className="fa fa-gear" />}
target={<i className={"fa fa-gear fb-icon-button"} />}
content={<MoveWidgetSettingsMenu
dispatch={props.dispatch}
getConfigValue={props.getConfigValue}
Expand Down
9 changes: 4 additions & 5 deletions frontend/css/farm_designer/farm_designer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -684,7 +684,7 @@
display: flex;
flex-direction: column;
flex-wrap: wrap;
max-width: 134px;
max-width: 140px;
padding: 1rem;
background: rgba(255, 255, 255, .75);
border-radius: 5px;
Expand Down Expand Up @@ -775,7 +775,7 @@
}
.caret-menu-button {
display: inline;
margin-left: 0.25rem;
margin-left: 0.1rem;
font-weight: bold;
font-size: medium;
cursor: pointer;
Expand Down Expand Up @@ -979,7 +979,6 @@
.fa-caret-left,
.fa-caret-right,
.fa-step-forward {
line-height: 1.3rem;
font-weight: bold;
vertical-align: middle;
}
Expand All @@ -993,11 +992,11 @@
}
.fa-step-backward,
.fa-caret-left {
margin-right: 1rem;
margin-right: 0.1rem;
}
.fa-caret-right,
.fa-step-forward {
margin-left: 1rem;
margin-left: 0.1rem;
}
}

Expand Down
41 changes: 24 additions & 17 deletions frontend/css/farm_designer/farm_designer_panels.scss
Original file line number Diff line number Diff line change
Expand Up @@ -536,12 +536,12 @@
}
.plant-slug-bulk-update {
.fa-pencil {
margin-left: 1rem;
margin-left: 0.25rem;
}
.fb-button {
float: none;
height: 2rem;
line-height: 1.75rem;
line-height: 0;
margin-left: 1rem;
vertical-align: top;
}
Expand Down Expand Up @@ -1774,7 +1774,7 @@ li {
.fa-gear {
color: $dark_gray;
margin-right: 1rem;
margin-top: 2rem;
margin-top: 1.5rem;
}
}
}
Expand Down Expand Up @@ -1965,6 +1965,7 @@ li {
}

.non-layer-config-toggle {
margin-top: 0.1rem;
&.disabled {
input {
background: $gray !important;
Expand Down Expand Up @@ -2742,10 +2743,10 @@ li {
label {
margin-top: 0 !important;
}
i {
.fa-external-link {
position: absolute;
right: 0.5rem;
line-height: 4rem;
top: 1rem;
right: 0;
}
.active-curve-name {
position: relative;
Expand Down Expand Up @@ -3211,17 +3212,6 @@ li {
}

.designer-sequence-editor-panel {
.green,
.red {
.panel-title {
.fa-paint-brush,
.fa-expand,
.fa-magic,
.fa-spinner {
color: $white;
}
}
}
.panel-content {
.sequence-editor-content {
hr {
Expand All @@ -3247,6 +3237,23 @@ li {
}
}

.weed-info-panel,
.point-info-panel,
.designer-regimen-editor-panel,
.designer-sequence-editor-panel {
.green,
.red {
.panel-title {
.fa-paint-brush,
.fa-expand,
.fa-magic,
.fa-spinner {
color: $white;
}
}
}
}

.designer-regimen-scheduler-panel {
.panel-content {
display: inline-block;
Expand Down
10 changes: 4 additions & 6 deletions frontend/css/global.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1108,6 +1108,7 @@ ul {
}
}

.sequence-description-wrapper,
.button-group,
.panel-header-icon-group {
.fa-spinner {
Expand Down Expand Up @@ -1765,8 +1766,8 @@ ul {
.fa-trash {
display: inline;
color: $darkest_red;
margin-left: 7px;
padding: 0.25rem;
margin-left: 6px;
padding: 0.5rem;
line-height: 2rem;
}
.log-verbosity-saucer {
Expand Down Expand Up @@ -1864,7 +1865,7 @@ ul {
.logs-tab {
.thin-search-wrapper {
display: inline-block;
width: 95%;
width: 94%;
background: $white;
}
.logs-settings-menu-button {
Expand Down Expand Up @@ -2371,9 +2372,6 @@ ul {
}

.status-icon {
padding: 0.5rem;
float: right !important;
font-size: 1.75rem;
&.ok {
color: $green;
}
Expand Down
11 changes: 10 additions & 1 deletion frontend/css/image_flipper.scss
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,6 @@
.photos-footer,
.image-show-menu {
i {
margin: 0.25rem;
background: none !important;
&.green {
color: $green;
Expand All @@ -216,6 +215,16 @@
color: $medium_gray;
}
}
.fb-icon-button {
&:hover {
background: rgba(255, 255, 255, 0.2) !important;
}
}
.shown-in-map-details {
i {
margin-right: 0.25rem;
}
}
}

.this-image-section {
Expand Down
23 changes: 19 additions & 4 deletions frontend/css/navbar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,8 @@ nav {
p {
color: $white;
}
box-shadow: 0 0 10px $translucent5, 0 0 5px inset rgba(255, 255, 255, 0.2);
filter: brightness(1.05);
box-shadow: inset 0 -1px 0px 0px $translucent2, 0 0 5px $translucent15, inset 0 0 5px rgba(255, 255, 255, 0.3);
}
}
.nav-coordinates {
Expand Down Expand Up @@ -272,9 +273,13 @@ nav {
}
}
.nav-name {
padding: 1rem;
border-radius: 1rem;
margin-top: -1rem;
padding: 0.75rem;
border-radius: 5px;
margin-top: -0.75rem;
font-weight: normal;
&:hover {
background: rgba(255, 255, 255, 0.2);
}
&:after{
content: attr(data-title);
display: block;
Expand Down Expand Up @@ -344,6 +349,16 @@ nav {
.bp5-popover-arrow {
visibility: hidden;
}
.fa-user {
width: 2.75rem;
height: 2.75rem;
padding: 0.75rem;
margin-top: -0.75rem;
border-radius: 5px;
&:hover {
background: rgba(255, 255, 255, 0.2);
}
}
}

.mobile-menu {
Expand Down
1 change: 0 additions & 1 deletion frontend/css/regimens.scss
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@

.regimen-control {
position: absolute;
top: 1rem;
right: 1rem;
}

Expand Down
14 changes: 10 additions & 4 deletions frontend/css/sequences.scss
Original file line number Diff line number Diff line change
Expand Up @@ -291,13 +291,13 @@
.fa-magic,
.fa-spinner {
position: absolute;
top: 1.25rem;
right: 6rem;
top: 1rem;
right: 6.5rem;
}
.fa-pencil,
.fa-eye {
position: absolute;
top: 1.25rem;
top: 1rem;
right: 4rem;
}
}
Expand Down Expand Up @@ -742,6 +742,7 @@
.fa-trash {
color: $darkest_red;
margin-top: 0.5rem;
margin-left: -1rem;
}
.numeric-variable-input,
.text-variable-input {
Expand Down Expand Up @@ -1152,7 +1153,7 @@
.folder-name-input {
display: flex;
button {
top: 0.5rem;
margin-top: 0.75rem;
width: auto;
height: 2rem;
i {
Expand Down Expand Up @@ -1504,4 +1505,9 @@
&:hover {
background: rgba(255, 255, 255, 0.2);
}
&.light {
&:hover {
background: rgba(0, 0, 0, 0.08);
}
}
}
4 changes: 2 additions & 2 deletions frontend/curves/edit_curve.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ export class RawEditCurve extends React.Component<EditCurveProps, EditCurveState
<Popover
isOpen={this.state.scale}
popoverClassName={"curve-action-popover"}
target={<button className={"transparent-button"}
target={<button className={"transparent-button light"}
onClick={this.toggle("scale")}>
{t("scale")}
</button>}
Expand All @@ -174,7 +174,7 @@ export class RawEditCurve extends React.Component<EditCurveProps, EditCurveState
<Popover
isOpen={this.state.templates}
popoverClassName={"curve-action-popover"}
target={<button className={"transparent-button"}
target={<button className={"transparent-button light"}
onClick={this.toggle("templates")}>
{t("templates")}
</button>}
Expand Down
10 changes: 5 additions & 5 deletions frontend/devices/connectivity/connectivity_row.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ const colorLookup: Record<string, string> = {
};

const iconLookup: Record<string, string> = {
true: "check",
false: "times",
undefined: "question"
true: "fa-check",
false: "fa-times",
undefined: "fa-question"
};

export function ConnectivityRow(props: StatusRowProps) {
Expand All @@ -44,7 +44,7 @@ export function ConnectivityRow(props: StatusRowProps) {
? "saucer active grey"
: `diagnosis-indicator saucer active ${colorClass} ${hoverClass}`;
const icon = iconLookup["" + connectionStatus];
const iconClass = syncStatus == "syncing" ? "spinner fa-pulse" : icon;
const iconClass = syncStatus == "syncing" ? "fa-spinner fa-pulse" : icon;

const getTitle = (header?: boolean) => {
if (header) { return t("Status"); }
Expand All @@ -65,7 +65,7 @@ export function ConnectivityRow(props: StatusRowProps) {
title={syncStatus ? syncText(syncStatus) : getTitle(props.header)}
onMouseEnter={hoverOver(connectionName)}
onMouseLeave={hoverOver(undefined)}>
{!props.header && <i className={`fa fa-${iconClass}`} />}
{!props.header && <i className={`fa ${iconClass}`} />}
</div>
{!props.header &&
<div className={`saucer-connector ${connectorColorClass}`} />}
Expand Down
6 changes: 3 additions & 3 deletions frontend/devices/connectivity/diagnosis.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,17 @@ const diagnosisStatus = (flags: ConnectionStatusFlags): boolean =>
export const DiagnosisSaucer = (props: DiagnosisSaucerProps) => {
const diagnosisBoolean = diagnosisStatus(props);
const diagnosisColor = diagnosisBoolean ? "green" : "red";
const diagnosisIcon = diagnosisBoolean ? "check" : "times";
const diagnosisIcon = diagnosisBoolean ? "fa-check" : "fa-times";
const spinner = props.syncStatus == "syncing";
const diagnosisIconClass = spinner ? "spinner fa-pulse" : diagnosisIcon;
const diagnosisIconClass = spinner ? "fa-spinner fa-pulse" : diagnosisIcon;
const title = diagnosisBoolean ? t("Ok") : t("Error");
const classes = [
"diagnosis-indicator", "saucer", "active", diagnosisColor, props.className,
];
return <div className={classes.join(" ")}
onClick={props.onClick}
title={props.syncStatus ? syncText(props.syncStatus) : title}>
<i className={`fa fa-${diagnosisIconClass}`} />
<i className={`fa ${diagnosisIconClass}`} />
</div>;
};

Expand Down
3 changes: 2 additions & 1 deletion frontend/farm_designer/map/legend/layer_toggle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ export function LayerToggle(props: LayerToggleProps) {
<Popover
position={Position.BOTTOM_RIGHT}
className={"caret-menu-button"}
target={<i className="fa fa-caret-down" title={t(title)} />}
target={<i className={"fa fa-caret-down fb-icon-button"}
title={t(title)} />}
content={popover} />}
</span>
</label>
Expand Down
4 changes: 2 additions & 2 deletions frontend/farm_events/farm_events.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const resourceLink =
onClick={resourceKind == "Regimen"
? setActiveRegimenByName
: setActiveSequenceByName}>
<i className="fa fa-external-link" />
<i className="fa fa-external-link fb-icon-button" />
</Link>;
};

Expand Down Expand Up @@ -83,7 +83,7 @@ export class RawFarmEvents
</div>
<Link className={"edit-link"}
to={Path.farmEvents(occur.id || "UNSAVED_EVENT")}>
<i className="fa fa-pencil-square-o edit-icon" />
<i className={"fa fa-pencil-square-o edit-icon fb-icon-button"} />
</Link>
</div>;
});
Expand Down
Loading

0 comments on commit 5cfdb75

Please sign in to comment.