Light Beacon 2 years ago
parent
commit
8b6c444da2

+ 4 - 2
Libraries/Versions/__LIBRARY__.yml

@@ -6,6 +6,8 @@ fill:
   title: ${file_name}
   #server-jar: ${@ServerJar}
   templates:
-    - VersionLatestCard
-    - VersionMarkdownCard
+    - Classic/VersionLatestCard
+    - Classic/VersionMarkdownCard
+    - Simplex/VersionLatestCard
+    - Simplex/VersionMarkdownCard
     - Raw

+ 30 - 0
Resources/Components/Classic/VersionToolBar.xaml

@@ -0,0 +1,30 @@
+<Grid Margin="0,10,6,0">
+${@IF|${translator}|${@IF|!${translators_in_new_line}|
+<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center">
+<Path Margin="8,0" Width="18" Height="18" Fill="{DynamicResource ColorBrush4}"
+                    Stretch="Uniform"
+                    Data="M640 416h256c35.36 0 64 28.48 64 64v416c0 35.36-28.48 64-64 64H480c-35.36 0-64-28.48-64-64V640h128c53.312 0 96-42.976 96-96V416zM64 128c0-35.36 28.48-64 64-64h416c35.36 0 64 28.48 64 64v416c0 35.36-28.48 64-64 64H128c-35.36 0-64-28.48-64-64V128z m128 276.256h46.72v-24.768h67.392V497.76h49.504V379.488h68.768v20.64h50.88V243.36H355.616v-34.368c0-10.08 1.376-18.784 4.16-26.112a10.56 10.56 0 0 0 1.344-4.16c0-0.896-3.2-1.792-9.6-2.72h-46.816v67.36H192v160.896z m46.72-122.368h67.392v60.48h-67.36V281.92z m185.664 60.48h-68.768V281.92h68.768v60.48z m203.84 488l19.264-53.632h100.384l19.264 53.632h54.976L732.736 576h-64.64L576 830.4h52.256z m33.024-96.256l37.12-108.608h1.376l34.368 108.608h-72.864zM896 320h-64a128 128 0 0 0-128-128v-64a192 192 0 0 1 192 192zM128 704h64a128 128 0 0 0 128 128v64a192 192 0 0 1-192-192z"/>
+<TextBlock Text="By ${translator}" FontSize="14" VerticalAlignment="Center" Foreground="{DynamicResource ColorBrush4}"/>
+</StackPanel>
+}}
+
+<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
+<local:MyIconTextButton Text="启动" ToolTip="启动 ${version-id}" EventType="启动游戏"
+    EventData="${version-id}" LogoScale="0.85" Logo="{StaticResource LaunchIcon}" />
+<local:MyIconTextButton Style="{StaticResource DownloadVersionButton}"
+    LogoScale="0.85" Logo="{StaticResource DownloadIcon}"/>
+${@IF|${server-jar}|
+<local:MyIconTextButton Style="{StaticResource ServerJarDownloadButton}"
+    LogoScale="1.05" EventData="${server-jar}" Logo="{StaticResource CloudIcon}" />
+}
+</StackPanel>
+</Grid>
+
+${@IF|${translator}|${@IF|${translators_in_new_line}|
+<StackPanel Margin="0,10,6,0" Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center">
+<Path Margin="8,0" Width="18" Height="18" Fill="{DynamicResource ColorBrush4}"
+                    Stretch="Uniform"
+                    Data="M640 416h256c35.36 0 64 28.48 64 64v416c0 35.36-28.48 64-64 64H480c-35.36 0-64-28.48-64-64V640h128c53.312 0 96-42.976 96-96V416zM64 128c0-35.36 28.48-64 64-64h416c35.36 0 64 28.48 64 64v416c0 35.36-28.48 64-64 64H128c-35.36 0-64-28.48-64-64V128z m128 276.256h46.72v-24.768h67.392V497.76h49.504V379.488h68.768v20.64h50.88V243.36H355.616v-34.368c0-10.08 1.376-18.784 4.16-26.112a10.56 10.56 0 0 0 1.344-4.16c0-0.896-3.2-1.792-9.6-2.72h-46.816v67.36H192v160.896z m46.72-122.368h67.392v60.48h-67.36V281.92z m185.664 60.48h-68.768V281.92h68.768v60.48z m203.84 488l19.264-53.632h100.384l19.264 53.632h54.976L732.736 576h-64.64L576 830.4h52.256z m33.024-96.256l37.12-108.608h1.376l34.368 108.608h-72.864zM896 320h-64a128 128 0 0 0-128-128v-64a192 192 0 0 1 192 192zM128 704h64a128 128 0 0 0 128 128v64a192 192 0 0 1-192-192z"/>
+<TextBlock Text="By ${translator}" FontSize="14" VerticalAlignment="Center" Foreground="{DynamicResource ColorBrush4}"/>
+</StackPanel>
+}}

+ 0 - 0
Resources/Components/VersionWebsites.xaml → Resources/Components/Classic/VersionWebsites.xaml


+ 0 - 0
Resources/Components/Button.xaml → Resources/Components/Elements/Button.xaml


+ 0 - 0
Resources/Components/ButtonGroup.xaml → Resources/Components/Elements/ButtonGroup.xaml


+ 0 - 0
Resources/Components/Hint.xaml → Resources/Components/Elements/Hint.xaml


+ 0 - 0
Resources/Components/ImageWithTitle.xaml → Resources/Components/Elements/ImageWithTitle.xaml


+ 1 - 0
Resources/Components/LastUpdateBox.xaml

@@ -0,0 +1 @@
+<TextBlock Margin="0,2" Grid.Column="1" HorizontalAlignment="Right" Text="最后更新:${last_update}" FontSize="12" Foreground="{DynamicResource ColorBrush4}"/>

+ 6 - 9
Resources/Components/TranslatorBar.xaml

@@ -1,15 +1,12 @@
 ${@IF|${translator}|
-<Grid VerticalAlignment="Center" Margin="6,0">
-<Grid.ColumnDefinitions>
-<ColumnDefinition Width="56"/>
-<ColumnDefinition/>
+<Grid VerticalAlignment="Center" Margin="6,10,0,0" HorizontalAlignment="Right">
+<Grid.ColumnDefinitions >
+<ColumnDefinition Width="45"/>
+<ColumnDefinition />
 </Grid.ColumnDefinitions>
-<StackPanel Grid.Column="0" Orientation="Horizontal">
-<Path Margin="8,0" Width="18" Height="18" Fill="{DynamicResource ColorBrush4}"
+<Path Grid.Column="0" Margin="8,0" Width="18" Height="18" Fill="{DynamicResource ColorBrush4}"
                     Stretch="Uniform"
                     Data="M640 416h256c35.36 0 64 28.48 64 64v416c0 35.36-28.48 64-64 64H480c-35.36 0-64-28.48-64-64V640h128c53.312 0 96-42.976 96-96V416zM64 128c0-35.36 28.48-64 64-64h416c35.36 0 64 28.48 64 64v416c0 35.36-28.48 64-64 64H128c-35.36 0-64-28.48-64-64V128z m128 276.256h46.72v-24.768h67.392V497.76h49.504V379.488h68.768v20.64h50.88V243.36H355.616v-34.368c0-10.08 1.376-18.784 4.16-26.112a10.56 10.56 0 0 0 1.344-4.16c0-0.896-3.2-1.792-9.6-2.72h-46.816v67.36H192v160.896z m46.72-122.368h67.392v60.48h-67.36V281.92z m185.664 60.48h-68.768V281.92h68.768v60.48z m203.84 488l19.264-53.632h100.384l19.264 53.632h54.976L732.736 576h-64.64L576 830.4h52.256z m33.024-96.256l37.12-108.608h1.376l34.368 108.608h-72.864zM896 320h-64a128 128 0 0 0-128-128v-64a192 192 0 0 1 192 192zM128 704h64a128 128 0 0 0 128 128v64a192 192 0 0 1-192-192z"/>
-<TextBlock Text="By " FontSize="14" VerticalAlignment="Center" Foreground="{DynamicResource ColorBrush4}"/>
-</StackPanel>
-<TextBlock Grid.Column="1" Text="${translator}" FontSize="14" VerticalAlignment="Center" Foreground="{DynamicResource ColorBrush4}"/>
+<TextBlock HorizontalAlignment="Right" Grid.Column="1" Text="${translator}" FontSize="14" VerticalAlignment="Center" Foreground="{DynamicResource ColorBrush4}"/>
 </Grid>
 }

+ 1 - 1
Resources/Components/VersionToolBar.xaml

@@ -1,4 +1,4 @@
-<WrapPanel Margin="0,10,6,0" Orientation="Horizontal" VerticalAlignment="Center">
+<WrapPanel Margin="-2,2" Orientation="Horizontal" VerticalAlignment="Center">
 <local:MyIconTextButton Text="启动" ToolTip="启动 ${version-id}" EventType="启动游戏"
     EventData="${version-id}" LogoScale="0.85" Logo="{StaticResource LaunchIcon}" />
 <local:MyIconTextButton Style="{StaticResource DownloadVersionButton}"

+ 9 - 0
Resources/Templates/Classic/VersionBase.yml

@@ -0,0 +1,9 @@
+components:
+ - ${@IF|${version-image-link}|VersionHeaderImage}
+ - FlowDocumentViewer
+ - ${@IF|${not_finished}|Loading}
+ - ${@IF|!${disable-websites}|Classic/VersionWebsites}
+ - ${@IF|!${disable-toolbar}|Classic/VersionToolBar}
+base: Card
+fill:
+   loading_content: 翻译施工中

+ 11 - 0
Resources/Templates/Classic/VersionLatestCard.yml

@@ -0,0 +1,11 @@
+components:
+ - $MarkdownPresenter
+base: Classic/VersionMarkdownCard
+filter:
+  file_exten:
+    - md
+    - markdown
+  skin: classic
+  latest: true
+cover:
+  title: 最新${version-type} - ${version-id}

+ 8 - 0
Resources/Templates/Classic/VersionMarkdownCard.yml

@@ -0,0 +1,8 @@
+components:
+ - $MarkdownPresenter
+base: Classic/VersionBase
+filter:
+  file_exten:
+    - md
+    - markdown
+  skin: classic

+ 1 - 0
Resources/Templates/VersionBase.yml → Resources/Templates/Simplex/VersionBase.yml

@@ -3,6 +3,7 @@ components:
  - FlowDocumentViewer
  - ${@IF|${not_finished}|Loading}
  - ${@IF|!${disable-translator}|TranslatorBar}
+ - ${@IF|${last_update}|LastUpdateBox}
  - ${@IF|!${disable-toolbar}|VersionToolBar}
 base: Card
 fill:

+ 1 - 1
Resources/Templates/VersionLatestCard.yml → Resources/Templates/Simplex/VersionLatestCard.yml

@@ -1,6 +1,6 @@
 components:
  - $MarkdownPresenter
-base: VersionMarkdownCard
+base: Simplex/VersionMarkdownCard
 filter:
   file_exten:
     - md

+ 1 - 1
Resources/Templates/VersionMarkdownCard.yml → Resources/Templates/Simplex/VersionMarkdownCard.yml

@@ -1,6 +1,6 @@
 components:
  - $MarkdownPresenter
-base: VersionBase
+base: Simplex/VersionBase
 filter:
   file_exten:
     - md