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

Laptops Osier

v1.0

A calm fleet desk for a small IT team: every laptop and phone, the people who hold them and parcels riding a line from hub to home, in silver and cobalt.

$69

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

มีในตัว

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

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

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

โค้ด

laptops-osierReact
  • laptops-osier.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.
    • checklists.tsxChecklists (#/checklists): onboarding and offboarding (?tab=), one card per person with its progress and steps to tick or add; start one (?new=1) or delete one.
    • compliance.tsxCompliance (#/compliance): the four rates (encrypted, OS up to date, failing, checked in today), the failing devices worst first with Push update and Remind (a row leaves the list as its device patches), the policy and how each platform sits across its OS versions.
    • devices.tsxDevices (#/devices): every laptop and phone, filtered by status (?status=), type and a search; pick rows for the bulk bar, open one in the side sheet (?device=), add or edit one in the form (?new=1, ?edit=).
    • overview.tsxThe Overview (#/): the greeting, the KPI strip, the shipments riding their lines, the compliance donut, the next starts and leaves, and the live check-ins.
    • people.tsxPeople (#/people): everyone at the company with their team, city, the devices they hold and their start or leave date; filter by starting or leaving (?view=), search, open one in the side sheet (?person=), add or edit one (?new=1, ?edit=).
    • reports.tsxReports (#/reports): fleet age by the year each device was bought (laptops and phones), hardware spend by year with this year in the accent, then the fleet by country and by model with warranties ending soon.
    • settings.tsxSettings (#/settings): Appearance (theme and language), the device policy, the checklist templates, the hubs and Reset demo data.
    • shipments.tsxShipments (#/shipments): the parcels in motion riding their lines with Advance and Cancel, the delivered ones and all (?tab=); one opens in the side sheet with its stage timeline (?ship=), a new one in the form (?new=1&person=).
    • sign-in.tsxThe sign-in page (#/sign-in): the logo and the form on one card on the plain ground, without the sidebar and top bar.
  • 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 theme (System, Dark or Light), each choice shown as a small preview, and the language (System or one of locales/list.ts).
    • bottom-tabs.tsxThe phone's bottom tabs: the four pages used most, and More for the whole sidebar.
    • checklist-card.tsxOne person's checklist: the progress bar, each step with its tick and owner, and a line to add a step. The Checklists page and the person sheet both show it.
    • device-form.tsxThe device form (new or edit): model, serial, OS (the model's platform's releases), status, who holds it, hub, warranty, encryption and a note; errors show under their fields and the first one takes the focus.
    • device-sheet.tsxA device in the side sheet (?device=LT-0142): its model, id and status, then Details (every field and its shipments), History (bought, assigned, patched…) and Compliance (why it fails, push an update, remind its person, exempt it); Edit and Delete at the foot.
    • feed.tsxThe live feed: devices checking in, patching or falling behind, parcels moving and checklist steps done, the newest sliding in on top with a short wash.
    • fleet-settings.tsxSettings for the fleet: the device policy (minimum OS per platform, encryption, check-in window), the onboarding and offboarding templates (add, move up, remove a step), the hubs with their stock, and Reset demo data.
    • kpi-strip.tsxThe Overview's strip of four numbers (devices, out of compliance, in stock, shipping), each with its note and an eight-week trail; each card opens its page.
    • person-form.tsxThe person form (new or edit: name, work email, team, country and city, start date) and the offboard dialog (last day; it starts the offboarding checklist and books the laptop returns).
    • person-sheet.tsxA person in the side sheet (?person=P12): who they are, then Devices (what they hold and what is on its way), Checklist (their onboarding or offboarding, tick by tick) and Details; Ship a laptop, Offboard, Edit and Remove.
    • route-rail.tsxThe shipment line, Osier's signature: each parcel rides a line from the hub to the person's city (or back), and the stage dots (Ordered, Packed, In transit, Delivered) light one by one as a carrier scan moves it on; the dot it reaches rings once.
    • ship-form.tsxThe new-shipment form: to a person (a laptop from stock, the person's hub first) or a return (one of the person's devices back to their hub); ?person= picks the person.
    • sidebar.tsxThe sidebar: logo, search with the command palette shortcut, the page links in two groups with their counts and a pill that glides to the current one, and the live strap (devices checking in, with its pause) at the foot; collapsed, only the icons show.
    • 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.
    • top-bar.tsxThe top bar: the menu button on narrow screens, where you are, the live dot, the page's one main action, search, the theme switch and the account menu. It frosts once the page scrolls under it.
  • partsWhat several sections share.
    • buildWhat several sections share.
      • cardsWhat several sections share.
        • deal.tsThe deal card style: each card is dealt from the side of the current nav item, a short slide toward its place, one quickly after another.
      • rowsWhat several sections share.
        • center.tsThe center row motion: the middle row on screen rises first, then the ripple spreads up and down.
      • 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).
    • actions.tsThe fleet-wide actions the top bar, the palette and the pages share: push an OS update to every device behind, and export the devices as a CSV file.
    • 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 on the raised shade.
    • backdrop.tsxThe Glass style's backdrop: what shows through the see-through panels, faded out in Solid; with followBackground it paints your background instead.
    • charts.tsxThe charts: a smooth sparkline, rounded bars with the current one in the accent, and the compliance donut whose slices retween when a device flips. Every series is a theme token, so a preset recolors them all.
    • command-palette.tsxThe command palette (⌘K or Ctrl K): type to find a page, an action, a device (by model, id or serial) or a person, then Enter.
    • confirm.tsxA confirm dialog for what can't be undone (delete a device, cancel a shipment): what happens, Cancel, and the red action.
    • 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 text field with its error line under it, tied together for screen readers.
    • flip.tsFLIP for a list that re-sorts or filters: after each change every row that stayed glides from where it was to where it is now. Rows carry data-flip="<id>"; positions are measured inside the list (and again when it resizes), so a page scroll or a wider window never reads as a move.
    • format.tsHow numbers and dates are written: by Intl, the current language's way ("1,240", "1.240"; "Nov 19", "19 nov."), plus money, "4 min ago" and "in 3 days".
    • icons.tsxThe logo 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).
    • live-clock.tsxOne shared clock for everything live: it ticks only while something on screen listens, the tab is visible and live isn't paused, and the bare button that pauses it. What a tick does (a device checks in, a carrier scans a parcel) is the app's, passed to liveClock.
    • live.tsThe app's one live clock: every second it asks the fake API for news (a device checks in about every five seconds, a carrier scans a parcel about every twelve) and every page reloads in place. It rests while nothing live is on screen, the tab is hidden or live is paused.
    • 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.
    • read.tsOne read of the fake API by its key, through useApi: useRead("overview"), useRead<"device">(`device:${id}`). Each key keeps one load function, so a page that mounts again finds its answer; save() runs a write, then every page reloads in place.
    • 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.
    • side-sheet.tsxThe detail sheet: a modal panel that slides in from the end edge over the page (a device, a person, a shipment), with tabs whose underline glides to the one picked. Escape, a tap outside or its close button slides it away; the address keeps what it shows (?device=LT-0142&dtab=history).
    • 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.
    • status.tsxThe small labels every list shares: a device's status with its glyph, why it fails the policy, and a country by its code.
    • 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.
    • 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. Rui leads Fernway's IT team of three.
    • api.tsThe fake API: every page loads and saves through these functions, so wiring a real backend happens here only.
    • clock.tsThe demo's "now": today's real date at 10:40 in the morning, moving on with the real time since the app opened; every seed date counts from it, so the data never goes stale.
    • seed.tsThe pretend fleet of Fernway, a 220-person remote company in nine countries: its people, laptops and phones, shipments, checklists and live feed, from one seeded random so every visit shows the same company.
    • views.tsWhat each page shows, worked out from the pretend database (devices with their people and compliance, people with what they hold, shipments with where they go, the Overview, Compliance and Reports numbers); pure functions data/api.ts calls on every read.
  • 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}).

laptops-osier.tsx

The page: the sections in order.

กำลังโหลด…
เหมาะสำหรับ
IT teams at remote companies who track laptops and phones across countries, ship them to new starters and keep them patched.
ทำงานอย่างไร
Devices check in live and their patch status flips; shipments ride a line from the hub to a person's city, lighting each stage.
วิธีใช้
Edit words in locales/ and colors in theme.ts, and swap the bodies in data/api.ts for calls to your MDM and carrier backends.