mirror of
https://github.com/rmcrackan/Libation.git
synced 2026-12-04 12:42:37 +01:00
The accounts grid gains a Marketplaces button per row, enabled once the account has credentials to check with, and a dialog that asks each marketplace what it holds and lets the user tick the ones to scan. The scan picker now lists every marketplace an account reads, since one checkbox there can scan several. A marketplace that could not be reached is reported as unchecked rather than empty. Calling it empty would recreate the exact silence this feature exists to break: titles present, and nothing anywhere in the app to suggest it. Co-authored-by: rmcrackan <rmcrackan@gmail.com>
132 lines
3.7 KiB
XML
132 lines
3.7 KiB
XML
<Window xmlns="https://github.com/avaloniaui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
|
Width="800" Height="450"
|
|
xmlns:dialogs="clr-namespace:LibationAvalonia.Dialogs"
|
|
x:DataType="dialogs:AccountsDialog"
|
|
x:Class="LibationAvalonia.Dialogs.AccountsDialog"
|
|
Title="Audible Accounts">
|
|
<Grid RowDefinitions="*,Auto">
|
|
<DataGrid
|
|
Grid.Row="0"
|
|
CanUserReorderColumns="False"
|
|
CanUserResizeColumns="False"
|
|
CanUserSortColumns="False"
|
|
AutoGenerateColumns="False"
|
|
IsReadOnly="False"
|
|
Name="accountsGrid"
|
|
ItemsSource="{Binding Accounts}"
|
|
GridLinesVisibility="All">
|
|
|
|
<DataGrid.Columns>
|
|
|
|
<DataGridTemplateColumn Header="Delete">
|
|
<DataGridTemplateColumn.CellTemplate>
|
|
<DataTemplate>
|
|
|
|
<Button
|
|
Content="X"
|
|
VerticalAlignment="Stretch"
|
|
HorizontalAlignment="Stretch"
|
|
HorizontalContentAlignment="Center"
|
|
IsEnabled="{Binding !IsDefault}"
|
|
Click="DeleteButton_Clicked" />
|
|
|
|
</DataTemplate>
|
|
</DataGridTemplateColumn.CellTemplate>
|
|
</DataGridTemplateColumn>
|
|
|
|
<DataGridTemplateColumn Header="Export">
|
|
<DataGridTemplateColumn.CellTemplate>
|
|
<DataTemplate>
|
|
|
|
<Button
|
|
Content="Export"
|
|
VerticalAlignment="Stretch"
|
|
HorizontalAlignment="Stretch"
|
|
HorizontalContentAlignment="Center"
|
|
IsEnabled="{Binding CanExport}"
|
|
ToolTip.Tip="{Binding ExportButtonToolTip}"
|
|
Click="ExportButton_Clicked" />
|
|
|
|
</DataTemplate>
|
|
</DataGridTemplateColumn.CellTemplate>
|
|
</DataGridTemplateColumn>
|
|
|
|
<DataGridCheckBoxColumn
|
|
Binding="{Binding LibraryScan, Mode=TwoWay}"
|
|
Header="Include in
library scan?"/>
|
|
|
|
<DataGridTextColumn
|
|
Width="2*"
|
|
Binding="{Binding AccountId, Mode=TwoWay}"
|
|
Header="Audible
email/login"/>
|
|
|
|
<DataGridTemplateColumn Width="Auto" Header="Locale">
|
|
<DataGridTemplateColumn.CellTemplate>
|
|
<DataTemplate>
|
|
<ComboBox
|
|
MinHeight="30"
|
|
HorizontalContentAlignment = "Stretch"
|
|
HorizontalAlignment = "Stretch"
|
|
SelectedItem="{Binding SelectedLocale, Mode=TwoWay}"
|
|
ItemsSource="{Binding Locales}">
|
|
|
|
<ComboBox.ItemTemplate>
|
|
<DataTemplate>
|
|
<TextBlock ZIndex="2"
|
|
FontSize="12"
|
|
Text="{Binding Name}" />
|
|
|
|
</DataTemplate>
|
|
</ComboBox.ItemTemplate>
|
|
</ComboBox>
|
|
</DataTemplate>
|
|
</DataGridTemplateColumn.CellTemplate>
|
|
</DataGridTemplateColumn>
|
|
|
|
<DataGridTemplateColumn Width="Auto" Header="Marketplaces">
|
|
<DataGridTemplateColumn.CellTemplate>
|
|
<DataTemplate>
|
|
|
|
<Button
|
|
Content="{Binding MarketplacesButtonText}"
|
|
VerticalAlignment="Stretch"
|
|
HorizontalAlignment="Stretch"
|
|
HorizontalContentAlignment="Center"
|
|
IsEnabled="{Binding CanCheckMarketplaces}"
|
|
ToolTip.Tip="{Binding MarketplacesButtonToolTip}"
|
|
Click="MarketplacesButton_Clicked" />
|
|
|
|
</DataTemplate>
|
|
</DataGridTemplateColumn.CellTemplate>
|
|
</DataGridTemplateColumn>
|
|
|
|
<DataGridTextColumn
|
|
Width="Auto"
|
|
Binding="{Binding AccountName, Mode=TwoWay}"
|
|
Header="Account Nickname
(optional)"/>
|
|
|
|
</DataGrid.Columns>
|
|
</DataGrid>
|
|
<Grid
|
|
Grid.Row="1"
|
|
Margin="10"
|
|
ColumnDefinitions="*,Auto" >
|
|
|
|
<Button
|
|
Grid.Column="0"
|
|
Content="Import from audible-cli"
|
|
Click="ImportButton_Clicked" />
|
|
|
|
<Button
|
|
Grid.Column="1"
|
|
Classes="SaveButton"
|
|
Content="Save"
|
|
Click="SaveButton_Clicked" />
|
|
</Grid>
|
|
</Grid>
|
|
</Window>
|