update icon
This commit is contained in:
1 parent
c7fa91c8ce
commit
3072bb5099
7 files changed
+1530
-3
No files matched your search
@@ -11,8 +11,10 @@
|
||||
"socket.io-client": "^4.8.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@iconify-json/tabler": "^1.2.35",
|
||||
"@tailwindcss/vite": "^4.1.3",
|
||||
"tailwindcss": "^4.1.3",
|
||||
"unplugin-icons": "^23.0.1",
|
||||
"vite": "^6.2.3"
|
||||
}
|
||||
}
|
||||
Generated
+1272
File diff suppressed because it is too large.
Load diff
@@ -1,5 +1,6 @@
|
||||
// Részletes nézet panel - egy webhook kérés összes adata tabokba szervezve
|
||||
import { formatTimestamp, methodColor } from '../utils/formatters.js';
|
||||
import { icon } from '../utils/icon.js';
|
||||
|
||||
// Részletes panel komponens létrehozása
|
||||
// onClose: callback a panel bezárásakor
|
||||
@@ -9,7 +10,7 @@ export function createRequestDetail(onClose) {
|
||||
panel.innerHTML = `
|
||||
<div id="detail-empty" class="flex-1 flex items-center justify-center text-gray-600">
|
||||
<div class="text-center">
|
||||
<div class="text-3xl mb-2">👆</div>
|
||||
<div class="text-3xl mb-2 flex justify-center">${icon('hand-click', 'w-18 h-18 text-gray-500')}</div>
|
||||
<p>Kattints egy sorra a részletekhez</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
// Webhook kérések táblázata - valós időben frissülő lista
|
||||
import { formatRelativeTime, formatTimestamp, methodColor, truncatePayload } from '../utils/formatters.js';
|
||||
import { icon } from '../utils/icon.js';
|
||||
|
||||
// Maximum ennyi sort tartunk a táblázatban memóriakímélés miatt
|
||||
const MAX_ROWS = 100;
|
||||
@@ -29,7 +30,7 @@ export function createRequestTable(onRowClick) {
|
||||
</tbody>
|
||||
</table>
|
||||
<div id="empty-state" class="py-16 text-center text-gray-600">
|
||||
<div class="text-4xl mb-3">📡</div>
|
||||
<div class="text-4xl mb-3 flex justify-center">${icon('network', 'w-18 h-18 text-gray-500')}</div>
|
||||
<p class="text-lg font-medium text-gray-500">Várakozás a webhook hívásokra…</p>
|
||||
<p class="text-sm mt-1">Küldd el a webhook URL-t, és a kérések itt jelennek meg</p>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
// Tabler ikon helper - unplugin-icons ?raw importok köré.
|
||||
// Csak a ténylegesen importált ikonok kerülnek a bundle-be.
|
||||
//
|
||||
// Új ikon felvétele:
|
||||
// 1. import IconValami from '~icons/tabler/valami?raw';
|
||||
// 2. vedd fel a REG mapbe: 'valami': IconValami
|
||||
// 3. használat: icon('valami', 'w-5 h-5 text-red-500')
|
||||
//
|
||||
// Minden Tabler ikon currentColor-t használ → szín Tailwind text-* osztállyal,
|
||||
// méret w-*/h-* osztállyal (a beépített width/height attribútumot leszedjük).
|
||||
|
||||
import IconTrash from '~icons/tabler/trash?raw';
|
||||
import IconCopy from '~icons/tabler/copy?raw';
|
||||
import IconHandClick from '~icons/tabler/hand-click?raw';
|
||||
import IconNetwork from '~icons/tabler/network?raw';
|
||||
|
||||
// Regisztrált ikonok: név -> nyers SVG string
|
||||
const REG = {
|
||||
trash: IconTrash,
|
||||
copy: IconCopy,
|
||||
'hand-click': IconHandClick,
|
||||
'network': IconNetwork,
|
||||
};
|
||||
|
||||
/**
|
||||
* SVG string egy regisztrált Tabler ikonhoz, a megadott CSS osztályokkal.
|
||||
* @param {string} name - ikonnév, pl. 'trash'
|
||||
* @param {string} className - CSS osztályok (méret/szín), pl. 'w-5 h-5 text-red-500'
|
||||
* @returns {string} beszúrható SVG markup
|
||||
*/
|
||||
export function icon(name, className = 'w-5 h-5') {
|
||||
const raw = REG[name];
|
||||
if (!raw) {
|
||||
console.warn(`[icon] Nem regisztrált ikon: ${name} (vedd fel az icon.js REG mapbe)`);
|
||||
return `<svg class="${className}" viewBox="0 0 24 24"></svg>`;
|
||||
}
|
||||
// Fix width/height attribútum leszedése (Tailwind méret nyerjen), majd class beszúrása
|
||||
return raw
|
||||
.replace(/\s(width|height)="[^"]*"/g, '')
|
||||
.replace('<svg', `<svg class="${className}" aria-hidden="true"`);
|
||||
}
|
||||
@@ -1,11 +1,15 @@
|
||||
// Vite build konfiguráció
|
||||
import { defineConfig } from 'vite';
|
||||
import tailwindcss from '@tailwindcss/vite';
|
||||
import Icons from 'unplugin-icons/vite';
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [
|
||||
// Tailwind CSS Vite plugin - natív integráció, nem kell postcss
|
||||
tailwindcss()
|
||||
tailwindcss(),
|
||||
// Ikonok: ~icons/tabler/<név> import, csak a használtak kerülnek a bundle-be.
|
||||
// compiler 'raw' -> nyers SVG string (vanilla JS-hez, innerHTML-be illeszthető)
|
||||
Icons({ compiler: 'raw' })
|
||||
],
|
||||
|
||||
build: {
|
||||
|
||||
Generated
+206
@@ -0,0 +1,206 @@
|
||||
lockfileVersion: '9.0'
|
||||
|
||||
settings:
|
||||
autoInstallPeers: true
|
||||
excludeLinksFromLockfile: false
|
||||
|
||||
importers:
|
||||
|
||||
.:
|
||||
devDependencies:
|
||||
concurrently:
|
||||
specifier: ^9.1.2
|
||||
version: 9.2.3
|
||||
|
||||
packages:
|
||||
|
||||
ansi-regex@5.0.1:
|
||||
resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==}
|
||||
engines: {node: '>=8'}
|
||||
|
||||
ansi-styles@4.3.0:
|
||||
resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==}
|
||||
engines: {node: '>=8'}
|
||||
|
||||
chalk@4.1.2:
|
||||
resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==}
|
||||
engines: {node: '>=10'}
|
||||
|
||||
cliui@8.0.1:
|
||||
resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==}
|
||||
engines: {node: '>=12'}
|
||||
|
||||
color-convert@2.0.1:
|
||||
resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==}
|
||||
engines: {node: '>=7.0.0'}
|
||||
|
||||
color-name@1.1.4:
|
||||
resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==}
|
||||
|
||||
concurrently@9.2.3:
|
||||
resolution: {integrity: sha512-ihjs0E2SxvDgq/MK418hX6YycQgKhsqxpbZuZbHo0yKfqDWdymWMjWYIpCIzqDDLLKClHlXev8whW/8WXmJ0BA==}
|
||||
engines: {node: '>=18'}
|
||||
hasBin: true
|
||||
|
||||
emoji-regex@8.0.0:
|
||||
resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==}
|
||||
|
||||
escalade@3.2.0:
|
||||
resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==}
|
||||
engines: {node: '>=6'}
|
||||
|
||||
get-caller-file@2.0.5:
|
||||
resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==}
|
||||
engines: {node: 6.* || 8.* || >= 10.*}
|
||||
|
||||
has-flag@4.0.0:
|
||||
resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==}
|
||||
engines: {node: '>=8'}
|
||||
|
||||
is-fullwidth-code-point@3.0.0:
|
||||
resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==}
|
||||
engines: {node: '>=8'}
|
||||
|
||||
require-directory@2.1.1:
|
||||
resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==}
|
||||
engines: {node: '>=0.10.0'}
|
||||
|
||||
rxjs@7.8.2:
|
||||
resolution: {integrity: sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==}
|
||||
|
||||
shell-quote@1.8.4:
|
||||
resolution: {integrity: sha512-VsC6n6vz1ihYYyZZwX7YZSF5l5x36ca17OC+a69h94YqB7X6XLwf+5MOgynYir2SLFUbl8gIYvBo8K8RoNQ6bQ==}
|
||||
engines: {node: '>= 0.4'}
|
||||
|
||||
string-width@4.2.3:
|
||||
resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==}
|
||||
engines: {node: '>=8'}
|
||||
|
||||
strip-ansi@6.0.1:
|
||||
resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==}
|
||||
engines: {node: '>=8'}
|
||||
|
||||
supports-color@7.2.0:
|
||||
resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==}
|
||||
engines: {node: '>=8'}
|
||||
|
||||
supports-color@8.1.1:
|
||||
resolution: {integrity: sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==}
|
||||
engines: {node: '>=10'}
|
||||
|
||||
tree-kill@1.2.2:
|
||||
resolution: {integrity: sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==}
|
||||
hasBin: true
|
||||
|
||||
tslib@2.8.1:
|
||||
resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==}
|
||||
|
||||
wrap-ansi@7.0.0:
|
||||
resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==}
|
||||
engines: {node: '>=10'}
|
||||
|
||||
y18n@5.0.8:
|
||||
resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==}
|
||||
engines: {node: '>=10'}
|
||||
|
||||
yargs-parser@21.1.1:
|
||||
resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==}
|
||||
engines: {node: '>=12'}
|
||||
|
||||
yargs@17.7.2:
|
||||
resolution: {integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==}
|
||||
engines: {node: '>=12'}
|
||||
|
||||
snapshots:
|
||||
|
||||
ansi-regex@5.0.1: {}
|
||||
|
||||
ansi-styles@4.3.0:
|
||||
dependencies:
|
||||
color-convert: 2.0.1
|
||||
|
||||
chalk@4.1.2:
|
||||
dependencies:
|
||||
ansi-styles: 4.3.0
|
||||
supports-color: 7.2.0
|
||||
|
||||
cliui@8.0.1:
|
||||
dependencies:
|
||||
string-width: 4.2.3
|
||||
strip-ansi: 6.0.1
|
||||
wrap-ansi: 7.0.0
|
||||
|
||||
color-convert@2.0.1:
|
||||
dependencies:
|
||||
color-name: 1.1.4
|
||||
|
||||
color-name@1.1.4: {}
|
||||
|
||||
concurrently@9.2.3:
|
||||
dependencies:
|
||||
chalk: 4.1.2
|
||||
rxjs: 7.8.2
|
||||
shell-quote: 1.8.4
|
||||
supports-color: 8.1.1
|
||||
tree-kill: 1.2.2
|
||||
yargs: 17.7.2
|
||||
|
||||
emoji-regex@8.0.0: {}
|
||||
|
||||
escalade@3.2.0: {}
|
||||
|
||||
get-caller-file@2.0.5: {}
|
||||
|
||||
has-flag@4.0.0: {}
|
||||
|
||||
is-fullwidth-code-point@3.0.0: {}
|
||||
|
||||
require-directory@2.1.1: {}
|
||||
|
||||
rxjs@7.8.2:
|
||||
dependencies:
|
||||
tslib: 2.8.1
|
||||
|
||||
shell-quote@1.8.4: {}
|
||||
|
||||
string-width@4.2.3:
|
||||
dependencies:
|
||||
emoji-regex: 8.0.0
|
||||
is-fullwidth-code-point: 3.0.0
|
||||
strip-ansi: 6.0.1
|
||||
|
||||
strip-ansi@6.0.1:
|
||||
dependencies:
|
||||
ansi-regex: 5.0.1
|
||||
|
||||
supports-color@7.2.0:
|
||||
dependencies:
|
||||
has-flag: 4.0.0
|
||||
|
||||
supports-color@8.1.1:
|
||||
dependencies:
|
||||
has-flag: 4.0.0
|
||||
|
||||
tree-kill@1.2.2: {}
|
||||
|
||||
tslib@2.8.1: {}
|
||||
|
||||
wrap-ansi@7.0.0:
|
||||
dependencies:
|
||||
ansi-styles: 4.3.0
|
||||
string-width: 4.2.3
|
||||
strip-ansi: 6.0.1
|
||||
|
||||
y18n@5.0.8: {}
|
||||
|
||||
yargs-parser@21.1.1: {}
|
||||
|
||||
yargs@17.7.2:
|
||||
dependencies:
|
||||
cliui: 8.0.1
|
||||
escalade: 3.2.0
|
||||
get-caller-file: 2.0.5
|
||||
require-directory: 2.1.1
|
||||
string-width: 4.2.3
|
||||
y18n: 5.0.8
|
||||
yargs-parser: 21.1.1
|
||||
Reference in new issue
Block a user