Rebuild UI on the Noo design system
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>
This commit is contained in:
@@ -0,0 +1,69 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:lucide_icons_flutter/lucide_icons.dart';
|
||||
import '../../models/nextcloud_item.dart';
|
||||
import '../../theme/design_tokens.dart';
|
||||
import '../noo/core/noo_button.dart';
|
||||
|
||||
/// Fallback for [FileViewerScreen]'s static preview path when the file type
|
||||
/// has no inline preview at all (not an image/video/pdf/text file) - just
|
||||
/// name, a generic file icon, and the "open with"/"details" escape hatches.
|
||||
class MediaUnsupportedPreview extends StatelessWidget {
|
||||
final NextcloudItem item;
|
||||
final bool isBusy;
|
||||
final VoidCallback onOpenExternally;
|
||||
final VoidCallback onOpenDetails;
|
||||
|
||||
const MediaUnsupportedPreview({
|
||||
super.key,
|
||||
required this.item,
|
||||
required this.isBusy,
|
||||
required this.onOpenExternally,
|
||||
required this.onOpenDetails,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final colors = context.nooColors;
|
||||
return Center(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(32),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Icon(LucideIcons.file, color: colors.fg3, size: 72),
|
||||
const SizedBox(height: 16),
|
||||
Text(
|
||||
item.name,
|
||||
textAlign: TextAlign.center,
|
||||
style: NooText.cardTitle.copyWith(
|
||||
fontSize: 16,
|
||||
color: colors.fg1,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
Text(
|
||||
'No inline preview for this file type.',
|
||||
style: NooText.meta.copyWith(color: colors.fg3),
|
||||
),
|
||||
const SizedBox(height: 28),
|
||||
NooButton(
|
||||
size: NooButtonSize.card,
|
||||
icon: LucideIcons.externalLink,
|
||||
disabled: isBusy,
|
||||
onTap: onOpenExternally,
|
||||
child: const Text('Open with...'),
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
NooButton(
|
||||
variant: NooButtonVariant.outline,
|
||||
size: NooButtonSize.card,
|
||||
icon: LucideIcons.info,
|
||||
onTap: onOpenDetails,
|
||||
child: const Text('Details'),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user