Skip to content

Commit

Permalink
Fix tree, calendar and add bluesky to docs site
Browse files Browse the repository at this point in the history
  • Loading branch information
ShaunLawrie committed Nov 2, 2024
1 parent 3586c9a commit a4199ce
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion PwshSpectreConsole.Docs/astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
5 changes: 2 additions & 3 deletions PwshSpectreConsole/public/formatting/Format-SpectreTree.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit a4199ce

Please sign in to comment.