Replaces the Material 3 screens with the Noo design system: warm neutrals, one violet accent, pill controls, Schibsted Grotesk/ Instrument Sans, Lucide icons, no gradients/shadows. - New lib/widgets/noo/ component kit (core, lists, files, media, nav, overlays) plus lib/theme/design_tokens.dart for the color/type/space/ radius/motion tokens. - Rebuilt the app shell (top/bottom bars, drawer, desktop sidebar and toolbar), every tab (Files/Offline, Photos, Favorites, Recent, Activity, Trash, Shares), Settings, the lock and login screens, the media viewer, search, the details/share sheets, and the share-upload and move/copy destination pickers. - Added a design canvas (linked from DESIGN_SYSTEM.md) covering the screens the spec didn't already describe, with matching Android and iOS chrome; wrote up the approved recipes into DESIGN_SYSTEM.md §4. - Removed now-dead legacy widgets (media_grid_tile, swipeable_item, sync_status_badge, selectable_thumbnail) and updated architecture.md/styling.md/standards.md to describe the new structure and component/testing conventions. - Added widget tests for the noo/ component kit. This is a UI-only rework: no provider/model/service behavior changed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
75 lines
2.2 KiB
Dart
75 lines
2.2 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:intl/intl.dart';
|
|
import '../../models/nextcloud_item.dart';
|
|
import '../../theme/design_tokens.dart';
|
|
import '../noo/lists/noo_grouped_list.dart';
|
|
import '../synced_header_scaffold.dart' show formatBytes;
|
|
|
|
/// Plain metadata list of the Details sheet/dialog - name, type, size,
|
|
/// location, and dates. No network calls, so no loading state needed.
|
|
class DetailsInfoTab extends StatelessWidget {
|
|
final NextcloudItem item;
|
|
|
|
const DetailsInfoTab({super.key, required this.item});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
final rows = <(String, String)>[
|
|
('Name', item.name),
|
|
('Type', item.isFolder ? 'Folder' : (item.mimeType ?? 'File')),
|
|
if (!item.isFolder) ('Size', formatBytes(item.size)),
|
|
('Location', item.path),
|
|
('Modified', DateFormat.yMMMd().add_jm().format(item.lastModified)),
|
|
('Created', DateFormat.yMMMd().add_jm().format(item.dateCreated)),
|
|
('Favorite', item.isFavorite ? 'Yes' : 'No'),
|
|
];
|
|
|
|
return NooGroupedList(
|
|
children: [for (final row in rows) _InfoRow(label: row.$1, value: row.$2)],
|
|
);
|
|
}
|
|
}
|
|
|
|
class _InfoRow extends StatelessWidget {
|
|
final String label;
|
|
final String value;
|
|
|
|
const _InfoRow({required this.label, required this.value});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
final colors = context.nooColors;
|
|
return ColoredBox(
|
|
color: colors.surface,
|
|
child: Padding(
|
|
padding: const EdgeInsets.symmetric(
|
|
horizontal: NooSpace.md,
|
|
vertical: NooSpace.sm,
|
|
),
|
|
child: Row(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
SizedBox(
|
|
width: 96,
|
|
child: Text(
|
|
label,
|
|
style: NooText.body.copyWith(fontSize: 14, color: colors.fg3),
|
|
),
|
|
),
|
|
Expanded(
|
|
child: Text(
|
|
value,
|
|
style: NooText.body.copyWith(
|
|
fontSize: 14,
|
|
fontWeight: FontWeight.w500,
|
|
color: colors.fg1,
|
|
),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|