Skip to content

Commit

Permalink
Merge pull request #17 from OpenSpartan/release-1.0.3
Browse files Browse the repository at this point in the history
Release 1.0.3
  • Loading branch information
dend authored Mar 9, 2024
2 parents f561ca8 + 1f50b0d commit 027c933
Show file tree
Hide file tree
Showing 46 changed files with 1,002 additions and 332 deletions.
16 changes: 10 additions & 6 deletions CURRENTRELEASE.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
# OpenSpartan Workshop 1.0.2 (`SANGHEILI-03012024`)
# OpenSpartan Workshop 1.0.3 (`ESCHARUM-03052024`)

- Application moves to Windows App SDK 1.5.
- Fixed the logic where some matches for which stats were not acquired were never re-acquired.
- Improves match acquisition performance.
- Fixes an issue where the match population process is not done if a playlist or playlist map/mode pair is not available.
- Fix an issue with the query where the map and playlist metadata was requested from the server even when it was available locally.
- [#2] Fixed a bug where the battle pass navigation was not correctly done on smaller window sizes.
- [#3] Medal name ID is now shown in medal details, so that a user can note it for SQL queries.
- [#5] Medals are now shown for each of the matches.
- User can navigate to matches where they earned medals from the match view.
- [#10] Ranked information displayed in match view and match details.
- [#12] **Battle Pass** is now listed as **Operations** in the navigation view.
- Fixed a bug where the service record might not correctly load.
- [#14] Title now correctly displays the tier and tier type.
- Onyx Cadet Grade 3 now correctly renders the large icon in the service record. Caused by Halo Infinite API game CMS misconfiguration.

Refer to [**getting started guide**](https://openspartan.com/docs/workshop/guides/get-started/) to start using OpenSpartan Workshop.
148 changes: 145 additions & 3 deletions src/OpenSpartan.Workshop/App.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,156 @@
<Application
x:Class="OpenSpartan.Workshop.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:converters="using:OpenSpartan.Workshop.Converters">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<XamlControlsResources xmlns="using:Microsoft.UI.Xaml.Controls" />
<!-- Other merged dictionaries here -->
</ResourceDictionary.MergedDictionaries>
<!-- Other app resources here -->

<Style x:Key="MonospaceTextStyle" TargetType="TextBlock">
<Setter Property="FontFamily" Value="Consolas"/>
</Style>

<Style x:Key="ScrollButtonStyle" TargetType="Button">
<Setter Property="Background" Value="{ThemeResource FlipViewNextPreviousButtonBackground}" />
<Setter Property="BackgroundSizing" Value="InnerBorderEdge" />
<Setter Property="Foreground" Value="{ThemeResource ButtonForeground}" />
<Setter Property="BorderBrush" Value="{ThemeResource FlipViewNextPreviousButtonBorderBrush}" />
<Setter Property="BorderThickness" Value="{ThemeResource FlipViewButtonBorderThemeThickness}" />
<Setter Property="Padding" Value="0" />
<Setter Property="HorizontalAlignment" Value="Left" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="FontFamily" Value="{ThemeResource ContentControlThemeFontFamily}" />
<Setter Property="FontWeight" Value="Normal" />
<Setter Property="FontSize" Value="{ThemeResource ControlContentThemeFontSize}" />
<Setter Property="UseSystemFocusVisuals" Value="{StaticResource UseSystemFocusVisuals}" />
<Setter Property="FocusVisualMargin" Value="-3" />
<Setter Property="CornerRadius" Value="{ThemeResource ControlCornerRadius}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<ContentPresenter
x:Name="ContentPresenter"
Padding="{TemplateBinding Padding}"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
AnimatedIcon.State="Normal"
AutomationProperties.AccessibilityView="Raw"
Background="{TemplateBinding Background}"
BackgroundSizing="{TemplateBinding BackgroundSizing}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
Content="{TemplateBinding Content}"
ContentTemplate="{TemplateBinding ContentTemplate}"
ContentTransitions="{TemplateBinding ContentTransitions}"
CornerRadius="{TemplateBinding CornerRadius}">
<ContentPresenter.BackgroundTransition>
<BrushTransition Duration="0:0:0.083" />
</ContentPresenter.BackgroundTransition>

<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal" />

<VisualState x:Name="PointerOver">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Background">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource FlipViewNextPreviousButtonBackgroundPointerOver}" />
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="BorderBrush">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource FlipViewNextPreviousButtonBorderBrushPointerOver}" />
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource FlipViewNextPreviousArrowForegroundPointerOver}" />
</ObjectAnimationUsingKeyFrames>
</Storyboard>
<VisualState.Setters>
<Setter Target="ContentPresenter.(AnimatedIcon.State)" Value="PointerOver" />
</VisualState.Setters>
</VisualState>

<VisualState x:Name="Pressed">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Background">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource FlipViewNextPreviousButtonBackgroundPressed}" />
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="BorderBrush">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource FlipViewNextPreviousButtonBorderBrushPressed}" />
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource FlipViewNextPreviousArrowForegroundPressed}" />
</ObjectAnimationUsingKeyFrames>
</Storyboard>
<VisualState.Setters>
<Setter Target="ContentPresenter.(AnimatedIcon.State)" Value="Pressed" />
</VisualState.Setters>
</VisualState>

<VisualState x:Name="Disabled">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Background">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ButtonBackgroundDisabled}" />
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="BorderBrush">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ButtonBorderBrushDisabled}" />
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ButtonForegroundDisabled}" />
</ObjectAnimationUsingKeyFrames>
</Storyboard>
<VisualState.Setters>
<!-- DisabledVisual Should be handled by the control, not the animated icon. -->
<Setter Target="ContentPresenter.(AnimatedIcon.State)" Value="Normal" />
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
</ContentPresenter>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>

<ResourceDictionary x:Key="ThemeDictionary">
<ResourceDictionary.ThemeDictionaries>
<ResourceDictionary x:Key="Light">
<SolidColorBrush x:Key="myBrush" Color="{StaticResource SystemBaseHighColor}" />
<AcrylicBrush x:Key="NavigationViewExpandedPaneBackground"
TintColor="White"
TintOpacity="0.8"
FallbackColor="#F2F2F2" />
</ResourceDictionary>
<ResourceDictionary x:Key="Dark">
<SolidColorBrush x:Key="myBrush" Color="{StaticResource SystemBaseHighColor}" />
<AcrylicBrush x:Key="NavigationViewExpandedPaneBackground"
TintColor="#1F1F1F"
TintOpacity="1"
FallbackColor="#1F1F1F" />
</ResourceDictionary>
<ResourceDictionary x:Key="HighContrast">
<SolidColorBrush x:Key="myBrush" Color="{ThemeResource SystemColorButtonFaceColor}"/>
</ResourceDictionary>
</ResourceDictionary.ThemeDictionaries>
</ResourceDictionary>

<converters:ServicePathToLocalPathConverter x:Key="ServicePathToLocalPathConverter"/>
<converters:RankToVisibilityConverter x:Key="RankToVisibilityConverter"/>
<converters:DoubleToPercentageStringConverter x:Key="DoubleToPercentageStringConverter"/>
<converters:DirectValueToPercentageStringConverter x:Key="DirectValueToPercentageStringConverter"/>
<converters:ComplexTimeToSimpleTimeConverter x:Key="ComplexTimeToSimpleTimeConverter"/>
<converters:MedalTypeIndexToStringConverter x:Key="MedalTypeIndexToStringConverter"/>
<converters:CommaAfterThousandsConverter x:Key="CommaAfterThousandsConverter"/>
<converters:MedalDifficultyToBrushConverter x:Key="MedalDifficultyToBrushConverter"/>
<converters:BoolNegativeConverter x:Key="BoolNegativeConverter"/>
<converters:BoolToDisabledBrushConverter x:Key="BoolToDisabledBrushConverter"/>
<converters:MedalNameIdToPathConverter x:Key="MedalNameIdToPathConverter"/>
<converters:MetadataLoadingStateToVisibilityConverter x:Key="MetadataLoadingStateToVisibilityConverter"/>
<converters:OutcomeToBackgroundConverter x:Key="OutcomeToBackgroundConverter"/>
<converters:OutcomeToForegroundConverter x:Key="OutcomeToForegroundConverter"/>
<converters:PerformanceToGlyphConverter x:Key="PerformanceToGlyphConverter"/>
<converters:PerformanceToColorConverter x:Key="PerformanceToColorConverter"/>
</ResourceDictionary>
</Application.Resources>
</Application>
1 change: 0 additions & 1 deletion src/OpenSpartan.Workshop/App.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using Microsoft.UI.Xaml;
using NLog;
using OpenSpartan.Workshop.Core;
using OpenSpartan.Workshop.Shared;
using OpenSpartan.Workshop.ViewModels;
using System;
using System.IO;
Expand Down
80 changes: 80 additions & 0 deletions src/OpenSpartan.Workshop/Controls/AutoClosingTeachingTip.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
using Microsoft.UI.Xaml;
using System;

namespace OpenSpartan.Workshop.Controls
{
public class AutoClosingTeachingTip : Microsoft.UI.Xaml.Controls.TeachingTip
{
private DispatcherTimer _timer;
private long _token;

public AutoClosingTeachingTip() : base()
{
this.Loaded += AutoCloseTeachingTip_Loaded;
this.Unloaded += AutoCloseTeachingTip_Unloaded;
}

public int AutoCloseInterval { get; set; } = 5000;

private void AutoCloseTeachingTip_Loaded(object sender, RoutedEventArgs e)
{
_token = this.RegisterPropertyChangedCallback(IsOpenProperty, IsOpenChanged);
if (IsOpen)
{
Open();
}
}

private void AutoCloseTeachingTip_Unloaded(object sender, RoutedEventArgs e)
{
this.UnregisterPropertyChangedCallback(IsOpenProperty, _token);
}

private void IsOpenChanged(DependencyObject dependencyObject, DependencyProperty dependencyProperty)
{
var tip = dependencyObject as AutoClosingTeachingTip;
if (tip == null)
{
return;
}

if (dependencyProperty != IsOpenProperty)
{
return;
}

if (tip.IsOpen)
{
tip.Open();
}
else
{
tip.Close();
}
}

private void Open()
{
_timer = new DispatcherTimer();
_timer.Tick += Timer_Tick;
_timer.Interval = TimeSpan.FromMilliseconds(AutoCloseInterval);
_timer.Start();
}

private void Close()
{
if (_timer == null)
{
return;
}

_timer.Stop();
_timer.Tick -= Timer_Tick;
}

private void Timer_Tick(object sender, object e)
{
this.IsOpen = false;
}
}
}
Loading

0 comments on commit 027c933

Please sign in to comment.