Windfarm Gust
v1.0A glass control room for three wind farms: a drawn farm whose blades turn at their live rpm, output against forecast, and an alarm rail beside every page.
页面地址: /
内置
你能得到- 浅色和深色使用你的主题颜色
- 桌面端、平板和手机为这些屏幕设计
- 依赖包…
- 代码大小…
- 省电30 fps,静止时空闲
- 隐藏时暂停不在屏幕内或在其他标签页
- 减少动效尊重用户的减少动效设置
每次修改都会检查
安全检查于 12月3日- 类型检查TypeScript 严格模式
- 代码检查与格式化ESLint · Prettier
- 测试与构建浅色和深色截图
- 安全审计无高危或严重漏洞通告
- 依赖包发布时间每个版本都已公开 7 天以上
- 空闲 CPU静止时不到半个核心,≤ 30 fps
代码
windfarm-gustReact
- windfarm-gust.tsxThe page: the sections in order.
- content.tsEvery word and number: brand, nav links, each section's copy and lists.
- theme.tsThe colors as CSS variables, and the shared class strings.
- README.mdHow to install it, and where to change the text, colors and form.
- pagesOne file per page: the sections it shows, in order.
- alarms.tsxFaults and alarms: the list filtered by status and severity (kept in the address), each with acknowledge, assign and close; an alarm's own page has its timeline, a note form and the turbine as it reads now.
- farms.tsxThe farms: each one's live output against its forecast, side by side; a farm's own page adds its week of energy, its drawn layout and its turbines.
- grid.tsxThe grid: what the caps hold back now, curtailment requests to accept, decline, end or edit, the caps over the next 12 hours, the capacity free to run and two weeks of availability.
- maintenance.tsxMaintenance: work orders moved along planned, scheduled, in progress and done (finishing one takes its parts from the store), added and edited in a drawer, deleted after a confirm; plus the crews and parts tabs.
- overview.tsxThe overview: four live tiles, the drawn farm with its turning blades, each farm now, the big output-vs-forecast chart, today's grid caps, and the work, crews and parts that need eyes.
- reports.tsxReports for 7 days, 30 days or 12 months (kept in the address): energy, capacity factor, downtime and revenue, revenue and energy over the period, capacity factor by farm and downtime by cause; the period exports as CSV.
- settings.tsxThe settings page: Appearance (style, theme and language), the operations limits and the team.
- sign-in.tsxThe sign-in page (#/sign-in): the logo and the form on one card over the backdrop, without the nacelle bar and the alarm rail.
- turbine.tsxOne turbine: its rotor turning at the live rpm, the readings, the last six hours, its measured power curve, its faults and work orders; stop, start, derate or raise a work order from here.
- turbines.tsxThe turbines page: all sixty with live output, wind, rotor and yaw, filtered by farm, status and a search that the address keeps (Back returns to the same filters); a list or tiles whose little rotors turn at their real rpm.
- sectionsOne file per page section.
- account-menu.tsxThe account menu under the avatar in the top bar: who is signed in, Settings and Sign out; the arrow keys move through it, Escape, Tab or a click outside closes it.
- alarm-actions.tsxThe actions every alarm offers wherever it shows (the rail, the list, its page): acknowledge, assign to a technician on shift, close and reopen, each saved through the API with a toast.
- alarm-rail.tsxThe alarm rail beside every page: open alarms by severity, newest first, each pulsing once as it arrives and then holding its color; acknowledge and assign right here, or open one.
- appearance.tsxSettings → Appearance: the style (Glass or Solid) and the theme (System, Dark or Light), each choice shown as a small preview, and the language (System or one of locales/list.ts).
- crews-tab.tsxThe crews tab: each crew's lead, members, status and the farm they work at (both set here), the order they have under way, and who is on shift.
- curtail-form.tsxThe curtailment form in a drawer: the farm, who asked, why, the cap and its window; checked on save with its own messages.
- nacelle-bar.tsxThe nacelle bar: the turning logo, the page tabs under one glass bead that flows like a drop, search, alarms, theme and account; under it a live readout of fleet output and each farm's wind.
- operations.tsxThe operations settings: the power price and the limits SCADA alarms on, plus who gets paged, checked and saved through the API; and the team who can be assigned work.
- order-form.tsxThe work order form in a drawer: what needs doing, the turbine, kind, priority, crew, due date, hours and the parts it takes; checked on save with its own messages, then saved through the API.
- parts-tab.tsxThe parts tab: the store with stock against each part's minimum, and restock, add, edit and delete, each in a dialog with its own checks.
- sign-in-form.tsxThe sign-in form: email and password with their errors under them, show or hide the password, keep me signed in, and the demo account to fill in; a wrong pair says so above the fields.
- partsWhat several sections share.
- buildWhat several sections share.
- cardsWhat several sections share.
- sheen.tsThe sheen card style: cards rise, plus one soft light sweep across each card as it lands.
- rowsWhat several sections share.
- count.tsThe count row motion: each row on screen brightens from faint while its numbers (<Ticker>) count up, rounded every frame.
- core.tsxThe page's build-in: on first load and on every page switch the cards arrive in the app's card style and their contents build: bars grow, lines draw, rings fill, the list rows on screen ripple in in the app's row motion, numbers count. The two picks are wired in ./index.ts.
- index.tsThe app's two build-in picks, wired here and nowhere else: its card style (cards/) and its row motion (rows/). npm run new-app copies only the two it is given (--cards, --rows).
- appearance.tsHow the app looks right now: dark or light, Glass or Solid, from Settings → Appearance, the page around it and the Style setting.
- avatar.tsxA person's initials in a round badge, tinted with the primary.
- backdrop.tsxThe backdrop: a storm-sky mesh of four big soft cyan and blue clouds behind the glass, with faint isobars swept across it; dusky in dark, near-white pastel in light, drifting very slowly. With followBackground it paints your background instead.
- bar-chart.tsxA bar chart: bars grow in, and the picked bar (in the primary), its guide line and tooltip glide to the bar you point at or pick with the arrow keys; a new range morphs the bars instead of drawing them again.
- command-palette.tsxThe command palette (⌘K or Ctrl K): type to find a page or an action, then Enter.
- csv.tsExport CSV: turns rows into a CSV file and hands it to the browser to save.
- dialog.tsxA centered modal dialog (a form, a confirm): rises in, plays its way out, Escape or a tap outside closes it, and the focus goes back where it was.
- drawer.tsxA drawer from the right: a full-height native <dialog> for one thing's details (a client, an order). It springs in, slides out, closes on Esc, the close button or a click beside it, and keeps showing its thing while it slides away.
- farm-map.tsxThe drawn farm layout: the land (a ridge, a coast or a moor) in contour lines, the cable runs to the substation and every turbine standing on its spot, its blades turning at its live rpm on the shared clock while wind streaks drift with the farm's wind. Pick a turbine for its readings.
- field.tsxA labeled form field (a text input or a select) with its error line under it, tied together for screen readers.
- format.tsHow numbers and dates are written: by Intl, the current language's way ("1,240", "1.240"; "Nov 19", "19 nov."), plus the units a wind control room reads (MW, m/s, rpm, degrees, pounds).
- icons.tsxThe logo (a three-blade rotor that turns at the fleet's mean rpm) and the line icons, drawn on a 24-unit grid with round ends.
- language.tsThe app's language: the words every page reads (useWords), how dates and numbers are written (parts/format.ts) and the reading direction. Picked in Settings → Appearance (or System: the page's own language) and kept in this browser; English is built in, any other language loads only when it shows (locales/list.ts).
- liquid-marker.tsThe selected marker that moves like a drop of liquid: shared by every segmented control, tab row and the nav droplet.
- live.tsThe one shared clock: live readings tick every 3 seconds, and every turning rotor and drifting wind streak moves on one frame loop capped at 30 frames a second. Both rest while the tab is hidden; rotors also rest off screen, with Motion off and under reduced motion.
- moments.tsThe animations the sidebar, the sign-in card, menus, dialogs, the phone sheet and toasts play, timed by their moments in theme.ts.
- motion.tsMotion helpers: the reduced-motion check, live, and run-once-in-view.
- popover.tsxA menu that unfolds from its button (a row's actions, the alerts, a sort pick): drawn in the window layer so no table or card clips it; arrow keys walk it, Escape, Tab, a click outside or a scroll folds it away, and it plays its way out unless motion is reduced.
- power-curve.tsxA power curve in a recessed well: the model curve glows as a line, each measured 15 minutes is a dot, wind on the bottom and output up the side.
- router.tsThe page switcher: reads the app's page from the address hash (#/settings, #/?status=open).
- save.tsRuns a save through the fake API: on success every loaded answer loads again in place and a toast says what changed; on failure a toast says so and nothing on screen claims it saved.
- scroll-to-view.tsScrolls an element into view moving only its own scroll container, never the page around it.
- select-box.tsxA native select dressed to match the app: no browser arrow, a drawn chevron instead.
- session.tsWhether someone is signed in: a first visit is signed in as the demo account; Sign out holds until the next sign-in, and a sign-in without Keep me signed in lasts only this tab.
- sheet.tsxThe phone sheet: a modal panel that springs in from the left with the sidebar; Escape, a tap outside or its close button slides it away.
- states.tsxThe data states every page shares: a calm skeleton while loading, an error with Try again, and an empty note with a way out.
- store.tsThe app-wide state several parts share: the theme mode and style (kept in the browser) and the toasts.
- ticker.tsxA number that counts up while its page builds in, and rolls to its new value whenever it changes.
- toasts.tsxThe toasts: short notes that confirm what just happened, at the bottom end.
- trend-chart.tsxA trend chart in a recessed glass well: the actual line glows in the primary and draws itself in (BuildLine), an optional forecast runs dashed in the secondary over its soft band, a Now line splits past from ahead, and pointing at it shows both values.
- ui.tsxThe small parts every page shares: glass panels, a segmented switch whose glass bead flows to the pick, card headings, KPI tiles with a sparkline, status and severity chips, a meter and a switch.
- use-api.tsLoads data through the fake API with loading, error and retry, remembering each answer so a page you come back to shows at once.
- use-dialog.tsOpens and closes a native <dialog> as a modal; on close it plays its way out first (data-closing), so dialogs, sheets and the palette never vanish in one frame.
- dataThe pretend data and the fake API: swap it for your backend.
- account.tsThe demo account: who is signed in (the account menu shows them) and the email and password the sign-in page takes.
- api.tsThe fake API: every page loads and saves through these functions, so wiring a real backend happens here only. live() stands in for the SCADA stream.
- model.tsThe shapes the fake API answers with, and the wind physics behind every live number: farm wind on one clock, each turbine's share by its wake, the power curve, rotor speed, yaw and the forecast.
- reports.tsThe sums behind Reports and the availability chart, from the year of daily production in seed-work.ts.
- seed-work.tsThe operator's work: spare parts, work orders, grid curtailments, settings and a year of daily production.
- seed.tsThe pretend operator's world: three wind farms of 20 turbines, the crews and alarms (work orders, parts, curtailments and daily production: seed-work.ts). Times are set relative to now so the demo always reads as today.
- localesEvery word the app shows, one JSON file a language; list.ts names them.
- en.jsonOne language's words, with the keys of en.json.
- es.jsonOne language's words, with the keys of en.json.
- list.tsThe languages the app offers, in the picker's order: one JSON file each, en.json the source. To remove one, delete its file and its line; to add one, copy es.json, translate it and add a line. English is built in; the rest load only when picked. TypeScript checks each file has en.json's keys, scripts/check/check-locales.mjs the rest (no extra keys, plural forms, {slots}).
windfarm-gust.tsx
The page: the sections in order.
正在加载…
- 适用场景
- Wind farm operators and SCADA teams: turbines, alarms, maintenance, grid curtailment and reports for a fleet of 60 turbines.
- 工作原理
- Blades turn at each turbine's real rpm while wind streaks drift; alarms pulse once, then hold; acknowledge, assign and close from the rail.
- 使用方法
- Edit words in locales/ and colors in theme.ts, and swap the bodies in data/api.ts for calls to your backend and SCADA feed.