Browse Source

Merge pull request #1028 from nextcloud/doc/neon_pages

docs(neon): document neon pages
pull/1031/head
Nikolas Rimikis 1 year ago committed by GitHub
parent
commit
e71e0cfe0a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      packages/neon/neon/lib/src/pages/account_settings.dart
  2. 2
      packages/neon/neon/lib/src/pages/home.dart
  3. 31
      packages/neon/neon/lib/src/pages/settings.dart

7
packages/neon/neon/lib/src/pages/account_settings.dart

@ -17,15 +17,22 @@ import 'package:neon/src/widgets/error.dart';
import 'package:neon/src/widgets/linear_progress_indicator.dart';
import 'package:nextcloud/provisioning_api.dart' as provisioning_api;
/// Account settings page.
///
/// Displays settings for an [Account]. Settings are specified as `Option`s.
@internal
class AccountSettingsPage extends StatelessWidget {
/// Creates a new account settings page for the given [account].
const AccountSettingsPage({
required this.bloc,
required this.account,
super.key,
});
/// The bloc managing the accounts and their settings.
final AccountsBloc bloc;
/// The account to display the settings for.
final Account account;
@override

2
packages/neon/neon/lib/src/pages/home.dart

@ -19,8 +19,10 @@ import 'package:neon/src/widgets/unified_search_results.dart';
import 'package:nextcloud/core.dart' as core;
import 'package:provider/provider.dart';
/// The home page of Neon.
@internal
class HomePage extends StatefulWidget {
/// Creates a new home page.
const HomePage({
super.key,
});

31
packages/neon/neon/lib/src/pages/settings.dart

@ -26,25 +26,56 @@ import 'package:neon/src/widgets/error.dart';
import 'package:package_info_plus/package_info_plus.dart';
import 'package:url_launcher/url_launcher_string.dart';
/// Categories of the [SettingsPage].
///
/// Used with [SettingsPage.initialCategory] to scroll to a specific section.
/// Values are in order of appearance but are not guaranteed to be included on
/// the settings page.
@internal
enum SettingsCategories {
/// `NextcloudAppOptions` category.
///
/// Each activated `AppImplementation` has an entry if it has any options specified.
apps,
/// Theming category.
theme,
/// Device navigation category.
navigation,
/// Push notifications category.
pushNotifications,
/// Startup category.
startup,
/// System tray category.
systemTray,
/// Account management category.
///
/// Also includes the `AccountSpecificOptions`.
accounts,
/// Other category.
///
/// Contains legal information and various links.
other,
}
/// Settings page.
///
/// Settings are specified as `Option`s.
@internal
class SettingsPage extends StatefulWidget {
/// Creates a new settings page.
const SettingsPage({
this.initialCategory,
super.key,
});
/// The optional initial category to show.
final SettingsCategories? initialCategory;
@override

Loading…
Cancel
Save