update UI

This commit is contained in:
Admin 2025-08-23 08:27:24 +07:00
parent 71290dcdcd
commit d145558446
13 changed files with 42 additions and 55 deletions

View File

@ -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

View File

@ -7,9 +7,9 @@
<title>Vite + React + TS</title>
<script type="module" crossorigin src="/assets/popup.js"></script>
<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/popup-Bz59jSUd.js">
<link rel="modulepreload" crossorigin href="/assets/popup-BMz864nQ.js">
<link rel="stylesheet" crossorigin href="/assets/style.css">
</head>
<body>

BIN
public/icons/128.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

BIN
public/icons/16.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 566 B

BIN
public/icons/32.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -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

View File

@ -7,9 +7,9 @@
<title>Vite + React + TS</title>
<script type="module" crossorigin src="/assets/popup.js"></script>
<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/popup-Bz59jSUd.js">
<link rel="modulepreload" crossorigin href="/assets/popup-BMz864nQ.js">
<link rel="stylesheet" crossorigin href="/assets/style.css">
</head>
<body>

View File

@ -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"
}
]
[]

View File

@ -187,14 +187,23 @@ window.addEventListener("message", async (event) => {
break;
}
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 });
await productApi.sync(products);
data = products;
break;
}
}
@ -221,6 +230,8 @@ window.addEventListener("message", async (event) => {
});
(async () => {
// Call to inject modal
await delayRD(800, 1000);
// Sử dụng
@ -241,7 +252,6 @@ window.addEventListener("message", async (event) => {
productApi.sync(products);
// Call to inject modal
injectApp();
})
.catch((err) => {

View File

@ -69,20 +69,22 @@ export function mapToIPost(raw: any): IPost {
return {
images,
title: `${raw.title} - ${raw.code}`,
price: raw.price,
title: raw?.title?.includes(raw?.code)
? raw?.title
: `${raw?.title} - ${raw?.code}`,
price: raw?.price,
category: "electronics & computers",
condition: (raw?.conditionEbay as string)?.toLowerCase()?.includes("new")
? "new"
: "used like new",
brand: typeof raw.manufactor === "string" ? raw.manufactor : "",
brand: typeof raw?.manufactor === "string" ? raw?.manufactor : "",
description: descriptionLines,
tags: [],
sku: raw.code,
location: raw.location || "Sydney, Australia",
sku: raw?.code,
location: raw?.location || "Sydney, Australia",
status: false,
id: raw.id,
publist_id: raw.listingId,
id: raw?.id,
publist_id: raw?.listingId,
raw_condition: raw?.condition,
};
}

View File

@ -171,18 +171,6 @@ export default function Popup() {
/>
</div>
{/* <Button
onClick={async () => {
await productApi.apiRequest("sync", {});
publistQuery.refetch();
dataQuery.refetch();
}}
size={"icon"}
>
<RefreshCcwIcon />
</Button> */}
<ImprovedToggleFilter
filter={filter as any}
setFilter={setFilter}