Browse Source

Add tooltips to all IconButtons

pull/302/head
jld3103 2 years ago
parent
commit
31bf292eb8
No known key found for this signature in database
GPG Key ID: 9062417B9E8EB7B3
  1. 38
      packages/neon/neon/lib/l10n/en.arb
  2. 120
      packages/neon/neon/lib/l10n/localizations.dart
  3. 62
      packages/neon/neon/lib/l10n/localizations_en.dart
  4. 2
      packages/neon/neon/lib/src/pages/account_settings.dart
  5. 40
      packages/neon/neon/lib/src/pages/home.dart
  6. 4
      packages/neon/neon/lib/src/pages/login.dart
  7. 1
      packages/neon/neon/lib/src/pages/nextcloud_app_settings.dart
  8. 1
      packages/neon/neon/lib/src/pages/settings.dart
  9. 17
      packages/neon/neon/lib/src/widgets/exception.dart
  10. 1
      packages/neon/neon_files/lib/pages/main.dart
  11. 41
      packages/neon/neon_files/lib/widgets/browser_view.dart
  12. 8
      packages/neon/neon_news/lib/pages/article.dart
  13. 11
      packages/neon/neon_news/lib/widgets/articles_view.dart
  14. 1
      packages/neon/neon_news/lib/widgets/feed_floating_action_button.dart
  15. 3
      packages/neon/neon_news/lib/widgets/feeds_view.dart
  16. 1
      packages/neon/neon_news/lib/widgets/folder_floating_action_button.dart
  17. 2
      packages/neon/neon_notes/lib/dialogs/select_category.dart
  18. 10
      packages/neon/neon_notes/lib/pages/note.dart
  19. 12
      packages/neon/neon_notes/lib/widgets/category_select.dart
  20. 1
      packages/neon/neon_notes/lib/widgets/notes_floating_action_button.dart
  21. 9
      packages/neon/neon_notes/lib/widgets/notes_view.dart
  22. 1
      packages/neon/neon_notifications/lib/pages/main.dart

38
packages/neon/neon/lib/l10n/en.arb

@ -10,6 +10,7 @@
"loginOpenAgain": "Open again", "loginOpenAgain": "Open again",
"loginSwitchToBrowserWindow": "Please switch to the browser window that just opened and proceed there", "loginSwitchToBrowserWindow": "Please switch to the browser window that just opened and proceed there",
"loginWorksWith": "works with", "loginWorksWith": "works with",
"loginRestart": "Restart login",
"errorAccountAlreadyExists": "The account you are trying to add already exists", "errorAccountAlreadyExists": "The account you are trying to add already exists",
"errorCredentialsForAccountNoLongerMatch": "The credentials for this account no longer match", "errorCredentialsForAccountNoLongerMatch": "The credentials for this account no longer match",
"errorServerHadAProblemProcessingYourRequest": "The server had a problem while processing your request. You might want to try again", "errorServerHadAProblemProcessingYourRequest": "The server had a problem while processing your request. You might want to try again",
@ -63,10 +64,20 @@
"nextPushSupportedInstall": "Install NextPush", "nextPushSupportedInstall": "Install NextPush",
"settings": "Settings", "settings": "Settings",
"settingsApps": "Apps", "settingsApps": "Apps",
"settingsAccount": "Account",
"settingsExport": "Export settings", "settingsExport": "Export settings",
"settingsImport": "Import settings", "settingsImport": "Import settings",
"settingsImportWrongFileExtension": "Settings import has wrong file extension (has to be .json.base64)", "settingsImportWrongFileExtension": "Settings import has wrong file extension (has to be .json.base64)",
"settingsResetAll": "Reset all settings",
"settingsResetAllConfirmation": "Do you want to reset all settings?", "settingsResetAllConfirmation": "Do you want to reset all settings?",
"settingsResetFor": "Reset all settings for {name}",
"@settingsResetFor": {
"placeholders": {
"name": {
"type": "String"
}
}
},
"settingsResetForConfirmation": "Do you want to reset all settings for {name}?", "settingsResetForConfirmation": "Do you want to reset all settings for {name}?",
"@settingsResetForConfirmation": { "@settingsResetForConfirmation": {
"placeholders": { "placeholders": {
@ -112,6 +123,7 @@
"globalOptionsNavigationModeDrawer": "Drawer", "globalOptionsNavigationModeDrawer": "Drawer",
"globalOptionsNavigationModeDrawerAlwaysVisible": "Drawer always visible", "globalOptionsNavigationModeDrawerAlwaysVisible": "Drawer always visible",
"globalOptionsNavigationModeQuickBar": "Quick bar", "globalOptionsNavigationModeQuickBar": "Quick bar",
"accountOptionsRemove": "Remove account",
"accountOptionsRemoveConfirm": "Are you sure you want to remove the account {id}?", "accountOptionsRemoveConfirm": "Are you sure you want to remove the account {id}?",
"@accountOptionsRemoveConfirm": { "@accountOptionsRemoveConfirm": {
"placeholders": { "placeholders": {
@ -195,6 +207,14 @@
} }
} }
}, },
"filesGoToPath": "Go to /{path}",
"@filesGoToPath": {
"placeholders": {
"path": {
"type": "String"
}
}
},
"filesOptionsFilesSortPropertyName": "Name", "filesOptionsFilesSortPropertyName": "Name",
"filesOptionsFilesSortPropertyModifiedDate": "Last modified", "filesOptionsFilesSortPropertyModifiedDate": "Last modified",
"filesOptionsFilesSortPropertySize": "Size", "filesOptionsFilesSortPropertySize": "Size",
@ -242,9 +262,16 @@
} }
} }
}, },
"newsArticleStar": "Star article",
"newsArticleUnstar": "Unstar article",
"newsArticleMarkRead": "Mark article as read",
"newsArticleMarkUnread": "Mark article as unread",
"newsArticleOpenLink": "Open in browser",
"newsArticleShare": "Share",
"newsShowFeedURL": "Show URL", "newsShowFeedURL": "Show URL",
"newsCopyFeedURL": "Copy URL", "newsCopyFeedURL": "Copy URL",
"newsCopiedFeedURL": "URL copied to clipboard", "newsCopiedFeedURL": "URL copied to clipboard",
"newsShowFeedErrorMessage": "Show error message",
"newsCopyFeedErrorMessage": "Copy error message", "newsCopyFeedErrorMessage": "Copy error message",
"newsCopiedFeedErrorMessage": "Error message copied to clipboard", "newsCopiedFeedErrorMessage": "Error message copied to clipboard",
"newsOptionsDefaultCategory": "Category to show by default", "newsOptionsDefaultCategory": "Category to show by default",
@ -273,7 +300,6 @@
"notesCategories": "Categories", "notesCategories": "Categories",
"notesCreateNote": "Create note", "notesCreateNote": "Create note",
"notesCategory": "Category", "notesCategory": "Category",
"notesChangeCategory": "Change category",
"notesSetCategory": "Set category", "notesSetCategory": "Set category",
"notesNoteTitle": "Title", "notesNoteTitle": "Title",
"notesNoteChangedOnServer": "The note has been changed on the server. Please refresh and try again", "notesNoteChangedOnServer": "The note has been changed on the server. Please refresh and try again",
@ -286,8 +312,11 @@
} }
}, },
"notesUncategorized": "Uncategorized", "notesUncategorized": "Uncategorized",
"notesEdit": "Edit", "notesShowEditor": "Edit note",
"notesPreview": "Preview", "notesShowPreview": "Preview note",
"notesStar": "Star note",
"notesUnstar": "Unstar note",
"notesChangeCategory": "Change note category",
"notesDeleteNoteConfirm": "Are you sure you want to delete the note '{name}'?", "notesDeleteNoteConfirm": "Are you sure you want to delete the note '{name}'?",
"@notesDeleteNoteConfirm": { "@notesDeleteNoteConfirm": {
"placeholders": { "placeholders": {
@ -308,5 +337,6 @@
"notesOptionsCategoriesSortProperty": "How to sort categories", "notesOptionsCategoriesSortProperty": "How to sort categories",
"notesOptionsCategoriesSortPropertyAlphabetical": "Alphabetical", "notesOptionsCategoriesSortPropertyAlphabetical": "Alphabetical",
"notesOptionsCategoriesSortPropertyNotesCount": "Count of notes", "notesOptionsCategoriesSortPropertyNotesCount": "Count of notes",
"notificationsNextcloudAppNotImplementedYet": "Sorry, this Nextcloud app has not been implemented yet" "notificationsNextcloudAppNotImplementedYet": "Sorry, this Nextcloud app has not been implemented yet",
"notificationsDismissAll": "Dismiss all notifications"
} }

120
packages/neon/neon/lib/l10n/localizations.dart

@ -119,6 +119,12 @@ abstract class AppLocalizations {
/// **'works with'** /// **'works with'**
String get loginWorksWith; String get loginWorksWith;
/// No description provided for @loginRestart.
///
/// In en, this message translates to:
/// **'Restart login'**
String get loginRestart;
/// No description provided for @errorAccountAlreadyExists. /// No description provided for @errorAccountAlreadyExists.
/// ///
/// In en, this message translates to: /// In en, this message translates to:
@ -311,6 +317,12 @@ abstract class AppLocalizations {
/// **'Apps'** /// **'Apps'**
String get settingsApps; String get settingsApps;
/// No description provided for @settingsAccount.
///
/// In en, this message translates to:
/// **'Account'**
String get settingsAccount;
/// No description provided for @settingsExport. /// No description provided for @settingsExport.
/// ///
/// In en, this message translates to: /// In en, this message translates to:
@ -329,12 +341,24 @@ abstract class AppLocalizations {
/// **'Settings import has wrong file extension (has to be .json.base64)'** /// **'Settings import has wrong file extension (has to be .json.base64)'**
String get settingsImportWrongFileExtension; String get settingsImportWrongFileExtension;
/// No description provided for @settingsResetAll.
///
/// In en, this message translates to:
/// **'Reset all settings'**
String get settingsResetAll;
/// No description provided for @settingsResetAllConfirmation. /// No description provided for @settingsResetAllConfirmation.
/// ///
/// In en, this message translates to: /// In en, this message translates to:
/// **'Do you want to reset all settings?'** /// **'Do you want to reset all settings?'**
String get settingsResetAllConfirmation; String get settingsResetAllConfirmation;
/// No description provided for @settingsResetFor.
///
/// In en, this message translates to:
/// **'Reset all settings for {name}'**
String settingsResetFor(String name);
/// No description provided for @settingsResetForConfirmation. /// No description provided for @settingsResetForConfirmation.
/// ///
/// In en, this message translates to: /// In en, this message translates to:
@ -563,6 +587,12 @@ abstract class AppLocalizations {
/// **'Quick bar'** /// **'Quick bar'**
String get globalOptionsNavigationModeQuickBar; String get globalOptionsNavigationModeQuickBar;
/// No description provided for @accountOptionsRemove.
///
/// In en, this message translates to:
/// **'Remove account'**
String get accountOptionsRemove;
/// No description provided for @accountOptionsRemoveConfirm. /// No description provided for @accountOptionsRemoveConfirm.
/// ///
/// In en, this message translates to: /// In en, this message translates to:
@ -737,6 +767,12 @@ abstract class AppLocalizations {
/// **'Are you sure you want to download a file that is bigger than {warningSize} ({actualSize})?'** /// **'Are you sure you want to download a file that is bigger than {warningSize} ({actualSize})?'**
String filesConfirmDownloadSizeWarning(String warningSize, String actualSize); String filesConfirmDownloadSizeWarning(String warningSize, String actualSize);
/// No description provided for @filesGoToPath.
///
/// In en, this message translates to:
/// **'Go to /{path}'**
String filesGoToPath(String path);
/// No description provided for @filesOptionsFilesSortPropertyName. /// No description provided for @filesOptionsFilesSortPropertyName.
/// ///
/// In en, this message translates to: /// In en, this message translates to:
@ -893,6 +929,42 @@ abstract class AppLocalizations {
/// **'{count} unread'** /// **'{count} unread'**
String newsUnreadArticles(int count); String newsUnreadArticles(int count);
/// No description provided for @newsArticleStar.
///
/// In en, this message translates to:
/// **'Star article'**
String get newsArticleStar;
/// No description provided for @newsArticleUnstar.
///
/// In en, this message translates to:
/// **'Unstar article'**
String get newsArticleUnstar;
/// No description provided for @newsArticleMarkRead.
///
/// In en, this message translates to:
/// **'Mark article as read'**
String get newsArticleMarkRead;
/// No description provided for @newsArticleMarkUnread.
///
/// In en, this message translates to:
/// **'Mark article as unread'**
String get newsArticleMarkUnread;
/// No description provided for @newsArticleOpenLink.
///
/// In en, this message translates to:
/// **'Open in browser'**
String get newsArticleOpenLink;
/// No description provided for @newsArticleShare.
///
/// In en, this message translates to:
/// **'Share'**
String get newsArticleShare;
/// No description provided for @newsShowFeedURL. /// No description provided for @newsShowFeedURL.
/// ///
/// In en, this message translates to: /// In en, this message translates to:
@ -911,6 +983,12 @@ abstract class AppLocalizations {
/// **'URL copied to clipboard'** /// **'URL copied to clipboard'**
String get newsCopiedFeedURL; String get newsCopiedFeedURL;
/// No description provided for @newsShowFeedErrorMessage.
///
/// In en, this message translates to:
/// **'Show error message'**
String get newsShowFeedErrorMessage;
/// No description provided for @newsCopyFeedErrorMessage. /// No description provided for @newsCopyFeedErrorMessage.
/// ///
/// In en, this message translates to: /// In en, this message translates to:
@ -1079,12 +1157,6 @@ abstract class AppLocalizations {
/// **'Category'** /// **'Category'**
String get notesCategory; String get notesCategory;
/// No description provided for @notesChangeCategory.
///
/// In en, this message translates to:
/// **'Change category'**
String get notesChangeCategory;
/// No description provided for @notesSetCategory. /// No description provided for @notesSetCategory.
/// ///
/// In en, this message translates to: /// In en, this message translates to:
@ -1115,17 +1187,35 @@ abstract class AppLocalizations {
/// **'Uncategorized'** /// **'Uncategorized'**
String get notesUncategorized; String get notesUncategorized;
/// No description provided for @notesEdit. /// No description provided for @notesShowEditor.
/// ///
/// In en, this message translates to: /// In en, this message translates to:
/// **'Edit'** /// **'Edit note'**
String get notesEdit; String get notesShowEditor;
/// No description provided for @notesPreview. /// No description provided for @notesShowPreview.
/// ///
/// In en, this message translates to: /// In en, this message translates to:
/// **'Preview'** /// **'Preview note'**
String get notesPreview; String get notesShowPreview;
/// No description provided for @notesStar.
///
/// In en, this message translates to:
/// **'Star note'**
String get notesStar;
/// No description provided for @notesUnstar.
///
/// In en, this message translates to:
/// **'Unstar note'**
String get notesUnstar;
/// No description provided for @notesChangeCategory.
///
/// In en, this message translates to:
/// **'Change note category'**
String get notesChangeCategory;
/// No description provided for @notesDeleteNoteConfirm. /// No description provided for @notesDeleteNoteConfirm.
/// ///
@ -1210,6 +1300,12 @@ abstract class AppLocalizations {
/// In en, this message translates to: /// In en, this message translates to:
/// **'Sorry, this Nextcloud app has not been implemented yet'** /// **'Sorry, this Nextcloud app has not been implemented yet'**
String get notificationsNextcloudAppNotImplementedYet; String get notificationsNextcloudAppNotImplementedYet;
/// No description provided for @notificationsDismissAll.
///
/// In en, this message translates to:
/// **'Dismiss all notifications'**
String get notificationsDismissAll;
} }
class _AppLocalizationsDelegate extends LocalizationsDelegate<AppLocalizations> { class _AppLocalizationsDelegate extends LocalizationsDelegate<AppLocalizations> {

62
packages/neon/neon/lib/l10n/localizations_en.dart

@ -35,6 +35,9 @@ class AppLocalizationsEn extends AppLocalizations {
@override @override
String get loginWorksWith => 'works with'; String get loginWorksWith => 'works with';
@override
String get loginRestart => 'Restart login';
@override @override
String get errorAccountAlreadyExists => 'The account you are trying to add already exists'; String get errorAccountAlreadyExists => 'The account you are trying to add already exists';
@ -141,6 +144,9 @@ class AppLocalizationsEn extends AppLocalizations {
@override @override
String get settingsApps => 'Apps'; String get settingsApps => 'Apps';
@override
String get settingsAccount => 'Account';
@override @override
String get settingsExport => 'Export settings'; String get settingsExport => 'Export settings';
@ -150,9 +156,17 @@ class AppLocalizationsEn extends AppLocalizations {
@override @override
String get settingsImportWrongFileExtension => 'Settings import has wrong file extension (has to be .json.base64)'; String get settingsImportWrongFileExtension => 'Settings import has wrong file extension (has to be .json.base64)';
@override
String get settingsResetAll => 'Reset all settings';
@override @override
String get settingsResetAllConfirmation => 'Do you want to reset all settings?'; String get settingsResetAllConfirmation => 'Do you want to reset all settings?';
@override
String settingsResetFor(String name) {
return 'Reset all settings for $name';
}
@override @override
String settingsResetForConfirmation(String name) { String settingsResetForConfirmation(String name) {
return 'Do you want to reset all settings for $name?'; return 'Do you want to reset all settings for $name?';
@ -270,6 +284,9 @@ class AppLocalizationsEn extends AppLocalizations {
@override @override
String get globalOptionsNavigationModeQuickBar => 'Quick bar'; String get globalOptionsNavigationModeQuickBar => 'Quick bar';
@override
String get accountOptionsRemove => 'Remove account';
@override @override
String accountOptionsRemoveConfirm(String id) { String accountOptionsRemoveConfirm(String id) {
return 'Are you sure you want to remove the account $id?'; return 'Are you sure you want to remove the account $id?';
@ -369,6 +386,11 @@ class AppLocalizationsEn extends AppLocalizations {
return 'Are you sure you want to download a file that is bigger than $warningSize ($actualSize)?'; return 'Are you sure you want to download a file that is bigger than $warningSize ($actualSize)?';
} }
@override
String filesGoToPath(String path) {
return 'Go to /$path';
}
@override @override
String get filesOptionsFilesSortPropertyName => 'Name'; String get filesOptionsFilesSortPropertyName => 'Name';
@ -453,6 +475,24 @@ class AppLocalizationsEn extends AppLocalizations {
return '$count unread'; return '$count unread';
} }
@override
String get newsArticleStar => 'Star article';
@override
String get newsArticleUnstar => 'Unstar article';
@override
String get newsArticleMarkRead => 'Mark article as read';
@override
String get newsArticleMarkUnread => 'Mark article as unread';
@override
String get newsArticleOpenLink => 'Open in browser';
@override
String get newsArticleShare => 'Share';
@override @override
String get newsShowFeedURL => 'Show URL'; String get newsShowFeedURL => 'Show URL';
@ -462,6 +502,9 @@ class AppLocalizationsEn extends AppLocalizations {
@override @override
String get newsCopiedFeedURL => 'URL copied to clipboard'; String get newsCopiedFeedURL => 'URL copied to clipboard';
@override
String get newsShowFeedErrorMessage => 'Show error message';
@override @override
String get newsCopyFeedErrorMessage => 'Copy error message'; String get newsCopyFeedErrorMessage => 'Copy error message';
@ -546,9 +589,6 @@ class AppLocalizationsEn extends AppLocalizations {
@override @override
String get notesCategory => 'Category'; String get notesCategory => 'Category';
@override
String get notesChangeCategory => 'Change category';
@override @override
String get notesSetCategory => 'Set category'; String get notesSetCategory => 'Set category';
@ -567,10 +607,19 @@ class AppLocalizationsEn extends AppLocalizations {
String get notesUncategorized => 'Uncategorized'; String get notesUncategorized => 'Uncategorized';
@override @override
String get notesEdit => 'Edit'; String get notesShowEditor => 'Edit note';
@override
String get notesShowPreview => 'Preview note';
@override
String get notesStar => 'Star note';
@override @override
String get notesPreview => 'Preview'; String get notesUnstar => 'Unstar note';
@override
String get notesChangeCategory => 'Change note category';
@override @override
String notesDeleteNoteConfirm(String name) { String notesDeleteNoteConfirm(String name) {
@ -615,4 +664,7 @@ class AppLocalizationsEn extends AppLocalizations {
@override @override
String get notificationsNextcloudAppNotImplementedYet => 'Sorry, this Nextcloud app has not been implemented yet'; String get notificationsNextcloudAppNotImplementedYet => 'Sorry, this Nextcloud app has not been implemented yet';
@override
String get notificationsDismissAll => 'Dismiss all notifications';
} }

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

@ -33,6 +33,7 @@ class AccountSettingsPage extends StatelessWidget {
Navigator.of(context).pop(); Navigator.of(context).pop();
} }
}, },
tooltip: AppLocalizations.of(context).accountOptionsRemove,
icon: const Icon(MdiIcons.delete), icon: const Icon(MdiIcons.delete),
), ),
IconButton( IconButton(
@ -46,6 +47,7 @@ class AccountSettingsPage extends StatelessWidget {
await _options.reset(); await _options.reset();
} }
}, },
tooltip: AppLocalizations.of(context).settingsResetFor(_name),
icon: const Icon(MdiIcons.cogRefresh), icon: const Icon(MdiIcons.cogRefresh),
), ),
], ],

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

@ -245,12 +245,11 @@ class _HomePageState extends State<HomePage> {
margin: const EdgeInsets.symmetric( margin: const EdgeInsets.symmetric(
vertical: 5, vertical: 5,
), ),
child: Tooltip(
message: account.client.humanReadableID,
child: IconButton( child: IconButton(
onPressed: () { onPressed: () {
_accountsBloc.setActiveAccount(account); _accountsBloc.setActiveAccount(account);
}, },
tooltip: account.client.humanReadableID,
icon: IntrinsicHeight( icon: IntrinsicHeight(
child: NeonAccountAvatar( child: NeonAccountAvatar(
account: account, account: account,
@ -258,7 +257,6 @@ class _HomePageState extends State<HomePage> {
), ),
), ),
), ),
),
], ],
Container( Container(
margin: const EdgeInsets.only( margin: const EdgeInsets.only(
@ -358,18 +356,16 @@ class _HomePageState extends State<HomePage> {
builder: (final context, final unreadCounterSnapshot) { builder: (final context, final unreadCounterSnapshot) {
final unreadCount = unreadCounterSnapshot.data ?? 0; final unreadCount = unreadCounterSnapshot.data ?? 0;
if (isQuickBar) { if (isQuickBar) {
return Tooltip( return IconButton(
message: appImplementation.name(context),
child: IconButton(
onPressed: () async { onPressed: () async {
await _appsBloc.setActiveApp(appImplementation.id); await _appsBloc.setActiveApp(appImplementation.id);
}, },
tooltip: appImplementation.name(context),
icon: NeonAppImplementationIcon( icon: NeonAppImplementationIcon(
appImplementation: appImplementation, appImplementation: appImplementation,
unreadCount: unreadCount, unreadCount: unreadCount,
color: Theme.of(context).colorScheme.primary, color: Theme.of(context).colorScheme.primary,
), ),
),
); );
} }
return ListTile( return ListTile(
@ -413,11 +409,12 @@ class _HomePageState extends State<HomePage> {
), ),
if (isQuickBar) ...[ if (isQuickBar) ...[
IconButton( IconButton(
onPressed: _openSettings,
tooltip: AppLocalizations.of(context).settings,
icon: Icon( icon: Icon(
Icons.settings, Icons.settings,
color: Theme.of(context).appBarTheme.foregroundColor, color: Theme.of(context).appBarTheme.foregroundColor,
), ),
onPressed: _openSettings,
), ),
] else ...[ ] else ...[
ListTile( ListTile(
@ -515,6 +512,15 @@ class _HomePageState extends State<HomePage> {
final unreadCount = unreadCounterSnapshot.data ?? 0; final unreadCount = unreadCounterSnapshot.data ?? 0;
return IconButton( return IconButton(
key: Key('app-${notificationsAppImplementation.data!.id}'), key: Key('app-${notificationsAppImplementation.data!.id}'),
onPressed: () async {
await _openNotifications(
notificationsAppImplementation.data!,
accounts,
account,
);
},
tooltip: AppLocalizations.of(context)
.appImplementationName(notificationsAppImplementation.data!.id),
icon: NeonAppImplementationIcon( icon: NeonAppImplementationIcon(
appImplementation: notificationsAppImplementation.data!, appImplementation: notificationsAppImplementation.data!,
unreadCount: unreadCount, unreadCount: unreadCount,
@ -523,23 +529,11 @@ class _HomePageState extends State<HomePage> {
: Theme.of(context).colorScheme.onBackground, : Theme.of(context).colorScheme.onBackground,
size: const Size.square(kAvatarSize * 2 / 3), size: const Size.square(kAvatarSize * 2 / 3),
), ),
onPressed: () async {
await _openNotifications(
notificationsAppImplementation.data!,
accounts,
account,
);
},
); );
}, },
), ),
], ],
IconButton( IconButton(
icon: IntrinsicWidth(
child: NeonAccountAvatar(
account: account,
),
),
onPressed: () async { onPressed: () async {
await Navigator.of(context).push( await Navigator.of(context).push(
MaterialPageRoute( MaterialPageRoute(
@ -550,6 +544,12 @@ class _HomePageState extends State<HomePage> {
), ),
); );
}, },
tooltip: AppLocalizations.of(context).settingsAccount,
icon: IntrinsicWidth(
child: NeonAccountAvatar(
account: account,
),
),
), ),
], ],
), ),

4
packages/neon/neon/lib/src/pages/login.dart

@ -126,7 +126,7 @@ class _LoginPageState extends State<LoginPage> {
appBar: serverConnectionStateSnapshot.data == ServerConnectionState.success || appBar: serverConnectionStateSnapshot.data == ServerConnectionState.success ||
(accountsSnapshot.data?.isNotEmpty ?? false) (accountsSnapshot.data?.isNotEmpty ?? false)
? AppBar( ? AppBar(
leading: IconButton( leading: BackButton(
onPressed: () { onPressed: () {
if (accountsSnapshot.data?.isNotEmpty ?? false) { if (accountsSnapshot.data?.isNotEmpty ?? false) {
Navigator.of(context).pop(); Navigator.of(context).pop();
@ -134,12 +134,12 @@ class _LoginPageState extends State<LoginPage> {
_loginBloc.setServerURL(null); _loginBloc.setServerURL(null);
} }
}, },
icon: const Icon(Icons.arrow_back),
), ),
actions: [ actions: [
if (serverConnectionStateSnapshot.data != null) ...[ if (serverConnectionStateSnapshot.data != null) ...[
IconButton( IconButton(
onPressed: _loginBloc.refresh, onPressed: _loginBloc.refresh,
tooltip: AppLocalizations.of(context).loginRestart,
icon: const Icon(Icons.refresh), icon: const Icon(Icons.refresh),
), ),
], ],

1
packages/neon/neon/lib/src/pages/nextcloud_app_settings.dart

@ -25,6 +25,7 @@ class NextcloudAppSettingsPage extends StatelessWidget {
await appImplementation.options.reset(); await appImplementation.options.reset();
} }
}, },
tooltip: AppLocalizations.of(context).settingsResetFor(appImplementation.name(context)),
icon: const Icon(MdiIcons.cogRefresh), icon: const Icon(MdiIcons.cogRefresh),
), ),
], ],

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

@ -35,6 +35,7 @@ class _SettingsPageState extends State<SettingsPage> {
} }
} }
}, },
tooltip: AppLocalizations.of(context).settingsResetAll,
icon: const Icon(MdiIcons.cogRefresh), icon: const Icon(MdiIcons.cogRefresh),
), ),
], ],

17
packages/neon/neon/lib/src/widgets/exception.dart

@ -48,15 +48,26 @@ class NeonException extends StatelessWidget {
); );
if (onlyIcon) { if (onlyIcon) {
return InkWell( return Semantics(
child: errorIcon, tooltip: details.text,
onTap: () async { child: IconButton(
icon: errorIcon,
padding: EdgeInsets.zero,
visualDensity: const VisualDensity(
horizontal: VisualDensity.minimumDensity,
vertical: VisualDensity.minimumDensity,
),
tooltip: details.isUnauthorized
? AppLocalizations.of(context).loginAgain
: AppLocalizations.of(context).retry,
onPressed: () async {
if (details.isUnauthorized) { if (details.isUnauthorized) {
await _openLoginPage(context); await _openLoginPage(context);
} else { } else {
onRetry(); onRetry();
} }
}, },
),
); );
} }

1
packages/neon/neon_files/lib/pages/main.dart

@ -55,6 +55,7 @@ class _FilesMainPageState extends State<FilesMainPage> {
), ),
); );
}, },
tooltip: AppLocalizations.of(context).filesUploadFiles,
child: const Icon(Icons.add), child: const Icon(Icons.add),
), ),
); );

41
packages/neon/neon_files/lib/widgets/browser_view.dart

@ -150,28 +150,47 @@ class _FilesBrowserViewState extends State<FilesBrowserView> {
child: Wrap( child: Wrap(
crossAxisAlignment: WrapCrossAlignment.center, crossAxisAlignment: WrapCrossAlignment.center,
children: <Widget>[ children: <Widget>[
SizedBox( IconButton(
height: 40, padding: EdgeInsets.zero,
child: InkWell( visualDensity: const VisualDensity(
onTap: () { horizontal: VisualDensity.minimumDensity,
vertical: VisualDensity.minimumDensity,
),
tooltip: AppLocalizations.of(context).filesGoToPath(''),
icon: const Icon(
Icons.house,
size: 30,
),
onPressed: () {
widget.bloc.setPath([]); widget.bloc.setPath([]);
}, },
child: const Icon(Icons.house),
),
), ),
for (var i = 0; i < pathSnapshot.data!.length; i++) ...[ for (var i = 0; i < pathSnapshot.data!.length; i++) ...[
InkWell( Builder(
onTap: () { builder: (final context) {
widget.bloc.setPath(pathSnapshot.data!.sublist(0, i + 1)); final path = pathSnapshot.data!.sublist(0, i + 1);
return Tooltip(
message: AppLocalizations.of(context).filesGoToPath(path.join('/')),
excludeFromSemantics: true,
child: TextButton(
onPressed: () {
widget.bloc.setPath(path);
},
child: Text(
pathSnapshot.data![i],
semanticsLabel:
AppLocalizations.of(context).filesGoToPath(path.join('/')),
),
),
);
}, },
child: Text(pathSnapshot.data![i]),
), ),
], ],
] ]
.intersperse( .intersperse(
const Icon( const Icon(
Icons.keyboard_arrow_right, Icons.keyboard_arrow_right,
size: 40, size: 30,
), ),
) )
.toList(), .toList(),

8
packages/neon/neon_news/lib/pages/article.dart

@ -123,6 +123,9 @@ class _NewsArticlePageState extends State<NewsArticlePage> {
widget.bloc.starArticle(); widget.bloc.starArticle();
} }
}, },
tooltip: starred
? AppLocalizations.of(context).newsArticleUnstar
: AppLocalizations.of(context).newsArticleStar,
icon: Icon(starred ? Icons.star : Icons.star_outline), icon: Icon(starred ? Icons.star : Icons.star_outline),
); );
}, },
@ -139,6 +142,9 @@ class _NewsArticlePageState extends State<NewsArticlePage> {
widget.bloc.markArticleAsUnread(); widget.bloc.markArticleAsUnread();
} }
}, },
tooltip: unread
? AppLocalizations.of(context).newsArticleMarkRead
: AppLocalizations.of(context).newsArticleMarkUnread,
icon: Icon(unread ? MdiIcons.email : MdiIcons.emailMarkAsUnread), icon: Icon(unread ? MdiIcons.email : MdiIcons.emailMarkAsUnread),
); );
}, },
@ -151,12 +157,14 @@ class _NewsArticlePageState extends State<NewsArticlePage> {
mode: LaunchMode.externalApplication, mode: LaunchMode.externalApplication,
); );
}, },
tooltip: AppLocalizations.of(context).newsArticleOpenLink,
icon: const Icon(Icons.open_in_new), icon: const Icon(Icons.open_in_new),
), ),
IconButton( IconButton(
onPressed: () async { onPressed: () async {
await Share.share(await _getURL()); await Share.share(await _getURL());
}, },
tooltip: AppLocalizations.of(context).newsArticleShare,
icon: const Icon(Icons.share), icon: const Icon(Icons.share),
), ),
], ],

11
packages/neon/neon_news/lib/widgets/articles_view.dart

@ -158,10 +158,6 @@ class _NewsArticlesViewState extends State<NewsArticlesView> {
], ],
), ),
trailing: IconButton( trailing: IconButton(
icon: Icon(
article.starred ? Icons.star : Icons.star_outline,
color: Theme.of(context).colorScheme.primary,
),
onPressed: () { onPressed: () {
if (article.starred) { if (article.starred) {
widget.bloc.unstarArticle(article); widget.bloc.unstarArticle(article);
@ -169,6 +165,13 @@ class _NewsArticlesViewState extends State<NewsArticlesView> {
widget.bloc.starArticle(article); widget.bloc.starArticle(article);
} }
}, },
tooltip: article.starred
? AppLocalizations.of(context).newsArticleUnstar
: AppLocalizations.of(context).newsArticleStar,
icon: Icon(
article.starred ? Icons.star : Icons.star_outline,
color: Theme.of(context).colorScheme.primary,
),
), ),
onLongPress: () { onLongPress: () {
if (article.unread) { if (article.unread) {

1
packages/neon/neon_news/lib/widgets/feed_floating_action_button.dart

@ -24,6 +24,7 @@ class NewsFeedFloatingActionButton extends StatelessWidget {
bloc.addFeed(result[0] as String, result[1] as int?); bloc.addFeed(result[0] as String, result[1] as int?);
} }
}, },
tooltip: AppLocalizations.of(context).newsAddFeed,
child: const Icon(Icons.add), child: const Icon(Icons.add),
); );
} }

3
packages/neon/neon_news/lib/widgets/feeds_view.dart

@ -63,7 +63,6 @@ class NewsFeedsView extends StatelessWidget {
children: [ children: [
if (feed.updateErrorCount > 0) ...[ if (feed.updateErrorCount > 0) ...[
IconButton( IconButton(
iconSize: 30,
onPressed: () async { onPressed: () async {
await showDialog( await showDialog(
context: context, context: context,
@ -72,6 +71,8 @@ class NewsFeedsView extends StatelessWidget {
), ),
); );
}, },
tooltip: AppLocalizations.of(context).newsShowFeedErrorMessage,
iconSize: 30,
icon: Text( icon: Text(
feed.updateErrorCount.toString(), feed.updateErrorCount.toString(),
style: const TextStyle( style: const TextStyle(

1
packages/neon/neon_news/lib/widgets/folder_floating_action_button.dart

@ -19,6 +19,7 @@ class NewsFolderFloatingActionButton extends StatelessWidget {
bloc.createFolder(result); bloc.createFolder(result);
} }
}, },
tooltip: AppLocalizations.of(context).filesCreateFolder,
child: const Icon(Icons.add), child: const Icon(Icons.add),
); );
} }

2
packages/neon/neon_notes/lib/dialogs/select_category.dart

@ -29,7 +29,7 @@ class _NotesSelectCategoryDialogState extends State<NotesSelectCategoryDialog> {
Widget build(final BuildContext context) => ResultBuilder<List<NextcloudNotesNote>>( Widget build(final BuildContext context) => ResultBuilder<List<NextcloudNotesNote>>(
stream: widget.bloc.notes, stream: widget.bloc.notes,
builder: (final context, final notes) => NeonDialog( builder: (final context, final notes) => NeonDialog(
title: Text(AppLocalizations.of(context).notesChangeCategory), title: Text(AppLocalizations.of(context).notesCategory),
children: [ children: [
Form( Form(
key: formKey, key: formKey,

10
packages/neon/neon_notes/lib/pages/note.dart

@ -89,9 +89,6 @@ class _NotesNotePageState extends State<NotesNotePage> {
), ),
actions: [ actions: [
IconButton( IconButton(
icon: Icon(
_showEditor ? Icons.visibility : Icons.edit,
),
onPressed: () { onPressed: () {
setState(() { setState(() {
_showEditor = !_showEditor; _showEditor = !_showEditor;
@ -104,6 +101,12 @@ class _NotesNotePageState extends State<NotesNotePage> {
_titleFocusNode.unfocus(); _titleFocusNode.unfocus();
} }
}, },
tooltip: _showEditor
? AppLocalizations.of(context).notesShowPreview
: AppLocalizations.of(context).notesShowEditor,
icon: Icon(
_showEditor ? Icons.visibility : Icons.edit,
),
), ),
StreamBuilder( StreamBuilder(
stream: widget.bloc.category, stream: widget.bloc.category,
@ -123,6 +126,7 @@ class _NotesNotePageState extends State<NotesNotePage> {
widget.bloc.updateCategory(result); widget.bloc.updateCategory(result);
} }
}, },
tooltip: AppLocalizations.of(context).notesChangeCategory,
icon: Icon( icon: Icon(
MdiIcons.tag, MdiIcons.tag,
color: category.isNotEmpty ? NotesCategoryColor.compute(category) : null, color: category.isNotEmpty ? NotesCategoryColor.compute(category) : null,

12
packages/neon/neon_notes/lib/widgets/category_select.dart

@ -71,12 +71,7 @@ class NotesCategorySelect extends StatelessWidget {
itemCount: options.length, itemCount: options.length,
itemBuilder: (final context, final index) { itemBuilder: (final context, final index) {
final option = options.elementAt(index); final option = options.elementAt(index);
return InkWell( return ListTile(
onTap: () {
onSelected(option);
},
child: Builder(
builder: (final context) => ListTile(
leading: Icon( leading: Icon(
MdiIcons.tag, MdiIcons.tag,
color: option != '' ? NotesCategoryColor.compute(option) : null, color: option != '' ? NotesCategoryColor.compute(option) : null,
@ -84,8 +79,9 @@ class NotesCategorySelect extends StatelessWidget {
title: Text( title: Text(
option != '' ? option : AppLocalizations.of(context).notesUncategorized, option != '' ? option : AppLocalizations.of(context).notesUncategorized,
), ),
), onTap: () {
), onSelected(option);
},
); );
}, },
), ),

1
packages/neon/neon_notes/lib/widgets/notes_floating_action_button.dart

@ -27,6 +27,7 @@ class NotesFloatingActionButton extends StatelessWidget {
); );
} }
}, },
tooltip: AppLocalizations.of(context).notesCreateNote,
child: const Icon(Icons.add), child: const Icon(Icons.add),
); );
} }

9
packages/neon/neon_notes/lib/widgets/notes_view.dart

@ -71,10 +71,6 @@ class NotesView extends StatelessWidget {
], ],
), ),
trailing: IconButton( trailing: IconButton(
icon: Icon(
note.favorite ? Icons.star : Icons.star_outline,
color: Theme.of(context).colorScheme.primary,
),
onPressed: () { onPressed: () {
bloc.updateNote( bloc.updateNote(
note.id, note.id,
@ -82,6 +78,11 @@ class NotesView extends StatelessWidget {
favorite: !note.favorite, favorite: !note.favorite,
); );
}, },
tooltip: note.favorite ? AppLocalizations.of(context).notesUnstar : AppLocalizations.of(context).notesStar,
icon: Icon(
note.favorite ? Icons.star : Icons.star_outline,
color: Theme.of(context).colorScheme.primary,
),
), ),
onTap: () async { onTap: () async {
await Navigator.of(context).push( await Navigator.of(context).push(

1
packages/neon/neon_notifications/lib/pages/main.dart

@ -31,6 +31,7 @@ class _NotificationsMainPageState extends State<NotificationsMainPage> {
onPressed: () async { onPressed: () async {
widget.bloc.deleteAllNotifications(); widget.bloc.deleteAllNotifications();
}, },
tooltip: AppLocalizations.of(context).notificationsDismissAll,
child: const Icon(MdiIcons.checkAll), child: const Icon(MdiIcons.checkAll),
), ),
body: NeonListView<NextcloudNotificationsNotification>( body: NeonListView<NextcloudNotificationsNotification>(

Loading…
Cancel
Save