update UI
This commit is contained in:
parent
71290dcdcd
commit
d145558446
|
|
@ -1 +1 @@
|
||||||
import{R as c,j as s,Q as u,q as l,P as d}from"./popup-Bz59jSUd.js";import"./base64-BbJB1hmJ.js";import"./product-api.service--mothqFI.js";import"./app-C7VSS-q9.js";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const e of document.querySelectorAll('link[rel="modulepreload"]'))i(e);new MutationObserver(e=>{for(const r of e)if(r.type==="childList")for(const o of r.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function n(e){const r={};return e.integrity&&(r.integrity=e.integrity),e.referrerPolicy&&(r.referrerPolicy=e.referrerPolicy),e.crossOrigin==="use-credentials"?r.credentials="include":e.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function i(e){if(e.ep)return;e.ep=!0;const r=n(e);fetch(e.href,r)}})();c.createRoot(document.getElementById("root")).render(s.jsx(u,{client:l,children:s.jsx(d,{})}));
|
import{R as c,j as s,Q as u,q as l,P as d}from"./popup-BMz864nQ.js";import"./base64-BbJB1hmJ.js";import"./product-api.service-PLptzR9s.js";import"./app-C7VSS-q9.js";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const e of document.querySelectorAll('link[rel="modulepreload"]'))i(e);new MutationObserver(e=>{for(const r of e)if(r.type==="childList")for(const o of r.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function n(e){const r={};return e.integrity&&(r.integrity=e.integrity),e.referrerPolicy&&(r.referrerPolicy=e.referrerPolicy),e.crossOrigin==="use-credentials"?r.credentials="include":e.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function i(e){if(e.ep)return;e.ep=!0;const r=n(e);fetch(e.href,r)}})();c.createRoot(document.getElementById("root")).render(s.jsx(u,{client:l,children:s.jsx(d,{})}));
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -7,9 +7,9 @@
|
||||||
<title>Vite + React + TS</title>
|
<title>Vite + React + TS</title>
|
||||||
<script type="module" crossorigin src="/assets/popup.js"></script>
|
<script type="module" crossorigin src="/assets/popup.js"></script>
|
||||||
<link rel="modulepreload" crossorigin href="/assets/base64-BbJB1hmJ.js">
|
<link rel="modulepreload" crossorigin href="/assets/base64-BbJB1hmJ.js">
|
||||||
<link rel="modulepreload" crossorigin href="/assets/product-api.service--mothqFI.js">
|
<link rel="modulepreload" crossorigin href="/assets/product-api.service-PLptzR9s.js">
|
||||||
<link rel="modulepreload" crossorigin href="/assets/app-C7VSS-q9.js">
|
<link rel="modulepreload" crossorigin href="/assets/app-C7VSS-q9.js">
|
||||||
<link rel="modulepreload" crossorigin href="/assets/popup-Bz59jSUd.js">
|
<link rel="modulepreload" crossorigin href="/assets/popup-BMz864nQ.js">
|
||||||
<link rel="stylesheet" crossorigin href="/assets/style.css">
|
<link rel="stylesheet" crossorigin href="/assets/style.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 35 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 566 B |
Binary file not shown.
|
After Width: | Height: | Size: 1.5 KiB |
|
|
@ -1 +1 @@
|
||||||
import{R as c,j as s,Q as u,q as l,P as d}from"./popup-Bz59jSUd.js";import"./base64-BbJB1hmJ.js";import"./product-api.service--mothqFI.js";import"./app-C7VSS-q9.js";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const e of document.querySelectorAll('link[rel="modulepreload"]'))i(e);new MutationObserver(e=>{for(const r of e)if(r.type==="childList")for(const o of r.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function n(e){const r={};return e.integrity&&(r.integrity=e.integrity),e.referrerPolicy&&(r.referrerPolicy=e.referrerPolicy),e.crossOrigin==="use-credentials"?r.credentials="include":e.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function i(e){if(e.ep)return;e.ep=!0;const r=n(e);fetch(e.href,r)}})();c.createRoot(document.getElementById("root")).render(s.jsx(u,{client:l,children:s.jsx(d,{})}));
|
import{R as c,j as s,Q as u,q as l,P as d}from"./popup-BMz864nQ.js";import"./base64-BbJB1hmJ.js";import"./product-api.service-PLptzR9s.js";import"./app-C7VSS-q9.js";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const e of document.querySelectorAll('link[rel="modulepreload"]'))i(e);new MutationObserver(e=>{for(const r of e)if(r.type==="childList")for(const o of r.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function n(e){const r={};return e.integrity&&(r.integrity=e.integrity),e.referrerPolicy&&(r.referrerPolicy=e.referrerPolicy),e.crossOrigin==="use-credentials"?r.credentials="include":e.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function i(e){if(e.ep)return;e.ep=!0;const r=n(e);fetch(e.href,r)}})();c.createRoot(document.getElementById("root")).render(s.jsx(u,{client:l,children:s.jsx(d,{})}));
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -7,9 +7,9 @@
|
||||||
<title>Vite + React + TS</title>
|
<title>Vite + React + TS</title>
|
||||||
<script type="module" crossorigin src="/assets/popup.js"></script>
|
<script type="module" crossorigin src="/assets/popup.js"></script>
|
||||||
<link rel="modulepreload" crossorigin href="/assets/base64-BbJB1hmJ.js">
|
<link rel="modulepreload" crossorigin href="/assets/base64-BbJB1hmJ.js">
|
||||||
<link rel="modulepreload" crossorigin href="/assets/product-api.service--mothqFI.js">
|
<link rel="modulepreload" crossorigin href="/assets/product-api.service-PLptzR9s.js">
|
||||||
<link rel="modulepreload" crossorigin href="/assets/app-C7VSS-q9.js">
|
<link rel="modulepreload" crossorigin href="/assets/app-C7VSS-q9.js">
|
||||||
<link rel="modulepreload" crossorigin href="/assets/popup-Bz59jSUd.js">
|
<link rel="modulepreload" crossorigin href="/assets/popup-BMz864nQ.js">
|
||||||
<link rel="stylesheet" crossorigin href="/assets/style.css">
|
<link rel="stylesheet" crossorigin href="/assets/style.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1 @@
|
||||||
[
|
[]
|
||||||
{
|
|
||||||
"title": "Cisco AIR-PWRINJ6 Power Injector 8023at for Aironet Access Points - AIR-PWRINJ6",
|
|
||||||
"price": 95,
|
|
||||||
"el": {},
|
|
||||||
"date": "2025-08-22T09:58:21.949Z"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"title": "Cisco AIR-CT7510-K9 Wireless LAN Controller w / OS 8.5.182, 2x 300GB, 2x SFP+ - AIR-CT7510-K9",
|
|
||||||
"price": 8562,
|
|
||||||
"el": {},
|
|
||||||
"date": "2025-08-22T09:58:21.950Z"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
|
|
@ -187,14 +187,23 @@ window.addEventListener("message", async (event) => {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "sync": {
|
case "sync": {
|
||||||
const products = await facebookService.getProducts();
|
const el = await thiefService.waitForElement(
|
||||||
|
'[aria-label="Collection of your Marketplace items"]'
|
||||||
|
);
|
||||||
|
console.log("Element đã xuất hiện:", el);
|
||||||
|
|
||||||
|
await facebookService.waitForPageReady(
|
||||||
|
facebookService.sellingPath,
|
||||||
|
'[aria-label="Collection of your Marketplace items"]'
|
||||||
|
);
|
||||||
|
|
||||||
|
await delayRD(800, 1000);
|
||||||
|
|
||||||
|
const products = await facebookService.getProducts();
|
||||||
console.log({ products });
|
console.log({ products });
|
||||||
|
|
||||||
await productApi.sync(products);
|
await productApi.sync(products);
|
||||||
|
|
||||||
data = products;
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -221,6 +230,8 @@ window.addEventListener("message", async (event) => {
|
||||||
});
|
});
|
||||||
|
|
||||||
(async () => {
|
(async () => {
|
||||||
|
// Call to inject modal
|
||||||
|
|
||||||
await delayRD(800, 1000);
|
await delayRD(800, 1000);
|
||||||
|
|
||||||
// Sử dụng
|
// Sử dụng
|
||||||
|
|
@ -241,7 +252,6 @@ window.addEventListener("message", async (event) => {
|
||||||
|
|
||||||
productApi.sync(products);
|
productApi.sync(products);
|
||||||
|
|
||||||
// Call to inject modal
|
|
||||||
injectApp();
|
injectApp();
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
|
|
|
||||||
|
|
@ -69,20 +69,22 @@ export function mapToIPost(raw: any): IPost {
|
||||||
|
|
||||||
return {
|
return {
|
||||||
images,
|
images,
|
||||||
title: `${raw.title} - ${raw.code}`,
|
title: raw?.title?.includes(raw?.code)
|
||||||
price: raw.price,
|
? raw?.title
|
||||||
|
: `${raw?.title} - ${raw?.code}`,
|
||||||
|
price: raw?.price,
|
||||||
category: "electronics & computers",
|
category: "electronics & computers",
|
||||||
condition: (raw?.conditionEbay as string)?.toLowerCase()?.includes("new")
|
condition: (raw?.conditionEbay as string)?.toLowerCase()?.includes("new")
|
||||||
? "new"
|
? "new"
|
||||||
: "used – like new",
|
: "used – like new",
|
||||||
brand: typeof raw.manufactor === "string" ? raw.manufactor : "",
|
brand: typeof raw?.manufactor === "string" ? raw?.manufactor : "",
|
||||||
description: descriptionLines,
|
description: descriptionLines,
|
||||||
tags: [],
|
tags: [],
|
||||||
sku: raw.code,
|
sku: raw?.code,
|
||||||
location: raw.location || "Sydney, Australia",
|
location: raw?.location || "Sydney, Australia",
|
||||||
status: false,
|
status: false,
|
||||||
id: raw.id,
|
id: raw?.id,
|
||||||
publist_id: raw.listingId,
|
publist_id: raw?.listingId,
|
||||||
raw_condition: raw?.condition,
|
raw_condition: raw?.condition,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -171,18 +171,6 @@ export default function Popup() {
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* <Button
|
|
||||||
onClick={async () => {
|
|
||||||
await productApi.apiRequest("sync", {});
|
|
||||||
|
|
||||||
publistQuery.refetch();
|
|
||||||
dataQuery.refetch();
|
|
||||||
}}
|
|
||||||
size={"icon"}
|
|
||||||
>
|
|
||||||
<RefreshCcwIcon />
|
|
||||||
</Button> */}
|
|
||||||
|
|
||||||
<ImprovedToggleFilter
|
<ImprovedToggleFilter
|
||||||
filter={filter as any}
|
filter={filter as any}
|
||||||
setFilter={setFilter}
|
setFilter={setFilter}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue