TreeMap
A free, open-source disk-space visualizer. Squarified treemap, duplicate hunting, disk-full forecasting, and cleanup that only ever moves files to the Trash.
翻译准备中
尚未检测到更新。GitHub 发布版本后会显示在这里。
个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证正在加载完整 README。 以下为已保存的摘录。
Unified Inbox — Phase 3 (Google OAuth + Gmail)
Phase 2 converted the working index.html prototype into a maintainable
Next.js + TypeScript app running on mock data only. Phase 3 adds a real,
read-only connection to one Gmail account via Google OAuth — everything
else (Outlook accounts, the other 11 mock Gmail accounts) is still mock
data, exactly as before.
Every row component (AccountRow, ExpandedAccount, EmailRow) receives
its data as props — none of them import mock data directly.
Phase 3: Google OAuth + Gmail (new)查看完整 README ↗Phase 2 converted the working index.html prototype into a maintainable
Next.js + TypeScript app running on mock data only. Phase 3 adds a real,
read-only connection to one Gmail account via Google OAuth — everything
else (Outlook accounts, the other 11 mock Gmail accounts) is still mock
data, exactly as before.
app/
layout.tsx root layout, imports globals.css
page.tsx entry point, passes mock data into <Dashboard />
globals.css all styling, ported from the prototype's <style>
components/
Dashboard.tsx owns all state (search, filters, expanded/selected
account, modals) — the only "smart" component
AccountPanel.tsx left column: toolbar + scrollable account list
AccountToolbar.tsx search input + All/Gmail/Outlook/Unread chips
AccountRow.tsx one collapsed account row
ExpandedAccount.tsx the open state of an account row (Inbox/Login/•••)
MoreMenu.tsx dropdown: mark all read / sync / settings / disconnect
StreamPanel.tsx right column: unified email list + search
EmailRow.tsx one row in the email stream
EmailDetailModal.tsx modal shown when an email is opened
ConnectAccountModal.tsx "+ Connect account" modal — now links to
/api/auth/google for the real Gmail connection
lib/
types.ts Account, Email, Provider, ProviderFilter
mock-data.ts mockAccounts[], mockEmails[] — the 12 mock accounts /
10 mock emails Phase 3 layers the real Gmail account on
top of (see "Phase 3" section below for the new lib/ files)
Every row component (AccountRow, ExpandedAccount, EmailRow) receives
its data as props — none of them import mock data directly.
No new npm dependencies — OAuth and the Gmail REST calls are implemented
with plain fetch and Node's built-in crypto, nothing else.
lib/
google-auth.ts OAuth URL building, code/refresh-token exchange, token
revoke, and the Gmail API calls (list inbox, unread
count) — all plain fetch, no googleapis/next-auth
session.ts AES-256-GCM encrypt/decrypt for the session cookie
(keyed from AUTH_SECRET)
constants.ts REAL_GMAIL_ACCOUNT_ID — the reserved id (1000) used
to merge the one real account into the mock arrays
without colliding with mock ids 1-12 / 1-10
app/api/
auth/google/route.ts GET → redirects to Google's consent screen
auth/google/callback/route.ts GET → exchanges code for tokens, sets session cookie
auth/google/disconnect/route.ts POST → revokes token, clears session cookie
gmail/messages/route.ts GET → { connected, account, emails } for the
logged-in Gmail account, refreshing the
access token first if it's expired
components/Dashboard.tsx fetches /api/gmail/messages once on mount and
merges the result into the same accounts/emails state the mock data
already lives in — so every existing component (search, filters, the
inbox stream, the detail modal) works on the real account for free,
without ever knowing it's real. "Sync now" and "Disconnect" on that one
account are now wired to actually call Google instead of being no-ops.
http://localhost:3000/api/auth/google/callback
.env.local (already git-ignored):
GOOGLE_CLIENT_ID=...
GOOGLE_CLIENT_SECRET=...
AUTH_SECRET=... # any long random string, e.g. `openssl rand -base64 32`
GOOGLE_REDIRECT_URI=http://localhost:3000/api/auth/google/callback
npm install && npm run dev, then click + Connect account → Continue
with Google.1000) — there's no multi-account Gmail support and
Outlook OAuth isn't implemented.gmail.readonly; no send, no
archive/delete, no labels beyond reading INBOX/UNREAD.snippet (~100 chars), not the full parsed
MIME body — fetching/parsing full multipart bodies (text vs HTML,
attachments) is real scope for a later phase, not added here.This was implemented and type-checked (tsc --noEmit passes cleanly) in a
sandbox with no network access, so npm run build's SWC binary download
and the actual Google OAuth redirect couldn't be exercised. Please run
npm run dev and click through Connect account → Continue with Google
yourself, and run npm run build before deploying — if anything breaks,
send me the error output and I'll fix it.
npm install
npm run dev
npm run build
npm start
lib/mock-data.ts) — refreshing the page resets their
read/unread state and any disconnected mock accounts. The one real
Gmail account re-syncs from the actual API on every load instead.Push this folder to a GitHub repo and import it into Vercel the same way as before — Vercel auto-detects Next.js, so no manual Framework Preset or Output Directory changes are needed this time (that override was only required for the raw static HTML version).