c9432a16ba
- SIWE auth flow: challenge/login/logout/me API routes + JWT middleware
- Fixed [...path] catch-all: Kubo proxy with matchRoute() + mapToKuboAPI()
- Fixed session_id → nonce field mismatch in AuthProvider
- Fixed dashboard pins crash: Kubo returns {Keys: {...}}, not array
- Added middleware route guard (307 redirect to /login)
- Added login, register, profile, usage, upload pages
- Added dashboard components (StorageGauge, FreeTierProgress)
- Added SWR hooks + AuthGuard + Providers + Toast/ErrorBoundary
- Added payment integration (smart contract ABI, tiers, tokens)
- Fixed IPNS key listing: Name/Id → name/id mapping
- Added PWA support (manifest, service worker, icons)
- Added tests for helpers, limits, search-index, wallet
19 lines
520 B
JavaScript
19 lines
520 B
JavaScript
/* ── Generate PNG icons from SVG ── */
|
|
const sharp = require('sharp');
|
|
const fs = require('fs');
|
|
const path = require('path');
|
|
|
|
async function main() {
|
|
const sizes = [192, 512];
|
|
for (const size of sizes) {
|
|
const svg = fs.readFileSync(path.join(__dirname, '..', 'public', 'icon-' + size + '.svg'));
|
|
await sharp(svg)
|
|
.resize(size, size)
|
|
.png()
|
|
.toFile(path.join(__dirname, 'icon-' + size + '.png'));
|
|
console.log(`Generated icon-${size}.png`);
|
|
}
|
|
}
|
|
|
|
main().catch(console.error);
|