XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet

XFEWarframe

【WinUI】基于Warframe游戏本体的公开服务器以及安装器

公开
关注 0 Fork 0 Star 0
UTF-8
<Page xmlns:loc="using:XFEWarframe.Desktop.Editing" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:models="using:XFEWarframe.Admin.Models" x:Class="XFEWarframe.Admin.Views.NewsPage">
  <ScrollViewer>
    <StackPanel Padding="28,24,28,32" Spacing="22" MaxWidth="1300">
      <StackPanel Spacing="8">
        <TextBlock Text="{loc:Translate Key=ui_c77604c8a65f5a80}" Style="{StaticResource PageTitleStyle}"/>
        <TextBlock Text="{loc:Translate Key=ui_aa8a8d1aabb07726}" Style="{StaticResource MutedTextStyle}"/>
      </StackPanel>
      <ContentControl IsEnabled="{x:Bind ViewModel.IsIdle, Mode=OneWay}" HorizontalContentAlignment="Stretch">
        <StackPanel Spacing="20">
          <StackPanel Orientation="Horizontal" Spacing="12">
            <Button Content="{loc:Translate Key=ui_15157cf0d4d8b6ee}" Style="{StaticResource OrbitAccentButtonStyle}" Click="NewNews_Click"/>
            <Button Content="{loc:Translate Key=ui_e28be7098db113cb}" Command="{x:Bind ViewModel.RefreshCommand}"/>
            <Button Content="{loc:Translate Key=ui_23219b8f4a873bda}" Command="{x:Bind ViewModel.WithdrawCommand}"/>
            <Button Content="{loc:Translate Key=ui_2f9daa828907b93f}" Command="{x:Bind ViewModel.DeleteCommand}"/>
          </StackPanel>
          <ListView ItemsSource="{x:Bind ViewModel.Items}" SelectedItem="{x:Bind ViewModel.SelectedItem, Mode=TwoWay}" MaxHeight="650" HorizontalContentAlignment="Stretch">
            <ListView.ItemTemplate>
              <DataTemplate x:DataType="models:NewsRow">
                <Grid Padding="6,10" ColumnSpacing="20">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="Auto"/>
                  </Grid.ColumnDefinitions>
                  <TextBlock Text="{x:Bind Title}" TextWrapping="Wrap" FontSize="17"/>
                  <TextBlock Grid.Column="1" Text="{x:Bind Status}" Foreground="{ThemeResource OrbitAccentBrush}"/>
                </Grid>
              </DataTemplate>
            </ListView.ItemTemplate>
          </ListView>
          <loc:FormDialogButton Content="{loc:Translate Key=ui_a20525a947719b37}" DialogTitle="{loc:Translate Key=ui_319fb731076491a4}" HorizontalAlignment="Left" PrimaryCommand="{x:Bind ViewModel.PublishCommand}" PrimaryText="{loc:Translate Key=ui_b61f333b91b21f79}" SecondaryCommand="{x:Bind ViewModel.SaveDraftCommand}" SecondaryText="{loc:Translate Key=ui_5329e3f0ee463df5}" x:Name="NewsEditorButton" ErrorText="{x:Bind ViewModel.LastError, Mode=OneWay}" IsWorking="{x:Bind ViewModel.IsBusy, Mode=OneWay}" PrepareCommand="{x:Bind ViewModel.RestoreEditorCommand}" CanceledCommand="{x:Bind ViewModel.RestoreEditorCommand}">
            <loc:FormDialogButton.Form>
              <StackPanel Spacing="16">
                <TextBlock Text="{x:Bind ViewModel.EditorStatus, Mode=OneWay}" Foreground="{ThemeResource OrbitAccentBrush}"/>
                <TextBox Header="{loc:Translate Key=ui_31ab012f053c5ef4}" MaxLength="300" Text="{x:Bind ViewModel.Title, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
                <TextBox Header="{loc:Translate Key=ui_6e3aac34a7776f55}" MaxLength="300" Text="{x:Bind ViewModel.EnglishTitle, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
                <TextBox Header="{loc:Translate Key=ui_38b6bf507310506f}" PlaceholderText="https://" Text="{x:Bind ViewModel.Url, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
                <TextBox Header="{loc:Translate Key=ui_a245d8a0fabfca2e}" PlaceholderText="https://" Text="{x:Bind ViewModel.ImageUrl, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
                <ToggleSwitch Header="{loc:Translate Key=ui_2a5ab81dc6adf331}" IsOn="{x:Bind ViewModel.Priority, Mode=TwoWay}"/>
                <TextBlock Text="{loc:Translate Key=ui_3465a975e51d7e42}" Style="{StaticResource MutedTextStyle}" TextWrapping="Wrap"/>
              </StackPanel>
            </loc:FormDialogButton.Form>
          </loc:FormDialogButton>
        </StackPanel>
      </ContentControl>
    </StackPanel>
  </ScrollViewer>
</Page>