-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1680 from nextcloud/fix/neon_framework/user-statu…
…s-icon
- Loading branch information
Showing
13 changed files
with
72 additions
and
11 deletions.
There are no files selected for viewing
Submodule nextcloud-notifications
updated
27 files
+7 −3 | .github/workflows/block-merge-freeze.yml | |
+35 −21 | .github/workflows/command-compile.yml | |
+1 −1 | .github/workflows/dependabot-approve-merge.yml | |
+5 −5 | .github/workflows/lint-eslint.yml | |
+1 −1 | .github/workflows/lint-info-xml.yml | |
+2 −1 | .github/workflows/lint-php-cs.yml | |
+3 −2 | .github/workflows/lint-php.yml | |
+2 −2 | .github/workflows/lint-stylelint.yml | |
+5 −5 | .github/workflows/node.yml | |
+22 −11 | .github/workflows/phpunit-mysql.yml | |
+21 −8 | .github/workflows/phpunit-oci.yml | |
+21 −8 | .github/workflows/phpunit-pgsql.yml | |
+21 −8 | .github/workflows/phpunit-sqlite.yml | |
+2 −1 | .github/workflows/psalm.yml | |
+2 −2 | .github/workflows/update-nextcloud-ocp-approve-merge.yml | |
+2 −2 | .github/workflows/update-nextcloud-ocp.yml | |
+4 −4 | composer.lock | |
+2 −0 | l10n/nb.js | |
+2 −0 | l10n/nb.json | |
+1 −1 | l10n/sc.js | |
+1 −1 | l10n/sc.json | |
+1 −0 | l10n/sv.js | |
+1 −0 | l10n/sv.json | |
+1 −1 | lib/Push.php | |
+135 −68 | package-lock.json | |
+1 −1 | package.json | |
+1 −2 | tests/psalm-baseline.xml |
Submodule nextcloud-server
updated
2473 files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file removed
BIN
-204 Bytes
packages/neon_framework/assets/icons/server/user-status-away.svg.vec
Binary file not shown.
Binary file removed
BIN
-439 Bytes
packages/neon_framework/assets/icons/server/user-status-dnd.svg.vec
Binary file not shown.
Binary file removed
BIN
-264 Bytes
packages/neon_framework/assets/icons/server/user-status-invisible.svg.vec
Binary file not shown.
Binary file removed
BIN
-200 Bytes
packages/neon_framework/assets/icons/server/user-status-online.svg.vec
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
packages/neon_framework/lib/src/widgets/user_status_icon.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
import 'dart:math'; | ||
|
||
import 'package:flutter/material.dart'; | ||
import 'package:flutter_material_design_icons/flutter_material_design_icons.dart'; | ||
import 'package:neon_framework/src/theme/colors.dart'; | ||
import 'package:nextcloud/user_status.dart' as user_status; | ||
|
||
const _minus45Rad = -45 * pi / 180; | ||
|
||
/// Displays the current user status [type] as an icon. | ||
class NeonUserStatusIcon extends StatelessWidget { | ||
/// Creates a new user status icon. | ||
const NeonUserStatusIcon({ | ||
required this.type, | ||
this.size, | ||
super.key, | ||
}); | ||
|
||
/// The type of the user status. | ||
final user_status.$Type type; | ||
|
||
/// The size of the icon. | ||
final double? size; | ||
|
||
@override | ||
Widget build(BuildContext context) => switch (type) { | ||
user_status.$Type.online => Icon( | ||
size: size, | ||
Icons.circle, | ||
color: NcColors.success, | ||
), | ||
user_status.$Type.dnd => Icon( | ||
size: size, | ||
MdiIcons.minusCircle, | ||
color: NcColors.error, | ||
), | ||
user_status.$Type.away => Transform.rotate( | ||
angle: _minus45Rad, | ||
child: Icon( | ||
size: size, | ||
MdiIcons.moonWaningCrescent, | ||
color: NcColors.warning, | ||
), | ||
), | ||
user_status.$Type.invisible => Icon( | ||
size: size, | ||
Icons.circle_outlined, | ||
color: Theme.of(context).colorScheme.onBackground, | ||
), | ||
user_status.$Type.offline || user_status.$Type.busy => const SizedBox.shrink(), | ||
_ => throw UnimplementedError(type.value), | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters