@@ -235,7 +235,7 @@ local function CreateMainFrame()
235235 -- Version badge
236236 local versionBadge = header :CreateFontString (nil , " OVERLAY" , " GameFontNormalSmall" )
237237 versionBadge :SetPoint (" LEFT" , title , " RIGHT" , 4 , 0 )
238- versionBadge :SetText (" v1.1.6 " )
238+ versionBadge :SetText (" v1.1.11 " )
239239 versionBadge :SetTextColor (unpack (COLORS .accent ))
240240
241241 -- View mode indicator (pill badge)
@@ -295,6 +295,33 @@ local function CreateMainFrame()
295295 sessionQuick :SetJustifyH (" RIGHT" )
296296 frame .sessionQuick = sessionQuick
297297
298+ -- Goals compact view (shown when goals tab is active and minimized)
299+ local goalsCompactContainer = CreateFrame (" Frame" , nil , compact )
300+ goalsCompactContainer :SetAllPoints ()
301+ goalsCompactContainer :Hide ()
302+ frame .goalsCompact = goalsCompactContainer
303+
304+ -- Goals icon
305+ local goalsIcon = goalsCompactContainer :CreateTexture (nil , " ARTWORK" )
306+ goalsIcon :SetSize (12 , 12 )
307+ goalsIcon :SetPoint (" LEFT" , PADDING , 0 )
308+ goalsIcon :SetTexture (" Interface\\ Icons\\ INV_Misc_Token_HonorHold" )
309+ goalsIcon :SetTexCoord (0.08 , 0.92 , 0.08 , 0.92 )
310+ goalsIcon :SetAlpha (0.8 )
311+ frame .goalsCompactIcon = goalsIcon
312+
313+ -- Goals summary text (left side)
314+ local goalsSummary = goalsCompactContainer :CreateFontString (nil , " OVERLAY" , " GameFontNormalSmall" )
315+ goalsSummary :SetPoint (" LEFT" , goalsIcon , " RIGHT" , 4 , 0 )
316+ goalsSummary :SetJustifyH (" LEFT" )
317+ frame .goalsCompactSummary = goalsSummary
318+
319+ -- Goals currency text (right side)
320+ local goalsCurrency = goalsCompactContainer :CreateFontString (nil , " OVERLAY" , " GameFontNormalSmall" )
321+ goalsCurrency :SetPoint (" RIGHT" , - PADDING , 0 )
322+ goalsCurrency :SetJustifyH (" RIGHT" )
323+ frame .goalsCompactCurrency = goalsCurrency
324+
298325 ---- ------------------------------------------------------------------------
299326 -- EXPANDED VIEW (with scroll support)
300327 ---- ------------------------------------------------------------------------
@@ -720,15 +747,32 @@ end
720747
721748function HonorLog :SetExpanded (expanded )
722749 self .db .settings .frameExpanded = expanded
750+ local frame = self .mainFrame
723751
724752 -- Get saved width or use default
725753 local savedSize = self .db .settings .frameSize
726754 local width = (savedSize and savedSize [1 ]) or FRAME_WIDTH
727755
756+ -- Determine which view is active (default to stats if not set)
757+ local currentView = frame .currentView or " stats"
758+
728759 if expanded then
729- self .mainFrame .expanded :Show ()
730- self .mainFrame :SetSize (width , FRAME_HEIGHT_EXPANDED )
731- self .mainFrame .expandBtn .icon :SetTexture (" Interface\\ Buttons\\ UI-MinusButton-UP" )
760+ frame :SetSize (width , FRAME_HEIGHT_EXPANDED )
761+ frame .expandBtn .icon :SetTexture (" Interface\\ Buttons\\ UI-MinusButton-UP" )
762+
763+ -- Show the appropriate expanded view based on current tab
764+ if currentView == " goals" then
765+ frame .expanded :Hide ()
766+ if frame .goalsPanel then
767+ frame .goalsPanel :Show ()
768+ self :UpdateGoalsPanel ()
769+ end
770+ else
771+ frame .expanded :Show ()
772+ if frame .goalsPanel then
773+ frame .goalsPanel :Hide ()
774+ end
775+ end
732776
733777 -- Update scroll bar visibility after showing
734778 C_Timer .After (0 , function ()
@@ -737,9 +781,42 @@ function HonorLog:SetExpanded(expanded)
737781 end
738782 end )
739783 else
740- self .mainFrame .expanded :Hide ()
741- self .mainFrame :SetSize (width , FRAME_HEIGHT_COMPACT )
742- self .mainFrame .expandBtn .icon :SetTexture (" Interface\\ Buttons\\ UI-PlusButton-UP" )
784+ -- Minimized state - hide all expanded views
785+ frame .expanded :Hide ()
786+ if frame .goalsPanel then
787+ frame .goalsPanel :Hide ()
788+ end
789+ frame :SetSize (width , FRAME_HEIGHT_COMPACT )
790+ frame .expandBtn .icon :SetTexture (" Interface\\ Buttons\\ UI-PlusButton-UP" )
791+ end
792+
793+ -- Update compact view to show appropriate content
794+ self :UpdateCompactView ()
795+ end
796+
797+ function HonorLog :UpdateCompactView ()
798+ local frame = self .mainFrame
799+ if not frame then return end
800+
801+ local currentView = frame .currentView or " stats"
802+
803+ if currentView == " goals" then
804+ -- Show goals compact, hide stats compact
805+ frame .statusIcon :Hide ()
806+ frame .statusLine :Hide ()
807+ frame .sessionQuick :Hide ()
808+ if frame .goalsCompact then
809+ frame .goalsCompact :Show ()
810+ self :UpdateGoalsCompact ()
811+ end
812+ else
813+ -- Show stats compact, hide goals compact
814+ frame .statusIcon :Show ()
815+ frame .statusLine :Show ()
816+ frame .sessionQuick :Show ()
817+ if frame .goalsCompact then
818+ frame .goalsCompact :Hide ()
819+ end
743820 end
744821end
745822
@@ -874,6 +951,83 @@ function HonorLog:UpdateMainFrame()
874951 frame .sessionRate :SetText (" " )
875952 frame .sessionRewards :SetText (" " )
876953 end
954+
955+ -- Update goals compact if in goals view
956+ if frame .currentView == " goals" and self .UpdateGoalsCompact then
957+ self :UpdateGoalsCompact ()
958+ end
959+ end
960+
961+ ---- ----------------------------------------------------------------------------
962+ -- GOALS COMPACT VIEW UPDATE
963+ ---- ----------------------------------------------------------------------------
964+ function HonorLog :UpdateGoalsCompact ()
965+ if not self .mainFrame then return end
966+ local frame = self .mainFrame
967+
968+ local goalCount = self :GetGoalCount ()
969+ if goalCount == 0 then
970+ frame .goalsCompactSummary :SetText (" No goals set" )
971+ frame .goalsCompactSummary :SetTextColor (unpack (COLORS .textTertiary ))
972+ frame .goalsCompactIcon :SetTexture (" Interface\\ Icons\\ INV_Misc_Token_HonorHold" )
973+ frame .goalsCompactIcon :SetVertexColor (0.5 , 0.5 , 0.5 , 0.7 )
974+ frame .goalsCompactCurrency :SetText (" " )
975+ else
976+ -- Get top goal info
977+ local goals = self :GetAllGoalsProgress ()
978+ if goals and # goals > 0 then
979+ local topGoal = goals [1 ]
980+
981+ -- Update icon to match top goal
982+ local _ , _ , _ , _ , _ , _ , _ , _ , _ , itemTexture = GetItemInfo (topGoal .itemID )
983+ if itemTexture then
984+ frame .goalsCompactIcon :SetTexture (itemTexture )
985+ else
986+ frame .goalsCompactIcon :SetTexture (" Interface\\ Icons\\ INV_Misc_Token_HonorHold" )
987+ end
988+ frame .goalsCompactIcon :SetTexCoord (0.08 , 0.92 , 0.08 , 0.92 )
989+ frame .goalsCompactIcon :SetVertexColor (1 , 1 , 1 , 0.9 )
990+
991+ -- Calculate overall progress
992+ local totalProgress = 0
993+ for _ , goal in ipairs (goals ) do
994+ local percent = 100
995+ if goal .honor .needed > 0 then
996+ percent = math.min (percent , goal .honor .percent )
997+ end
998+ if goal .arena .needed > 0 then
999+ percent = math.min (percent , goal .arena .percent )
1000+ end
1001+ for _ , markData in pairs (goal .marks ) do
1002+ percent = math.min (percent , markData .percent )
1003+ end
1004+ totalProgress = totalProgress + percent
1005+ end
1006+ local avgProgress = totalProgress / # goals
1007+
1008+ -- Summary text
1009+ local summaryText
1010+ if # goals == 1 then
1011+ summaryText = string.format (" %s · %.0f%%" , topGoal .name or " Goal" , avgProgress )
1012+ else
1013+ summaryText = string.format (" %d goals · %.0f%%" , # goals , avgProgress )
1014+ end
1015+ frame .goalsCompactSummary :SetText (summaryText )
1016+
1017+ -- Color based on progress
1018+ if avgProgress >= 100 then
1019+ frame .goalsCompactSummary :SetTextColor (unpack (COLORS .progressFull ))
1020+ elseif avgProgress >= 50 then
1021+ frame .goalsCompactSummary :SetTextColor (unpack (COLORS .progressPartial ))
1022+ else
1023+ frame .goalsCompactSummary :SetTextColor (unpack (COLORS .textPrimary ))
1024+ end
1025+
1026+ -- Currency display (current honor)
1027+ local currentHonor = self :GetCurrentHonor ()
1028+ frame .goalsCompactCurrency :SetText (string.format (" |cffffd700%s|r Honor" , BreakUpLargeNumbers (currentHonor )))
1029+ end
1030+ end
8771031end
8781032
8791033---- ----------------------------------------------------------------------------
0 commit comments