Skip to content

Commit 0a12c4f

Browse files
## Rebranded
- The application id / package name is now changed from `com.sysadmin.sysadmin` to `dev.prathameshkhade.sysadmin` - This will treat as a new app, please uninstall the older version, from now onwards this is the new application id ## New User management: - Introducing comprehensive User Management system with full CRUD operations: - Create new users with customizable options (username, UID, GID, shell, home directory) - View detailed user information in an intuitive bottom sheet interface - Edit existing user properties including password management and home directory options - Delete users with multiple options: forcefully, SELinux, remove home directory - Advanced filtering and sorting: - Filter between All, System, and Regular user accounts - Sort by Username, UID, GID, or Comment fields - Support for three-state sorting: ascending → descending → none - Visual indicators for active filters and sorts - UI Improvements: - Redesigned user list with color-coding based on user type - Intuitive bottom sheet for detailed user information - Floating Action Button for user creation - Protection against modifying system users (UID ≤ 1000) ## Performance Optimizations - Refactored system resource monitoring to read directly from /proc filesystem - Introduced SSHSessionManager for efficient command execution and queuing - Optimized CPU usage calculation for more accurate readings - Reduced command timeout from 5 to 3 seconds for faster operations ## System Improvements - Enhanced sudo session management with improved authentication - Added dynamic shell detection from /etc/shells - Updated Flutter to version 3.32.5 ## Known bugs - It may take 1, 2, or 3 seconds to load the list of users - Sometimes you may get the error while deleting the user: no context for this screen (needs restart/reconnect) - System Information screen is taking more time to load the data ## bugfixes - Added support for powerline characters (#22) - Fixed keyboard rendering issues - Improved error handling for sudo operations - Fixed buymeacoffee button updating issue in readme file
1 parent cdb4e82 commit 0a12c4f

File tree

5 files changed

+23
-11
lines changed

5 files changed

+23
-11
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424

2525
- uses: subosito/flutter-action@v2
2626
with:
27-
flutter-version: '3.29.2'
27+
flutter-version: '3.32.5'
2828
channel: 'stable'
2929

3030
- name: Flutter Analyze

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ Traditional server management requires either physical access or an SSH session
9797

9898
- **Dashboard** - View server status, system metrics, and connection details at a glance
9999
- **SSH Manager** - Store and manage multiple server connections securely
100+
- **User Management** - Create, Update, Deletes or see information about users
100101
- **System Information** - Detailed hardware information about your connected server
101102
- **Real-time System Resource Monitoring** - Track CPU, RAM, and swap usage with graphs
102103
- **SFTP File Explorer** - Browse, upload, download, and manage files with ease
@@ -106,7 +107,7 @@ Traditional server management requires either physical access or an SSH session
106107

107108
### Coming Soon:
108109

109-
- **User & Group Management**
110+
- **Group Management**
110111
- **Service & Log Management**
111112
- **Package Management**
112113
- **Firewall Configuration**

fastlane/metadata/android/en-US/full_description.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
<ul>
77
<li><b>Dashboard</b> - View server status, system metrics, and connection details at a glance</li>
88
<li><b>SSH Manager</b> - Store and manage multiple server connections securely</li>
9+
<li><b>User Management</b> - Create, Update, Deletes or see information about users</li>
910
<li><b>System Information</b> - Detailed hardware information about your connected server</li>
1011
<li><b>Real-time System Resource Monitoring</b> - Track CPU, RAM, and swap usage with graphs</li>
1112
<li><b>SFTP File Explorer</b> - Browse, upload, download, and manage files with ease</li>
@@ -16,7 +17,7 @@
1617

1718
<h4>Coming Soon:</h4>
1819
<ul>
19-
<li>User & Group Management</li>
20+
<li>Group Management</li>
2021
<li>Service & Log Management</li>
2122
<li>Package Management</li>
2223
<li>Firewall Configuration</li>

lib/providers/sudo_session_provider.dart

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import 'dart:async';
22
import 'dart:convert';
3+
34
import 'package:dartssh2/dartssh2.dart';
45
import 'package:flutter/cupertino.dart';
56
import 'package:flutter/material.dart';
@@ -238,10 +239,18 @@ class SudoSessionNotifier extends StateNotifier<SudoSessionState> {
238239
status: SudoSessionStatus.error,
239240
errorMessage: 'No context available for password prompt',
240241
);
241-
return {
242-
'success': false,
243-
'output': "No context available for password prompt"
244-
};
242+
return {'success': false, 'output': "No context available for password prompt"};
243+
}
244+
245+
// Check if context is a BuildContext from a StatefulWidget
246+
bool isStatefulContext = ctx is StatefulElement || (ctx.owner != null && ctx.mounted);
247+
248+
if (isStatefulContext && !ctx.mounted) {
249+
state = state.copyWith(
250+
status: SudoSessionStatus.error,
251+
errorMessage: 'Context is no longer mounted',
252+
);
253+
return {'success': false, 'output': "Context is no longer mounted"};
245254
}
246255

247256
final password = await _promptSudoPassword(ctx);
@@ -268,7 +277,6 @@ class SudoSessionNotifier extends StateNotifier<SudoSessionState> {
268277
// Step 4: Parse output
269278
final username = _extractUsername(command);
270279
return parseOutput(authenticatedOutput, username);
271-
272280
}
273281
catch (e) {
274282
debugPrint("Sudo command execution error: $e");
@@ -455,7 +463,9 @@ class SudoSessionNotifier extends StateNotifier<SudoSessionState> {
455463
}
456464

457465
// Provider for sudo session
458-
final sudoSessionProvider = StateNotifierProvider.family<SudoSessionNotifier, SudoSessionState, SSHClient>((ref, sshClient) {
466+
final sudoSessionProvider =
467+
StateNotifierProvider.family<SudoSessionNotifier, SudoSessionState, SSHClient>(
468+
(ref, sshClient) {
459469
return SudoSessionNotifier(sshClient);
460470
});
461471

@@ -471,4 +481,4 @@ final sudoSessionHelperProvider = Provider<SudoSessionNotifier?>((ref) {
471481
loading: () => null,
472482
error: (_, __) => null,
473483
);
474-
});
484+
});

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: "Building GUI for the Linux System Administrator"
44
# pub.dev using `flutter pub publish`. This is preferred for private packages.
55
publish_to: "none" # Remove this line if you wish to publish to pub.dev
66

7-
version: 1.0.30+10030
7+
version: 1.1.0+11000
88

99
environment:
1010
sdk: ^3.5.3

0 commit comments

Comments
 (0)