New UI (not wired up)
This commit is contained in:
@@ -21,7 +21,13 @@ public partial class BoolToVisibilityConverter : MarkupExtension, IValueConverte
|
||||
flag = boolValue;
|
||||
}
|
||||
|
||||
if (IsInverted)
|
||||
var parameterInverted = false;
|
||||
if (parameter is string paramStr && bool.TryParse(paramStr, out var result))
|
||||
{
|
||||
parameterInverted = result;
|
||||
}
|
||||
|
||||
if (IsInverted || parameterInverted)
|
||||
{
|
||||
flag = !flag;
|
||||
}
|
||||
|
||||
@@ -213,9 +213,6 @@
|
||||
<data name="SettingsDNSSettingsPageTitle.Text" xml:space="preserve">
|
||||
<value>DNS Settings</value>
|
||||
</data>
|
||||
<data name="SubsSettingsPageNavPaneTitle.Content" xml:space="preserve">
|
||||
<value>Subscriptions and servers</value>
|
||||
</data>
|
||||
<data name="ConfigSettingsPageNavPaneTitle.Content" xml:space="preserve">
|
||||
<value>Configs settings</value>
|
||||
</data>
|
||||
@@ -273,4 +270,67 @@
|
||||
<data name="ErrorDialog.Title" xml:space="preserve">
|
||||
<value>Error occurred:</value>
|
||||
</data>
|
||||
<data name="ServerListElementMenuFlyoutEdit.Text" xml:space="preserve">
|
||||
<value>Edit name</value>
|
||||
</data>
|
||||
<data name="ServerListElementMenuFlyoutIsDisabled.Text" xml:space="preserve">
|
||||
<value>Disable server</value>
|
||||
</data>
|
||||
<data name="ServerListElementMenuFlyoutDelete.Text" xml:space="preserve">
|
||||
<value>Delete server</value>
|
||||
</data>
|
||||
<data name="ServerListElementTitleTextBox.PlaceholderText" xml:space="preserve">
|
||||
<value>New title...</value>
|
||||
</data>
|
||||
<data name="ServerListElementMenuFlyoutSave.Text" xml:space="preserve">
|
||||
<value>Save name</value>
|
||||
</data>
|
||||
<data name="SubsSettingsCommandAddSub.Label" xml:space="preserve">
|
||||
<value>Add subscription</value>
|
||||
</data>
|
||||
<data name="SubsSettingsCommandSelSub.Label" xml:space="preserve">
|
||||
<value>Select subscriptions</value>
|
||||
</data>
|
||||
<data name="SubsSettingsCommandSelServ.Label" xml:space="preserve">
|
||||
<value>Select servers</value>
|
||||
</data>
|
||||
<data name="SubsSettingsCommandSelAll.Label" xml:space="preserve">
|
||||
<value>Select all</value>
|
||||
</data>
|
||||
<data name="SubsSettingsCommandCommandEnable.Label" xml:space="preserve">
|
||||
<value>Enable selected</value>
|
||||
</data>
|
||||
<data name="SubsSettingsCommandCommandDisable.Label" xml:space="preserve">
|
||||
<value>Disable selected</value>
|
||||
</data>
|
||||
<data name="SubsSettingsCommandCommandDelete.Label" xml:space="preserve">
|
||||
<value>Delete selected</value>
|
||||
</data>
|
||||
<data name="SubsSettingsPageNavPaneTitle.Content" xml:space="preserve">
|
||||
<value>Subscriptions and servers</value>
|
||||
</data>
|
||||
<data name="SubsSettingsCommandAddServLink.Label" xml:space="preserve">
|
||||
<value>Add server</value>
|
||||
</data>
|
||||
<data name="SubsSettingsCommandTabSubs.Header" xml:space="preserve">
|
||||
<value>Subscriptons</value>
|
||||
</data>
|
||||
<data name="SubsSettingsCommandTabServ.Header" xml:space="preserve">
|
||||
<value>Server</value>
|
||||
</data>
|
||||
<data name="SubsSettingsEmtpyText.Text" xml:space="preserve">
|
||||
<value>Nothing here...</value>
|
||||
</data>
|
||||
<data name="SubsSettingsCommandAddServFile.Label" xml:space="preserve">
|
||||
<value>Import config</value>
|
||||
</data>
|
||||
<data name="SubscriptionListElementTitleTextBox.PlaceholderText" xml:space="preserve">
|
||||
<value>New title...</value>
|
||||
</data>
|
||||
<data name="SubscriptionListElementMenuFlyoutDelete.Text" xml:space="preserve">
|
||||
<value>Delete subscription</value>
|
||||
</data>
|
||||
<data name="SubscriptionListElementMenuFlyoutIsDisabled.Text" xml:space="preserve">
|
||||
<value>Disable subscription</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -213,9 +213,6 @@
|
||||
<data name="SettingsDNSSettingsPageTitle.Text" xml:space="preserve">
|
||||
<value>Настройки DNS</value>
|
||||
</data>
|
||||
<data name="SubsSettingsPageNavPaneTitle.Content" xml:space="preserve">
|
||||
<value>Подписки и сервера</value>
|
||||
</data>
|
||||
<data name="ConfigSettingsPageNavPaneTitle.Content" xml:space="preserve">
|
||||
<value>Конфигурации</value>
|
||||
</data>
|
||||
@@ -273,4 +270,67 @@
|
||||
<data name="ErrorDialog.Title" xml:space="preserve">
|
||||
<value>Произошла ошибка:</value>
|
||||
</data>
|
||||
<data name="ServerListElementMenuFlyoutEdit.Text" xml:space="preserve">
|
||||
<value>Изменить имя</value>
|
||||
</data>
|
||||
<data name="ServerListElementMenuFlyoutIsDisabled.Text" xml:space="preserve">
|
||||
<value>Выключить сервер</value>
|
||||
</data>
|
||||
<data name="ServerListElementMenuFlyoutDelete.Text" xml:space="preserve">
|
||||
<value>Удалить сервер</value>
|
||||
</data>
|
||||
<data name="ServerListElementTitleTextBox.PlaceholderText" xml:space="preserve">
|
||||
<value>Новое название</value>
|
||||
</data>
|
||||
<data name="ServerListElementMenuFlyoutSave.Text" xml:space="preserve">
|
||||
<value>Сохранить имя</value>
|
||||
</data>
|
||||
<data name="SubsSettingsCommandAddSub.Label" xml:space="preserve">
|
||||
<value>Добавить подписку</value>
|
||||
</data>
|
||||
<data name="SubsSettingsCommandSelSub.Label" xml:space="preserve">
|
||||
<value>Выбрать подписки</value>
|
||||
</data>
|
||||
<data name="SubsSettingsCommandSelServ.Label" xml:space="preserve">
|
||||
<value>Выбрать сервера</value>
|
||||
</data>
|
||||
<data name="SubsSettingsCommandSelAll.Label" xml:space="preserve">
|
||||
<value>Выбрать всё</value>
|
||||
</data>
|
||||
<data name="SubsSettingsCommandCommandEnable.Label" xml:space="preserve">
|
||||
<value>Включить выбранные</value>
|
||||
</data>
|
||||
<data name="SubsSettingsCommandCommandDisable.Label" xml:space="preserve">
|
||||
<value>Отключить выбранные</value>
|
||||
</data>
|
||||
<data name="SubsSettingsCommandCommandDelete.Label" xml:space="preserve">
|
||||
<value>Удалить выбранные</value>
|
||||
</data>
|
||||
<data name="SubsSettingsPageNavPaneTitle.Content" xml:space="preserve">
|
||||
<value>Подписки и сервера</value>
|
||||
</data>
|
||||
<data name="SubsSettingsCommandAddServLink.Label" xml:space="preserve">
|
||||
<value>Добавить сервер</value>
|
||||
</data>
|
||||
<data name="SubsSettingsCommandTabSubs.Header" xml:space="preserve">
|
||||
<value>Подписки</value>
|
||||
</data>
|
||||
<data name="SubsSettingsCommandTabServ.Header" xml:space="preserve">
|
||||
<value>Сервера</value>
|
||||
</data>
|
||||
<data name="SubsSettingsEmtpyText.Text" xml:space="preserve">
|
||||
<value>Здесь пусто...</value>
|
||||
</data>
|
||||
<data name="SubsSettingsCommandAddServFile.Label" xml:space="preserve">
|
||||
<value>Импортировать файл</value>
|
||||
</data>
|
||||
<data name="SubscriptionListElementTitleTextBox.PlaceholderText" xml:space="preserve">
|
||||
<value>Новое имя...</value>
|
||||
</data>
|
||||
<data name="SubscriptionListElementMenuFlyoutDelete.Text" xml:space="preserve">
|
||||
<value>Удалить подписку</value>
|
||||
</data>
|
||||
<data name="SubscriptionListElementMenuFlyoutIsDisabled.Text" xml:space="preserve">
|
||||
<value>Выключить подписку</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -10,6 +10,7 @@
|
||||
xmlns:w="using:WinWARP.Core.ViewModels.Wrappers"
|
||||
xmlns:conv="using:WinWARP.Ui.Converters"
|
||||
xmlns:h="using:WinWARP.Ui.Helpers"
|
||||
xmlns:u="using:WinUI3Localizer"
|
||||
Height="64" Width="300"
|
||||
mc:Ignorable="d">
|
||||
|
||||
@@ -23,17 +24,30 @@
|
||||
<StackPanel>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
<conv:BoolToVisibilityConverter x:Key="BoolToVisConverter" />
|
||||
</UserControl.Resources>
|
||||
<UserControl.ContextFlyout>
|
||||
<MenuFlyout x:Name="ServerListFlyout">
|
||||
<MenuFlyoutItem Text="Option 1"/>
|
||||
<MenuFlyoutItem Text="Option 2"/>
|
||||
<MenuFlyout x:Name="ServerListFlyout" >
|
||||
<MenuFlyoutItem Command="{x:Bind ServerData.EditNameCommand, Mode=OneWay}" u:Uids.Uid="{x:Bind GetUidForNameEditing(ServerData.IsNameEditing), Mode=OneWay}">
|
||||
<MenuFlyoutItem.Icon>
|
||||
<FontIcon Glyph="{x:Bind GetGlyphForNameEditing(ServerData.IsNameEditing), Mode=OneWay}" />
|
||||
</MenuFlyoutItem.Icon>
|
||||
</MenuFlyoutItem>
|
||||
<ToggleMenuFlyoutItem u:Uids.Uid="ServerListElementMenuFlyoutIsDisabled" IsChecked="{x:Bind ServerData.IsDisabled, Mode=TwoWay}">
|
||||
<ToggleMenuFlyoutItem.Icon>
|
||||
<FontIcon Glyph="" />
|
||||
</ToggleMenuFlyoutItem.Icon>
|
||||
</ToggleMenuFlyoutItem>
|
||||
<MenuFlyoutSeparator/>
|
||||
<MenuFlyoutItem u:Uids.Uid="ServerListElementMenuFlyoutDelete" Command="{x:Bind ServerData.DeleteCommand}">
|
||||
<MenuFlyoutItem.Icon>
|
||||
<FontIcon Glyph="" />
|
||||
</MenuFlyoutItem.Icon>
|
||||
</MenuFlyoutItem>
|
||||
</MenuFlyout>
|
||||
</UserControl.ContextFlyout>
|
||||
|
||||
<Grid MaxHeight="64"
|
||||
Background="{ThemeResource CardBackgroundFillColorDefaultBrush}"
|
||||
CornerRadius="4">
|
||||
<Grid MaxHeight="64" Background="{ThemeResource CardBackgroundFillColorDefaultBrush}" CornerRadius="4">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="64"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
@@ -57,10 +71,11 @@
|
||||
<Rectangle Grid.Column="1" Grid.Row="1" Fill="Beige"/>
|
||||
<Rectangle Grid.Column="1" Grid.Row="2" Fill="Brown"/>-->
|
||||
<StackPanel Grid.Column="1">
|
||||
<TextBlock Text="{x:Bind Title(ServerData), Mode=OneWay}" Style="{StaticResource BodyTextBlockStyle}"/>
|
||||
<TextBox Text="{x:Bind ServerData.Title, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" u:Uids.Uid="ServerListElementTitleTextBox" Style="{StaticResource BodyTextBlockStyle}" Visibility="{x:Bind ServerData.IsNameEditing, Converter={StaticResource BoolToVisConverter}, Mode=OneWay}"/>
|
||||
<TextBlock Text="{x:Bind GetTitle(ServerData), Mode=OneWay}" Style="{StaticResource BodyTextBlockStyle}" Visibility="{x:Bind ServerData.IsNameEditing, Converter={StaticResource BoolToVisConverter}, ConverterParameter=True, Mode=OneWay}"/>
|
||||
<TextBlock Text="{x:Bind ServerData.DefaultTitle, Mode=OneWay}" Style="{StaticResource CaptionTextBlockStyle}" Visibility="{x:Bind IsNotDefaultTitle(ServerData), Mode=OneWay}"/>
|
||||
</StackPanel>
|
||||
<Button Grid.Column="2" Height="24" Width="24" Padding="0" Margin="4" VerticalAlignment="Top" Click="MenuButton_Click">
|
||||
<Button Grid.RowSpan="2" Grid.Column="2" Height="20" Width="20" Padding="0" Margin="4" VerticalAlignment="Bottom" Click="MenuButton_Click">
|
||||
<FontIcon Glyph="" FontSize="10"/>
|
||||
</Button>
|
||||
<ItemsView Grid.Column="1" Grid.Row="1" ItemsSource="{x:Bind ServerData.Tags, Mode=OneWay}" VerticalAlignment="Center" SelectionMode="None">
|
||||
|
||||
@@ -27,7 +27,7 @@ public sealed partial class ServerListElement : UserControl
|
||||
|
||||
public static readonly DependencyProperty ServerDataProperty =
|
||||
DependencyProperty.Register(nameof(ServerData), typeof(ServerItemViewModel),
|
||||
typeof(ServerListElement), new PropertyMetadata(null));
|
||||
typeof(ServerListElement), new PropertyMetadata(null, OnServerDataChanged));
|
||||
|
||||
public ServerItemViewModel ServerData
|
||||
{
|
||||
@@ -35,7 +35,7 @@ public sealed partial class ServerListElement : UserControl
|
||||
set => SetValue(ServerDataProperty, value);
|
||||
}
|
||||
|
||||
public string Title(ServerItemViewModel serverData) => string.IsNullOrEmpty(serverData?.Title) ? (string.IsNullOrEmpty(serverData?.DefaultTitle) ? string.Empty : serverData.DefaultTitle) : serverData.Title;
|
||||
public string GetTitle(ServerItemViewModel serverData) => string.IsNullOrEmpty(serverData?.Title) ? (string.IsNullOrEmpty(serverData?.DefaultTitle) ? string.Empty : serverData.DefaultTitle) : serverData.Title;
|
||||
|
||||
public Visibility IsNotDefaultTitle(ServerItemViewModel serverData) => (!string.IsNullOrEmpty(serverData?.Title) && serverData?.Title != serverData?.DefaultTitle) ? Visibility.Visible : Visibility.Collapsed;
|
||||
|
||||
@@ -80,4 +80,28 @@ public sealed partial class ServerListElement : UserControl
|
||||
ServerListFlyout.ShowAt(button, options);
|
||||
}
|
||||
}
|
||||
|
||||
private static void OnServerDataChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
||||
{
|
||||
var control = (ServerListElement)d;
|
||||
if (e.OldValue is ServerItemViewModel oldVM) oldVM.PropertyChanged -= control.OnServerItemPropertyChanged;
|
||||
if (e.NewValue is ServerItemViewModel newVM) newVM.PropertyChanged += control.OnServerItemPropertyChanged;
|
||||
}
|
||||
|
||||
private void OnServerItemPropertyChanged(object sender, PropertyChangedEventArgs e)
|
||||
{
|
||||
if (e.PropertyName == nameof(ServerItemViewModel.Title)) Bindings.Update();
|
||||
}
|
||||
|
||||
private string GetUidForNameEditing(bool isNameEditing)
|
||||
{
|
||||
if (isNameEditing) return "ServerListElementMenuFlyoutSave";
|
||||
else return "ServerListElementMenuFlyoutEdit";
|
||||
}
|
||||
|
||||
private string GetGlyphForNameEditing(bool isNameEditing)
|
||||
{
|
||||
if (isNameEditing) return "\uE792";
|
||||
else return "\uE70F";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,29 +6,147 @@
|
||||
xmlns:local="using:WinWARP.Ui.Views"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:com="using:CommunityToolkit.WinUI.Controls"
|
||||
xmlns:conv="using:WinWARP.Ui.Converters"
|
||||
xmlns:c="using:WinWARP.Ui.Views.Components"
|
||||
xmlns:vm="using:WinWARP.Core.ViewModels"
|
||||
xmlns:w="using:WinWARP.Core.ViewModels.Wrappers"
|
||||
xmlns:u="using:WinUI3Localizer"
|
||||
|
||||
mc:Ignorable="d">
|
||||
|
||||
<ScrollView>
|
||||
<StackPanel>
|
||||
<Button Command="{x:Bind ViewModel.AddSubscriptionCommand}" Content="Add Subscription"/>
|
||||
<GridView ItemsSource="{x:Bind ViewModel.Servers}" SelectionMode="None">
|
||||
<GridView.ItemContainerStyle>
|
||||
<Style TargetType="GridViewItem" BasedOn="{StaticResource DefaultGridViewItemStyle}">
|
||||
<Setter Property="Margin" Value="6"/>
|
||||
</Style>
|
||||
</GridView.ItemContainerStyle>
|
||||
<Page.Resources>
|
||||
<conv:BoolToVisibilityConverter x:Key="BoolToVisConverter" />
|
||||
</Page.Resources>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<com:TabbedCommandBar Margin="8,0">
|
||||
<com:TabbedCommandBar.PaneFooter>
|
||||
<CommandBar Background="Transparent" DefaultLabelPosition="Right">
|
||||
<AppBarButton u:Uids.Uid="SubsSettingsCommandCommandEnable">
|
||||
<AppBarButton.Icon>
|
||||
<FontIcon Glyph="" />
|
||||
</AppBarButton.Icon>
|
||||
</AppBarButton>
|
||||
<AppBarButton u:Uids.Uid="SubsSettingsCommandCommandDisable">
|
||||
<AppBarButton.Icon>
|
||||
<FontIcon Glyph="" />
|
||||
</AppBarButton.Icon>
|
||||
</AppBarButton>
|
||||
<AppBarButton u:Uids.Uid="SubsSettingsCommandCommandDelete">
|
||||
<AppBarButton.Icon>
|
||||
<FontIcon Glyph="" />
|
||||
</AppBarButton.Icon>
|
||||
</AppBarButton>
|
||||
</CommandBar>
|
||||
</com:TabbedCommandBar.PaneFooter>
|
||||
<com:TabbedCommandBar.MenuItems>
|
||||
<com:TabbedCommandBarItem u:Uids.Uid="SubsSettingsCommandTabSubs">
|
||||
<AppBarButton u:Uids.Uid="SubsSettingsCommandAddSub" Command="{x:Bind ViewModel.AddSubscriptionCommand}">
|
||||
<AppBarButton.Icon>
|
||||
<FontIcon Glyph="" />
|
||||
</AppBarButton.Icon>
|
||||
</AppBarButton>
|
||||
<AppBarSeparator/>
|
||||
<AppBarToggleButton u:Uids.Uid="SubsSettingsCommandSelSub">
|
||||
<AppBarToggleButton.Icon>
|
||||
<FontIcon Glyph="" />
|
||||
</AppBarToggleButton.Icon>
|
||||
</AppBarToggleButton>
|
||||
<AppBarButton u:Uids.Uid="SubsSettingsCommandSelAll">
|
||||
<AppBarButton.Icon>
|
||||
<FontIcon Glyph="" />
|
||||
</AppBarButton.Icon>
|
||||
</AppBarButton>
|
||||
</com:TabbedCommandBarItem>
|
||||
<com:TabbedCommandBarItem u:Uids.Uid="SubsSettingsCommandTabServ">
|
||||
<AppBarButton u:Uids.Uid="SubsSettingsCommandAddServLink">
|
||||
<AppBarButton.Icon>
|
||||
<FontIcon Glyph="" />
|
||||
</AppBarButton.Icon>
|
||||
</AppBarButton>
|
||||
<AppBarButton u:Uids.Uid="SubsSettingsCommandAddServFile">
|
||||
<AppBarButton.Icon>
|
||||
<FontIcon Glyph="" />
|
||||
</AppBarButton.Icon>
|
||||
</AppBarButton>
|
||||
<AppBarSeparator/>
|
||||
<AppBarToggleButton u:Uids.Uid="SubsSettingsCommandSelServ">
|
||||
<AppBarToggleButton.Icon>
|
||||
<FontIcon Glyph="" />
|
||||
</AppBarToggleButton.Icon>
|
||||
</AppBarToggleButton>
|
||||
<AppBarButton u:Uids.Uid="SubsSettingsCommandSelAll">
|
||||
<AppBarButton.Icon>
|
||||
<FontIcon Glyph="" />
|
||||
</AppBarButton.Icon>
|
||||
</AppBarButton>
|
||||
</com:TabbedCommandBarItem>
|
||||
</com:TabbedCommandBar.MenuItems>
|
||||
</com:TabbedCommandBar>
|
||||
|
||||
<GridView.ItemTemplate>
|
||||
<DataTemplate x:DataType="vm:ServerItemViewModel">
|
||||
<c:ServerListElement ServerData="{x:Bind}"/>
|
||||
</DataTemplate>
|
||||
</GridView.ItemTemplate>
|
||||
</GridView>
|
||||
<ProgressRing IsActive="{x:Bind ViewModel.ShowLoadingIndicator, Mode=OneWay}"/>
|
||||
</StackPanel>
|
||||
|
||||
</ScrollView>
|
||||
<ScrollView Grid.Row="1" CornerRadius="4">
|
||||
<ItemsView ItemsSource="{x:Bind ViewModel.Subscriptions}" SelectionMode="Multiple" HorizontalAlignment="Stretch">
|
||||
<ItemsView.Layout>
|
||||
<StackLayout/>
|
||||
</ItemsView.Layout>
|
||||
<ItemsView.ItemTemplate>
|
||||
<DataTemplate x:DataType="w:SubscriptionViewModel">
|
||||
<ItemContainer Margin="8,8,8,0" Background="{ThemeResource CardBackgroundFillColorDefaultBrush}" VerticalContentAlignment="Center">
|
||||
<Expander HorizontalAlignment="Stretch" Margin="0,0,28,0">
|
||||
<Expander.ContextFlyout>
|
||||
<MenuFlyout x:Name="SubscritionListFlyout">
|
||||
<MenuFlyoutItem u:Uids.Uid="{x:Bind GetUidForNameEditing(IsNameEditing), Mode=OneWay}" Command="{x:Bind EditNameCommand}">
|
||||
<MenuFlyoutItem.Icon>
|
||||
<FontIcon Glyph="{x:Bind GetGlyphForNameEditing(IsNameEditing), Mode=OneWay}"/>
|
||||
</MenuFlyoutItem.Icon>
|
||||
</MenuFlyoutItem>
|
||||
<ToggleMenuFlyoutItem u:Uids.Uid="SubscriptionListElementMenuFlyoutIsDisabled" IsChecked="{x:Bind IsDisabled, Mode=TwoWay}">
|
||||
<ToggleMenuFlyoutItem.Icon>
|
||||
<FontIcon Glyph="" />
|
||||
</ToggleMenuFlyoutItem.Icon>
|
||||
</ToggleMenuFlyoutItem>
|
||||
<MenuFlyoutSeparator/>
|
||||
<MenuFlyoutItem u:Uids.Uid="SubscriptionListElementMenuFlyoutDelete" Command="{x:Bind DeleteCommand}">
|
||||
<MenuFlyoutItem.Icon>
|
||||
<FontIcon Glyph="" />
|
||||
</MenuFlyoutItem.Icon>
|
||||
</MenuFlyoutItem>
|
||||
</MenuFlyout>
|
||||
</Expander.ContextFlyout>
|
||||
<Expander.Header>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBox Text="{x:Bind Title, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" u:Uids.Uid="SubscriptionListElementTitleTextBox"
|
||||
Style="{StaticResource BodyStrongTextBlockStyle}" Visibility="{x:Bind IsNameEditing, Converter={StaticResource BoolToVisConverter}, Mode=OneWay}"
|
||||
VerticalAlignment="Center"/>
|
||||
<TextBlock Text="{x:Bind GetTitle, Mode=OneWay}" Style="{StaticResource BodyStrongTextBlockStyle}" Visibility="{x:Bind IsNameEditing, Converter={StaticResource BoolToVisConverter}, ConverterParameter=True, Mode=OneWay}"
|
||||
VerticalAlignment="Center"/>
|
||||
<TextBlock Text="{x:Bind DefaultTitle, Mode=OneWay}" Style="{StaticResource BodyTextBlockStyle}" Visibility="{x:Bind IsNotDefaultTitle, Converter={StaticResource BoolToVisConverter}, Mode=OneWay}"
|
||||
VerticalAlignment="Center" Margin="8"/>
|
||||
</StackPanel>
|
||||
</Expander.Header>
|
||||
|
||||
<ItemsView ItemsSource="{x:Bind Servers}" SelectionMode="Multiple">
|
||||
<ItemsView.Layout>
|
||||
<UniformGridLayout Orientation="Horizontal" ItemsStretch="None" ItemsJustification="SpaceAround"/>
|
||||
</ItemsView.Layout>
|
||||
<ItemsView.ItemTemplate>
|
||||
<DataTemplate x:DataType="vm:ServerItemViewModel">
|
||||
<ItemContainer Margin="6">
|
||||
<c:ServerListElement ServerData="{x:Bind}"/>
|
||||
</ItemContainer>
|
||||
</DataTemplate>
|
||||
</ItemsView.ItemTemplate>
|
||||
</ItemsView>
|
||||
</Expander>
|
||||
</ItemContainer>
|
||||
</DataTemplate>
|
||||
</ItemsView.ItemTemplate>
|
||||
</ItemsView>
|
||||
</ScrollView>
|
||||
<TextBlock Grid.Row="1" u:Uids.Uid="SubsSettingsEmtpyText" Style="{ThemeResource BodyLargeTextBlockStyle}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||||
</Grid>
|
||||
</Page>
|
||||
|
||||
@@ -57,6 +57,7 @@
|
||||
<PackageReference Include="CommunityToolkit.WinUI.Behaviors" Version="8.2.251219" />
|
||||
<PackageReference Include="CommunityToolkit.WinUI.Controls.Primitives" Version="8.2.251219" />
|
||||
<PackageReference Include="CommunityToolkit.WinUI.Controls.SettingsControls" Version="8.2.251219" />
|
||||
<PackageReference Include="CommunityToolkit.WinUI.Controls.TabbedCommandBar" Version="8.2.251219" />
|
||||
<PackageReference Include="MessageFormat" Version="8.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="10.0.11" />
|
||||
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.28000.2705" />
|
||||
|
||||
Reference in New Issue
Block a user