From a4199ce1c85619a480356bdb6a43eb02689206c2 Mon Sep 17 00:00:00 2001 From: Shaun Lawrie Date: Sun, 3 Nov 2024 02:07:44 +1300 Subject: [PATCH] Fix tree, calendar and add bluesky to docs site --- PwshSpectreConsole.Docs/astro.config.mjs | 2 +- PwshSpectreConsole/public/formatting/Format-SpectreTree.ps1 | 5 ++--- PwshSpectreConsole/public/writing/Write-SpectreCalendar.ps1 | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/PwshSpectreConsole.Docs/astro.config.mjs b/PwshSpectreConsole.Docs/astro.config.mjs index d94c1de..3aa44fc 100644 --- a/PwshSpectreConsole.Docs/astro.config.mjs +++ b/PwshSpectreConsole.Docs/astro.config.mjs @@ -13,7 +13,7 @@ export default defineConfig({ social: { rss: "https://shaunlawrie.com/rss.xml", github: "https://github.com/ShaunLawrie/PwshSpectreConsole", - "x.com": "https://twitter.com/Shaun_Lawrie", + blueSky: "https://bsky.app/profile/shaunlawrie.com", youtube: "https://www.youtube.com/@shaunlawrie", }, components: { diff --git a/PwshSpectreConsole/public/formatting/Format-SpectreTree.ps1 b/PwshSpectreConsole/public/formatting/Format-SpectreTree.ps1 index 9bed1c4..8ee6b99 100644 --- a/PwshSpectreConsole/public/formatting/Format-SpectreTree.ps1 +++ b/PwshSpectreConsole/public/formatting/Format-SpectreTree.ps1 @@ -58,13 +58,12 @@ function Format-SpectreTree { [string] $Guide = "Line", [ColorTransformationAttribute()] [ArgumentCompletionsSpectreColors()] - [Spectre.Console.Color] $Color = $script:AccentColor, - [switch] $Expand + [Spectre.Console.Color] $Color = $script:AccentColor ) $tree = [Spectre.Console.Tree]::new($Data.Value) $tree.Guide = [Spectre.Console.TreeGuide]::$Guide - $tree.Expanded = $Expand + $tree.Expanded = $true if ($Data.Children) { Add-SpectreTreeNode -Node $tree -Children $Data.Children diff --git a/PwshSpectreConsole/public/writing/Write-SpectreCalendar.ps1 b/PwshSpectreConsole/public/writing/Write-SpectreCalendar.ps1 index b4dcb2a..efe7d25 100644 --- a/PwshSpectreConsole/public/writing/Write-SpectreCalendar.ps1 +++ b/PwshSpectreConsole/public/writing/Write-SpectreCalendar.ps1 @@ -82,7 +82,7 @@ function Write-SpectreCalendar { $eventDate = $event.Name -as [datetime] $calendar = [Spectre.Console.CalendarExtensions]::AddCalendarEvent($calendar, $event.value, $eventDate.Year, $eventDate.Month, $eventDate.Day) } - $outputData += $calendar.CalendarEvents | Sort-Object -Property Day | Format-SpectreTable -Border $Border -Color $Color + $outputData += $calendar.CalendarEvents | Sort-Object -Property Day | Format-SpectreTable -Property Description, Year, Month, Day -Border $Border -Color $Color } if ($PassThru) {