Skip to content

Commit

Permalink
hf14a-scanner add ats (#143)
Browse files Browse the repository at this point in the history
  • Loading branch information
taichunmin authored Aug 29, 2024
2 parents 2b9a2ba + 5aaa510 commit c704d97
Show file tree
Hide file tree
Showing 3 changed files with 202 additions and 194 deletions.
21 changes: 10 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"@types/jest": "^29.5.12",
"@types/livereload": "^0.9.5",
"@types/lodash": "^4.17.7",
"@types/node": "^22.0.2",
"@types/node": "^22.5.1",
"@types/pug": "^2.0.10",
"@types/serve-static": "^1.15.7",
"@types/uglify-js": "^3.17.5",
Expand All @@ -46,16 +46,16 @@
"@typescript-eslint/parser": "^7.18.0",
"chokidar": "^3.6.0",
"concurrently": "^8.2.2",
"dayjs": "^1.11.12",
"dayjs": "^1.11.13",
"dotenv": "^16.4.5",
"esbuild-plugins-node-modules-polyfill": "^1.6.4",
"esbuild-plugins-node-modules-polyfill": "^1.6.5",
"eslint": "^8.57.0",
"eslint-config-love": "^43",
"eslint-config-standard": "^17.1.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-local-rules": "^3.0.2",
"eslint-plugin-n": "^17.10.1",
"eslint-plugin-promise": "^7.0.0",
"eslint-plugin-n": "^17.10.2",
"eslint-plugin-promise": "^7.1.0",
"eslint-plugin-pug": "^1.2.5",
"eslint-plugin-tsdoc": "^0.3.0",
"finalhandler": "^1.2.0",
Expand All @@ -69,15 +69,14 @@
"rimraf": "^6.0.1",
"serve-static": "^1.15.0",
"supports-color": "^9.4.0",
"ts-jest": "^29.2.4",
"ts-jest": "^29.2.5",
"ts-node": "^10.9.2",
"tsup": "^8.2.3",
"tsx": "^4.16.5",
"typedoc": "^0.26.5",
"typedoc-plugin-mdn-links": "^3.2.6",
"tsup": "^8.2.4",
"tsx": "^4.19.0",
"typedoc": "^0.26.6",
"typedoc-plugin-mdn-links": "^3.2.10",
"typedoc-plugin-missing-exports": "^3.0.0",
"typedoc-plugin-rename-defaults": "^0.7.1",
"typedoc-plugin-zod": "^1.2.0",
"typescript": "^5.5.4",
"utility-types": "^3.11.0"
},
Expand Down
7 changes: 5 additions & 2 deletions pug/src/hf14a-scanner.pug
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,18 @@ block content
th UID
th ATQA
th SAK
th ATS
tbody
tr(
v-for="tag in ss.tags",
:key="`${tag.uid}-${tag.atqa}-${tag.sak}`",
:class="tag.ts + 1000 > tsnow ? 'animate__animated animate__flash' : ''",
)
td {{ dayjs(tag.ts).format('YYYY-MM-DD HH:mm:ss') }}
td(@click="btnCopy(tag.uid)") {{ tag.uid }}
td.text-left(@click="btnCopy(tag.uid)") {{ tag.uid }}
td(@click="btnCopy(tag.atqa)") {{ tag.atqa }}
td(@click="btnCopy(tag.sak)") {{ tag.sak }}
td.text-left(@click="btnCopy(tag.ats)") {{ tag.ats }}

block script
script.
Expand Down Expand Up @@ -119,6 +121,7 @@ block script
for (const tag of scanned) {
newTags.push({
atqa: toHex(tag.atqa.toReversed()),
ats: toHex(tag.ats),
sak: toHex(tag.sak),
ts: Date.now(),
uid: toHex(tag.uid),
Expand All @@ -127,7 +130,7 @@ block script
this.$set(this.ss, 'tags', _.uniqBy([
...newTags,
...this.ss.tags,
], c => `${c.uid}-${c.atqa}-${c.sak}`))
], c => `${c.uid}-${c.atqa}-${c.sak}-${c.ats}`))
} catch (err) {
if (!ultra.isConnected()) throw err
}
Expand Down
Loading

0 comments on commit c704d97

Please sign in to comment.