Skip to content

Commit

Permalink
Merge pull request #14 from nukora/feature/#13
Browse files Browse the repository at this point in the history
Feature/#13
  • Loading branch information
nukora authored Mar 2, 2022
2 parents 9b7f5c6 + 314d312 commit 6d2a1d7
Show file tree
Hide file tree
Showing 15 changed files with 427 additions and 129 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,24 @@ public ActivityLogGridModel(ActivityLog activityLog)
IsDetailWindowEnabled = true;
IsCopyableUrl = true;
}
if (activityLog.ActivityType == ActivityType.AcceptInvite)
{
ActivityName = "Accept Invite";
Content = addIcon + activityLog.UserName + " -> " + activityLog.WorldName;
WorldID = activityLog.WorldID;
IsCopyableWorldID = true;
UserID = activityLog.UserID;
IsCopyableUserID = true;
IsDetailWindowEnabled = true;
}
if (activityLog.ActivityType == ActivityType.AcceptRequestInvite)
{
ActivityName = "Accept RequestInvite";
Content = addIcon + activityLog.UserName;
UserID = activityLog.UserID;
IsCopyableUserID = true;
IsDetailWindowEnabled = true;
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,11 @@ class ActivityLogSearchParameter

/// <summary>動画を再生した履歴を含める</summary>
public bool IsPlayedVideo { get; set; } = true;

/// <summary>inviteを承認した履歴を含める</summary>
public bool IsAcceptInvite { get; set; } = true;

/// <summary>reqInvを承認した履歴を含める</summary>
public bool IsAcceptRequestInvite { get; set; } = true;
}
}
86 changes: 81 additions & 5 deletions VRChatActivityLogViewer/VRChatActivityLogViewer/DetailWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,65 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:VRChatActivityLogViewer"
xmlns:toolkit="clr-namespace:Microsoft.Toolkit.Wpf.UI.Controls;assembly=Microsoft.Toolkit.Wpf.UI.Controls.WebView"
xmlns:shareddb="clr-namespace:VRChatActivityToolsShared.Database;assembly=VRChatActivityToolsShared"
mc:Ignorable="d"
Loaded="DetailWindow_Loaded"
Closed="DetailWindow_Closed"
Title="VRChatActivityViewer" Height="360" Width="500" ResizeMode="NoResize">
x:Name="DetailDialog"
Title="VRChatActivityViewer" Height="360" Width="500">
<Grid>
<Grid Margin="10">
<Grid.RowDefinitions>
<RowDefinition Height="60"/>
<RowDefinition Height="30"/>
<RowDefinition Height="160"/>
<RowDefinition Height="*"/>
<RowDefinition Height="50"/>
</Grid.RowDefinitions>
<Grid x:Name="HeaderGrid" Grid.Row="0" Margin="5">
<Grid.Style>
<Style TargetType="Grid">
<Style.Triggers>
<DataTrigger Binding="{Binding ActivityLog.ActivityType, ElementName=DetailDialog}" Value="{x:Static shareddb:ActivityType.JoinedRoom}">
<Setter Property="Background" Value="Plum" />
</DataTrigger>
<DataTrigger Binding="{Binding ActivityLog.ActivityType, ElementName=DetailDialog}" Value="{x:Static shareddb:ActivityType.SendFriendRequest}">
<Setter Property="Background" Value="LightGreen" />
</DataTrigger>
<DataTrigger Binding="{Binding ActivityLog.ActivityType, ElementName=DetailDialog}" Value="{x:Static shareddb:ActivityType.ReceivedFriendRequest}">
<Setter Property="Background" Value="LightGreen" />
</DataTrigger>
<DataTrigger Binding="{Binding ActivityLog.ActivityType, ElementName=DetailDialog}" Value="{x:Static shareddb:ActivityType.AcceptFriendRequest}">
<Setter Property="Background" Value="LightGreen" />
</DataTrigger>
<DataTrigger Binding="{Binding ActivityLog.ActivityType, ElementName=DetailDialog}" Value="{x:Static shareddb:ActivityType.ReceivedInvite}">
<Setter Property="Background" Value="SkyBlue" />
</DataTrigger>
<DataTrigger Binding="{Binding ActivityLog.ActivityType, ElementName=DetailDialog}" Value="{x:Static shareddb:ActivityType.ReceivedRequestInvite}">
<Setter Property="Background" Value="LightBlue" />
</DataTrigger>
<DataTrigger Binding="{Binding ActivityLog.ActivityType, ElementName=DetailDialog}" Value="{x:Static shareddb:ActivityType.SendInvite}">
<Setter Property="Background" Value="SkyBlue" />
</DataTrigger>
<DataTrigger Binding="{Binding ActivityLog.ActivityType, ElementName=DetailDialog}" Value="{x:Static shareddb:ActivityType.SendRequestInvite}">
<Setter Property="Background" Value="LightBlue" />
</DataTrigger>
<DataTrigger Binding="{Binding ActivityLog.ActivityType, ElementName=DetailDialog}" Value="{x:Static shareddb:ActivityType.ReceivedInviteResponse}">
<Setter Property="Background" Value="SkyBlue" />
</DataTrigger>
<DataTrigger Binding="{Binding ActivityLog.ActivityType, ElementName=DetailDialog}" Value="{x:Static shareddb:ActivityType.ReceivedRequestInviteResponse}">
<Setter Property="Background" Value="LightBlue" />
</DataTrigger>
<DataTrigger Binding="{Binding ActivityLog.ActivityType, ElementName=DetailDialog}" Value="{x:Static shareddb:ActivityType.PlayedVideo}">
<Setter Property="Background" Value="Pink" />
</DataTrigger>
<DataTrigger Binding="{Binding ActivityLog.ActivityType, ElementName=DetailDialog}" Value="{x:Static shareddb:ActivityType.AcceptInvite}">
<Setter Property="Background" Value="SkyBlue" />
</DataTrigger>
<DataTrigger Binding="{Binding ActivityLog.ActivityType, ElementName=DetailDialog}" Value="{x:Static shareddb:ActivityType.AcceptRequestInvite}">
<Setter Property="Background" Value="LightBlue" />
</DataTrigger>
</Style.Triggers>
</Style>
</Grid.Style>
<TextBlock x:Name="ActivityTypeText" Margin="10,0,0,0" Text="ActivityType" FontSize="28" FontWeight="Bold" VerticalAlignment="Center">
<TextBlock.Effect>
<DropShadowEffect ShadowDepth="0" Direction="0" Color="White" Opacity="1" BlurRadius="4"/>
Expand Down Expand Up @@ -98,7 +143,38 @@
</Grid>
</Grid>
<Grid x:Name="VideoGrid" Grid.Row="2" Margin="5" Visibility="Hidden">
<toolkit:WebView x:Name="VideoWebBrowser" NewWindowRequested="VideoWebBrowser_NewWindowRequested"/>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="1.6*"/>
</Grid.ColumnDefinitions>
<Grid Grid.Row="0" Grid.Column="0">
<TextBlock Text="YouTube" FontSize="16" Margin="5,0,0,0" Foreground="Gray" VerticalAlignment="Bottom"/>
</Grid>
<Grid Grid.Row="1" Grid.Column="0" Margin="5,0,5,5">
<TextBlock Text="&#xE8B9;" FontFamily="Segoe MDL2 Assets" FontSize="64" HorizontalAlignment="Center" VerticalAlignment="Center"/>
<Image x:Name="VideoImageContent" Stretch="Uniform" Visibility="Hidden"/>
</Grid>
<Grid Grid.Row="1" Grid.Column="1">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<TextBlock x:Name="VideoAuthorText" Grid.Row="0" Text="" FontSize="14" Margin="15,0,15,0" TextTrimming="CharacterEllipsis" Foreground="Gray"/>
<TextBlock Grid.Row="1" FontSize="20" Margin="15,0,15,0" TextWrapping="WrapWithOverflow" TextTrimming="CharacterEllipsis">
<Hyperlink Click="VideoHyperlink_Click" TextDecorations="" Cursor="Hand">
<Hyperlink.Style>
<Style TargetType="Hyperlink" BasedOn="{StaticResource {x:Type Hyperlink}}">
<Setter Property="Foreground" Value="Black"/>
</Style>
</Hyperlink.Style>
<Run x:Name="VideoTitleText"/>
</Hyperlink>
</TextBlock>
</Grid>
</Grid>
<Grid x:Name="UnknownContentsGrid" Grid.Row="2" Margin="5" Visibility="Visible">
<TextBlock Text="&#xE70B;" FontFamily="Segoe MDL2 Assets" FontSize="64" HorizontalAlignment="Center" VerticalAlignment="Center"/>
Expand Down
Loading

0 comments on commit 6d2a1d7

Please sign in to comment.