Skip to content

Commit

Permalink
docs(neon): document neon pages
Browse files Browse the repository at this point in the history
Signed-off-by: Nikolas Rimikis <[email protected]>
  • Loading branch information
Leptopoda committed Oct 26, 2023
1 parent ab10025 commit eeb6fa6
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/neon/neon/lib/src/pages/account_settings.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions packages/neon/neon/lib/src/pages/home.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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,
});
Expand Down
31 changes: 31 additions & 0 deletions packages/neon/neon/lib/src/pages/settings.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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.
apps,

/// Theming category.
theme,

/// Device navigation category.
navigation,

/// Push notifications category.
pushNotifications,

/// Startup category.
startup,

/// SystemTray 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 category to show after creation.
final SettingsCategories? initialCategory;

@override
Expand Down

0 comments on commit eeb6fa6

Please sign in to comment.