shadcn.io is not affiliated with official shadcn/ui
Archived Project Restore Error Block for React
A page for an archived project: four cells for when and by whom it was archived, how many people worked on it and how many days it sat quiet, a retention meter with the months that remain, one button to restore it, a real archive download and a link to active projects.
Installation
Overview
Tell people where a project went and how to bring it back, with this archived-project page for React with Base UI. It's the page for a project archived on Stonepath, a project planner: the page's two side rails run its full height, and one band crosses the screen between two rules with a plus mark where each meets a rail. The product's mark, the heading and one sentence sit over a framed band of four cells, counted from typed dates, over a retention meter that says how many months remain before the archive is deleted for good. The Shine Button restores the project, the only colored control, and an outline Button saves the archive as a file with a Download Trigger. It's built from Download Trigger, Button, Shine Button and Guides, with a CSS entrance only. For planners, document tools and any product that archives before it deletes.
FAQ
Where do the dates and counts come from?
From the typed PROJECT at the top of the file: the day it was archived, who did it, how many people worked on it and the day it was last active. The page's "today" is a typed constant, AS_OF, so the server and the browser agree: days inactive is the days from the last activity to it, the archive is deleted one year after it was archived, and the months that remain and the meter's fill are worked out from the same dates, never typed twice. In your app, pass the real dates and the real day.
What does Restore project do?
In the example it changes the page to its restored state: the mark, the heading and the sentence say the project is active again, the meter row says nothing is scheduled for deletion, and a polite status message says it was restored in this demo and nothing was changed. The same button then reads "Undo restore" as an outline button, so you can run it twice. For a real product, call your API on press, wait for it, and only then change the page; if restoring can't be undone, drop the second state.
Is the archive download real?
Yes. The Download Trigger saves quayside-road-extension-archive.json, a small file built in the browser from the typed project: its name, who archived it and when, how many people worked on it, when it was last active and the day it will be deleted. For a real archive, set data to a request for your export (the trigger takes text, a Blob or a promise of either) and name the file after the project.
What does the retention meter show?
How much of the year the archive has used, as a bar that starts at the day it was archived and ends at the day it will be deleted, with a tick at today. It is drawn by hand so the tick sits exactly on the fill, and it stays left-to-right on a right-to-left page, as a time line should. The bar is hidden from assistive technology; the sentence above it gives the months that remain, and a hidden line gives the days used of the year.
Related
- Pro
Read-Only Document Error
Locked and removedA full-screen read-only page for a document editor: a drawn page with a lock above a table of six actions (allowed or not, and the role each needs), Request edit access that opens a message to the owner in place, and Open in read mode.
- Pro
Removed Post Review Error
Locked and removedA page for a removed forum post: the post with its words under black bars except the phrase that broke a rule, underlined and named, then a field and one button to request a review that shows what a real review would do, and the case details.
- Pro
Deprecated Endpoint Migration Error
Developer toolsA page for a retired API endpoint: the old and the new endpoint as two diff lines with the days to go to a typed sunset date, a link to the migration guide, and the same request on the new version in curl, JavaScript and Python tabs with numbered lines, changed lines flagged and a copy button.
- Pro
Trial Expired Error
Plans and checkoutA full-screen page for a trial that has ended: what the trial built, how long the data is kept with a bar for the days used, a real export, and two plan cells whose button names the plan you picked.
- 43Pro
403 Forbidden Error
Locked and removedA full-screen 403 page for a team wiki: a door drawn as the zero of 403, the heading 'Ask someone who can say yes', the three workspace admins in a framed list with a Copy email button each, and a way back to the wiki.
- Pro
Account Deleted Error
Locked and removedA full-screen page for someone who signs in to a deleted account: three facts on shared hairlines and two choice cells that spell out what recovering and starting fresh each mean, with a Shine Button that follows the choice.