Added initial status info

This commit is contained in:
Craig Loewen 2024-09-18 15:20:47 -07:00
parent fa6ddbca4f
commit 9d8972201f
4 changed files with 90 additions and 44 deletions

View File

@ -71,6 +71,8 @@ namespace AdvancedPaste
viewModel = GetService<OptionsViewModel>();
UnhandledException += App_UnhandledException;
var throwAway = ShowWindow();
}
public MainWindow GetMainWindow()

View File

@ -335,7 +335,7 @@
<Grid x:Name="PromptBoxGrid" Loaded="Grid_Loaded">
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="40" />
<RowDefinition Height="60" />
</Grid.RowDefinitions>
<local:AnimatedContentControl
x:Name="Loader"

View File

@ -127,49 +127,66 @@
x:FieldModifier="public"
TabIndex="0">
<controls:PromptBox.Footer>
<StackPanel Orientation="Horizontal">
<TextBlock
Margin="0,0,2,0"
HorizontalAlignment="Left"
VerticalAlignment="Center"
Style="{StaticResource CaptionTextBlockStyle}">
<Run x:Uid="AIMistakeNote" Foreground="{ThemeResource TextFillColorSecondaryBrush}" />
</TextBlock>
<TextBlock
Margin="4,0,2,0"
HorizontalAlignment="Left"
VerticalAlignment="Center"
Style="{StaticResource CaptionTextBlockStyle}">
<Hyperlink
x:Name="TermsHyperlink"
NavigateUri="https://openai.com/policies/terms-of-use"
TabIndex="3">
<Run x:Uid="TermsLink" />
</Hyperlink>
<ToolTipService.ToolTip>
<TextBlock Text="https://openai.com/policies/terms-of-use" />
</ToolTipService.ToolTip>
</TextBlock>
<TextBlock
Margin="0,0,2,0"
HorizontalAlignment="Left"
VerticalAlignment="Center"
Style="{StaticResource CaptionTextBlockStyle}"
ToolTipService.ToolTip="">
<Run x:Uid="AIFooterSeparator" Foreground="{ThemeResource TextFillColorSecondaryBrush}">|</Run>
</TextBlock>
<TextBlock
Margin="0,0,2,0"
HorizontalAlignment="Left"
VerticalAlignment="Center"
Style="{StaticResource CaptionTextBlockStyle}">
<Hyperlink NavigateUri="https://openai.com/policies/privacy-policy" TabIndex="3">
<Run x:Uid="PrivacyLink" />
</Hyperlink>
<ToolTipService.ToolTip>
<TextBlock Text="https://openai.com/policies/privacy-policy" />
</ToolTipService.ToolTip>
</TextBlock>
<StackPanel Orientation="Vertical">
<StackPanel Orientation="Horizontal">
<TextBlock
Margin="0,0,2,0"
HorizontalAlignment="Left"
VerticalAlignment="Center"
Style="{StaticResource CaptionTextBlockStyle}">
<Run x:Uid="AIMistakeNote" Foreground="{ThemeResource TextFillColorSecondaryBrush}" />
</TextBlock>
<TextBlock
Margin="4,0,2,0"
HorizontalAlignment="Left"
VerticalAlignment="Center"
Style="{StaticResource CaptionTextBlockStyle}">
<Hyperlink
x:Name="TermsHyperlink"
NavigateUri="https://openai.com/policies/terms-of-use"
TabIndex="3">
<Run x:Uid="TermsLink" />
</Hyperlink>
<ToolTipService.ToolTip>
<TextBlock Text="https://openai.com/policies/terms-of-use" />
</ToolTipService.ToolTip>
</TextBlock>
<TextBlock
Margin="0,0,2,0"
HorizontalAlignment="Left"
VerticalAlignment="Center"
Style="{StaticResource CaptionTextBlockStyle}"
ToolTipService.ToolTip="">
<Run x:Uid="AIFooterSeparator" Foreground="{ThemeResource TextFillColorSecondaryBrush}">|</Run>
</TextBlock>
<TextBlock
Margin="0,0,2,0"
HorizontalAlignment="Left"
VerticalAlignment="Center"
Style="{StaticResource CaptionTextBlockStyle}">
<Hyperlink NavigateUri="https://openai.com/policies/privacy-policy" TabIndex="3">
<Run x:Uid="PrivacyLink" />
</Hyperlink>
<ToolTipService.ToolTip>
<TextBlock Text="https://openai.com/policies/privacy-policy" />
</ToolTipService.ToolTip>
</TextBlock>
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Margin="0 5 0 5">Available formats :</TextBlock>
<ItemsControl ItemsSource="{x:Bind ViewModel.AvailableFormatsText, Mode=OneWay}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal" />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Item1}" Margin="5,0" ToolTipService.ToolTip="{Binding Item2}" />
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</StackPanel>
</StackPanel>
</controls:PromptBox.Footer>
</controls:PromptBox>

View File

@ -284,6 +284,33 @@ namespace AdvancedPaste.ViewModels
}
}
public ObservableCollection<Tuple<string, string>> AvailableFormatsText
{
get
{
List<Tuple<ClipboardFormat, string>> formatQueryList = new()
{
new Tuple<ClipboardFormat, string>(ClipboardFormat.Text, "Text "),
new Tuple<ClipboardFormat, string>(ClipboardFormat.Html, "Html "),
new Tuple<ClipboardFormat, string>(ClipboardFormat.Audio, "Audio "),
new Tuple<ClipboardFormat, string>(ClipboardFormat.Image, "Image "),
new Tuple<ClipboardFormat, string>(ClipboardFormat.ImageFile, "ImageFile "),
};
ObservableCollection<Tuple<string, string>> returnList = new();
foreach (var formatQuery in formatQueryList)
{
if (AvailableClipboardFormats.HasFlag(formatQuery.Item1))
{
returnList.Add(new Tuple<string, string>(formatQuery.Item2, "Hello world"));
}
}
return returnList;
}
}
[ObservableProperty]
private string _customFormatResult;