b8fb4d350c
The header gains an Upload button that uses the host file picker (disabled with its reason where no picker exists), and the panel body becomes a drop target: on web, document drag events are observed through a dart:js_interop seam and a file drag over the panel shows a highlight naming the folder. Each file is posted to POST /files?path=<folder> through an injectable transport; refusals (exists, sign in, too large) stay visible until dismissed and the folder reloads afterwards. The list/grid builders move to files_entries.dart to keep the panel small.
12 lines
441 B
Dart
12 lines
441 B
Dart
import 'files_drop.dart';
|
|
|
|
/// Native fallback for file drag-and-drop in the Files panel.
|
|
///
|
|
/// Only the web host observes drag events in this slice; a native host keeps
|
|
/// the Upload button and reports the missing drop capability plainly.
|
|
const String filesDropUnsupportedMessage =
|
|
'Dropping files is not supported on this platform yet.';
|
|
|
|
FilesDrop get hostFilesDrop =>
|
|
const FilesDrop.unsupported(filesDropUnsupportedMessage);
|