feat(store): add custom labels for links (#1183)

Fixes #1132
Fixes #1163
This commit is contained in:
Jef LeCompte
2020-12-05 07:50:17 -05:00
committed by GitHub
parent 9bf33eceda
commit f7b32e8ac5
4 changed files with 53 additions and 6 deletions
+14 -2
View File
@@ -510,6 +510,12 @@ export const AmazonDe: Store = {
brand: 'sony',
cartUrl:
'https://www.amazon.de/gp/aws/cart/add.html?ASIN.1=B08H93ZRK9&Quantity.1=1',
labels: {
inStock: {
container: '#productTitle',
text: ['sony playstation 5']
}
},
model: 'ps5 console',
series: 'sonyps5c',
url: 'https://www.amazon.de/dp/B08H93ZRK9'
@@ -518,13 +524,19 @@ export const AmazonDe: Store = {
brand: 'sony',
cartUrl:
'https://www.amazon.de/gp/aws/cart/add.html?ASIN.1=B08H98GVK8&Quantity.1=1',
labels: {
inStock: {
container: '#productTitle',
text: ['sony playstation 5']
}
},
model: 'ps5 digital',
series: 'sonyps5de',
url: 'https://www.amazon.de/dp/B08H98GVK8'
},
{
brand: 'microsoft',
// Disabled because of #1095
// Fixme: disabled because of #1095, enable when working again
// cartUrl:
// 'https://www.amazon.de/gp/aws/cart/add.html?ASIN.1=B08H93ZRLL&Quantity.1=1',
model: 'xbox series x',
@@ -533,7 +545,7 @@ export const AmazonDe: Store = {
},
{
brand: 'microsoft',
// Disabled because of #1095
// Fixme: disabled because of #1095, enable when working again
// cartUrl:
// 'https://www.amazon.de/gp/aws/cart/add.html?ASIN.1=B087VM5XC6&Quantity.1=1',
model: 'xbox series s',
+21
View File
@@ -28,6 +28,13 @@ export const Otto: Store = {
},
{
brand: 'sony',
labels: {
inStock: {
container:
'.js_shortInfo__variationName.prd_shortInfo__variationName',
text: ['konsole']
}
},
model: 'ps5 console',
series: 'sonyps5c',
url:
@@ -35,6 +42,13 @@ export const Otto: Store = {
},
{
brand: 'sony',
labels: {
inStock: {
container:
'.js_shortInfo__variationName.prd_shortInfo__variationName',
text: ['konsole']
}
},
model: 'ps5 console',
series: 'sonyps5c',
url:
@@ -42,6 +56,13 @@ export const Otto: Store = {
},
{
brand: 'sony',
labels: {
inStock: {
container:
'.js_shortInfo__variationName.prd_shortInfo__variationName',
text: ['konsole']
}
},
model: 'ps5 digital',
series: 'sonyps5de',
url:
+5 -4
View File
@@ -132,13 +132,14 @@ export type Model =
export type Link = {
brand: Brand;
itemNumber?: string;
series: Series;
model: Model;
url: string;
cartUrl?: string;
itemNumber?: string;
labels?: Labels;
model: Model;
openCartAction?: (browser: Browser) => Promise<string>;
series: Series;
screenshot?: string;
url: string;
};
export type LabelQuery = Element[] | Element | string[];