some more improvements to vote handling. buttons now reflect what they will do!
This commit is contained in:
parent
e691687ee1
commit
104901142e
|
@ -26,9 +26,9 @@
|
|||
<ColumnDefinition Width="0*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image x:Name="art" Margin="0,0,0,0" Grid.Column="0" Stretch="UniformToFill"/>
|
||||
<Label x:Name="lbTitle" Content="リサフランク420 / 現代のコンピュ" HorizontalAlignment="Left" Margin="2,6,0,0" VerticalAlignment="Top" FontSize="12" FontWeight="Bold" Grid.ColumnSpan="2" Grid.Column="1"/>
|
||||
<Label x:Name="lbArtist" Content="MACプラス Macintosh Plus" HorizontalAlignment="Left" Margin="2,28,0,0" VerticalAlignment="Top" FontSize="11" Grid.Column="1"/>
|
||||
<Label x:Name="lbAlbum" Content="フローラルの専門店 Floral Shoppe" HorizontalAlignment="Left" Margin="2,45,0,0" VerticalAlignment="Top" FontStyle="Italic" FontSize="10" Grid.Column="1" Grid.ColumnSpan="2"/>
|
||||
<Label x:Name="lbTitle" Content="Track title" HorizontalAlignment="Left" Margin="2,6,0,0" VerticalAlignment="Top" FontSize="12" FontWeight="Bold" Grid.ColumnSpan="2" Grid.Column="1"/>
|
||||
<Label x:Name="lbArtist" Content="Track artist" HorizontalAlignment="Left" Margin="2,28,0,0" VerticalAlignment="Top" FontSize="11" Grid.Column="1"/>
|
||||
<Label x:Name="lbAlbum" Content="Track album" HorizontalAlignment="Left" Margin="2,45,0,0" VerticalAlignment="Top" FontStyle="Italic" FontSize="10" Grid.Column="1" Grid.ColumnSpan="2"/>
|
||||
<Slider x:Name="slDuration" Margin="0,87,0,0" VerticalAlignment="Top" IsEnabled="False" Grid.ColumnSpan="2" Height="18" Grid.Column="1" AutoToolTipPlacement="TopLeft"/>
|
||||
<Label x:Name="lbElapsed" Content="00:00" HorizontalAlignment="Left" Margin="0,99,0,0" VerticalAlignment="Top" FontStyle="Italic" FontSize="9" Grid.Column="1"/>
|
||||
<Label x:Name="lbTime" Content="00:00" Margin="0,99,0,0" VerticalAlignment="Top" HorizontalAlignment="Right" FontStyle="Italic" FontSize="9" Grid.Column="2"/>
|
||||
|
@ -45,16 +45,16 @@
|
|||
<StatusBar x:Name="statusBar" Margin="0,0,0,-2" DockPanel.Dock="Bottom" VerticalAlignment="Bottom" BorderBrush="#FFDFDFDF" BorderThickness="1" Height="28" VerticalContentAlignment="Bottom">
|
||||
<StatusBarItem HorizontalAlignment="Left">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock x:Name="sbListeners" Text="420 listeners" Margin="4,0,4,0"/>
|
||||
<TextBlock x:Name="sbListeners" Text="Listener count" Margin="4,0,4,0"/>
|
||||
<ToggleButton x:Name="btPlayPause" Content="⏯" ToolTip="Start/Stop playback" VerticalContentAlignment="Center" Checked="BtPlayPause_Click" Unchecked="BtPlayPause_Click" Margin="0,-2,4,-2"/>
|
||||
<TextBlock x:Name="sbStatus" Text="Idle.."/>
|
||||
<TextBlock x:Name="sbStatus" Text="Status"/>
|
||||
</StackPanel>
|
||||
</StatusBarItem>
|
||||
<StatusBarItem HorizontalAlignment="Right">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<!--TODO implement tracking of time spent listening (this session and all-time)
|
||||
<TextBlock x:Name="sbListeningTimers" Text="00:00 (00:00)"/>-->
|
||||
<TextBlock x:Name="sbVote" Margin="0,0,4,0"/>
|
||||
<TextBlock x:Name="sbVote" Text="Vote" Margin="0,0,4,0"/>
|
||||
<ToggleButton x:Name="sbOnTop" Content="📌" ToolTip="Toggle always-on-top" Checked="SbOnTop_Click" Margin="0,-2,4,-2"/>
|
||||
<ToggleButton x:Name="sbMute" Content="🔊" ToolTip="Toggle mute" Checked="SbMute_Click" Unchecked="SbMute_Click" Margin="0,-2,0,-2"/>
|
||||
<Separator Width="6" Background="{x:Null}" Foreground="{x:Null}"/>
|
||||
|
|
|
@ -76,19 +76,40 @@ namespace WinPlaza {
|
|||
lbDislikeCt.Content = s.Dislikes;
|
||||
lbElapsed.Content = $"{(s.CalculatedElapsed / 60).ToString("D")}:{(s.CalculatedElapsed % 60).ToString("D2")}";
|
||||
if(LastArtwork != s.ArtworkUri || Force) {
|
||||
//TODO should probably break this part out into a separate function cause this feels real messy
|
||||
Nightwave.Vote v = await plaza.GetVote() ?? Nightwave.Vote.Neutral;
|
||||
switch(v) {
|
||||
case Nightwave.Vote.Dislike:
|
||||
sbVote.Text = "👎";
|
||||
sbVote.ToolTip = "You dislike this.";
|
||||
btLike.Content = "👍";
|
||||
btLike.ToolTip = "Like this track";
|
||||
btDislike.Content = "🤷♀️";
|
||||
btDislike.ToolTip = "Remove your vote for this track";
|
||||
break;
|
||||
case Nightwave.Vote.Like:
|
||||
sbVote.Text = "👍";
|
||||
sbVote.ToolTip = "You like this.";
|
||||
btLike.Content = "💖";
|
||||
btLike.ToolTip = "Favourite this track";
|
||||
btDislike.Content = "👎";
|
||||
btDislike.ToolTip = "Dislike this track";
|
||||
break;
|
||||
case Nightwave.Vote.Favourite:
|
||||
sbVote.Text = "💖";
|
||||
sbVote.ToolTip = "You have favourited this.";
|
||||
btLike.Content = "🤷♀️";
|
||||
btLike.ToolTip = "Remove your vote for this track";
|
||||
btDislike.Content = "👎";
|
||||
btDislike.ToolTip = "Dislike this track";
|
||||
break;
|
||||
default:
|
||||
sbVote.Text = "🤷♀️";
|
||||
sbVote.ToolTip = "You have no feelings towards this, or you have not expressed your feelings for this.";
|
||||
btLike.Content = "👍";
|
||||
btLike.ToolTip = "Like this track";
|
||||
btDislike.Content = "👎";
|
||||
btDislike.ToolTip = "Dislike this track";
|
||||
break;
|
||||
}
|
||||
//TODO visual effect on the like/dislike buttons to indicate user's vote
|
||||
|
|
|
@ -73,7 +73,7 @@
|
|||
<GenerateManifests>true</GenerateManifests>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<SignManifests>true</SignManifests>
|
||||
<SignManifests>false</SignManifests>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<StartupObject>WinPlaza.App</StartupObject>
|
||||
|
|
Loading…
Reference in New Issue