Skip to content

Commit

Permalink
delete gacha records by time period
Browse files Browse the repository at this point in the history
  • Loading branch information
Scighost committed Nov 30, 2024
1 parent 9cbaedb commit 47c8023
Show file tree
Hide file tree
Showing 8 changed files with 502 additions and 18 deletions.
72 changes: 72 additions & 0 deletions src/Starward.Language/Lang.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 24 additions & 0 deletions src/Starward.Language/Lang.resx
Original file line number Diff line number Diff line change
Expand Up @@ -1609,4 +1609,28 @@ Do you accept the risk and continue to use it?</value>
<data name="InterKnotMonthlyReportPage_OtherRewards" xml:space="preserve">
<value>Other Rewards</value>
</data>
<data name="DeleteGachaLogDialog_BeginTime" xml:space="preserve">
<value>Begin Time</value>
</data>
<data name="DeleteGachaLogDialog_EndTime" xml:space="preserve">
<value>End Time</value>
</data>
<data name="DeleteGachaLogDialog_DeleteGachaRecordsForASpecificTimePeriod" xml:space="preserve">
<value>Delete gacha records for a specific time period</value>
</data>
<data name="DeleteGachaLogDialog_6MonthsDeletingWarning" xml:space="preserve">
<value>Warning: The selected time period includes gacha records from more than 6 months ago, which cannot be retrieved after deleting.</value>
</data>
<data name="DeleteGachaLogDialog_ThisAccountHas0GachaRecordS" xml:space="preserve">
<value>This account has {0} gacha record(s).</value>
</data>
<data name="DeleteGachaLogDialog_TheSelectedTimePeriodIncludes0GachaRecords" xml:space="preserve">
<value>The selected time period includes {0} gacha records.</value>
</data>
<data name="GachaLogPage_DeleteAll" xml:space="preserve">
<value>Delete All</value>
</data>
<data name="GachaLogPage_SpecificTimePeriod" xml:space="preserve">
<value>Specific Time Period</value>
</data>
</root>
58 changes: 41 additions & 17 deletions src/Starward.Language/Lang.zh-CN.resx
Original file line number Diff line number Diff line change
Expand Up @@ -59,46 +59,46 @@
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" id="root">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace"/>
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0"/>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string"/>
<xsd:attribute name="type" type="xsd:string"/>
<xsd:attribute name="mimetype" type="xsd:string"/>
<xsd:attribute ref="xml:space"/>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string"/>
<xsd:attribute name="name" type="xsd:string"/>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1"/>
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2"/>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1"/>
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3"/>
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4"/>
<xsd:attribute ref="xml:space"/>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1"/>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required"/>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
Expand Down Expand Up @@ -1609,4 +1609,28 @@
<data name="InterKnotMonthlyReportPage_OtherRewards" xml:space="preserve">
<value>其他奖励</value>
</data>
<data name="DeleteGachaLogDialog_BeginTime" xml:space="preserve">
<value>起始时间</value>
</data>
<data name="DeleteGachaLogDialog_EndTime" xml:space="preserve">
<value>结束时间</value>
</data>
<data name="DeleteGachaLogDialog_DeleteGachaRecordsForASpecificTimePeriod" xml:space="preserve">
<value>删除特定时间段的抽卡记录</value>
</data>
<data name="DeleteGachaLogDialog_6MonthsDeletingWarning" xml:space="preserve">
<value>警告:所选时间段包含6个月之前的抽卡记录,删除后无法再次获取。</value>
</data>
<data name="DeleteGachaLogDialog_ThisAccountHas0GachaRecordS" xml:space="preserve">
<value>此账号有 {0} 条抽卡记录</value>
</data>
<data name="DeleteGachaLogDialog_TheSelectedTimePeriodIncludes0GachaRecords" xml:space="preserve">
<value>所选时间段包含 {0} 条抽卡记录</value>
</data>
<data name="GachaLogPage_DeleteAll" xml:space="preserve">
<value>全部删除</value>
</data>
<data name="GachaLogPage_SpecificTimePeriod" xml:space="preserve">
<value>指定时间段</value>
</data>
</root>
96 changes: 96 additions & 0 deletions src/Starward/Controls/DeleteGachaLogDialog.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentDialog x:Class="Starward.Controls.DeleteGachaLogDialog"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:lang="using:Starward.Language"
xmlns:local="using:Starward.Controls"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
x:DefaultBindMode="OneWay"
Background="{ThemeResource CustomAcrylicBrush}"
BorderThickness="0"
Loaded="ContentDialog_Loaded"
Style="{ThemeResource DefaultContentDialogStyle}"
mc:Ignorable="d">


<StackPanel Spacing="12">
<TextBlock FontSize="20" Text="{x:Bind lang:Lang.DeleteGachaLogDialog_DeleteGachaRecordsForASpecificTimePeriod}" />
<StackPanel Margin="0,8,0,0"
Orientation="Horizontal"
Spacing="12">
<TextBlock VerticalAlignment="Center" Text="Uid" />
<ComboBox MinWidth="140"
ItemsSource="{x:Bind UidList}"
SelectedItem="{x:Bind SelectUid, Mode=TwoWay}" />
</StackPanel>

<TextBlock Name="TextBlock_GachaLogNumber"
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
Visibility="Collapsed" />

<StackPanel Orientation="Horizontal" Spacing="12">
<StackPanel Spacing="8">
<Border Height="32">
<TextBlock VerticalAlignment="Center" Text="{x:Bind lang:Lang.DeleteGachaLogDialog_BeginTime}" />
</Border>
<Border Height="32">
<TextBlock VerticalAlignment="Center" Text="{x:Bind lang:Lang.DeleteGachaLogDialog_EndTime}" />
</Border>
</StackPanel>
<StackPanel Spacing="8">
<StackPanel Orientation="Horizontal" Spacing="8">
<CalendarDatePicker Name="CalendarDatePicker_BeginTime"
MinWidth="160"
DateChanged="CalendarDatePicker_DateChanged"
DateFormat="{}{year.full}/{month.integer}/{day.integer}" />
<TimePicker Name="TimePicker_BeginTime"
ClockIdentifier="24HourClock"
SelectedTimeChanged="TimePicker_SelectedTimeChanged" />
</StackPanel>
<StackPanel Orientation="Horizontal" Spacing="8">
<CalendarDatePicker Name="CalendarDatePicker_EndTime"
MinWidth="160"
DateChanged="CalendarDatePicker_DateChanged"
DateFormat="{}{year.full}/{month.integer}/{day.integer}" />
<TimePicker Name="TimePicker_EndTime"
ClockIdentifier="24HourClock"
SelectedTimeChanged="TimePicker_SelectedTimeChanged" />
</StackPanel>
</StackPanel>
</StackPanel>

<TextBlock Name="TextBlock_SelectedCount"
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
Visibility="Collapsed" />
<TextBlock Name="TextBlock_Warning"
Foreground="{ThemeResource SystemFillColorCautionBrush}"
Text="{x:Bind lang:Lang.DeleteGachaLogDialog_6MonthsDeletingWarning}"
TextWrapping="Wrap"
Visibility="Collapsed" />

<StackPanel Margin="0,16,0,0"
HorizontalAlignment="Right"
Orientation="Horizontal"
Spacing="12">
<Button Name="Button_Delete"
MinWidth="100"
Content="{x:Bind lang:Lang.Common_Delete}"
IsEnabled="False">
<Button.Flyout>
<MenuFlyout>
<MenuFlyoutItem Command="{x:Bind DeleteCommand}"
Foreground="{ThemeResource SystemFillColorCriticalBrush}"
Text="{x:Bind lang:Lang.LauncherPage_ConfirmDelete}" />
</MenuFlyout>
</Button.Flyout>
</Button>
<Button Name="Button_Cancel"
MinWidth="100"
Command="{x:Bind CancelCommand}"
Content="{x:Bind lang:Lang.Common_Cancel}"
Style="{ThemeResource AccentButtonStyle}" />
</StackPanel>
</StackPanel>

</ContentDialog>
Loading

0 comments on commit 47c8023

Please sign in to comment.