Navigation Components
Relevant source files
The following files were used as context for generating this wiki page:
The Navigation Components within the Solo Leveling Penalty System facilitate user interaction with the daily task management and progression tracking interfaces. This system is designed as a single-page architecture where the primary view serves as both the dashboard and the task interaction hub. The components coordinate real-time updates of the user's status, including level, rank, and experience points (XP), while managing transitions between active and completed task states.
The architecture relies on a centralized state object stored in the browser's local storage, ensuring that navigation between sessions maintains the user's progress. The interface utilizes a responsive, dark-themed layout centered around a "System Status" header and a dynamic task container.
Sources: index.html:12-40, Quest.html:12-40
Interface Structure and Header
The navigation interface is anchored by a persistent header that provides temporal context to the user. This includes a real-time clock synchronized with Saudi Arabian time (Asia/Riyadh), serving as the reference for daily task cycles.
Header Components
The header section contains the main application title and the time display element.
| Component | Element ID | Description |
|---|---|---|
| System Title | <h1> | Displays "SYSTEM STATUS" |
| Saudi Time Clock | saudi-time | Shows current time in ar-SA format with 1-second updates |
Sources: index.html:77-80, index.html:209-211, Quest.html:77-80
The diagram above illustrates the continuous background process that updates the temporal navigation element.
Progression and Status Panel
Below the header, the progression panel acts as the primary navigational feedback loop. It visualizes the user's current standing within the "Solo" hierarchy. This panel does not navigate between pages but navigates the user through various "Rank" states based on accumulated points.
Status Data Model
The system tracks progress through a specific data structure stored in localStorage under the key solo_penalty_v1.
| Field | Type | Description |
|---|---|---|
points | Number | Total accumulated XP used to determine Rank and Level |
lastUpdate | String | ISO-style date (en-CA) used to trigger daily cycle resets |
dailyTasks | Array | Collection of current task objects with completion status |
lastPenalty | Number | Tracks points deducted for missed tasks from the previous cycle |
Sources: index.html:121-123, Quest.html:121-123
Rank and Level Logic
Navigation through levels is determined by a logarithmic-style requirement system where the points needed to level up scale based on the user's current Rank.
Sources: index.html:125-153, Quest.html:125-153
Task Interaction and List Navigation
The tasks-container is a dynamic element where navigation occurs through state changes of task cards. Users interact with checkboxes or the cards themselves to toggle completion, which immediately triggers UI recalculations.
Task Categories
The system navigates through three specific task domains during the generation phase:
- Physical (جسدي): Exercises like push-ups and planks.
- Discipline (انضباط): Habit-forming activities like organizing or fasting.
- Mental (عقلي): Cognitive tasks like reading.
Sources: index.html:107-119, Quest.html:107-119
Task State Flow
When a user interacts with a task card, the following sequence occurs:
Sources: index.html:187-194, Quest.html:187-194
Daily Cycle Management
The system performs an automated "navigation" of the date state upon initialization. This logic determines if the user has transitioned to a new calendar day based on Riyadh time.
- Date Comparison: The system compares
lastUpdatewith the current KSA date. - Penalty Application: If a new day is detected, it navigates through the
dailyTasksarray. For every task whered(done) isfalse, a penalty is deducted from total points. - Task Regeneration: The
generateTasks()function is called to refresh the list based on the user's current difficulty rank (f, d, a, or r).
Sources: index.html:167-185, Quest.html:167-185
Conclusion
The Navigation Components of the Solo System prioritize immediate feedback and persistent state management. By combining a real-time temporal reference with a robust localized data model, the system ensures that user progression and task interactions are seamlessly synchronized across sessions. Significant emphasis is placed on the visual transition between Ranks (F through R) and the automated handling of daily resets and penalties.