Skip to content

Feature content management #14

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

Merged
merged 48 commits into from
Jul 1, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
bf53ae4
feat: add data_table_2 dependency
fulleni Jul 1, 2025
50e694e
feat: add content management events
fulleni Jul 1, 2025
5d12be5
feat: add ContentManagementState
fulleni Jul 1, 2025
84a311d
feat: Implement Content Management BLoC
fulleni Jul 1, 2025
f154623
feat(content): content management page
fulleni Jul 1, 2025
fe09c63
feat: display and manage categories in table
fulleni Jul 1, 2025
b5687c6
feat(content): add headlines page with data table
fulleni Jul 1, 2025
173e2e6
feat: display and manage sources in a table
fulleni Jul 1, 2025
aec0347
feat: Add new localization keys for Arabic
fulleni Jul 1, 2025
7b77849
feat: add internationalization strings
fulleni Jul 1, 2025
ae36a8b
feat(router): add nested routes for create/edit
fulleni Jul 1, 2025
826cda4
refactor: Date formatting utility class
fulleni Jul 1, 2025
a132634
feat: add PlaceholderCreatePage widget
fulleni Jul 1, 2025
8207aa6
refactor(headlines): use sourceName localization key
fulleni Jul 1, 2025
c310425
lint: misc
fulleni Jul 1, 2025
faaee80
feat(router): add edit headline route
fulleni Jul 1, 2025
3b12dde
refactor: Remove unused dependencies from AppBloc
fulleni Jul 1, 2025
f668e28
liut: misc
fulleni Jul 1, 2025
6720b08
docs: add description for appearance settings
fulleni Jul 1, 2025
75064d4
fix: fixed the ProviderNotFoundException by adding ContentManagementB…
fulleni Jul 1, 2025
f0a8588
refactor(router): flatten content management routes
fulleni Jul 1, 2025
99a69be
feat(content): move add button to app bar
fulleni Jul 1, 2025
0af84e1
feat(edit_category): add EditCategory events
fulleni Jul 1, 2025
7b4a99a
feat(content_management): Add EditCategoryState
fulleni Jul 1, 2025
3436a24
feat(content): add edit category bloc
fulleni Jul 1, 2025
fcdb273
feat: add edit category page
fulleni Jul 1, 2025
7798dfc
feat(content): Implement edit category page
fulleni Jul 1, 2025
106eee4
feat: Add localization for category editing
fulleni Jul 1, 2025
760be57
fix(edit_cat): handle missing original data
fulleni Jul 1, 2025
5a7aefe
feat(edit_source): add EditSourceEvent
fulleni Jul 1, 2025
99f07fc
feat(content): add EditSourceState
fulleni Jul 1, 2025
5fac073
feat: implement edit source bloc
fulleni Jul 1, 2025
d519424
feat(content_mgmt): add edit source page
fulleni Jul 1, 2025
f698167
feat(router): Add EditSourcePage route
fulleni Jul 1, 2025
268dcff
feat: add source edit localization
fulleni Jul 1, 2025
6caa1d2
feat(content): add EditHeadlineEvent
fulleni Jul 1, 2025
b231dd8
feat(content): add EditHeadlineState
fulleni Jul 1, 2025
e53d688
feat: Implement EditHeadlineBloc
fulleni Jul 1, 2025
f9ad105
feat: Create edit headline page
fulleni Jul 1, 2025
155b234
feat(router): connect edit headline page
fulleni Jul 1, 2025
254c825
feat: add headline localization keys
fulleni Jul 1, 2025
1f86a0d
feat: Add localization for edit headline feature
fulleni Jul 1, 2025
af93511
feat(content): create headline events
fulleni Jul 1, 2025
2d33a9f
feat: Implement CreateHeadlineBloc
fulleni Jul 1, 2025
acc3909
feat(headline): create headline state
fulleni Jul 1, 2025
f59f4bb
feat: add create headline page
fulleni Jul 1, 2025
7afb88f
feat(content): implement create headline page
fulleni Jul 1, 2025
526c622
feat: add create headline localization keys
fulleni Jul 1, 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
2 changes: 2 additions & 0 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ analyzer:
errors:
avoid_catches_without_on_clauses: ignore
avoid_print: ignore
avoid_redundant_argument_values: ignore
deprecated_member_use: ignore
document_ignores: ignore
lines_longer_than_80_chars: ignore
unnecessary_null_checks: ignore
include: package:very_good_analysis/analysis_options.9.0.0.yaml
linter:
rules:
Expand Down
2 changes: 2 additions & 0 deletions lib/app/bloc/app_bloc.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// ignore_for_file: unused_field

import 'dart:async';

import 'package:bloc/bloc.dart';
Expand Down
8 changes: 8 additions & 0 deletions lib/app/view/app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import 'package:ht_dashboard/app/bloc/app_bloc.dart';
import 'package:ht_dashboard/app/config/app_environment.dart';
import 'package:ht_dashboard/app_configuration/bloc/app_configuration_bloc.dart';
import 'package:ht_dashboard/authentication/bloc/authentication_bloc.dart';
import 'package:ht_dashboard/content_management/bloc/content_management_bloc.dart';
import 'package:ht_dashboard/l10n/app_localizations.dart';
import 'package:ht_dashboard/router/router.dart';
// Import for app_theme.dart
Expand Down Expand Up @@ -90,6 +91,13 @@ class App extends StatelessWidget {
appConfigRepository: context.read<HtDataRepository<AppConfig>>(),
),
),
BlocProvider(
create: (context) => ContentManagementBloc(
headlinesRepository: context.read<HtDataRepository<Headline>>(),
categoriesRepository: context.read<HtDataRepository<Category>>(),
sourcesRepository: context.read<HtDataRepository<Source>>(),
),
),
],
child: _AppView(
htAuthenticationRepository: _htAuthenticationRepository,
Expand Down
2 changes: 1 addition & 1 deletion lib/app_configuration/view/app_configuration_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ class _AppConfigurationPageState extends State<AppConfigurationPage> {
onPressed: isDirty
? () async {
final confirmed = await _showConfirmationDialog(context);
if (confirmed && appConfig != null) {
if (context.mounted && confirmed && appConfig != null) {
context.read<AppConfigurationBloc>().add(
AppConfigurationUpdated(appConfig),
);
Expand Down
Loading
Loading