Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(neon): document neon pages #1028

Merged
merged 1 commit into from
Oct 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 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
Expand Down