Skip to content
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
2 changes: 1 addition & 1 deletion external/nextcloud-notifications
Submodule nextcloud-notifications updated 52 files
+6 −5 .github/workflows/command-compile.yml
+7 −6 .github/workflows/lint-eslint.yml
+3 −9 .github/workflows/lint-info-xml.yml
+4 −4 .github/workflows/lint-php-cs.yml
+4 −10 .github/workflows/lint-php.yml
+2 −2 .github/workflows/lint-stylelint.yml
+7 −11 .github/workflows/node.yml
+12 −14 .github/workflows/phpunit-mysql.yml
+8 −13 .github/workflows/phpunit-oci.yml
+8 −13 .github/workflows/phpunit-pgsql.yml
+8 −13 .github/workflows/phpunit-sqlite.yml
+1 −1 .github/workflows/pr-feedback.yml
+6 −12 .github/workflows/psalm.yml
+5 −5 .github/workflows/update-nextcloud-ocp.yml
+4 −4 composer.lock
+2 −2 js/notifications-admin-settings.js
+1 −1 js/notifications-admin-settings.js.LICENSE.txt
+1 −1 js/notifications-admin-settings.js.map
+2 −2 js/notifications-main.js
+1 −1 js/notifications-main.js.LICENSE.txt
+1 −1 js/notifications-main.js.map
+2 −2 ...ons-node_modules_moment_locale_sync_recursive_-src_NotificationsApp_vue-data_image_svg_xml_base64-ab95a3.js
+1 −1 ...node_modules_moment_locale_sync_recursive_-src_NotificationsApp_vue-data_image_svg_xml_base64-ab95a3.js.map
+2 −2 js/notifications-node_modules_nextcloud_dialogs_dist_chunks_index-c0bccfab_mjs.js
+1 −1 js/notifications-node_modules_nextcloud_dialogs_dist_chunks_index-c0bccfab_mjs.js.map
+2 −2 js/notifications-settings.js
+1 −1 js/notifications-settings.js.LICENSE.txt
+1 −1 js/notifications-settings.js.map
+0 −3 ...ons-vendors-node_modules_core-js_internals_array-iteration_js-node_modules_core-js_internals_arra-46f851.js
+0 −1 ...vendors-node_modules_core-js_internals_array-iteration_js-node_modules_core-js_internals_arra-46f851.js.map
+3 −0 ...ons-vendors-node_modules_nextcloud_auth_dist_index_js-node_modules_nextcloud_vue_dist_Components_-304b96.js
+0 −0 ...node_modules_nextcloud_auth_dist_index_js-node_modules_nextcloud_vue_dist_Components_-304b96.js.LICENSE.txt
+1 −0 ...vendors-node_modules_nextcloud_auth_dist_index_js-node_modules_nextcloud_vue_dist_Components_-304b96.js.map
+2 −2 js/notifications-vendors-node_modules_nextcloud_dialogs_dist_chunks_FilePicker-0bd54f66_mjs.js
+1 −1 js/notifications-vendors-node_modules_nextcloud_dialogs_dist_chunks_FilePicker-0bd54f66_mjs.js.map
+2 −2 ...ons-vendors-node_modules_nextcloud_moment_dist_index_js-node_modules_nextcloud_notify_push_dist_i-4dbea9.js
+1 −1 ...vendors-node_modules_nextcloud_moment_dist_index_js-node_modules_nextcloud_notify_push_dist_i-4dbea9.js.map
+24 −0 l10n/ast.js
+24 −0 l10n/ast.json
+1 −0 l10n/az.js
+1 −0 l10n/az.json
+1 −1 l10n/es.js
+1 −1 l10n/es.json
+42 −0 l10n/ka.js
+40 −0 l10n/ka.json
+3 −0 l10n/ko.js
+3 −0 l10n/ko.json
+27 −110 package-lock.json
+3 −3 package.json
+0 −1 tests/Integration/composer.json
+1 −44 tests/Integration/composer.lock
+6 −5 tests/Integration/config/behat.yml
2 changes: 1 addition & 1 deletion external/nextcloud-server
Submodule nextcloud-server updated 1307 files
2 changes: 1 addition & 1 deletion external/nextcloud-spreed
Submodule nextcloud-spreed updated 222 files
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ const _reservedNames = [
'super',
'switch',
'sync',
'Type',
'this',
'throw',
'true',
Expand Down
6 changes: 5 additions & 1 deletion packages/neon/neon_dashboard/lib/src/pages/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import 'package:neon_framework/theme.dart';
import 'package:neon_framework/utils.dart';
import 'package:neon_framework/widgets.dart';
import 'package:nextcloud/dashboard.dart' as dashboard;
import 'package:nextcloud/user_status.dart' as user_status;

/// Displays the whole dashboard page layout.
class DashboardMainPage extends StatelessWidget {
Expand Down Expand Up @@ -136,7 +137,10 @@ class DashboardMainPage extends StatelessWidget {

return _buildStatus(
context: context,
icon: NeonServerIcon(icon: 'user-status-${status.status == 'offline' ? 'invisible' : status.status}'),
icon: NeonServerIcon(
icon:
'user-status-${status.status == user_status.$Type.offline ? user_status.$Type.invisible : status.status}',
),
label: Text(label.toString()),
onPressed: () async {
await showDialog<void>(
Expand Down
18 changes: 9 additions & 9 deletions packages/neon_framework/lib/src/widgets/dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -618,23 +618,23 @@ class _NeonUserStatusDialogState extends State<NeonUserStatusDialog> {
late final StreamSubscription<Result<user_status.$PublicInterface?>> statusSubscription;

late final onlineStatuses = {
'online': (
['online'],
user_status.$Type.online: (
[user_status.$Type.online],
NeonLocalizations.of(context).userStatusOnline,
null,
),
'dnd': (
['dnd'],
user_status.$Type.dnd: (
[user_status.$Type.dnd],
NeonLocalizations.of(context).userStatusDoNotDisturb,
NeonLocalizations.of(context).userStatusDoNotDisturbDescription
),
'away': (
['away'],
user_status.$Type.away: (
[user_status.$Type.away],
NeonLocalizations.of(context).userStatusAway,
null,
),
'invisible': (
['invisible', 'offline'],
user_status.$Type.invisible: (
[user_status.$Type.invisible, user_status.$Type.offline],
NeonLocalizations.of(context).userStatusInvisible,
NeonLocalizations.of(context).userStatusInvisibleDescription
),
Expand Down Expand Up @@ -832,7 +832,7 @@ class _NeonUserStatusDialogState extends State<NeonUserStatusDialog> {
overflow: TextOverflow.ellipsis,
),
onTap: () {
bloc.setStatusType(onlineStatus.key);
bloc.setStatusType(onlineStatus.key.value);
},
),
);
Expand Down
2 changes: 1 addition & 1 deletion packages/neon_framework/lib/src/widgets/user_avatar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ class _UserAvatarState extends State<NeonUserAvatar> {
);
} else if (result.hasData) {
final type = result.data!.status;
if (type != 'offline') {
if (type != user_status.$Type.offline) {
child = NeonServerIcon(icon: 'user-status-$type');
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/neon_framework/test/dialog_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ void main() {
..message = 'predefined message'
..icon = '😅'
..clearAt = now.add(const Duration(hours: 3)).millisecondsSinceEpoch ~/ 1000
..status = 'online'
..status = user_status.$Type.online
..messageId = 'id1'
..messageIsPredefined = true
..statusIsUserDefined = true,
Expand Down
27 changes: 14 additions & 13 deletions packages/neon_framework/test/user_status_bloc_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import 'package:neon_framework/blocs.dart';
import 'package:neon_framework/platform.dart';
import 'package:neon_framework/src/models/account.dart';
import 'package:nextcloud/nextcloud.dart';
import 'package:nextcloud/user_status.dart' as user_status;

class MockNeonPlatform extends Mock implements NeonPlatform {}

Expand Down Expand Up @@ -192,15 +193,15 @@ void main() {
expectLater(
bloc.status.transformResult((e) => e.status),
emitsInOrder([
Result<String>.loading(),
Result.success('offline'),
Result.success('offline').asLoading(),
Result.success('offline'),
Result.success('online'),
Result.success('online').asLoading(),
Result.success('online'),
Result.success('dnd'),
Result.success('dnd').asLoading(),
Result<user_status.$Type>.loading(),
Result.success(user_status.$Type.offline),
Result.success(user_status.$Type.offline).asLoading(),
Result.success(user_status.$Type.offline),
Result.success(user_status.$Type.online),
Result.success(user_status.$Type.online).asLoading(),
Result.success(user_status.$Type.online),
Result.success(user_status.$Type.dnd),
Result.success(user_status.$Type.dnd).asLoading(),
Result<String>.error(
await DynamiteStatusCodeException.fromResponse(StreamedResponse(Stream.value(utf8.encode('')), 201)),
),
Expand All @@ -218,21 +219,21 @@ void main() {

// Trigger heartbeat 204
await Future<void>.delayed(const Duration(milliseconds: 1));
bloc.setStatusType('online');
bloc.setStatusType(user_status.$Type.online.value);
await Future<void>.delayed(const Duration(milliseconds: 1));
bloc.load('test', force: true);

// Trigger error
await Future<void>.delayed(const Duration(milliseconds: 1));
bloc.setStatusType('dnd');
bloc.setStatusType(user_status.$Type.dnd.value);
await Future<void>.delayed(const Duration(milliseconds: 1));
bloc.load('test', force: true);
});

test('Set status type', () async {
bloc.setStatusType('dnd');
bloc.setStatusType(user_status.$Type.dnd.value);

expect(bloc.status.transformResult((e) => e.status), emits(Result.success('dnd')));
expect(bloc.status.transformResult((e) => e.status), emits(Result.success(user_status.$Type.dnd)));
});

test('Set predefined message', () async {
Expand Down
4 changes: 2 additions & 2 deletions packages/nextcloud/lib/src/api/files_sharing.openapi.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1226,7 +1226,7 @@ class $ShareapiClient {
/// * [publicUpload] If public uploading is allowed. Defaults to `false`.
/// * [password] Password for the share. Defaults to `''`.
/// * [sendPasswordByTalk] Send the password for the share over Talk.
/// * [expireDate] Expiry date of the share. Defaults to `''`.
/// * [expireDate] Expiry date of the share using user timezone at 00:00. It means date in UTC timezone will be used. Defaults to `''`.
/// * [note] Note for the share. Defaults to `''`.
/// * [label] Label for the share (only used in link and email). Defaults to `''`.
/// * [attributes] Additional attributes for the share.
Expand Down Expand Up @@ -1287,7 +1287,7 @@ class $ShareapiClient {
/// * [publicUpload] If public uploading is allowed. Defaults to `false`.
/// * [password] Password for the share. Defaults to `''`.
/// * [sendPasswordByTalk] Send the password for the share over Talk.
/// * [expireDate] Expiry date of the share. Defaults to `''`.
/// * [expireDate] Expiry date of the share using user timezone at 00:00. It means date in UTC timezone will be used. Defaults to `''`.
/// * [note] Note for the share. Defaults to `''`.
/// * [label] Label for the share (only used in link and email). Defaults to `''`.
/// * [attributes] Additional attributes for the share.
Expand Down
2 changes: 1 addition & 1 deletion packages/nextcloud/lib/src/api/files_sharing.openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -1756,7 +1756,7 @@
{
"name": "expireDate",
"in": "query",
"description": "Expiry date of the share",
"description": "Expiry date of the share using user timezone at 00:00. It means date in UTC timezone will be used.",
"schema": {
"type": "string",
"default": ""
Expand Down
4 changes: 2 additions & 2 deletions packages/nextcloud/lib/src/api/spreed.openapi.dart
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,7 @@ class $BotClient {
///
/// Status codes:
/// * 201: Message sent successfully
/// * 400: Sending message is not possible
/// * 400: When the replyTo is invalid or message is empty
/// * 401: Sending message is not allowed
/// * 413: Message too long
///
Expand Down Expand Up @@ -705,7 +705,7 @@ class $BotClient {
///
/// Status codes:
/// * 201: Message sent successfully
/// * 400: Sending message is not possible
/// * 400: When the replyTo is invalid or message is empty
/// * 401: Sending message is not allowed
/// * 413: Message too long
///
Expand Down
2 changes: 1 addition & 1 deletion packages/nextcloud/lib/src/api/spreed.openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -1816,7 +1816,7 @@
}
},
"400": {
"description": "Sending message is not possible",
"description": "When the replyTo is invalid or message is empty",
"content": {
"application/json": {
"schema": {
Expand Down
2 changes: 2 additions & 0 deletions packages/nextcloud/lib/src/api/theming.openapi.dart
Original file line number Diff line number Diff line change
Expand Up @@ -525,6 +525,7 @@ class $ThemingClient {
///
/// Status codes:
/// * 200: Manifest returned
/// * 404: App not found
///
/// See:
/// * [getManifestRaw] for an experimental operation that returns a `DynamiteRawResponse` that can be serialized.
Expand All @@ -548,6 +549,7 @@ class $ThemingClient {
///
/// Status codes:
/// * 200: Manifest returned
/// * 404: App not found
///
/// See:
/// * [getManifest] for an operation that returns a `DynamiteResponse` with a stable API.
Expand Down
10 changes: 10 additions & 0 deletions packages/nextcloud/lib/src/api/theming.openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,16 @@
}
}
}
},
"404": {
"description": "App not found",
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
}
}
}
Expand Down
84 changes: 83 additions & 1 deletion packages/nextcloud/lib/src/api/user_status.openapi.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1021,13 +1021,94 @@ abstract class OCSMeta implements $OCSMetaInterface, Built<OCSMeta, OCSMetaBuild
static Serializer<OCSMeta> get serializer => _$oCSMetaSerializer;
}

class $Type extends EnumClass {
const $Type._(super.name);

/// `online`
static const $Type online = _$$typeOnline;

/// `away`
static const $Type away = _$$typeAway;

/// `dnd`
static const $Type dnd = _$$typeDnd;

/// `busy`
static const $Type busy = _$$typeBusy;

/// `offline`
static const $Type offline = _$$typeOffline;

/// `invisible`
static const $Type invisible = _$$typeInvisible;

/// Returns a set with all values this enum contains.
// coverage:ignore-start
static BuiltSet<$Type> get values => _$$typeValues;
// coverage:ignore-end

/// Returns the enum value associated to the [name].
static $Type valueOf(String name) => _$valueOf$Type(name);

/// Returns the serialized value of this enum value.
String get value => _$jsonSerializers.serializeWith(serializer, this)! as String;

/// Serializer for $Type.
@BuiltValueSerializer(custom: true)
static Serializer<$Type> get serializer => const _$$TypeSerializer();
}

class _$$TypeSerializer implements PrimitiveSerializer<$Type> {
const _$$TypeSerializer();

static const Map<$Type, Object> _toWire = <$Type, Object>{
$Type.online: 'online',
$Type.away: 'away',
$Type.dnd: 'dnd',
$Type.busy: 'busy',
$Type.offline: 'offline',
$Type.invisible: 'invisible',
};

static const Map<Object, $Type> _fromWire = <Object, $Type>{
'online': $Type.online,
'away': $Type.away,
'dnd': $Type.dnd,
'busy': $Type.busy,
'offline': $Type.offline,
'invisible': $Type.invisible,
};

@override
Iterable<Type> get types => const [$Type];

@override
String get wireName => r'$Type';

@override
Object serialize(
Serializers serializers,
$Type object, {
FullType specifiedType = FullType.unspecified,
}) =>
_toWire[object]!;

@override
$Type deserialize(
Serializers serializers,
Object serialized, {
FullType specifiedType = FullType.unspecified,
}) =>
_fromWire[serialized]!;
}

@BuiltValue(instantiable: false)
abstract interface class $PublicInterface {
String get userId;
String? get message;
String? get icon;
int? get clearAt;
String get status;
$Type get status;
}

abstract class Public implements $PublicInterface, Built<Public, PublicBuilder> {
Expand Down Expand Up @@ -2326,6 +2407,7 @@ final Serializers _$serializers = (Serializers().toBuilder()
..add(Private.serializer)
..addBuilderFactory(const FullType(Public), PublicBuilder.new)
..add(Public.serializer)
..add($Type.serializer)
..addBuilderFactory(
const FullType(PredefinedStatusFindAllResponseApplicationJson),
PredefinedStatusFindAllResponseApplicationJsonBuilder.new,
Expand Down
Loading