ข้ามไปยังเนื้อหา

Aurora Kp

v1.0

A northern-lights tour desk in glass over a drawn polar night: Kp gauge, go/no-go call, van timeline, bookings and drawn photo galleries.

$69

ที่อยู่หน้า: /

มีในตัว

สิ่งที่คุณได้รับ
  • สว่างและมืดใช้สีของธีมคุณ
  • เดสก์ท็อป แท็บเล็ต และโทรศัพท์หน้าจอที่สร้างมารองรับ
  • แพ็กเกจ…
  • ขนาดโค้ด…
  • ประหยัดแบตเตอรี่30 fps หยุดพักเมื่อนิ่ง
  • หยุดเมื่อซ่อนอยู่นอกหน้าจอหรืออยู่แท็บอื่น
  • ลดการเคลื่อนไหวสงบสำหรับผู้ที่ตั้งค่าไว้

ตรวจสอบทุกครั้งที่มีการเปลี่ยนแปลง

ตรวจสอบความปลอดภัย 3 ธ.ค.
  • ตรวจสอบไทป์TypeScript แบบ strict
  • Lint และฟอร์แมตESLint · Prettier
  • ทดสอบและบิลด์ภาพหน้าจอโหมดสว่างและมืด
  • ตรวจสอบความปลอดภัยไม่มีคำเตือนระดับสูงหรือวิกฤต
  • อายุแพ็กเกจทุกเวอร์ชันเผยแพร่มาแล้วอย่างน้อย 7 วัน
  • CPU ขณะว่างต่ำกว่าครึ่งคอร์ขณะพัก ≤ 30 fps

โค้ด

aurora-kpReact
  • aurora-kp.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.
    • booking.tsxOne booking: its heading with edit, move and cancel, then three tabs (?tab=): the booking (tour, seats, pickup, paid), the guest (contact and their other bookings) and the history.
    • bookings.tsxBookings: every booking with filters kept in the address (status, when, a search by name or code), the guests to rebook on top, and new bookings.
    • crew.tsxGuides and vans: three tabs (?tab=): the eight guides (role, languages, tours this week), the vans (seats, plate, nights out) and the week's rota, where a press on a cell cycles off, on and lead.
    • forecast.tsxForecast: the next seven nights as a strip (pick one into ?night=), its sky band, Kp through the night and across the week, cloud at each viewing spot and the go/no-go rules.
    • overview.tsxOverview: tonight's sky band, four numbers that matter, tonight's vans on the night timeline, the next three nights and the three after (sections/outlook), guests waiting to be rebooked, who is on tonight and the latest galleries.
    • photos.tsxPhotos: every tour's gallery as a cover with its count, views and whether guests have it; one gallery (#/photos/<tour>) shows its frames to star, remove, add to, deliver and share.
    • reports.tsxReports over the last 30 nights or the season (?range=): how often guests saw the lights, how full the vans ran, what came in, by tour kind and by spot.
    • routes.tsxRoutes: a drawn map of the fjords around the base with every viewing spot (colored by tonight's cloud), and the spot list with drive, darkness, visits and sightings; add, edit, delete.
    • settings.tsxSettings: Appearance (style, theme, language), the go/no-go rules and the company the guests see on their tickets and galleries.
    • sign-in.tsxThe sign-in page (#/sign-in): the logo and the form on one glass card floating over the drawn polar night, without the bar and the dock.
    • tour.tsxOne tour: its heading with edit and delete, then four tabs (?tab=): the overview (the night's sky, seats, van, guide, money), the manifest, the route and the photos.
    • tours.tsxTours: one night at a time (?night=, stepped with the arrows): its vans on the timeline (drag a tour to another van or time) and the list of its hunts with seats, route and call.
  • 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.
    • 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).
    • booking-form.tsxThe booking form in a dialog: the guest's name, email, phone and country, the tour, seats and hotel pickup, checked as you save; new or edit.
    • crew-forms.tsxThe small forms in dialogs for the crew and the map: a guide (name, contact, role, languages), a van (name, plate, seats) and a viewing spot (name, area, drive, darkness, place on the map); new or edit.
    • go-rules.tsxThe go/no-go rules: the lowest Kp worth a drive, the most cloud and moon a hunt stands, and the fewest guests a van runs for; checked as you save.
    • nav-dock.tsxThe dock: a floating glass pill docked bottom-center over the drawn horizon, one key per page with a liquid bead that flows to the current one. On phones the first five stay and the rest open from More.
    • outlook.tsxThe next three nights on the overview, one row each (to that night's forecast), and the three after them as small tiles under "Later this week".
    • rebook.tsxRebooking a guest whose night was called off (or who asks to move): pick another night with seats, keep the money on account, or refund it.
    • 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.
    • sky-band.tsxThe sky band on Overview and Forecast: tonight's Kp gauge, the go/no-go call in a glass card (make it with one press), and the dark window with the moon, the clearest spot and the next departure.
    • top-bar.tsxThe horizon bar: the logo and the operator, tonight's Kp and call as a glass pill (to the forecast), search, the theme switch and the account menu.
    • tour-form.tsxThe tour form in a dialog: the night, kind, van, guide, start, length, price and the two viewing spots, checked as you save; new or edit.
    • tour-tabs.tsxThe tour page's other tabs: the manifest (who rides, how many seats, which hotel), the route (the viewing spots in driving order) and the photos (the night's gallery, or a button to open one).
  • partsWhat several sections share.
    • buildWhat several sections share.
      • cardsWhat several sections share.
        • unfold.tsThe unfold card style: cards unfold downward from their top edge, their contents fading in.
      • rowsWhat several sections share.
        • spot.tsThe spot row motion: each row on screen lights up from faint as a soft primary glow passes it.
      • 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.
    • aurora-frame.tsxA drawn aurora photo for the galleries: each seed gives its own curtain, sky and landscape (a fjord with its reflection, a ridge of pines or snowy peaks), so a gallery reads like a night's shots without real photos.
    • avatar.tsxA person's initials in a round badge, tinted with the primary.
    • backdrop.tsxThe backdrop: a polar night behind the glass — three dusky mesh clouds, two aurora ribbons that drift slowly, sparse stars (a few twinkle) and a drawn mountain ridge with pines along the bottom. Pale dawn in light. With followBackground it paints your background instead.
    • chart-path.tsA chart's line and area paths in each curve Chart Studio has (straight, smooth, step), and the classes that let a Chart Studio curve swap them in CSS.
    • charts.tsxThe charts: pill bars and a glowing line in a recessed glass well, a donut, and a sparkline for KPI tiles. The current bar or point is in the accent; axis text stays flat and readable.
    • command-palette.tsxThe command palette (⌘K or Ctrl K): type to find a page or an action, then Enter.
    • confirm.tsxAn in-app "are you sure" for a delete: the question, what it removes and the red button; the app never uses the browser's confirm.
    • 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.
    • 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."). Add a helper here when a page needs money, times or a list.
    • icons.tsxThe logo and the line icons, drawn on a 24-unit grid with round ends.
    • kp-gauge.tsxThe Kp gauge, the app's hero: a half dial from 0 to 9 in nine lit segments, a needle that eases to tonight's peak, and the value with its storm level in the middle.
    • 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 the dock, every segmented control and tab row.
    • 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.
    • night-timeline.tsxThe night timeline, the app's signature: 16:00 to 08:00 across, twilight fading into the dark window, Kp glowing in its 3-hour blocks, one lane per van with the night's tours as pills, and a now line. Drag a tour along its lane to change its start, or to another van (keyboard: Space, arrows, Space).
    • page.tsxA page's frame: its heading row (title, a line under it, actions on the end) and its loaded body, with the loading and error states in between.
    • router.tsThe page switcher: reads the app's page from the address hash (#/settings, #/?status=open).
    • 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.
    • ui.tsxThe small parts every page shares: glass panels, card headings, a segmented switch whose glass bead flows to the pick, KPI tiles, status chips and a seat meter.
    • 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.
    • db.tsThe fake API's data while the page is open: the seed, copied, then changed by every save (api.ts) and read by every page (views.ts).
    • seed.tsThe pretend data: a northern-lights tour operator in Tromsø with eight guides, four vans and six viewing spots, 30 nights back and a week ahead, all made from fixed seeds so every visit shows the same season.
    • types.tsThe shapes the fake API answers with. Times are minutes after noon (19:30 is 450), so a night from 16:00 to 08:00 reads as one rising number.
    • views.tsThe fake API's reads, shaped for the pages: each builds its answer from the data in db.ts (api.ts serves them by key).
  • 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}).

aurora-kp.tsx

The page: the sections in order.

กำลังโหลด…
เหมาะสำหรับ
Aurora and night-sky tour operators who run vans, guides and guests every night and must make a go/no-go call at dusk.
ทำงานอย่างไร
Ribbons drift over a pine ridge, the Kp needle eases in, tours drag between vans on a night timeline and a glass dock follows you.
วิธีใช้
Edit words in locales/ and colors in theme.ts, and swap the bodies in data/api.ts for calls to your backend.