Skip to content
Merged
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: 2 additions & 2 deletions Trdo/Controls/TutorialWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
</TitleBar.IconSource>
</TitleBar>

<ScrollViewer Grid.Row="1" VerticalScrollBarVisibility="Auto">
<ScrollView Grid.Row="1" VerticalScrollBarVisibility="Auto">
<StackPanel
Margin="32,24,32,24"
Orientation="Vertical"
Expand Down Expand Up @@ -230,7 +230,7 @@
TextWrapping="Wrap" />
</StackPanel>
</StackPanel>
</ScrollViewer>
</ScrollView>

<!-- Bottom Action Button -->
<Border
Expand Down
2 changes: 1 addition & 1 deletion Trdo/Package.appxmanifest
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<Identity
Name="40087JoeFinApps.Trdo"
Publisher="CN=153F3B0F-BA3D-4964-8098-71AC78A1DF6A"
Version="1.6.0.0" />
Version="1.7.1.0" />

<mp:PhoneIdentity PhoneProductId="fa86867b-3ba1-44b4-b776-ea2ad8aea4c7" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>

Expand Down
287 changes: 180 additions & 107 deletions Trdo/Pages/AboutPage.xaml

Large diffs are not rendered by default.

39 changes: 39 additions & 0 deletions Trdo/Pages/AboutPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,45 @@ private void ReviewButton_Click(object sender, RoutedEventArgs e)
ViewModel.OpenRatingWindow();
}

private void Star_Click(object sender, RoutedEventArgs e)
{
if (sender is Button button && button.Tag is string tagString && int.TryParse(tagString, out int rating))
{
ViewModel.SelectedRating = rating;
UpdateStarVisuals(rating);

// If 5 stars, immediately launch the store review
if (rating >= 4)
{
_ = ViewModel.OpenRatingWindow();
}
}
}

private void UpdateStarVisuals(int selectedRating)
{
// Update all star buttons to show filled or outline based on rating
UpdateStarButton("Star1", selectedRating >= 1);
UpdateStarButton("Star2", selectedRating >= 2);
UpdateStarButton("Star3", selectedRating >= 3);
UpdateStarButton("Star4", selectedRating >= 4);
UpdateStarButton("Star5", selectedRating >= 5);
}

private void UpdateStarButton(string buttonName, bool isFilled)
{
if (FindName(buttonName) is Button starButton && starButton.Content is FontIcon icon)
{
// E735 is filled star, E734 is outline star
icon.Glyph = isFilled ? "\uE735" : "\uE734";
}
}

private void ContactDeveloperButton_Click(object sender, RoutedEventArgs e)
{
_ = ViewModel.ContactDeveloper();
}

private void TutorialButton_Click(object sender, RoutedEventArgs e)
{
TutorialWindow tutorialWindow = new();
Expand Down
74 changes: 38 additions & 36 deletions Trdo/Pages/AddStation.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,46 +17,48 @@
Text="{x:Bind ViewModel.PageTitle, Mode=OneWay}" />

<!-- Content Area -->
<StackPanel Grid.Row="1" Spacing="12">
<!-- Station Name Input -->
<StackPanel Spacing="4">
<TextBlock FontWeight="SemiBold" Text="Station Name" />
<TextBox
x:Name="StationNameTextBox"
PlaceholderText="e.g., WYMS - Hometown radio"
Text="{x:Bind ViewModel.StationName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
</StackPanel>
<ScrollView Grid.Row="1">
<StackPanel Spacing="12">
<!-- Station Name Input -->
<StackPanel Spacing="4">
<TextBlock FontWeight="SemiBold" Text="Station Name" />
<TextBox
x:Name="StationNameTextBox"
PlaceholderText="e.g., WYMS - Hometown radio"
Text="{x:Bind ViewModel.StationName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
</StackPanel>

<!-- Stream URL Input -->
<StackPanel Spacing="4">
<TextBlock FontWeight="SemiBold" Text="Stream URL" />
<TextBox
x:Name="StreamUrlTextBox"
PlaceholderText="e.g., https://example.com/stream"
Text="{x:Bind ViewModel.StreamUrl, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
TextWrapping="Wrap" />
</StackPanel>
<!-- Stream URL Input -->
<StackPanel Spacing="4">
<TextBlock FontWeight="SemiBold" Text="Stream URL" />
<TextBox
x:Name="StreamUrlTextBox"
PlaceholderText="e.g., https://example.com/stream"
Text="{x:Bind ViewModel.StreamUrl, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
TextWrapping="Wrap" />
</StackPanel>

<!-- Homepage URL Input -->
<StackPanel Spacing="4">
<TextBlock FontWeight="SemiBold" Text="Homepage (Optional)" />
<TextBox
x:Name="HomepageTextBox"
PlaceholderText="e.g., https://example.com"
Text="{x:Bind ViewModel.Homepage, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
TextWrapping="Wrap" />
</StackPanel>
<!-- Homepage URL Input -->
<StackPanel Spacing="4">
<TextBlock FontWeight="SemiBold" Text="Homepage (Optional)" />
<TextBox
x:Name="HomepageTextBox"
PlaceholderText="e.g., https://example.com"
Text="{x:Bind ViewModel.Homepage, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
TextWrapping="Wrap" />
</StackPanel>

<!-- Favicon URL Input -->
<StackPanel Spacing="4">
<TextBlock FontWeight="SemiBold" Text="Station Logo/Icon URL (Optional)" />
<TextBox
x:Name="FaviconUrlTextBox"
PlaceholderText="e.g., https://example.com/logo.png"
Text="{x:Bind ViewModel.FaviconUrl, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
TextWrapping="Wrap" />
<!-- Favicon URL Input -->
<StackPanel Spacing="4">
<TextBlock FontWeight="SemiBold" Text="Station Logo/Icon URL (Optional)" />
<TextBox
x:Name="FaviconUrlTextBox"
PlaceholderText="e.g., https://example.com/logo.png"
Text="{x:Bind ViewModel.FaviconUrl, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
TextWrapping="Wrap" />
</StackPanel>
</StackPanel>
</StackPanel>
</ScrollView>

<!-- Buttons -->
<Grid Grid.Row="2" ColumnSpacing="8">
Expand Down
6 changes: 3 additions & 3 deletions Trdo/Pages/FavoritesPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
Grid.Row="0"
FontSize="16"
FontWeight="SemiBold"
Text="Favorites" />
Text="Favorite Songs" />

<!-- Content -->
<Grid Grid.Row="1" Padding="0,0,0,0">
Expand All @@ -41,13 +41,13 @@
HorizontalAlignment="Center"
FontSize="16"
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
Text="No favorites yet"
Text="No favorite songs yet"
TextAlignment="Center" />
<TextBlock
HorizontalAlignment="Center"
FontSize="12"
Foreground="{ThemeResource TextFillColorTertiaryBrush}"
Text="Tap the star icon on tracks you love to save them here"
Text="Tap the star icon on songs you love to save them here"
TextAlignment="Center"
TextWrapping="Wrap" />
</StackPanel>
Expand Down
16 changes: 8 additions & 8 deletions Trdo/Pages/NowPlayingPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,27 +88,27 @@
<TextBlock
FontSize="14"
FontWeight="SemiBold"
IsTextSelectionEnabled="True"
Text="{x:Bind ViewModel.Title, Mode=OneWay}"
TextTrimming="CharacterEllipsis"
TextWrapping="NoWrap"
TextWrapping="WrapWholeWords"
Visibility="{x:Bind ViewModel.HasTitle, Mode=OneWay, Converter={StaticResource BooleanToVisibilityConverter}}" />

<!-- Artist (if available) -->
<TextBlock
FontSize="12"
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
IsTextSelectionEnabled="True"
Text="{x:Bind ViewModel.Artist, Mode=OneWay}"
TextTrimming="CharacterEllipsis"
TextWrapping="NoWrap"
TextWrapping="WrapWholeWords"
Visibility="{x:Bind ViewModel.HasArtist, Mode=OneWay, Converter={StaticResource BooleanToVisibilityConverter}}" />

<!-- Stream Title Only (shown when we don't have parsed artist/title) -->
<TextBlock
FontSize="14"
FontWeight="SemiBold"
IsTextSelectionEnabled="True"
Text="{x:Bind ViewModel.StreamTitle, Mode=OneWay}"
TextTrimming="CharacterEllipsis"
TextWrapping="NoWrap"
TextWrapping="WrapWholeWords"
Visibility="{x:Bind ViewModel.ShowStreamTitleOnly, Mode=OneWay, Converter={StaticResource BooleanToVisibilityConverter}}" />
</StackPanel>

Expand All @@ -121,7 +121,7 @@
Background="Transparent"
BorderThickness="0"
Click="FavoriteCurrentTrack_Click"
ToolTipService.ToolTip="Toggle favorite">
ToolTipService.ToolTip="Favorite Song">
<FontIcon
FontSize="20"
Foreground="{ThemeResource AccentFillColorDefaultBrush}"
Expand Down Expand Up @@ -237,7 +237,7 @@
BorderThickness="0"
Click="FavoriteHistoryItem_Click"
Tag="{x:Bind}"
ToolTipService.ToolTip="Toggle favorite">
ToolTipService.ToolTip="Favorite Song">
<FontIcon
FontSize="14"
Foreground="{ThemeResource AccentFillColorDefaultBrush}"
Expand Down
20 changes: 17 additions & 3 deletions Trdo/Pages/PlayingPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:converters="using:Trdo.Converters"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:labs="using:CommunityToolkit.Labs.WinUI.MarqueeTextRns"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:models="using:Trdo.Models"
mc:Ignorable="d">
Expand Down Expand Up @@ -46,7 +47,7 @@
Background="Transparent"
BorderBrush="Transparent"
Click="FavoritesButton_Click"
ToolTipService.ToolTip="Favorites">
ToolTipService.ToolTip="Favorite Songs">
<FontIcon FontSize="16" Glyph="&#xE728;" />
</Button>

Expand Down Expand Up @@ -91,6 +92,7 @@
CanReorderItems="True"
DragItemsCompleted="StationsListView_DragItemsCompleted"
ItemsSource="{x:Bind ViewModel.Stations, Mode=OneWay}"
SelectedItem="{x:Bind ViewModel.SelectedStation, Mode=TwoWay}"
SelectionChanged="StationsListView_SelectionChanged"
SelectionMode="Single">
<ListView.ItemContainerStyle>
Expand Down Expand Up @@ -266,6 +268,17 @@
FontSize="14"
Foreground="{ThemeResource AccentFillColorDefaultBrush}"
Glyph="&#xE8D6;" />
<labs:MarqueeText
x:Name="NowPlayingMarqueeText"
Grid.Column="1"
VerticalAlignment="Center"
Behavior="Ticker"
Direction="Left"
FontSize="12"
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
RepeatBehavior="Forever"
Speed="40"
Text="{x:Bind ViewModel.NowPlaying, Mode=OneWay}" />
<TextBlock
x:Name="NowPlayingText"
Grid.Column="1"
Expand All @@ -274,7 +287,8 @@
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
Text="{x:Bind ViewModel.NowPlaying, Mode=OneWay}"
TextTrimming="CharacterEllipsis"
TextWrapping="NoWrap" />
TextWrapping="NoWrap"
Visibility="Collapsed" />
<!-- Favorite Button -->
<Button
x:Name="FavoriteButton"
Expand All @@ -283,7 +297,7 @@
Background="Transparent"
BorderThickness="0"
Click="FavoriteButton_Click"
ToolTipService.ToolTip="Toggle favorite">
ToolTipService.ToolTip="Favorite Song">
<FontIcon
x:Name="FavoriteIcon"
FontSize="14"
Expand Down
7 changes: 7 additions & 0 deletions Trdo/Pages/PlayingPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,13 @@ private void UpdateStationSelection()
return;
}

// Ensure ListView SelectedItem is synchronized with ViewModel
if (StationsListView.SelectedItem != ViewModel.SelectedStation)
{
StationsListView.SelectedItem = ViewModel.SelectedStation;
Debug.WriteLine($"[PlayingPage] Synchronized ListView.SelectedItem to {ViewModel.SelectedStation?.Name ?? "null"}");
}

for (int i = 0; i < ViewModel.Stations.Count; i++)
{
if (StationsListView.ContainerFromIndex(i) is not ListViewItem container)
Expand Down
40 changes: 18 additions & 22 deletions Trdo/Pages/SearchStation.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,15 @@

<!-- Error InfoBar -->
<InfoBar
Title="Search Error"
Grid.Row="2"
IsClosable="True"
IsOpen="{x:Bind ViewModel.HasError, Mode=OneWay}"
Message="{x:Bind ViewModel.ErrorMessage, Mode=OneWay}"
Severity="Error"
Title="Search Error" />
Severity="Error" />

<!-- Search Results -->
<ScrollViewer Grid.Row="3">
<ScrollView Grid.Row="3">
<StackPanel Spacing="8">
<!-- Initial state -->
<StackPanel Spacing="8" Visibility="{x:Bind ViewModel.ShowInitialState, Mode=OneWay}">
Expand Down Expand Up @@ -91,12 +91,8 @@
Height="40"
VerticalAlignment="Top"
Visibility="{x:Bind Favicon, Converter={StaticResource NullToVisibilityConverter}, Mode=OneWay}">
<Border
Background="{ThemeResource CardBackgroundFillColorSecondaryBrush}"
CornerRadius="6">
<Image
Source="{x:Bind Favicon, Converter={StaticResource StringToImageSourceConverter}, Mode=OneWay}"
Stretch="UniformToFill" />
<Border Background="{ThemeResource CardBackgroundFillColorSecondaryBrush}" CornerRadius="6">
<Image Source="{x:Bind Favicon, Converter={StaticResource StringToImageSourceConverter}, Mode=OneWay}" Stretch="UniformToFill" />
</Border>
</Grid>

Expand Down Expand Up @@ -142,17 +138,17 @@
</ListView.ItemTemplate>
</ListView>
</StackPanel>
</ScrollViewer>
</ScrollView>

<!-- Cancel Button -->
<Button
Grid.Row="4"
HorizontalAlignment="Stretch"
Click="CancelButton_Click">
<StackPanel Orientation="Horizontal" Spacing="8">
<FontIcon FontSize="16" Glyph="&#xE711;" />
<TextBlock Text="Cancel" />
</StackPanel>
</Button>
</Grid>
</Page>
<!-- Cancel Button -->
<Button
Grid.Row="4"
HorizontalAlignment="Stretch"
Click="CancelButton_Click">
<StackPanel Orientation="Horizontal" Spacing="8">
<FontIcon FontSize="16" Glyph="&#xE711;" />
<TextBlock Text="Cancel" />
</StackPanel>
</Button>
</Grid>
</Page>
Loading
Loading