Improved OCI UX

This commit is contained in:
Assistant 2020-06-22 00:17:30 -06:00
parent 7ff93ec823
commit c92da4c012
4 changed files with 30 additions and 2 deletions

View file

@ -28,6 +28,11 @@ namespace ModAssistant
await Playlist(uri);
break;
}
if (App.OCIWindow != "No")
{
Status.StopRotation();
API.Utils.SetMessage((string)Application.Current.FindResource("OneClick:Done"));
}
if (App.OCIWindow == "Close")
{
await Task.Delay(3000);

View file

@ -226,6 +226,7 @@
<sys:String x:Key="OneClick:RatelimitSkip">Max tries reached: Skipping {0}</sys:String>
<sys:String x:Key="OneClick:RatelimitHit">Ratelimit hit. Resuming in {0}</sys:String>
<sys:String x:Key="OneClick:Failed">Download failed: {0}</sys:String>
<sys:String x:Key="OneClick:Done">Done'd</sys:String>
<!-- Themes Class -->
<sys:String x:Key="Themes:ThemeNotFound">Theme not found, reverting to default theme...</sys:String>

View file

@ -61,6 +61,7 @@
Source="{DynamicResource loadingMiddleDrawingImage}"
Stretch="Uniform" />
<Image
Name="Ring"
Grid.Row="0"
Margin="60,0"
VerticalAlignment="Center"
@ -70,11 +71,26 @@
</Grid>
<Grid Grid.Row="1">
<Grid.RowDefinitions>
<RowDefinition Height="auto" />
<RowDefinition Height="*" />
<RowDefinition Height="auto" />
</Grid.RowDefinitions>
<Border
Grid.Row="0"
Height="40"
Margin="10,0,10,10"
VerticalAlignment="Bottom"
BorderBrush="{DynamicResource BottomStatusBarOutline}"
BorderThickness="1">
<TextBlock
Name="MainTextBlock"
Padding="5"
Background="{DynamicResource BottomStatusBarBackground}"
FontSize="20" />
</Border>
<Border
Grid.Row="1"
Margin="10,0,10,10"
BorderBrush="{DynamicResource BottomStatusBarOutline}"
BorderThickness="1">

View file

@ -26,12 +26,13 @@ namespace ModAssistant
{
get
{
return HistoryTextBlock.Text;
return MainTextBlock.Text;
}
set
{
Dispatcher.Invoke(new Action(() => {
OneClickStatus.Instance.HistoryTextBlock.Text = string.IsNullOrEmpty(MainText) ? $"{value}" : $"{value}\n{MainText}";
OneClickStatus.Instance.MainTextBlock.Text = value;
OneClickStatus.Instance.HistoryTextBlock.Text = string.IsNullOrEmpty(MainText) ? $"{value}" : $"{value}\n{HistoryText}";
}));
}
}
@ -41,6 +42,11 @@ namespace ModAssistant
InitializeComponent();
Instance = App.OCIWindow != "No" ? this : null;
}
public void StopRotation()
{
Ring.Style = null;
}
}
[ValueConversion(typeof(double), typeof(double))]