Skip to content

Native iCloud apps for Windows and Linux, built in Rust. Notes, Reminders, Calendar, Contacts, Drive and Photos, offline and in sync with your iPhone.

Drive: how many items a folder holds, beside its name

Yashwanth Kamireddi35ba5410b6c6
diff --git a/src/screens/DriveView.tsx b/src/screens/DriveView.tsx
index 907d2f2..1a6033d 100644
--- a/src/screens/DriveView.tsx
+++ b/src/screens/DriveView.tsx
@@ -689,6 +689,15 @@ export function DriveView() {
</span>
))}
</nav>
+ {loaded && (
+ // As icloud.com writes it under a folder's name: how much is in it.
+ <p className="drive-count" aria-live="polite">
+ {(() => {
+ const n = items.filter((x) => !gone.has(x.drivewsid)).length;
+ return `${n} item${n === 1 ? "" : "s"}`;
+ })()}
+ </p>
+ )}
<div className="cal-actions">
<button className="quiet with-glyph" onClick={() => setInTrash(true)}>
<ActionGlyph name="delete" />
diff --git a/src/styles/app.css b/src/styles/app.css
index 8b50ab6..70946d5 100644
--- a/src/styles/app.css
+++ b/src/styles/app.css
@@ -1757,3 +1757,4 @@
.drive-more { font-size: 9px; letter-spacing: 1px; }
.drive-row.is-menu { background: color-mix(in srgb, var(--text) 8%, transparent); }
.drive-row.is-menu .drive-row-actions { opacity: 1; }
+.drive-count { margin: 0 auto 0 10px; color: var(--text-3); font-size: var(--t-12, 12px); white-space: nowrap; }