diff --git a/SecRandom/ViewModels/ProfileSettingsViewModel.cs b/SecRandom/ViewModels/ProfileSettingsViewModel.cs index 5688aa02..a1cb7ddc 100644 --- a/SecRandom/ViewModels/ProfileSettingsViewModel.cs +++ b/SecRandom/ViewModels/ProfileSettingsViewModel.cs @@ -32,10 +32,12 @@ public ProfileSettingsViewModel(MainConfigHandler configHandler) public void RefreshLists() { + StudentLists.Clear(); + StudentLists.AddRange( from i in Directory.GetFiles(Utils.GetDirectoryPath("list", "roll_call_list")) where i.EndsWith(".json") orderby i select Path.GetFileName(i).Replace(".json", "")); } -} \ No newline at end of file +} diff --git a/SecRandom/Views/SettingsPages/AGENTS.md b/SecRandom/Views/SettingsPages/AGENTS.md index a671efaa..862da36c 100644 --- a/SecRandom/Views/SettingsPages/AGENTS.md +++ b/SecRandom/Views/SettingsPages/AGENTS.md @@ -34,7 +34,7 @@ SecRandom/Views/SettingsPages/ | Privacy settings behavior | `General/PrivacySettingsPage.axaml(.cs)` | Binds to `MainConfigModel.General.PrivacySettings`; Sentry telemetry changes apply live through `TelemetryRuntimeService`, and online status changes apply live through `OnlineStatusService`. | | Backup settings UI | `General/BackupSettingsPage.axaml(.cs)` | Lists real backup ZIPs under app data, creates/deletes backups, and restores selected data with a pre-restore snapshot plus restart prompt. | | Security settings | `SecuritySettingsPage.axaml(.cs)` | Page ID `settings.general.security`; currently remains at subtree root but belongs to the General navigation group. | -| List management settings | `ListManagement/RollCallListSettingsPage.axaml(.cs)`, `ListManagement/LotteryListSettingsPage.axaml(.cs)` | Point-call list and lottery prize-pool viewing/import; separate table entries are intentionally not registered. | +| List management settings | `ListManagement/RollCallListSettingsPage.axaml(.cs)`, `ListManagement/LotteryListSettingsPage.axaml(.cs)` | Roll-call list settings are read-only for student list data; create/edit/import/delete student lists from the profile editing window, not from settings. Separate table entries are intentionally not registered. | | Draw settings | `Picking/DefaultDrawSettingsPage.axaml(.cs)`, `Picking/RollCallDrawSettingsPage.axaml(.cs)`, `Picking/QuickDrawSettingsPage.axaml(.cs)`, `Picking/LotteryDrawSettingsPage.axaml(.cs)`, `Picking/FaceDetectorSettingsPage.axaml(.cs)` | Default draw settings are flat grouped sections; specific draw pages show unique settings first and expandable override sections. | | Personalized appearance settings | `Personalized/AppearanceSettingsPage.axaml(.cs)` | Mutations call `App.Current.RefreshPersonalizedSettings()`. | | Linkage settings | `LinkageSettingsPage.axaml(.cs)` | Top-level `settings.linkage` entry between Personalized and ListManagement groups. | diff --git a/SecRandom/Views/SettingsPages/ListManagement/RollCallListSettingsPage.axaml b/SecRandom/Views/SettingsPages/ListManagement/RollCallListSettingsPage.axaml index cbb96faa..2171f323 100644 --- a/SecRandom/Views/SettingsPages/ListManagement/RollCallListSettingsPage.axaml +++ b/SecRandom/Views/SettingsPages/ListManagement/RollCallListSettingsPage.axaml @@ -5,13 +5,10 @@ xmlns:fa="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia" xmlns:local="clr-namespace:SecRandom.Views.SettingsPages.ListManagement" xmlns:lr="clr-namespace:SecRandom.Langs.SettingsPages.ListManagement.RollCallList" - xmlns:corelr="clr-namespace:SecRandom.Core.Langs.Common;assembly=SecRandom.Core" - xmlns:services="clr-namespace:SecRandom.Core.Services;assembly=SecRandom.Core" xmlns:sr="http://secrandom.sectl.cn/schemas/xaml/core" mc:Ignorable="d" d:DesignWidth="900" d:DesignHeight="560" x:Class="SecRandom.Views.SettingsPages.ListManagement.RollCallListSettingsPage" - x:DataType="local:RollCallListSettingsPage" - Unloaded="OnUnloaded"> + x:DataType="local:RollCallListSettingsPage">