3ec580c2d9
Servers become rows with a selection mark, addresses as subtitles and a Use/Edit/Remove menu plus an Add server row; the connection is a status row with address and Reconnect/Disconnect rows; Templates and Schedules are chevron rows in a Library group. Material groups are flat surfaceContainer surfaces with primary titleSmall headers (no Cards); Cupertino uses inset-grouped sections on the grouped background, switches for the ntfy choices. The trust warning is a footer, helper copy is shortened, Save workspace is a legible tonal/plain button, and the column starts at the bar's inset (max 720) instead of being centred. The page pads by the top media padding instead of a top SafeArea.
37 lines
1.1 KiB
Dart
37 lines
1.1 KiB
Dart
import 'package:flutter/cupertino.dart';
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'settings_keys.dart';
|
|
import 'settings_row.dart';
|
|
import 'settings_theme.dart';
|
|
|
|
/// The Settings entry to the Templates gallery.
|
|
///
|
|
/// The row wording matches the web Settings page: `Browse templates` with the
|
|
/// server-catalogue secondary line. It only opens the route; loading the
|
|
/// catalogue is the gallery's own read.
|
|
const String settingsTemplatesLabel = 'Browse templates';
|
|
const String settingsTemplatesSecondary =
|
|
'Reusable pipeline definitions offered by the server.';
|
|
|
|
/// A navigation row (chevron) for a Settings group.
|
|
class SettingsTemplatesSection extends StatelessWidget {
|
|
const SettingsTemplatesSection({super.key, required this.onOpen});
|
|
|
|
final VoidCallback onOpen;
|
|
|
|
@override
|
|
Widget build(BuildContext context) => SettingsRow(
|
|
key: SettingsKeys.templates,
|
|
leading: Icon(
|
|
usesCupertinoControls(context)
|
|
? CupertinoIcons.square_grid_2x2
|
|
: Icons.widgets_outlined,
|
|
),
|
|
title: const Text(settingsTemplatesLabel),
|
|
subtitle: const Text(settingsTemplatesSecondary),
|
|
chevron: true,
|
|
onTap: onOpen,
|
|
);
|
|
}
|