Fix buttons colors

Signed-off-by: Egor Savkin <es@m-labs.hk>
This commit is contained in:
Egor Savkin 2023-12-14 14:17:18 +08:00
parent 07e01bcc93
commit 0e60eb9bce
11 changed files with 99 additions and 86 deletions

View File

@ -149,7 +149,7 @@ a {
border: 1px solid $btn-primary-2 !important; border: 1px solid $btn-primary-2 !important;
text-decoration: none; text-decoration: none;
&:hover { &:hover, &:disabled {
background-color: $btn-secondary-2; background-color: $btn-secondary-2;
border: 1px solid $btn-secondary-2 !important; border: 1px solid $btn-secondary-2 !important;
} }

View File

@ -8,26 +8,7 @@ button {
outline: none!important; outline: none!important;
} }
#root-shop {
.layout {
.rfqFeedback { .rfqFeedback {
display: flex;
align-items: center;
padding: 2rem 3rem;
text-align: center;
/*position: absolute;
width: 350px;*/
background: white;
/*left: calc(100%/2 - 350px/2);*/
-webkit-box-shadow: 0px 0px 33px -7px rgba(0,0,0,0.75);
-moz-box-shadow: 0px 0px 33px -7px rgba(0,0,0,0.75);
box-shadow: 0px 0px 33px -7px rgba(0,0,0,0.75);
/*top: calc(50% - 50px);*/
border: 1px solid $brand-color;
font-size: .9rem;
button { button {
background-color: inherit; background-color: inherit;
align-self: center; align-self: center;
@ -45,13 +26,20 @@ button {
background-color: gray; background-color: gray;
} }
.btn-outline-primary, .btn-outline-primary {
.btn-outline-primary:hover {
color: $btn-primary-2; color: $btn-primary-2;
border-color: $btn-primary-2; border-color: $btn-primary-2;
background-color: inherit; background-color: inherit;
&:hover {
background-color: inherit;
color: $btn-secondary-2;
border-color: $btn-secondary-2;
} }
} }
}
#root-shop {
.layout {
display: flex; display: flex;
@ -186,11 +174,15 @@ button {
padding-bottom: .5rem; padding-bottom: .5rem;
} }
.btn-outline-primary, .btn-outline-primary {
.btn-outline-primary:hover {
color: $btn-primary-2; color: $btn-primary-2;
border-color: $btn-primary-2; border-color: $btn-primary-2;
background-color: inherit; background-color: inherit;
&:hover {
background-color: inherit;
color: $btn-secondary-2;
border-color: $btn-secondary-2;
}
} }
.control { .control {
@ -300,7 +292,7 @@ button {
button { button {
background-color: inherit; background-color: inherit;
border: 0; border: 0;
margin-left: 20px; margin-left: 16px;
img { img {
width: 20px; width: 20px;
@ -350,11 +342,14 @@ button {
border: 1px solid #e53e3e !important; border: 1px solid #e53e3e !important;
} }
.btn-outline-primary, .btn-outline-primary {
.btn-outline-primary:hover {
color: $btn-primary-2; color: $btn-primary-2;
border-color: $btn-primary-2; border-color: $btn-primary-2;
background-color: inherit; background-color: inherit;
&:hover {
background-color: inherit;
color: $btn-secondary-2;
}
} }
} }
} }
@ -606,6 +601,37 @@ button {
margin-left: -10px; margin-left: -10px;
} }
#accordion_crates {
background-color: inherit;
.accordion_crates_item {
.accordion-header {
padding-bottom: 0;
}
.accordion-button {
background-color: inherit;
font-weight: bold;
&:hover {
background-color: $color-highlight;
}
}
}
#accordion_crates_add {
.accordion-header {
padding-bottom: 0;
}
.accordion-button {
font-weight: bold;
&:hover {
background-color: $color-highlight;
}
}
.accordion-button:after {
background-image: url("/images/shop/icon-add.svg");
}
}
}
} }
.k-popup-connectors, .k-popup-connectors,

View File

@ -25,6 +25,7 @@ $link-primary-dark: #c2affd !default;
$link-secondary-dark: #cec2ea !default; $link-secondary-dark: #cec2ea !default;
$color-hover: #eae7f7 !default; $color-hover: #eae7f7 !default;
$color-highlight: #dfe9ff !default;
// Import partials. // Import partials.
@import @import

View File

@ -61,26 +61,6 @@
text-decoration: none; text-decoration: none;
} }
#accordion_crates #accordion_crates_add .accordion-button:after {
background-image: url("/images/shop/icon-add.svg");
}
#accordion_crates .accordion-header button {
font-weight: bold;
}
#accordion_crates,
#accordion_crates .accordion-header,
#accordion_crates .accordion-button,
#accordion_crates .accordion-item {
background-color: inherit;
}
#accordion_crates .accordion-button:not(.collapsed) {
background-color: rgba(26, 109, 147, 0.1);
}
/* /*
##Device = Tablets, Ipads (portrait) ##Device = Tablets, Ipads (portrait)
##Screen = B/w 768px to 1024px ##Screen = B/w 768px to 1024px

View File

@ -0,0 +1 @@
<svg width="232" height="232" version="1.1" viewBox="0 0 232 232" xmlns="http://www.w3.org/2000/svg"><g transform="translate(-4.0001 -12)" fill="none" stroke="#715ec7" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"><path d="m61.7 204.1-45.7-76.1 45.7-76.1a7.9 7.9 0 0 1 6.8-3.9h147.5a8 8 0 0 1 8 8v144a8 8 0 0 1-8 8h-147.5a7.9 7.9 0 0 1-6.8-3.9z"/><line x1="160" x2="112" y1="104" y2="152"/><line x1="160" x2="112" y1="152" y2="104"/></g></svg>

After

Width:  |  Height:  |  Size: 463 B

File diff suppressed because one or more lines are too long

View File

@ -24,7 +24,7 @@ export function CrateList() {
setActiveCrate("") setActiveCrate("")
}}> }}>
{crates.map((crate, index) => {crates.map((crate, index) =>
<Accordion.Item eventKey={crate.id} key={"accordion"+crate.id} > <Accordion.Item eventKey={crate.id} key={"accordion"+crate.id} className="accordion_crates_item">
<Accordion.Header>Crate #{`${index}`}</Accordion.Header> <Accordion.Header>Crate #{`${index}`}</Accordion.Header>
<Accordion.Body> <Accordion.Body>
<Crate crate_index={index}/> <Crate crate_index={index}/>

View File

@ -32,7 +32,7 @@ export function ImportJSON() {
onClick={showImport}>Import JSON onClick={showImport}>Import JSON
</button> </button>
<Modal show={shouldShow} animation={true} centered> <Modal show={shouldShow} animation={true} centered>
<Modal.Body ref={ref}> <Modal.Body ref={ref} className="rfqFeedback">
<div className="form-group"> <div className="form-group">
<p className="small"> <p className="small">
Input the JSON description below. Should be something like: Input the JSON description below. Should be something like:
@ -59,9 +59,9 @@ export function ImportJSON() {
<div className="d-flex flex-column flex-sm-row justify-content-end"> <div className="d-flex flex-column flex-sm-row justify-content-end">
<a type="button" onClick={closeImport} <a type="button" onClick={closeImport}
className="btn btn-sm btn-outline-primary m-0 mb-2 mb-sm-0 mr-sm-2">Close</a> className="btn btn-sm btn-outline-primary m-0 mb-2 mt-2 mb-sm-0 me-sm-2">Close</a>
<a type="button" onClick={loadDescription} <a type="button" onClick={loadDescription}
className={`btn btn-sm btn-primary m-0 ml-sm-2 ${data.error ? 'disabled' : ''}`}>Load className={`btn btn-sm btn-primary m-0 ms-sm-2 mt-2 ${data.error ? 'disabled' : ''}`}>Load
configuration</a> configuration</a>
</div> </div>
</Modal.Body> </Modal.Body>

View File

@ -20,6 +20,7 @@ export function OrderSummary() {
resetHighlight, resetHighlight,
highlighted, highlighted,
clearCrate, clearCrate,
delCrate,
clearAll clearAll
} = useShopStore(state =>({ } = useShopStore(state =>({
currency: state.currency, currency: state.currency,
@ -31,7 +32,8 @@ export function OrderSummary() {
resetHighlight: state.highlightReset, resetHighlight: state.highlightReset,
highlighted: state.highlighted, highlighted: state.highlighted,
clearAll: state.clearAll, clearAll: state.clearAll,
clearCrate: state.clearCrate clearCrate: state.clearCrate,
delCrate: state.delCrate,
})); }));
return ( return (
@ -58,18 +60,17 @@ export function OrderSummary() {
<tr key={"summary_crate_" + crate.id}> <tr key={"summary_crate_" + crate.id}>
<td className="item-card-name">{crate_type.name}</td> <td className="item-card-name">{crate_type.name}</td>
<td className="price"> <td className="price">
<div> <div className="d-inline-flex">
{`${currency} ${formatMoney(crate_type.price)}`} {`${currency} ${formatMoney(crate_type.price)}`}
<button onClick={() => clearCrate(crate.id)}> <button onClick={() => clearCrate(crate.id)}>
<img src="/images/shop/icon-remove.svg"/> <img src="/images/shop/icon-clear.svg" alt="empty crate"/>
</button>
<button onClick={() => delCrate(crate.id)}>
<img src="/images/shop/icon-remove.svg" alt="remove crate"/>
</button> </button>
</div> </div>
<span style={{
'display': 'inline-block',
'width': '30px',
}}>&nbsp;</span>
</td> </td>
</tr> </tr>
{crate.items.map((item, index) => { {crate.items.map((item, index) => {
@ -84,6 +85,10 @@ export function OrderSummary() {
onMouseEnter={() => setHighlight(crate.id, index)} onMouseEnter={() => setHighlight(crate.id, index)}
onMouseLeave={() => resetHighlight()}> onMouseLeave={() => resetHighlight()}>
<td className="item-card-name"> <td className="item-card-name">
<span style={{
'display': 'inline-block',
'width': '16px',
}}>&nbsp;</span>
<div>{`${item.name_number} ${item.name} ${item.name_codename}`}</div> <div>{`${item.name_number} ${item.name} ${item.name_codename}`}</div>
</td> </td>

View File

@ -18,7 +18,7 @@ export function RFQFeedback() {
return ( return (
<Modal show={shouldShow} animation={true} centered> <Modal show={shouldShow} animation={true} centered>
<Modal.Body ref={ref}> <Modal.Body ref={ref} className="rfqFeedback">
<div className="d-flex"> <div className="d-flex">
<div> <div>
{status.status === Validation.OK ? {status.status === Validation.OK ?

View File

@ -25,7 +25,7 @@ export function ShowJSON() {
onClick={showDescription} onClick={showDescription}
readOnly={true}/> readOnly={true}/>
<Modal show={shouldShow} animation={true} centered> <Modal show={shouldShow} animation={true} centered>
<Modal.Body ref={ref}> <Modal.Body ref={ref} className="rfqFeedback">
<textarea <textarea
value={description} value={description}
className="form-control w-100" className="form-control w-100"
@ -33,9 +33,9 @@ export function ShowJSON() {
readOnly={true} readOnly={true}
placeholder="There should be description of the crate"/> placeholder="There should be description of the crate"/>
<div className="d-flex flex-column flex-sm-row justify-content-end m-1"> <div className="d-flex flex-column flex-sm-row justify-content-end">
<a type="button" onClick={closeDescription} <a type="button" onClick={closeDescription}
className="btn btn-sm btn-outline-primary m-0 mb-2 mb-sm-0 mr-sm-2">Close</a> className="btn btn-sm btn-outline-primary m-0 mb-1 mt-2 mb-sm-0 me-sm-2">Close</a>
</div> </div>
</Modal.Body> </Modal.Body>
</Modal> </Modal>