Skip to content

Commit

Permalink
Various improvements
Browse files Browse the repository at this point in the history
Improve dual screen switch.
Add file name, size and format to deduplicator and archive page.
Fix autoplay on first play.
Localized some stuff.
  • Loading branch information
Guerra24 committed Dec 18, 2023
1 parent f103e6d commit 3479078
Show file tree
Hide file tree
Showing 20 changed files with 349 additions and 85 deletions.
13 changes: 12 additions & 1 deletion LRReader.Shared/Models/Main/Archive.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,18 @@ public class Archive : IEquatable<Archive>
public string title { get; set; } = null!;
public int pagecount { get; set; }
public int progress { get; set; }
public long? lastreadtime { get; set; }
public long? lastreadtime { get; set; } // 0.9.0

[JsonIgnore]
public string LastReadTimeString => lastreadtime == null ? "" : DateTimeOffset.FromUnixTimeSeconds((long)lastreadtime).ToLocalTime().ToString();

public long? size { get; set; } // dev

[JsonIgnore]
public string SizeString => size == null ? "" : string.Format("{0:n2} MB", size / 1024f / 1024f);

public string? filename { get; set; } // dev

[JsonIgnore]
public string TagsClean { get; set; } = null!;
[JsonIgnore]
Expand Down
6 changes: 5 additions & 1 deletion LRReader.UWP.Installer/LRReader.UWP.Installer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,13 @@
<Version>5.7.0</Version>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Fody" Version="6.8.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Windows.SDK.Contracts" Version="10.0.22621.2428" />
<PackageReference Include="WPF-UI">
<Version>3.0.0-preview.7</Version>
<Version>3.0.0-preview.13</Version>
</PackageReference>
</ItemGroup>
<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion LRReader.UWP.Installer/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public partial class MainWindow : FluentWindow

public MainWindow()
{
SystemThemeWatcher.Watch(this, WindowBackdropType.Mica, true);
InitializeComponent();
// Win32 Magic
//var interop = new WindowInteropHelper(this);
Expand Down Expand Up @@ -56,7 +57,6 @@ public MainWindow()

private async void Window_Loaded(object sender, RoutedEventArgs e)
{
SystemThemeWatcher.Watch(this, WindowBackdropType.Mica, true);
if (Environment.OSVersion.Version < new Version(10, 0, 17763, 0))
{
Error.Text = "LRReader requires Windows 10 1809 or newer";
Expand Down
17 changes: 9 additions & 8 deletions LRReader.UWP.Installer/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@
"NETStandard.Library": "1.6.1"
}
},
"Fody": {
"type": "Direct",
"requested": "[6.8.0, )",
"resolved": "6.8.0",
"contentHash": "hfZ/f8Mezt8aTkgv9nsvFdYoQ809/AqwsJlOGOPYIfBcG2aAIG3v3ex9d8ZqQuFYyMoucjRg4eKy3VleeGodKQ=="
},
"Microsoft.Windows.SDK.Contracts": {
"type": "Direct",
"requested": "[10.0.22621.2428, )",
Expand All @@ -25,14 +31,9 @@
},
"WPF-UI": {
"type": "Direct",
"requested": "[3.0.0-preview.7, )",
"resolved": "3.0.0-preview.7",
"contentHash": "l+O4L8w8P6oU36z7zQci9QAwLpRYrjIOpQsPfDbkXrIDhUaJur0WJ8+XaybDhWDG94hfoiz0PL0rdL1w+zmYnw=="
},
"Fody": {
"type": "Transitive",
"resolved": "6.5.5",
"contentHash": "Krca41L/PDva1VsmDec5n52cQZxQAQp/bsHdzsNi8iLLI0lqKL94fNIkNaC8tVolUkCyWsbzvxfxJCeD2789fA=="
"requested": "[3.0.0-preview.13, )",
"resolved": "3.0.0-preview.13",
"contentHash": "57Exnba6ySbx7pe8czXpgYs5pinq9sCI5TBKsX4qo03K7a0frj0KT5vUkYWjd4xWjfThAqZxLZE4YTA5vNJoUg=="
},
"Microsoft.NETCore.Platforms": {
"type": "Transitive",
Expand Down
2 changes: 1 addition & 1 deletion LRReader.UWP/LRReader.UWP.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@
<Version>2.8.6-custom.231105a</Version>
</PackageReference>
<PackageReference Include="Microsoft.Web.WebView2">
<Version>1.0.2151.40</Version>
<Version>1.0.2210.55</Version>
</PackageReference>
<PackageReference Include="Nullable">
<Version>1.3.1</Version>
Expand Down
24 changes: 24 additions & 0 deletions LRReader.UWP/Strings/en/Tabs.resw
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,12 @@
<data name="Archive.AddBookmark.Title" xml:space="preserve">
<value>Bookmark Archive?</value>
</data>
<data name="Archive.AutoplayState.Play" xml:space="preserve">
<value>Play</value>
</data>
<data name="Archive.AutoplayState.Stop" xml:space="preserve">
<value>Stop</value>
</data>
<data name="Archive.Bookmark.Content" xml:space="preserve">
<value>Bookmark</value>
</data>
Expand All @@ -147,12 +153,24 @@
<data name="Archive.Edit.Content" xml:space="preserve">
<value>Edit</value>
</data>
<data name="Archive.FileName.Text" xml:space="preserve">
<value>File name:</value>
</data>
<data name="Archive.FileType.Text" xml:space="preserve">
<value>File type:</value>
</data>
<data name="Archive.LastRead.Text" xml:space="preserve">
<value>Last read:</value>
</data>
<data name="Archive.New.Content" xml:space="preserve">
<value>New!</value>
</data>
<data name="Archive.Next.Content" xml:space="preserve">
<value>Next archive</value>
</data>
<data name="Archive.Pages.Text" xml:space="preserve">
<value>Pages:</value>
</data>
<data name="Archive.Random.Content" xml:space="preserve">
<value>Random</value>
</data>
Expand All @@ -165,6 +183,9 @@
<data name="Archive.RemoveBookmark.Title" xml:space="preserve">
<value>Remove Bookmark?</value>
</data>
<data name="Archive.Settings.Autoplay.Text" xml:space="preserve">
<value>Autoplay</value>
</data>
<data name="Archive.Settings.Button.ToolTipService.ToolTip" xml:space="preserve">
<value>Reader</value>
</data>
Expand All @@ -180,6 +201,9 @@
<data name="Archive.Settings.VerticalReader.Text" xml:space="preserve">
<value>Use vertical reader</value>
</data>
<data name="Archive.Size.Text" xml:space="preserve">
<value>Size:</value>
</data>
<data name="ArchiveEdit.AddAllTags.ToolTipService.ToolTip" xml:space="preserve">
<value>Add All</value>
</data>
Expand Down
12 changes: 12 additions & 0 deletions LRReader.UWP/Strings/en/Tools.resw
Original file line number Diff line number Diff line change
Expand Up @@ -256,9 +256,21 @@ At last enable Skip missing thumbnails and try again</value>
<data name="Deduplicator.Step.Text" xml:space="preserve">
<value>Step</value>
</data>
<data name="Deduplicator.SxSFileName.Text" xml:space="preserve">
<value>File name</value>
</data>
<data name="Deduplicator.SxSFileSize.Text" xml:space="preserve">
<value>File size</value>
</data>
<data name="Deduplicator.SxSFileType.Text" xml:space="preserve">
<value>File type</value>
</data>
<data name="Deduplicator.SxSImages.Text" xml:space="preserve">
<value>Images</value>
</data>
<data name="Deduplicator.SxSLastRead.Text" xml:space="preserve">
<value>Last read</value>
</data>
<data name="Deduplicator.SxSPages.Text" xml:space="preserve">
<value>Pages</value>
</data>
Expand Down
24 changes: 24 additions & 0 deletions LRReader.UWP/Strings/es/Tabs.resw
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,12 @@
<data name="Archive.AddBookmark.Title" xml:space="preserve">
<value>Marcar Archivo?</value>
</data>
<data name="Archive.AutoplayState.Play" xml:space="preserve">
<value>Play</value>
</data>
<data name="Archive.AutoplayState.Stop" xml:space="preserve">
<value>Stop</value>
</data>
<data name="Archive.Bookmark.Content" xml:space="preserve">
<value>Marcar</value>
</data>
Expand All @@ -147,12 +153,24 @@
<data name="Archive.Edit.Content" xml:space="preserve">
<value>Editar</value>
</data>
<data name="Archive.FileName.Text" xml:space="preserve">
<value>Nombre del archivo:</value>
</data>
<data name="Archive.FileType.Text" xml:space="preserve">
<value>Tipo de archivo:</value>
</data>
<data name="Archive.LastRead.Text" xml:space="preserve">
<value>Última lectura:</value>
</data>
<data name="Archive.New.Content" xml:space="preserve">
<value>¡Nuevo!</value>
</data>
<data name="Archive.Next.Content" xml:space="preserve">
<value>Siguiente archivo</value>
</data>
<data name="Archive.Pages.Text" xml:space="preserve">
<value>Páginas:</value>
</data>
<data name="Archive.Random.Content" xml:space="preserve">
<value>Aleatorio</value>
</data>
Expand All @@ -165,6 +183,9 @@
<data name="Archive.RemoveBookmark.Title" xml:space="preserve">
<value>Eliminar Marcador?</value>
</data>
<data name="Archive.Settings.Autoplay.Text" xml:space="preserve">
<value>Autoplay</value>
</data>
<data name="Archive.Settings.Button.ToolTipService.ToolTip" xml:space="preserve">
<value>Lector</value>
</data>
Expand All @@ -180,6 +201,9 @@
<data name="Archive.Settings.VerticalReader.Text" xml:space="preserve">
<value>Utilizar lector vertical</value>
</data>
<data name="Archive.Size.Text" xml:space="preserve">
<value>Tamaño:</value>
</data>
<data name="ArchiveEdit.AddAllTags.ToolTipService.ToolTip" xml:space="preserve">
<value>Agregar Todo</value>
</data>
Expand Down
12 changes: 12 additions & 0 deletions LRReader.UWP/Strings/es/Tools.resw
Original file line number Diff line number Diff line change
Expand Up @@ -256,9 +256,21 @@ Por último, active la opción de omitir las miniaturas que faltan y vuelva a in
<data name="Deduplicator.Step.Text" xml:space="preserve">
<value>Paso</value>
</data>
<data name="Deduplicator.SxSFileName.Text" xml:space="preserve">
<value>Nombre del archivo</value>
</data>
<data name="Deduplicator.SxSFileSize.Text" xml:space="preserve">
<value>Tamaño</value>
</data>
<data name="Deduplicator.SxSFileType.Text" xml:space="preserve">
<value>Tipo de archivo</value>
</data>
<data name="Deduplicator.SxSImages.Text" xml:space="preserve">
<value>Imágenes</value>
</data>
<data name="Deduplicator.SxSLastRead.Text" xml:space="preserve">
<value>Última lectura</value>
</data>
<data name="Deduplicator.SxSPages.Text" xml:space="preserve">
<value>Páginas</value>
</data>
Expand Down
26 changes: 25 additions & 1 deletion LRReader.UWP/Strings/ru/Tabs.resw
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,12 @@
<data name="Archive.AddBookmark.Title" xml:space="preserve">
<value>Архивировать закладку?</value>
</data>
<data name="Archive.AutoplayState.Play" xml:space="preserve">
<value>Play</value>
</data>
<data name="Archive.AutoplayState.Stop" xml:space="preserve">
<value>Stop</value>
</data>
<data name="Archive.Bookmark.Content" xml:space="preserve">
<value>Закладка</value>
</data>
Expand All @@ -147,12 +153,24 @@
<data name="Archive.Edit.Content" xml:space="preserve">
<value>Изменить</value>
</data>
<data name="Archive.FileName.Text" xml:space="preserve">
<value>File name:</value>
</data>
<data name="Archive.FileType.Text" xml:space="preserve">
<value>File type:</value>
</data>
<data name="Archive.LastRead.Text" xml:space="preserve">
<value>Last read:</value>
</data>
<data name="Archive.New.Content" xml:space="preserve">
<value>Новый!</value>
</data>
<data name="Archive.Next.Content" xml:space="preserve">
<value>Следующий архив</value>
</data>
<data name="Archive.Pages.Text" xml:space="preserve">
<value>Pages:</value>
</data>
<data name="Archive.Random.Content" xml:space="preserve">
<value>Случайно</value>
</data>
Expand All @@ -165,6 +183,9 @@
<data name="Archive.RemoveBookmark.Title" xml:space="preserve">
<value>Удалить закладку?</value>
</data>
<data name="Archive.Settings.Autoplay.Text" xml:space="preserve">
<value>Autoplay</value>
</data>
<data name="Archive.Settings.Button.ToolTipService.ToolTip" xml:space="preserve">
<value>Ридер</value>
</data>
Expand All @@ -180,6 +201,9 @@
<data name="Archive.Settings.VerticalReader.Text" xml:space="preserve">
<value>Использовать вертикальный ридер</value>
</data>
<data name="Archive.Size.Text" xml:space="preserve">
<value>Size:</value>
</data>
<data name="ArchiveEdit.AddAllTags.ToolTipService.ToolTip" xml:space="preserve">
<value>Добавить все</value>
</data>
Expand Down Expand Up @@ -315,4 +339,4 @@
<data name="Tools.Tab.Header" xml:space="preserve">
<value>Инструменты</value>
</data>
</root>
</root>
14 changes: 13 additions & 1 deletion LRReader.UWP/Strings/ru/Tools.resw
Original file line number Diff line number Diff line change
Expand Up @@ -255,9 +255,21 @@
<data name="Deduplicator.Step.Text" xml:space="preserve">
<value>Шаг</value>
</data>
<data name="Deduplicator.SxSFileName.Text" xml:space="preserve">
<value>File name</value>
</data>
<data name="Deduplicator.SxSFileSize.Text" xml:space="preserve">
<value>File size</value>
</data>
<data name="Deduplicator.SxSFileType.Text" xml:space="preserve">
<value>File type</value>
</data>
<data name="Deduplicator.SxSImages.Text" xml:space="preserve">
<value>Изображения</value>
</data>
<data name="Deduplicator.SxSLastRead.Text" xml:space="preserve">
<value>Last read</value>
</data>
<data name="Deduplicator.SxSPages.Text" xml:space="preserve">
<value>Страницы</value>
</data>
Expand Down Expand Up @@ -294,4 +306,4 @@
<data name="MainPage.Title" xml:space="preserve">
<value>Инструменты</value>
</data>
</root>
</root>
Loading

0 comments on commit 3479078

Please sign in to comment.