Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
93 changes: 49 additions & 44 deletions src/pages/qrcode_generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,9 @@ const QRCodeGeneratorPage = () => {
{/* 頁面標題 */}
<div className="text-center py-12">
<div className="flex justify-center items-center gap-3 mb-4">
<Icon icon="mdi:qrcode" className="text-4xl text-btnbg" />
<h1 className="text-5xl font-bold text-gray-800">QR Code 生成器</h1>
<h1 className="text-5xl font-bold text-gray-800 text-balance">
QR Code 生成器
</h1>
</div>
<p className="text-gray-600 text-lg">
使用 iOS Club 專屬樣式生成精美的 QR Code
Expand Down Expand Up @@ -292,53 +293,57 @@ const QRCodeGeneratorPage = () => {
</h3>

<div className="mb-6">
<label className="block text-sm font-semibold text-gray-700 mb-2">
網址
<label>
<span className="block text-sm font-semibold text-gray-700 mb-2">
網址
</span>
<div className="flex gap-2">
<input
type="text"
value={urlInput}
onChange={(e) => setUrlInput(e.target.value)}
onKeyDown={(e) => {
if (e.key === "Enter") generateQRCode();
}}
placeholder="請輸入網址⋯⋯"
className="flex-1 px-4 py-3 border-2 border-gray-300 rounded-full font-mono text-lg focus:border-btnbg focus:outline-none transition-colors"
/>
<button
onClick={clearUrlInput}
className="px-4 py-3 text-gray-700 rounded-full hover:bg-btnbg hover:text-white transition-colors flex items-center justify-center"
title="清除網址輸入"
>
<Icon icon="mdi:close" className="text-xl" />
</button>
</div>
</label>
Comment on lines +296 to 319
<div className="flex gap-2">
<input
type="text"
value={urlInput}
onChange={(e) => setUrlInput(e.target.value)}
onKeyDown={(e) => {
if (e.key === "Enter") generateQRCode();
}}
placeholder="請輸入網址⋯⋯"
className="flex-1 px-4 py-3 border-2 border-gray-300 rounded-full font-mono text-lg focus:border-btnbg focus:outline-none transition-colors"
/>
<button
onClick={clearUrlInput}
className="px-4 py-3 text-gray-700 rounded-full hover:bg-btnbg hover:text-white transition-colors flex items-center justify-center"
title="清除網址輸入"
>
<Icon icon="mdi:close" className="text-xl" />
</button>
</div>
</div>

<div className="mb-6">
<label className="block text-sm font-semibold text-gray-700 mb-2">
標題(選填)
<label>
<span className="block text-sm font-semibold text-gray-700 mb-2">
標題(選填)
</span>
<div className="flex gap-2">
<input
Comment on lines +323 to +328
type="text"
value={titleInput}
onChange={(e) => setTitleInput(e.target.value)}
onKeyDown={(e) => {
if (e.key === "Enter") generateQRCode();
}}
placeholder="如未填標題則生成單一 QR Code"
className="flex-1 px-4 py-3 border-2 border-gray-300 rounded-full font-mono text-lg focus:border-btnbg focus:outline-none transition-colors"
/>
<button
onClick={clearTitleInput}
className="px-4 py-3 text-gray-700 rounded-full hover:bg-btnbg hover:text-white transition-colors flex items-center justify-center"
title="清除標題輸入"
>
<Icon icon="mdi:close" className="text-xl" />
</button>
</div>
</label>
<div className="flex gap-2">
<input
type="text"
value={titleInput}
onChange={(e) => setTitleInput(e.target.value)}
onKeyDown={(e) => {
if (e.key === "Enter") generateQRCode();
}}
placeholder="如未填標題則生成單一 QR Code"
className="flex-1 px-4 py-3 border-2 border-gray-300 rounded-full font-mono text-lg focus:border-btnbg focus:outline-none transition-colors"
/>
<button
onClick={clearTitleInput}
className="px-4 py-3 text-gray-700 rounded-full hover:bg-btnbg hover:text-white transition-colors flex items-center justify-center"
title="清除標題輸入"
>
<Icon icon="mdi:close" className="text-xl" />
</button>
</div>
</div>

{/* 生成按鈕 */}
Expand Down
89 changes: 47 additions & 42 deletions src/pages/rfid_converter.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ const RfidConverterPage = () => {
decimal: decimal,
};
} catch (e) {
console.error(e);
return null;
Comment thread
Pencil126 marked this conversation as resolved.
}
};
Expand Down Expand Up @@ -78,6 +79,7 @@ const RfidConverterPage = () => {
reversedFormatted: reversedBytes.join(":"),
};
} catch (e) {
console.error(e);
return null;
Comment thread
Pencil126 marked this conversation as resolved.
}
};
Expand All @@ -101,8 +103,7 @@ const RfidConverterPage = () => {
{/* 頁面標題 */}
<div className="text-center py-12">
<div className="flex justify-center items-center gap-3 mb-4">
<Icon icon="mdi:rfid" className="text-4xl text-btnbg" />
<h1 className="text-5xl font-bold text-gray-800">
<h1 className="text-5xl font-bold text-gray-800 text-balance">
RFID 卡號轉換器
</h1>
</div>
Expand All @@ -124,31 +125,33 @@ const RfidConverterPage = () => {
</h3>

<div className="mb-6">
<label className="block text-sm font-semibold text-gray-700 mb-2">
16進制卡號(例: B4C5D677 或 0xB4C5D677)
<label>
<span className="block text-sm font-semibold text-gray-700 mb-2">
16進制卡號(例: B4C5D677 或 0xB4C5D677)
</span>
<div className="flex gap-2">
<input
type="text"
value={hexInput}
onChange={(e) => setHexInput(e.target.value)}
placeholder="請輸入16進制卡號⋯⋯"
className="flex-1 px-4 py-3 border-2 border-gray-300 rounded-full font-mono text-lg focus:border-btnbg focus:outline-none transition-colors"
/>
<button
onClick={clearHex}
className="px-4 py-3 text-gray-700 rounded-full hover:bg-btnbg hover:text-white transition-colors flex items-center justify-center"
title="清除輸入"
>
<Icon icon="mdi:close" className="text-xl" />
</button>
</div>
</label>
Comment on lines +128 to 148
<div className="flex gap-2">
<input
type="text"
value={hexInput}
onChange={(e) => setHexInput(e.target.value)}
placeholder="請輸入16進制卡號⋯⋯"
className="flex-1 px-4 py-3 border-2 border-gray-300 rounded-full font-mono text-lg focus:border-btnbg focus:outline-none transition-colors"
/>
<button
onClick={clearHex}
className="px-4 py-3 text-gray-700 rounded-full hover:bg-btnbg hover:text-white transition-colors flex items-center justify-center"
title="清除輸入"
>
<Icon icon="mdi:close" className="text-xl" />
</button>
</div>
</div>

<div className="mb-4">
<label className="block text-sm font-semibold text-gray-700 mb-2">
<p className="block text-sm font-semibold text-gray-700 mb-2">
轉換結果:
</label>
</p>
<div
className={`p-4 rounded-lg border-2 font-mono ${
hexResult
Expand Down Expand Up @@ -190,31 +193,33 @@ const RfidConverterPage = () => {
</h3>

<div className="mb-6">
<label className="block text-sm font-semibold text-gray-700 mb-2">
10進制卡號(例: 1234567890)
<label>
<span className="block text-sm font-semibold text-gray-700 mb-2">
10進制卡號(例: 1234567890)
</span>
<div className="flex gap-2">
<input
type="text"
value={decInput}
onChange={(e) => setDecInput(e.target.value)}
placeholder="請輸入10進制卡號⋯⋯"
className="flex-1 px-4 py-3 border-2 border-gray-300 rounded-full font-mono text-lg focus:border-btnbg focus:outline-none transition-colors"
/>
<button
onClick={clearDec}
className="px-4 py-3 text-gray-700 rounded-full hover:bg-btnbg hover:text-white transition-colors flex items-center justify-center"
title="清除輸入"
>
<Icon icon="mdi:close" className="text-xl" />
</button>
</div>
</label>
Comment on lines +196 to 216
<div className="flex gap-2">
<input
type="text"
value={decInput}
onChange={(e) => setDecInput(e.target.value)}
placeholder="請輸入10進制卡號⋯⋯"
className="flex-1 px-4 py-3 border-2 border-gray-300 rounded-full font-mono text-lg focus:border-btnbg focus:outline-none transition-colors"
/>
<button
onClick={clearDec}
className="px-4 py-3 text-gray-700 rounded-full hover:bg-btnbg hover:text-white transition-colors flex items-center justify-center"
title="清除輸入"
>
<Icon icon="mdi:close" className="text-xl" />
</button>
</div>
</div>

<div className="mb-4">
<label className="block text-sm font-semibold text-gray-700 mb-2">
<p className="block text-sm font-semibold text-gray-700 mb-2">
轉換結果:
</label>
</p>
<div
className={`p-4 rounded-lg border-2 font-mono ${
decResult
Expand Down