Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 3 additions & 1 deletion SecRandom/ViewModels/ProfileSettingsViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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", ""));
}
}
}
2 changes: 1 addition & 1 deletion SecRandom/Views/SettingsPages/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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. |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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">
<ScrollViewer>
<StackPanel Classes="page-container animated-intro" Spacing="8">
<fa:FAInfoBar Title="{x:Static lr:Resources.C_InfoTitle}"
Expand All @@ -35,11 +32,6 @@
<fa:FASettingsExpanderItem.Footer>
<StackPanel Orientation="Horizontal" Spacing="8">
<Button Content="{x:Static lr:Resources.C_Refresh}" Click="RefreshButton_OnClick" />
<Button Content="{x:Static lr:Resources.C_DeleteList}" Click="DeleteListButton_OnClick" />
<Button Content="{x:Static lr:Resources.C_RenameList}" Click="RenameListButton_OnClick" />
<Button Content="{x:Static lr:Resources.C_AddList}" Click="AddListButton_OnClick" />
<Button Classes="accent" Content="{x:Static lr:Resources.C_ImportList}"
Click="ImportButton_OnClick" />
</StackPanel>
</fa:FASettingsExpanderItem.Footer>
</fa:FASettingsExpanderItem>
Expand All @@ -54,7 +46,7 @@
CanUserSortColumns="True"
CanUserResizeColumns="True"
GridLinesVisibility="Horizontal"
IsReadOnly="False"
IsReadOnly="True"
SelectionMode="Single"
ItemsSource="{Binding SelectedStudentList.Students}">
<DataGrid.Columns>
Expand All @@ -64,16 +56,6 @@
<DataGridTextColumn Width="0.8*" Header="{x:Static lr:Resources.C_Gender}" Binding="{Binding Gender}" />
<DataGridTextColumn Width="1.25*" Header="{x:Static lr:Resources.C_Group}" Binding="{Binding Group}" />
<DataGridTextColumn Width="1*" Header="{x:Static lr:Resources.C_Tags}" Binding="{Binding Tags}" />
<DataGridTemplateColumn Width="120" Header="{x:Static corelr:Resources.C_AttachedSettings}">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<sr:AttachedSettingsFlyoutButton
TargetObject="{Binding}"
ControlInfos="{x:Static services:AttachedSettingsRegistryService.StudentAttachedSettingsControls}"
SettingsChanged="AttachedSettings_OnSettingsChanged" />
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
</DataGrid.Columns>
</DataGrid>
</Border>
Expand Down
Loading
Loading