Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Auto-Archive Comments Block for Vue

A Slider that sets how many quiet days archive a thread, ten threads with their quiet time and a bar against the rule, Active and Archived tabs that update as the slider moves, Keep active and Restore.

Framework
UI library

Preview

Preview width

Installation

Part of Pro
Pro unlocks the code and one-line install of every Pro button and text effect, plus the MCP for your AI editor.
Have Pro already? Sign in to open it.Opens here as soon as you're Pro.

Overview

Tidy a forum without losing anything, with this auto-archive rule for Vue with Ark UI. A compact header names the tool, Attichurst, a forum clean-up tool. The frame opens with the rule: Archive threads after 45 days, set with a Slider from 7 to 120 days, and a line that says how many threads it archives now. Under it Tabs headed Active and Archived, each with its count, switch a native table of ten threads: the title, the date of the last comment, how long it has been quiet with a thin Progress bar against the rule, and a Keep active Toggle (or Restore on an archived thread). Moving the slider moves threads between the tabs at once. A held-height region keeps the table the same size whatever the counts, with an Empty state when a tab has nothing. It is built from Slider, Tabs, Progress, Toggle, Button, Empty and Guides, with a native table. For forums, support queues, issue trackers and any list that goes stale.

FAQ

How do I change the threads and the rule?

Edit THREADS (each has a title, an author and the ISO date of its last comment, last) and START_DAYS, MIN_DAYS and MAX_DAYS for the slider. Quiet time is the number of whole days between last and a fixed AS_OF date, Wed 14 Oct, so "Quiet for 42 days" never changes between visits. A thread is archived when it is quiet for at least the rule's days and has not been kept.

What do Keep active and Restore do?

Keep active exempts a thread from the rule, whatever its quiet time; turn it off and the thread follows the rule again, moving to Archived if it is past it. Restore on an archived thread keeps it too, since it would otherwise return to Archived at once, and the status line says so. Both are one list of kept ids in the page.

What stays local, and how do I make it real?

Everything: nothing is archived anywhere, and the status line says so. In your app run the rule as a scheduled job on the server (threads with no comment for N days become archived and read-only), store who kept or restored a thread, and show the same counts from the same query, so a page never disagrees with the job.

Is it accessible?

The slider is named, steps one day at a time and reads its value as quiet days; the result is announced when you let go. The tabs show their counts in words, the table has a caption and column headings, and each Keep active toggle and Restore button names its thread. When a thread moves tab because of a press, focus goes to the scrolling table region instead of being lost.

How does it look on a phone?

The table folds its columns into the first cell: the thread title, its author and its quiet time stay together, and Keep active or Restore stays at the end of the row. The tab counts hide on the narrowest screens and the table keeps its scrolling region.