Download components/recent-activity.js from chanix21/doctrack-pro-digital-archiving-wizard: direct link, hf CLI and curl.
- Browser
- Download file 6.41 kB
-
https://huggingface.co/spaces/chanix21/doctrack-pro-digital-archiving-wizard/resolve/main/components/recent-activity.js
- Command line
-
hf download hf://spaces/chanix21/doctrack-pro-digital-archiving-wizard/components/recent-activity.js
-
curl -L -o recent-activity.js https://huggingface.co/spaces/chanix21/doctrack-pro-digital-archiving-wizard/resolve/main/components/recent-activity.js
6.41 kB
| class RecentActivity extends HTMLElement { | |
| connectedCallback() { | |
| this.attachShadow({ mode: 'open' }); | |
| this.shadowRoot.innerHTML = ` | |
| <style> | |
| .activity-item { | |
| display: flex; | |
| padding: 1rem 0; | |
| border-bottom: 1px solid #e5e7eb; | |
| } | |
| .activity-item:last-child { | |
| border-bottom: none; | |
| } | |
| .activity-icon { | |
| flex-shrink: 0; | |
| width: 2.5rem; | |
| height: 2.5rem; | |
| border-radius: 9999px; | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| margin-right: 1rem; | |
| } | |
| .activity-content { | |
| flex-grow: 1; | |
| } | |
| .activity-title { | |
| font-weight: 500; | |
| color: #1f2937; | |
| } | |
| .activity-description { | |
| color: #6b7280; | |
| font-size: 0.875rem; | |
| margin-top: 0.25rem; | |
| } | |
| .activity-time { | |
| color: #9ca3af; | |
| font-size: 0.75rem; | |
| margin-top: 0.25rem; | |
| } | |
| .document-status { | |
| display: inline-block; | |
| padding: 0.25rem 0.5rem; | |
| border-radius: 0.25rem; | |
| font-size: 0.75rem; | |
| font-weight: 500; | |
| margin-left: 0.5rem; | |
| } | |
| .status-pending { | |
| background-color: #fef3c7; | |
| color: #92400e; | |
| } | |
| .status-ongoing { | |
| background-color: #dbeafe; | |
| color: #1e40af; | |
| } | |
| .status-review { | |
| background-color: #fee2e2; | |
| color: #991b1b; | |
| } | |
| .status-approved { | |
| background-color: #d1fae5; | |
| color: #065f46; | |
| } | |
| .status-archived { | |
| background-color: #e0e7ff; | |
| color: #3730a3; | |
| } | |
| </style> | |
| <div class="activity-list"> | |
| <div class="activity-item"> | |
| <div class="activity-icon bg-blue-100 text-blue-600"> | |
| <i data-feather="file-plus"></i> | |
| </div> | |
| <div class="activity-content"> | |
| <div class="activity-title"> | |
| New document added | |
| <span class="document-status status-pending">Pending</span> | |
| </div> | |
| <div class="activity-description">Quarterly Financial Report - Q2 2023</div> | |
| <div class="activity-time">10 minutes ago</div> | |
| </div> | |
| </div> | |
| <div class="activity-item"> | |
| <div class="activity-icon bg-green-100 text-green-600"> | |
| <i data-feather="check-circle"></i> | |
| </div> | |
| <div class="activity-content"> | |
| <div class="activity-title"> | |
| Document approved | |
| <span class="document-status status-approved">Approved</span> | |
| </div> | |
| <div class="activity-description">Employee Attendance Sheets - June</div> | |
| <div class="activity-time">2 hours ago</div> | |
| </div> | |
| </div> | |
| <div class="activity-item"> | |
| <div class="activity-icon bg-yellow-100 text-yellow-600"> | |
| <i data-feather="edit"></i> | |
| </div> | |
| <div class="activity-content"> | |
| <div class="activity-title"> | |
| Document updated | |
| <span class="document-status status-ongoing">Ongoing</span> | |
| </div> | |
| <div class="activity-description">Project Proposal - Website Redesign</div> | |
| <div class="activity-time">5 hours ago</div> | |
| </div> | |
| </div> | |
| <div class="activity-item"> | |
| <div class="activity-icon bg-indigo-100 text-indigo-600"> | |
| <i data-feather="archive"></i> | |
| </div> | |
| <div class="activity-content"> | |
| <div class="activity-title"> | |
| Document archived | |
| <span class="document-status status-archived">Archived</span> | |
| </div> | |
| <div class="activity-description">Meeting Minutes - May 2023</div> | |
| <div class="activity-time">1 day ago</div> | |
| </div> | |
| </div> | |
| <div class="activity-item"> | |
| <div class="activity-icon bg-red-100 text-red-600"> | |
| <i data-feather="alert-circle"></i> | |
| </div> | |
| <div class="activity-content"> | |
| <div class="activity-title"> | |
| Document requires changes | |
| <span class="document-status status-review">For Review</span> | |
| </div> | |
| <div class="activity-description">Annual Budget Proposal</div> | |
| <div class="activity-time">2 days ago</div> | |
| </div> | |
| </div> | |
| </div> | |
| `; | |
| // Replace feather icons after rendering | |
| if (this.shadowRoot.querySelectorAll('[data-feather]').length > 0) { | |
| feather.replace(); | |
| } | |
| } | |
| } | |
| customElements.define('recent-activity', RecentActivity); |