Skip to content
Merged
Show file tree
Hide file tree
Changes from 81 commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
9827118
Add basic implementation of the SoundEventModel
theEvilReaper Jun 12, 2025
7a6e441
Add related parts to manage SoundModelEvents in the app state
theEvilReaper Jun 12, 2025
97ff11c
Add more state management related code for sounds
theEvilReaper Jun 12, 2025
8dfb82b
Add client api to handle data manipulation for sounds
theEvilReaper Jun 12, 2025
60b4daa
Rename some actions to reflect their context
theEvilReaper Jun 12, 2025
1b45f01
Improve sound state classes
theEvilReaper Jun 12, 2025
82de209
Improve some SoundActions
theEvilReaper Jun 12, 2025
b69a06b
Add route for the sound page
theEvilReaper Jun 12, 2025
d48479f
Add SoundFileSource file
theEvilReaper Jun 12, 2025
7efcc0b
Add basic implementation to view data for a sound
theEvilReaper Jun 12, 2025
49c1fc0
Improve base layout for sounds
theEvilReaper Jun 12, 2025
fceab3b
Add mockup dialog for the sound file editing
theEvilReaper Jun 12, 2025
94614a9
Update SoundFileSource class
theEvilReaper Jun 15, 2025
9147b12
Work on the sound modal page
theEvilReaper Jun 15, 2025
0bc99c9
Remove Expanded usage to avoid a stacktrace
Joltras Jun 15, 2025
a30a60a
Add new methods to the SelectedSoundView class
Joltras Jun 15, 2025
388fa81
Add FolderIcon widget implementation
Joltras Jun 15, 2025
f000082
Add SmallFileCard widget
Joltras Jun 15, 2025
dd0b48e
Improve widget structure
Joltras Jun 15, 2025
450fa4f
Add stateless widget for the view button on a SoundCard
Joltras Jun 15, 2025
8d1e7e0
Add SoundCardButton usage
Joltras Jun 15, 2025
b4e8598
Remove Padding and update EdgeInsets value
Joltras Jun 15, 2025
ae6b86c
Update api calls
theEvilReaper Jun 16, 2025
6c9674e
Update hasFiles getter to hasNoFiles
theEvilReaper Jun 16, 2025
15da278
Include SoundFileSource list to the SoundEventModel
theEvilReaper Jun 16, 2025
cf2357e
Add client api to handle data manipulation for sounds
theEvilReaper Jun 12, 2025
3712051
Add optional SoundFileSource variable to the event model
Joltras Jun 17, 2025
c33fde9
Update hasFiles to hasNoFiles
Joltras Jun 17, 2025
8844089
Remove fontWeight usage
Joltras Jun 17, 2025
52de262
Improve TextInputCard creation
Joltras Jun 17, 2025
4231dfc
Add sound enum entry for the navigation
theEvilReaper Jul 14, 2025
f8b6051
Add input formatters
theEvilReaper Jul 14, 2025
c0029b0
Add VolumeSection class
theEvilReaper Jul 14, 2025
dea76b7
Add SoundSlider class
theEvilReaper Jul 14, 2025
5b05e00
Update slider usage
theEvilReaper Jul 14, 2025
24b16d5
Improve widget structure
theEvilReaper Aug 11, 2025
d26e059
Add pagination to the SoundEventModel
theEvilReaper Aug 12, 2025
8c9a334
Update Sound api handling
theEvilReaper Aug 12, 2025
562b072
Improve sound related redux actions
theEvilReaper Aug 12, 2025
722e364
Improve vm state for the selected sound
theEvilReaper Aug 12, 2025
052e5e6
Improve paginated list
theEvilReaper Aug 12, 2025
c30ddce
Update imports
theEvilReaper Aug 12, 2025
cc1e9f3
Work on pagination
theEvilReaper Aug 12, 2025
3439ebd
Rebuild some freezed files to avoid future conflicts
theEvilReaper Sep 22, 2025
b004b9b
Fix some lint commits
theEvilReaper Sep 22, 2025
3a56fff
Use initialValue instead of the deprecated value parameter
theEvilReaper Sep 22, 2025
75123fe
Add base section widget
theEvilReaper Sep 22, 2025
9acf67e
Update section widgets
theEvilReaper Sep 22, 2025
bfd47e2
Add input section widget for strings
theEvilReaper Sep 22, 2025
9bb16ec
Update widget usage
theEvilReaper Sep 22, 2025
71f3f19
Update parameter list for a function
theEvilReaper Sep 22, 2025
90d7af0
Store SoundEvent in a PaginatedResult instead of a list
theEvilReaper Sep 23, 2025
c7d1593
Update sound vm state
theEvilReaper Sep 23, 2025
f8d17ef
Add static access methods
theEvilReaper Sep 23, 2025
ffae864
Update item access in the sound actions
theEvilReaper Sep 23, 2025
a1fbfaa
Update action calls
theEvilReaper Sep 23, 2025
4d2c062
Switch root widget to PaginatedBaseModelViewTabs
theEvilReaper Sep 23, 2025
ec62501
Improve validator usage
theEvilReaper Sep 23, 2025
35ae5d4
Add unit test for the folder icon
theEvilReaper Sep 23, 2025
f1d5483
Add constant value for a magic number
theEvilReaper Sep 23, 2025
af0d1e1
Add missing query parameters for a pageable request
theEvilReaper Sep 24, 2025
94b720c
Remove as call
theEvilReaper Sep 24, 2025
ee54d56
Add lazy load to the sound files page
theEvilReaper Sep 24, 2025
52671f5
Add keep file
theEvilReaper Sep 24, 2025
073ee53
Improve state handling
theEvilReaper Sep 24, 2025
8081d00
Adjust min, max and division values to align them with the sound prot…
theEvilReaper Sep 29, 2025
c337149
Add custom value formatter to deal better with minimal default values
theEvilReaper Sep 29, 2025
5dbb90a
Add test cases for the min value formatter
theEvilReaper Sep 29, 2025
f4c7685
Improve input formatting handling
theEvilReaper Sep 29, 2025
a4e446b
Improve widget handling
theEvilReaper Sep 29, 2025
0509acf
Update imports
theEvilReaper Sep 29, 2025
d000795
Improve dialog usage
theEvilReaper Oct 3, 2025
bc8b1b3
Update logic to link a source file with an event
theEvilReaper Oct 31, 2025
50c2d22
Improve dialog handling to allow the update of existing sound sources
theEvilReaper Oct 31, 2025
ba66876
Add endpoint and redux action to update a SoundFileSource
theEvilReaper Nov 1, 2025
a2e9d1f
Improve dialog handling when a existing model should be updated
theEvilReaper Nov 1, 2025
7d2633e
Retrieve given id from the old model before creating a new one withou…
theEvilReaper Nov 1, 2025
ec1b071
Fix cancel button usage
theEvilReaper Nov 1, 2025
f375272
Add api and redux action to delete a sound file source
Joltras Nov 2, 2025
a296c34
Implement test wise the delete logic
Joltras Nov 2, 2025
5acfc8a
Update delete endpoint usage for SoundSourceFiles
theEvilReaper Nov 5, 2025
069be5a
Add generic tooltip message
theEvilReaper Nov 5, 2025
208f50e
Fix file naming
theEvilReaper Nov 5, 2025
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
6 changes: 6 additions & 0 deletions lib/api/api_service.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import 'package:stelaris/api/api_client.dart';
import 'package:stelaris/api/base_api.dart';
import 'package:stelaris/api/service/client/sound_client_api.dart';
import 'package:stelaris/api/client_api.dart';
import 'package:stelaris/api/model/sound/sound_event_model.dart';
import 'package:stelaris/api/model/attribute_model.dart';
import 'package:stelaris/api/model/notification_model.dart';
import 'package:stelaris/api/service/font_api.dart';
Expand Down Expand Up @@ -40,6 +42,10 @@ class ApiService {
toJson: (model) => model.toJson(),
);

late final ClientAPI<SoundEventModel> soundApi = SoundClientApi(
apiClient: _apiClient,
);

/// Creates an instance of [ApiClient] with the backend URL.
ApiClient _createApiClient() => ApiClient(Environment.backendURl);

Expand Down
42 changes: 42 additions & 0 deletions lib/api/model/sound/sound_event_model.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import 'package:freezed_annotation/freezed_annotation.dart';
import 'package:stelaris/api/model/data_model.dart';
import 'package:stelaris/api/model/sound/sound_file_source.dart';
import 'package:stelaris/api/paginated_result.dart';

part 'sound_event_model.freezed.dart';

part 'sound_event_model.g.dart';

SoundEventModel soundEventFromJson(dynamic json) =>
SoundEventModel.fromJson(json);

Map<String, dynamic> soundEventToJson(SoundEventModel model) => model.toJson();

@freezed
abstract class SoundEventModel with _$SoundEventModel, DataModel {
const SoundEventModel._();

// Define the specific const default directly within the class that uses it.
// This is well-encapsulated.
static const PaginatedResult<SoundFileSource> _defaultFiles = PaginatedResult(
items: <SoundFileSource>[],
totalItems: 0,
totalPages: 0,
currentPage: 1,
pageSize: 0,
);

factory SoundEventModel({
required String uiName,
String? id,
String? variableName,
String? keyName,
String? subTitle,
@Default(SoundEventModel._defaultFiles)
PaginatedResult<SoundFileSource> files,
@Default(false) @JsonKey(includeToJson: false) bool isLoading,
}) = _SoundEventModel;

factory SoundEventModel.fromJson(Map<String, dynamic> json) =>
_$SoundEventModelFromJson(json);
}
295 changes: 295 additions & 0 deletions lib/api/model/sound/sound_event_model.freezed.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 34 additions & 0 deletions lib/api/model/sound/sound_event_model.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading