fix(frontend): improve dark mode colors, backdrop and navigation layout support
This commit is contained in:
1 parent
5f60defa21
commit
f97100b96c
6 files changed
+155
-30
No files matched your search
@@ -0,0 +1,117 @@
|
||||
# BACKEND WORKFLOW (F:\SumbrerongBato\tis_rms_server\backend)
|
||||
1. Read/Analyze Task → Inspect backend directory.
|
||||
2. Draft Code → Execute Quality Gate (Accept / Decline).
|
||||
3. Post-Code Loop: Analyze Errors → Resolve → Re-verify until Errors == 0.
|
||||
4. Terminal Exit: If build clean → Execute `git push`.
|
||||
|
||||
# FRONTEND WORKFLOW (F:\SumbrerongBato\tis_rms_server\frontend)
|
||||
1. Read/Analyze Task → Inspect frontend directory.
|
||||
2. Draft Components/Logic → Execute Quality Gate (Accept / Decline).
|
||||
3. Post-Code Loop: Analyze UI/Build Errors → Resolve → Re-verify until Errors == 0.
|
||||
4. Terminal Exit: If build clean & lint passes → Execute `git push`.
|
||||
|
||||
---
|
||||
|
||||
# ⚡️ TOKEN COMPRESSION PROTOCOL
|
||||
|
||||
## 1. INPUT RESTRICTIONS (CONTEXT DRYING)
|
||||
- Ignore system-level file-tree re-reads unless files change (Δ).
|
||||
- Avoid parsing historical chat history beyond the immediate code break.
|
||||
- Reference internal libraries by name only; do not request full source mappings.
|
||||
|
||||
## 2. OUTPUT SYSTEM CONSTRAINTS (ZERO BLOAT)
|
||||
- NO natural language intros, greetings, or conversational transitions.
|
||||
- NO explanations, rationales, or "why this works" breakdowns.
|
||||
- NO summaries of work completed or code recap commentary.
|
||||
- Exclude all code comments, inline documentation, and docstrings.
|
||||
|
||||
## 3. PATCH FORMATTING (MICRO-DIFFS ONLY)
|
||||
- BANNED: Full-file reprinting, multi-line blocks of unchanged code.
|
||||
- MANDATORY: Return micro-diff format or target lines replacement only:
|
||||
```diff
|
||||
- [old line]
|
||||
+ [new line]
|
||||
```
|
||||
- If a file creation is required, generate minimal skeleton logic only.
|
||||
|
||||
## 4. QUOTA BRAKING
|
||||
- Max output limit per prompt turn = 150 tokens.
|
||||
- If patch logic requires >150 tokens: STOP, emit `[TOKEN LIMIT BRAKE]`, and wait for chunked instructions.
|
||||
|
||||
---
|
||||
|
||||
# 📱 FLUTTER UI/UX RULES
|
||||
- Stack: Flutter (latest) + Riverpod (AsyncNotifier/Notifier) + Material 3 (`useMaterial3: true`).
|
||||
- Palette: Use existing `Theme.of(context).colorScheme` tokens only. Never hardcode hex values.
|
||||
- Layout: Stack actions vertically on Android (`Column` with full-width `ElevatedButton`).
|
||||
- Output: No design essays. Return optimized widget code immediately.
|
||||
|
||||
---
|
||||
|
||||
# TODO
|
||||
- dont do tasks with "(dont do)"
|
||||
|
||||
<!-- ## (dont do) Connected users api
|
||||
- i will use this to separate server manager
|
||||
- create a api for this
|
||||
- flutter: use heartbeat package
|
||||
- connected users, detects windows or android, users admin or teacher, username, ip, login time datenow, last seen datenow
|
||||
- every minute
|
||||
- in memory list users
|
||||
- server status, cpu mem usage, connected users, uptime
|
||||
- separate the connected users and status api -->
|
||||
|
||||
<!-- ## (dont do) backup/restore feature
|
||||
- Use better sqlite 3 backup api, db.backup()
|
||||
- Automatic backups (Daily, Weekly, Monthly, or Custom)
|
||||
- Configurable maximum number of snapshots (e.g., 5, 10, 20)
|
||||
- Timestamp-based backup names
|
||||
- Backup history in the UI
|
||||
- One-click restore
|
||||
- Automatic deletion of the oldest snapshot only after the newest backup is successfully created and verified
|
||||
- Metadata for version and backup details
|
||||
- Use configuration file json for backup and restore
|
||||
Files backup/restore - mirror mode or zip -->
|
||||
|
||||
<!-- ## settings screen
|
||||
- add set start day, month and end year. month and day for the active year
|
||||
- auto graduated the student that are grade 10 and grade 12 in the active year, make it sequential
|
||||
- add logs for these make it on one log compiled all students, separate per grade level
|
||||
- if not set the start day, month, end year, do not auto graduate
|
||||
- remove database management, this is separate windows app -->
|
||||
|
||||
<!-- # reports screen
|
||||
- exports use the custom success/error dialog
|
||||
- add clickable link path for success
|
||||
- fix the overflow cards of overall compliance, students with issues, total missing documents -->
|
||||
|
||||
<!-- ## backend server backup/restore
|
||||
- do not use zip and unzip -->
|
||||
|
||||
# SETTING SCREEN
|
||||
- dark mode color of screen font, and it does not have backdrop dark theme color
|
||||
|
||||
---
|
||||
|
||||
TIS_RMS Server Manager (dont do)
|
||||
Windows Service - NSSM nodejs
|
||||
- backup/restore db and files
|
||||
- backup: database backup, automatic schedule, snapshot retention
|
||||
- restore: restore database, validate backup, restart service automatically
|
||||
- files: mirror backup, verify files, restore files,
|
||||
- can choose where to store db and files separately
|
||||
|
||||
- dashboard: server status, cpu mem usage, connected users, uptime
|
||||
- service: controls windows service stop start restart
|
||||
- logs, server logs, error logs
|
||||
- settings backup path, file backup path, database location
|
||||
|
||||
---
|
||||
|
||||
## (dont do) add some features
|
||||
- dark mode
|
||||
- documents screen
|
||||
- excel to pdf all tabs export into one pdf
|
||||
|
||||
|
||||
---
|
||||
@@ -27,20 +27,20 @@ class AppColors {
|
||||
static const Color info = Colors.blue;
|
||||
|
||||
// ── Dark Theme Backgrounds ───────────────────────────────────
|
||||
/// Main scaffold background — deep charcoal navy (not pure black)
|
||||
static const Color darkPageBackground = Color(0xFF1A1D23);
|
||||
/// Main scaffold background — deep obsidian forest
|
||||
static const Color darkPageBackground = Color(0xFF0C100D);
|
||||
|
||||
/// Card / dialog surface in dark mode
|
||||
static const Color darkSurfaceCard = Color(0xFF22262F);
|
||||
static const Color darkSurfaceCard = Color(0xFF141916);
|
||||
|
||||
/// Secondary surface (inputs, hover areas) in dark mode
|
||||
static const Color darkSurface2 = Color(0xFF2A2F3A);
|
||||
static const Color darkSurface2 = Color(0xFF1C241F);
|
||||
|
||||
// ── Dark Theme Text Colors ───────────────────────────────────
|
||||
static const Color darkTextPrimary = Color(0xFFE8EAF0);
|
||||
static const Color darkTextSecondary = Color(0xFF9AA0B0);
|
||||
static const Color darkTextMuted = Color(0xFF60677A);
|
||||
static const Color darkTextPrimary = Color(0xFFE2E8E4);
|
||||
static const Color darkTextSecondary = Color(0xFF94A398);
|
||||
static const Color darkTextMuted = Color(0xFF5F6E64);
|
||||
|
||||
// ── Dark Theme Borders & Dividers ───────────────────────────
|
||||
static const Color darkBorder = Color(0xFF2E3340);
|
||||
static const Color darkBorder = Color(0xFF243029);
|
||||
}
|
||||
@@ -263,23 +263,23 @@ class _AndroidBottomNavLayoutState extends ConsumerState<AndroidBottomNavLayout>
|
||||
child: SafeArea(
|
||||
child: Scaffold(
|
||||
key: _scaffoldKey,
|
||||
backgroundColor: AppColors.pageBackground,
|
||||
backgroundColor: Theme.of(context).scaffoldBackgroundColor,
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.white,
|
||||
foregroundColor: AppColors.primaryGreen,
|
||||
iconTheme: const IconThemeData(color: AppColors.primaryGreen),
|
||||
backgroundColor: Theme.of(context).appBarTheme.backgroundColor,
|
||||
foregroundColor: Theme.of(context).colorScheme.primary,
|
||||
iconTheme: IconThemeData(color: Theme.of(context).colorScheme.primary),
|
||||
title: Text(
|
||||
activeTab,
|
||||
style: const TextStyle(
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
color: AppColors.primaryGreen,
|
||||
color: Theme.of(context).colorScheme.primary,
|
||||
),
|
||||
),
|
||||
elevation: 0,
|
||||
surfaceTintColor: Colors.transparent,
|
||||
),
|
||||
drawer: Drawer(
|
||||
backgroundColor: Colors.white,
|
||||
backgroundColor: Theme.of(context).colorScheme.surface,
|
||||
surfaceTintColor: Colors.transparent,
|
||||
width: 280,
|
||||
child: SafeArea(
|
||||
@@ -359,12 +359,12 @@ class _AndroidBottomNavLayoutState extends ConsumerState<AndroidBottomNavLayout>
|
||||
vertical: 8,
|
||||
),
|
||||
alignment: Alignment.centerLeft,
|
||||
child: const Text(
|
||||
child: Text(
|
||||
'MENU',
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Colors.black38,
|
||||
color: Theme.of(context).colorScheme.onSurface.withOpacity(0.38),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -398,12 +398,12 @@ class _AndroidBottomNavLayoutState extends ConsumerState<AndroidBottomNavLayout>
|
||||
vertical: 8,
|
||||
),
|
||||
alignment: Alignment.centerLeft,
|
||||
child: const Text(
|
||||
child: Text(
|
||||
'SYSTEM',
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Colors.black38,
|
||||
color: Theme.of(context).colorScheme.onSurface.withOpacity(0.38),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -510,7 +510,7 @@ class _AndroidBottomNavLayoutState extends ConsumerState<AndroidBottomNavLayout>
|
||||
),
|
||||
if (_isTabLoading)
|
||||
Container(
|
||||
color: AppColors.pageBackground,
|
||||
color: Theme.of(context).scaffoldBackgroundColor,
|
||||
width: double.infinity,
|
||||
height: double.infinity,
|
||||
child: const _PageSkeletonLoader(),
|
||||
|
||||
@@ -700,7 +700,7 @@ class _WindowsSidebarLayoutState extends ConsumerState<WindowsSidebarLayout> {
|
||||
),
|
||||
if (_isTabLoading)
|
||||
Container(
|
||||
color: AppColors.pageBackground,
|
||||
color: Theme.of(context).scaffoldBackgroundColor,
|
||||
width: double.infinity,
|
||||
height: double.infinity,
|
||||
child: const _PageSkeletonLoader(),
|
||||
|
||||
@@ -43,12 +43,12 @@ class ThemeModeNotifier extends Notifier<ThemeMode> {
|
||||
|
||||
static ThemeMode _fromString(String value) {
|
||||
switch (value) {
|
||||
case 'system':
|
||||
return ThemeMode.system;
|
||||
case 'light':
|
||||
return ThemeMode.light;
|
||||
case 'dark':
|
||||
return ThemeMode.dark;
|
||||
default:
|
||||
return ThemeMode.light;
|
||||
return ThemeMode.system;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,17 +10,25 @@ class AbstractBackground extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final isDark = Theme.of(context).brightness == Brightness.dark;
|
||||
return Container(
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
colors: [
|
||||
const Color(0xFFEAF3ED),
|
||||
AppColors.pageBackground,
|
||||
const Color(0xFFE4F0E8),
|
||||
AppColors.pageBackground,
|
||||
],
|
||||
colors: isDark
|
||||
? [
|
||||
const Color(0xFF0F1A14),
|
||||
AppColors.darkPageBackground,
|
||||
const Color(0xFF09120E),
|
||||
AppColors.darkPageBackground,
|
||||
]
|
||||
: [
|
||||
const Color(0xFFEAF3ED),
|
||||
AppColors.pageBackground,
|
||||
const Color(0xFFE4F0E8),
|
||||
AppColors.pageBackground,
|
||||
],
|
||||
stops: const [0.0, 0.35, 0.7, 1.0],
|
||||
),
|
||||
),
|
||||
|
||||
Reference in new issue
Block a user