Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
d2ddf8e
feat(build): make LVGL the default backend on build-verified targets
MarsDoge Jun 8, 2026
215d4cc
docs: refine CJK Gate 2 to graceful-fallback-default, GB2312 as narro…
MarsDoge Jun 8, 2026
3ed264d
feat(displayengine): render the form title as a prominent header
MarsDoge Jun 8, 2026
36f1797
feat(app): flow the dashboard status card, collapsing N/A placeholder…
MarsDoge Jun 8, 2026
f65e9c0
feat(app): humanize firmware revision and de-mix dashboard zh health …
MarsDoge Jun 8, 2026
599f1ee
docs: add normative App feature/IA standard
MarsDoge Jun 8, 2026
e570310
feat(app): make dashboard quick cards platform-class adaptive
MarsDoge Jun 8, 2026
4f73449
fix(displayengine): degrade gracefully on absent/degenerate GOP mode
MarsDoge Jun 9, 2026
d481843
docs: mark Gate 4 graceful-degradation + mode-change items done
MarsDoge Jun 9, 2026
275cd92
feat(app): show real SMBIOS Type 1 system identity on the dashboard
MarsDoge Jun 9, 2026
39d6dc2
feat(app): show real CPU identity from SMBIOS Type 4 on the dashboard
MarsDoge Jun 9, 2026
07ee592
feat(app): show real memory type/speed from SMBIOS Type 17
MarsDoge Jun 9, 2026
0be11f2
feat(app): add dedicated System Information detail page
MarsDoge Jun 9, 2026
a1a8b19
feat(app): deepen System Information page with baseboard/serial/UUID/…
MarsDoge Jun 10, 2026
eaa5625
fix(app): copy packed SMBIOS UUID to aligned storage before %g
MarsDoge Jun 10, 2026
8a0d106
docs: refresh showcase screenshots across x64/LoongArch/AArch64
MarsDoge Jun 10, 2026
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
8 changes: 4 additions & 4 deletions Application/ModernSetupApp/ModernSetupApp.c
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ UefiMain (
}
} else if (Page == PageDashboard) {
if (ModernSetupGetDashboardQuickGrid (&Ui, mModernSetupPreferences.DashboardDensity, &DashboardGrid) &&
((DashboardSelection + DashboardGrid.CardsPerRow) < DASHBOARD_QUICK_CARD_COUNT))
((DashboardSelection + DashboardGrid.CardsPerRow) < ModernSetupDashboardVisibleQuickCardCount ()))
{
DashboardSelection += DashboardGrid.CardsPerRow;
}
Expand Down Expand Up @@ -339,7 +339,7 @@ UefiMain (
{
DashboardSelection--;
} else if (!DashboardGrid.Visible) {
DashboardSelection = (DashboardSelection == 0) ? (DASHBOARD_QUICK_CARD_COUNT - 1) : (DashboardSelection - 1);
DashboardSelection = (DashboardSelection == 0) ? (ModernSetupDashboardVisibleQuickCardCount () - 1) : (DashboardSelection - 1);
}
} else if (Focus == SetupFocusNav) {
Page = (Page == 0) ? (PageMax - 1) : (Page - 1);
Expand All @@ -359,11 +359,11 @@ UefiMain (
ModernSetupCancelPreferencePopup ();
} else if (Page == PageDashboard) {
if (ModernSetupGetDashboardQuickGrid (&Ui, mModernSetupPreferences.DashboardDensity, &DashboardGrid)) {
if ((((DashboardSelection % DashboardGrid.CardsPerRow) + 1) < DashboardGrid.CardsPerRow) && ((DashboardSelection + 1) < DASHBOARD_QUICK_CARD_COUNT)) {
if ((((DashboardSelection % DashboardGrid.CardsPerRow) + 1) < DashboardGrid.CardsPerRow) && ((DashboardSelection + 1) < ModernSetupDashboardVisibleQuickCardCount ())) {
DashboardSelection++;
}
} else {
DashboardSelection = (DashboardSelection + 1) % DASHBOARD_QUICK_CARD_COUNT;
DashboardSelection = (DashboardSelection + 1) % ModernSetupDashboardVisibleQuickCardCount ();
}
StatusMessage[0] = L'\0';
} else {
Expand Down
105 changes: 100 additions & 5 deletions Application/ModernSetupApp/ModernSetupAppActions.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,85 @@ STATIC CONST MODERN_SETUP_DASHBOARD_ROUTE mDashboardCategoryRoutes[DASHBOARD_QU
{ PageServerInventory, SetupFocusNav }
};

/**
Decide whether a standardized dashboard quick-card is applicable on the
current platform. See the contract in ModernSetupAppInternal.h.

@param[in] CardIndex Catalog card index in [0, DASHBOARD_QUICK_CARD_COUNT).

@retval TRUE The card should be shown on this platform.
@retval FALSE The card is hidden (or CardIndex is out of range).
**/
BOOLEAN
ModernSetupDashboardQuickCardApplicable (
IN UINTN CardIndex
)
{
MODERN_SETUP_PROVIDER_SNAPSHOT Providers;

if (CardIndex >= DASHBOARD_QUICK_CARD_COUNT) {
return FALSE;
}

//
// Every catalog card is universally applicable except the trailing
// server-inventory card, which is server-class content.
//
if (CardIndex != MODERN_SETUP_DASHBOARD_SERVER_CARD) {
return TRUE;
}

ModernSetupGetCachedProviderSnapshot (&Providers);

//
// Show the server-inventory card when the chassis reports a server form
// factor, or when a management provider (IPMI / Redfish / SMBIOS management
// interface) is live -- so a managed workstation still surfaces it while a
// plain client desktop or VM does not.
//
if (StrCmp (Providers.Platform.FormFactor, L"Server") == 0) {
return TRUE;
}

if (!EFI_ERROR (Providers.ManagementStatus) &&
(Providers.Management.IpmiProtocolPresent ||
Providers.Management.RedfishDiscoverPresent ||
Providers.Management.SmbiosManagementInterfacePresent))
{
return TRUE;
}

return FALSE;
}

/**
Return the number of dashboard quick-cards visible on the current platform.
See the contract in ModernSetupAppInternal.h.

@return Visible quick-card count in [1, DASHBOARD_QUICK_CARD_COUNT].
**/
UINTN
ModernSetupDashboardVisibleQuickCardCount (
VOID
)
{
UINTN Index;
UINTN Count;

Count = 0;
for (Index = 0; Index < DASHBOARD_QUICK_CARD_COUNT; Index++) {
if (ModernSetupDashboardQuickCardApplicable (Index)) {
Count++;
}
}

//
// The Continue/Boot/Devices core cards are always applicable, so the count is
// never zero; defend against a future predicate change regardless.
//
return MAX (Count, (UINTN)1);
}

BOOLEAN mModernSetupLanguageDropdownOpen;
UINTN mModernSetupLanguageDropdownSelection;
BOOLEAN mModernSetupPreferencePopupOpen;
Expand Down Expand Up @@ -88,12 +167,20 @@ ModernSetupGetDashboardQuickGrid (
UINTN CardAreaWidth;
UINTN MaxRows;
UINTN ValueMinHeight;
UINTN CardCount;
BOOLEAN Compact;

if ((Ui == NULL) || (Grid == NULL)) {
return FALSE;
}

//
// Lay the grid out for the cards actually visible on this platform (the
// server-inventory card may be hidden), so the columns/rows reflow instead of
// leaving a gap. See Docs/AppFeatureStandard.md.
//
CardCount = ModernSetupDashboardVisibleQuickCardCount ();

ZeroMem (Grid, sizeof (*Grid));
Compact = (BOOLEAN)(DashboardDensity == ModernUiDashboardDensityCompact);
Content = ModernSetupContentRect (Ui);
Expand All @@ -115,16 +202,16 @@ ModernSetupGetDashboardQuickGrid (
MaxRows = (Grid->Panel.Height > (Grid->CardTop + ValueMinHeight + DASHBOARD_QUICK_CARD_BOTTOM)) ?
((Grid->Panel.Height - Grid->CardTop - DASHBOARD_QUICK_CARD_BOTTOM + Grid->CardGap) / (ValueMinHeight + Grid->CardGap)) :
1;
MaxRows = MAX (1, MIN (DASHBOARD_QUICK_CARD_COUNT, MaxRows));
Grid->CardsPerRow = (DASHBOARD_QUICK_CARD_COUNT + MaxRows - 1) / MaxRows;
MaxRows = MAX (1, MIN (CardCount, MaxRows));
Grid->CardsPerRow = (CardCount + MaxRows - 1) / MaxRows;
if ((Grid->Panel.Width >= 760) && (Grid->CardsPerRow < 3)) {
Grid->CardsPerRow = 3;
} else if ((Grid->Panel.Width >= 500) && (Grid->CardsPerRow < 2)) {
Grid->CardsPerRow = 2;
}

Grid->CardsPerRow = MIN (DASHBOARD_QUICK_CARD_COUNT, Grid->CardsPerRow);
Grid->Rows = (DASHBOARD_QUICK_CARD_COUNT + Grid->CardsPerRow - 1) / Grid->CardsPerRow;
Grid->CardsPerRow = MIN (CardCount, Grid->CardsPerRow);
Grid->Rows = (CardCount + Grid->CardsPerRow - 1) / Grid->CardsPerRow;
Grid->CardWidth = (CardAreaWidth > (Grid->CardGap * (Grid->CardsPerRow - 1))) ?
((CardAreaWidth - (Grid->CardGap * (Grid->CardsPerRow - 1))) / Grid->CardsPerRow) :
MAX (1, CardAreaWidth / Grid->CardsPerRow);
Expand Down Expand Up @@ -250,6 +337,14 @@ ModernSetupGetDashboardCategoryRoute (
return FALSE;
}

//
// A card hidden on this platform (e.g. server-inventory on a client) MUST NOT
// be Enter-activatable even if a stale selection index points at it.
//
if (!ModernSetupDashboardQuickCardApplicable (Selection)) {
return FALSE;
}

*Route = mDashboardCategoryRoutes[Selection];
return TRUE;
}
Expand Down Expand Up @@ -604,7 +699,7 @@ ModernSetupGetPageSelectableCount (
MODERN_SETUP_DASHBOARD_QUICK_GRID Grid;

return ModernSetupGetDashboardQuickGrid (Ui, mModernSetupPreferences.DashboardDensity, &Grid) ?
DASHBOARD_QUICK_CARD_COUNT : 0;
ModernSetupDashboardVisibleQuickCardCount () : 0;
}
case PageBoot:
{
Expand Down
3 changes: 3 additions & 0 deletions Application/ModernSetupApp/ModernSetupAppChrome.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

STATIC CONST PAGE_DESCRIPTOR mPages[] = {
{ PageDashboard, ModernUiStringPageDashboard, ModernUiStringPageDashboardHint },
{ PageSystemInfo, ModernUiStringPageSystemInfo, ModernUiStringPageSystemInfoHint },
{ PageBoot, ModernUiStringPageBoot, ModernUiStringPageBootHint },
{ PageDevices, ModernUiStringPageDevices, ModernUiStringPageDevicesHint },
{ PageSecurity, ModernUiStringPageSecurity, ModernUiStringPageSecurityHint },
Expand All @@ -27,6 +28,7 @@ STATIC CONST PAGE_DESCRIPTOR mPages[] = {

STATIC CONST CHAR16 *mEnglishCompactTabLabels[] = {
L"Main",
L"System",
L"Boot",
L"Devices",
L"Security",
Expand All @@ -42,6 +44,7 @@ STATIC CONST CHAR16 *mEnglishCompactTabLabels[] = {

STATIC CONST CHAR16 *mChineseCompactTabLabels[] = {
L"主页",
L"系统",
L"启动",
L"设备",
L"安全",
Expand Down
59 changes: 44 additions & 15 deletions Application/ModernSetupApp/ModernSetupAppDashboard.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,10 @@ STATIC CONST MODERN_UI_STRING_ID mDashboardCardGroupLabel[DASHBOARD_QUICK_CARD_
@param[in] Label Label text. Must not be NULL.
@param[in] Value Value text. Must not be NULL.
**/
#define DASHBOARD_INFO_ROW_STEP 32

STATIC
VOID
UINTN
DrawDashboardInfoRow (
IN MODERN_UI_RENDER_CONTEXT *Ui,
IN CONST MODERN_UI_THEME *Theme,
Expand All @@ -73,14 +75,26 @@ DrawDashboardInfoRow (
UINTN ValueX;

if (Width < 32) {
return;
return Y;
}

//
// Skip placeholder/empty values so a flowed card does not show "N/A" clutter
// or leave a gap. The caller passes the returned Y as the next row position,
// so skipped rows collapse. Callers that keep fixed Y can ignore the result.
//
if ((Value == NULL) || (Value[0] == CHAR_NULL) ||
(StrCmp (Value, L"N/A") == 0) || (StrCmp (Value, L"Limited data") == 0))
{
return Y;
}

Background = ModernUiBlendColor (Theme->Surface, Theme->BackgroundBlack, 30);
LabelWidth = (Width > 240) ? 180 : (Width / 2);
ValueX = X + LabelWidth;
ModernUiDrawTextFit (Ui, X, Y, LabelWidth - 8, Label, Theme->MutedText, Background);
ModernUiDrawTextFit (Ui, ValueX, Y, (Width > LabelWidth) ? (Width - LabelWidth) : Width, Value, Theme->Text, Background);
return Y + DASHBOARD_INFO_ROW_STEP;
}

/**
Expand Down Expand Up @@ -274,7 +288,7 @@ DashboardProviderHealthText (
case ModernSetupProviderHealthReady:
return L"就绪";
case ModernSetupProviderHealthDegraded:
return L"Degraded";
return L"退化";
case ModernSetupProviderHealthNotReady:
default:
return L"未就绪";
Expand Down Expand Up @@ -337,7 +351,7 @@ ModernSetupDrawDashboard (
CHAR16 Resolution[48];
CHAR16 BootCount[48];
CHAR16 DeviceCount[48];
CHAR16 MemoryText[48];
CHAR16 MemoryText[96];
CHAR16 SecurityText[48];
CHAR16 ArchitectureText[96];
CHAR16 ProviderCountText[48];
Expand Down Expand Up @@ -379,7 +393,11 @@ ModernSetupDrawDashboard (
ModernSetupGetCachedProviderSnapshot (&Providers);
ModernSetupGetProviderHealthSummary (&Providers, &ProviderHealth);

UnicodeSPrint (MemoryText, sizeof (MemoryText), L"%lu MB", Providers.Platform.MemorySizeMb);
if (Providers.Platform.MemoryDetail[0] != L'\0') {
UnicodeSPrint (MemoryText, sizeof (MemoryText), L"%lu MB (%s)", Providers.Platform.MemorySizeMb, Providers.Platform.MemoryDetail);
} else {
UnicodeSPrint (MemoryText, sizeof (MemoryText), L"%lu MB", Providers.Platform.MemorySizeMb);
}
UnicodeSPrint (ArchitectureText, sizeof (ArchitectureText), L"%s", Providers.Platform.Architecture);
UnicodeSPrint (
SecurityText,
Expand All @@ -390,7 +408,7 @@ ModernSetupDrawDashboard (
);
UnicodeSPrint (ProviderCountText, sizeof (ProviderCountText), Zh ? L"%u/%u 就绪" : L"%u/%u ready", ProviderHealth.ReadyProviders, ProviderHealth.TotalProviders);
if (ProviderHealth.State == ModernSetupProviderHealthReady) {
UnicodeSPrint (ProviderIssueText, sizeof (ProviderIssueText), Zh ? L"OK" : L"All providers ready");
UnicodeSPrint (ProviderIssueText, sizeof (ProviderIssueText), Zh ? L"已就绪" : L"All providers ready");
} else {
UnicodeSPrint (ProviderIssueText, sizeof (ProviderIssueText), Zh ? L"%s 不可用" : L"%s unavailable", ProviderHealth.FirstIssueName);
}
Expand Down Expand Up @@ -490,14 +508,25 @@ ModernSetupDrawDashboard (
}
DrawDashboardSection (Ui, Theme, SystemPanel, Zh ? L"系统状态" : L"System Information", TRUE);
ModernUiDrawFocusFrame (Ui, SystemPanel, (BOOLEAN)(Focus == SetupFocusContent), Theme);
DrawDashboardInfoRow (Ui, Theme, SystemPanel.X + 22, SystemPanel.Y + 58, SystemPanel.Width - 44, ModernUiGetString (ModernUiStringFirmwareVendor), Providers.Platform.FirmwareVendor);
DrawDashboardInfoRow (Ui, Theme, SystemPanel.X + 22, SystemPanel.Y + 90, SystemPanel.Width - 44, ModernUiGetString (ModernUiStringFirmwareRevision), Providers.Platform.FirmwareRevision);
DrawDashboardInfoRow (Ui, Theme, SystemPanel.X + 22, SystemPanel.Y + 122, SystemPanel.Width - 44, Zh ? L"平台" : L"Platform", Providers.Platform.Platform);
DrawDashboardInfoRow (Ui, Theme, SystemPanel.X + 22, SystemPanel.Y + 154, SystemPanel.Width - 44, ModernUiGetString (ModernUiStringFormFactor), Providers.Platform.FormFactor);
DrawDashboardInfoRow (Ui, Theme, SystemPanel.X + 22, SystemPanel.Y + 186, SystemPanel.Width - 44, ModernUiGetString (ModernUiStringBootMode), Providers.Platform.BootMode);
DrawDashboardInfoRow (Ui, Theme, SystemPanel.X + 22, SystemPanel.Y + 218, SystemPanel.Width - 44, Zh ? L"内存" : L"Memory", MemoryText);
if (TopHeight >= 260) {
DrawDashboardInfoRow (Ui, Theme, SystemPanel.X + 22, SystemPanel.Y + 250, SystemPanel.Width - 44, ModernUiGetString (ModernUiStringDisplay), Resolution);
{
//
// Flow the system-status rows: each row advances the running Y, and rows
// whose provider value is a placeholder ("N/A") collapse instead of leaving
// a labelled blank, so the card reads clean.
//
UINTN RowY;

RowY = SystemPanel.Y + 58;
RowY = DrawDashboardInfoRow (Ui, Theme, SystemPanel.X + 22, RowY, SystemPanel.Width - 44, ModernUiGetString (ModernUiStringFirmwareVendor), Providers.Platform.FirmwareVendor);
RowY = DrawDashboardInfoRow (Ui, Theme, SystemPanel.X + 22, RowY, SystemPanel.Width - 44, ModernUiGetString (ModernUiStringFirmwareRevision), Providers.Platform.FirmwareRevision);
RowY = DrawDashboardInfoRow (Ui, Theme, SystemPanel.X + 22, RowY, SystemPanel.Width - 44, Zh ? L"平台" : L"Platform", Providers.Platform.Platform);
RowY = DrawDashboardInfoRow (Ui, Theme, SystemPanel.X + 22, RowY, SystemPanel.Width - 44, L"CPU", Providers.Platform.Processor);
RowY = DrawDashboardInfoRow (Ui, Theme, SystemPanel.X + 22, RowY, SystemPanel.Width - 44, ModernUiGetString (ModernUiStringFormFactor), Providers.Platform.FormFactor);
RowY = DrawDashboardInfoRow (Ui, Theme, SystemPanel.X + 22, RowY, SystemPanel.Width - 44, ModernUiGetString (ModernUiStringBootMode), Providers.Platform.BootMode);
RowY = DrawDashboardInfoRow (Ui, Theme, SystemPanel.X + 22, RowY, SystemPanel.Width - 44, Zh ? L"内存" : L"Memory", MemoryText);
if (TopHeight >= 260) {
RowY = DrawDashboardInfoRow (Ui, Theme, SystemPanel.X + 22, RowY, SystemPanel.Width - 44, ModernUiGetString (ModernUiStringDisplay), Resolution);
}
}

if (MonitorPanel.Width > 0) {
Expand All @@ -519,7 +548,7 @@ ModernSetupDrawDashboard (
if (Grid.Visible) {
DrawDashboardSection (Ui, Theme, QuickPanel, ModernUiGetString (ModernUiStringSetupCategories), FALSE);

for (CardIndex = 0; CardIndex < DASHBOARD_QUICK_CARD_COUNT; CardIndex++) {
for (CardIndex = 0; CardIndex < ModernSetupDashboardVisibleQuickCardCount (); CardIndex++) {
CardX = QuickPanel.X + 20 + ((CardIndex % Grid.CardsPerRow) * (Grid.CardWidth + Grid.CardGap));
CardY = QuickPanel.Y + Grid.CardTop + ((CardIndex / Grid.CardsPerRow) * (Grid.CardHeight + Grid.CardGap));
QuickCard = (MODERN_UI_RECT){ CardX, CardY, Grid.CardWidth, Grid.CardHeight };
Expand Down
Loading
Loading