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>(); viewModel = GetService<OptionsViewModel>();
UnhandledException += App_UnhandledException; UnhandledException += App_UnhandledException;
var throwAway = ShowWindow();
} }
public MainWindow GetMainWindow() public MainWindow GetMainWindow()

View File

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

View File

@ -127,49 +127,66 @@
x:FieldModifier="public" x:FieldModifier="public"
TabIndex="0"> TabIndex="0">
<controls:PromptBox.Footer> <controls:PromptBox.Footer>
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Vertical">
<TextBlock <StackPanel Orientation="Horizontal">
Margin="0,0,2,0" <TextBlock
HorizontalAlignment="Left" Margin="0,0,2,0"
VerticalAlignment="Center" HorizontalAlignment="Left"
Style="{StaticResource CaptionTextBlockStyle}"> VerticalAlignment="Center"
<Run x:Uid="AIMistakeNote" Foreground="{ThemeResource TextFillColorSecondaryBrush}" /> Style="{StaticResource CaptionTextBlockStyle}">
</TextBlock> <Run x:Uid="AIMistakeNote" Foreground="{ThemeResource TextFillColorSecondaryBrush}" />
<TextBlock </TextBlock>
Margin="4,0,2,0" <TextBlock
HorizontalAlignment="Left" Margin="4,0,2,0"
VerticalAlignment="Center" HorizontalAlignment="Left"
Style="{StaticResource CaptionTextBlockStyle}"> VerticalAlignment="Center"
<Hyperlink Style="{StaticResource CaptionTextBlockStyle}">
x:Name="TermsHyperlink" <Hyperlink
NavigateUri="https://openai.com/policies/terms-of-use" x:Name="TermsHyperlink"
TabIndex="3"> NavigateUri="https://openai.com/policies/terms-of-use"
<Run x:Uid="TermsLink" /> TabIndex="3">
</Hyperlink> <Run x:Uid="TermsLink" />
<ToolTipService.ToolTip> </Hyperlink>
<TextBlock Text="https://openai.com/policies/terms-of-use" /> <ToolTipService.ToolTip>
</ToolTipService.ToolTip> <TextBlock Text="https://openai.com/policies/terms-of-use" />
</TextBlock> </ToolTipService.ToolTip>
<TextBlock </TextBlock>
Margin="0,0,2,0" <TextBlock
HorizontalAlignment="Left" Margin="0,0,2,0"
VerticalAlignment="Center" HorizontalAlignment="Left"
Style="{StaticResource CaptionTextBlockStyle}" VerticalAlignment="Center"
ToolTipService.ToolTip=""> Style="{StaticResource CaptionTextBlockStyle}"
<Run x:Uid="AIFooterSeparator" Foreground="{ThemeResource TextFillColorSecondaryBrush}">|</Run> ToolTipService.ToolTip="">
</TextBlock> <Run x:Uid="AIFooterSeparator" Foreground="{ThemeResource TextFillColorSecondaryBrush}">|</Run>
<TextBlock </TextBlock>
Margin="0,0,2,0" <TextBlock
HorizontalAlignment="Left" Margin="0,0,2,0"
VerticalAlignment="Center" HorizontalAlignment="Left"
Style="{StaticResource CaptionTextBlockStyle}"> VerticalAlignment="Center"
<Hyperlink NavigateUri="https://openai.com/policies/privacy-policy" TabIndex="3"> Style="{StaticResource CaptionTextBlockStyle}">
<Run x:Uid="PrivacyLink" /> <Hyperlink NavigateUri="https://openai.com/policies/privacy-policy" TabIndex="3">
</Hyperlink> <Run x:Uid="PrivacyLink" />
<ToolTipService.ToolTip> </Hyperlink>
<TextBlock Text="https://openai.com/policies/privacy-policy" /> <ToolTipService.ToolTip>
</ToolTipService.ToolTip> <TextBlock Text="https://openai.com/policies/privacy-policy" />
</TextBlock> </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> </StackPanel>
</controls:PromptBox.Footer> </controls:PromptBox.Footer>
</controls:PromptBox> </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] [ObservableProperty]
private string _customFormatResult; private string _customFormatResult;