mirror of
https://github.com/twirl/The-API-Book.git
synced 2025-02-16 18:34:31 +02:00
Assets fixed
This commit is contained in:
parent
38e97cceb2
commit
c1358cb70b
File diff suppressed because one or more lines are too long
@ -1,4 +1,5 @@
|
||||
{
|
||||
"printWidth": 50,
|
||||
"tabWidth": 2
|
||||
"tabWidth": 2,
|
||||
"trailingComma": "none"
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ const buildCustomOrderButton = function (
|
||||
createOrderButtonText:
|
||||
(offer &&
|
||||
`Buy now for just ${offer.price.formattedValue}`) ||
|
||||
"Place an Order",
|
||||
"Place an Order"
|
||||
}
|
||||
);
|
||||
};
|
||||
@ -25,7 +25,7 @@ class CustomComposer extends ourCoffeeSdk.SearchBoxComposer {
|
||||
? result
|
||||
: result.map((preview, index) => ({
|
||||
...preview,
|
||||
imageUrl: offerList[index].place.icon,
|
||||
imageUrl: offerList[index].place.icon
|
||||
}));
|
||||
}
|
||||
|
||||
@ -37,7 +37,7 @@ class CustomComposer extends ourCoffeeSdk.SearchBoxComposer {
|
||||
offer,
|
||||
options
|
||||
),
|
||||
createOrderButtonIcon: offer.place.icon,
|
||||
createOrderButtonIcon: offer.place.icon
|
||||
};
|
||||
}
|
||||
}
|
||||
@ -65,9 +65,10 @@ const searchBox = new CustomSearchBox(
|
||||
buttonBuilders: [
|
||||
buildCustomOrderButton,
|
||||
ourCoffeeSdk.OfferPanelComponent
|
||||
.buildCloseButton,
|
||||
.buildCloseButton
|
||||
],
|
||||
},
|
||||
closeButtonText: "❌Not Now"
|
||||
}
|
||||
}
|
||||
);
|
||||
searchBox.search("Lungo");
|
||||
|
@ -9,11 +9,11 @@ class CustomOfferList {
|
||||
|
||||
this.onMarkerSelect = (markerId) => {
|
||||
this.events.emit("offerSelect", {
|
||||
offerId: markerId,
|
||||
offerId: markerId
|
||||
});
|
||||
};
|
||||
this.setOfferList = ({
|
||||
offerList: newOfferList,
|
||||
offerList: newOfferList
|
||||
}) => {
|
||||
if (this.map) {
|
||||
this.map.destroy();
|
||||
@ -25,7 +25,7 @@ class CustomOfferList {
|
||||
this.container,
|
||||
[
|
||||
[16.355, 48.206],
|
||||
[16.375, 48.214],
|
||||
[16.375, 48.214]
|
||||
]
|
||||
);
|
||||
for (const offer of newOfferList) {
|
||||
@ -82,7 +82,7 @@ class CustomComposer extends ourCoffeeSdk.SearchBoxComposer {
|
||||
: result.map((preview, index) => ({
|
||||
...preview,
|
||||
location:
|
||||
offerList[index].place.location,
|
||||
offerList[index].place.location
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
@ -18,7 +18,7 @@ class CustomOfferList extends ourCoffeeSdk.OfferListComponent {
|
||||
this.context.events.emit(
|
||||
"createOrder",
|
||||
{
|
||||
offer,
|
||||
offer
|
||||
}
|
||||
);
|
||||
}
|
||||
|
@ -44,7 +44,7 @@ window.onload = function () {
|
||||
${code}
|
||||
}
|
||||
</script></head><body>
|
||||
<img src="/assets/app-header.png"/>
|
||||
<img src="../../assets/app-header.png"/>
|
||||
<h1>Our Coffee SDK Example Application</h1>
|
||||
<div id="search-box"/>
|
||||
</body></html>`;
|
||||
|
@ -164,6 +164,7 @@
|
||||
border: transparent;
|
||||
cursor: pointer;
|
||||
margin-bottom: 5px;
|
||||
mix-blend-mode: luminosity;
|
||||
}
|
||||
|
||||
.our-coffee-sdk-offer-panel-buttons button img {
|
||||
|
@ -25,7 +25,7 @@ export const CAFEE_CHAMOMILE_LUNGO_OFFER = {
|
||||
intervalValueSeconds: 120,
|
||||
formattedValue: '2 min'
|
||||
},
|
||||
icon: '/assets/coffee.png'
|
||||
icon: '../../assets/coffee.png'
|
||||
},
|
||||
price: {
|
||||
decimalValue: '37.00',
|
||||
|
@ -8,7 +8,7 @@ export class DummyMapApi {
|
||||
protected bounds: [[number, number], [number, number]]
|
||||
) {
|
||||
this.container.style.cssText = [
|
||||
'background-image: url(/assets/map.jpg)',
|
||||
'background-image: url(../../assets/map.jpg)',
|
||||
'background-position: center',
|
||||
'background-repeat: no-repeat',
|
||||
'background-size: cover',
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 54 KiB |
@ -1 +1 @@
|
||||
### Декомпозиция UI-компонентов. MV*-подходы
|
||||
### Декомпозиция UI-компонентов
|
Loading…
x
Reference in New Issue
Block a user