-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Resolved: #1281 - Full changelog: https://github.com/rocksdanister/lively/releases/tag/v2.0.2.4
- Loading branch information
1 parent
2e68a2a
commit 10d1a07
Showing
15 changed files
with
352 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
src/Lively/Lively.UI.WinUI/ViewModels/LibraryAboutViewModel.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
using Lively.Common; | ||
using Lively.Common.Helpers.Files; | ||
using Lively.Models; | ||
using System; | ||
|
||
namespace Lively.UI.WinUI.ViewModels | ||
{ | ||
internal class LibraryAboutViewModel | ||
{ | ||
public LibraryAboutViewModel(ILibraryModel obj) | ||
{ | ||
Title = obj.Title; | ||
Desc = obj.Desc; | ||
Author = obj.Author; | ||
SrcWebsite = obj.SrcWebsite; | ||
Type = obj.LivelyInfo.Type; | ||
Contact = obj.LivelyInfo.Contact; | ||
IsInstalled = !obj.LivelyInfo.IsAbsolutePath; | ||
|
||
try | ||
{ | ||
DirectorySize = FileOperations.SizeSuffix(FileOperations.GetDirectorySize(obj.LivelyInfoFolderPath), 2); | ||
} | ||
catch { } | ||
} | ||
|
||
public string Title { get; } | ||
public string Desc { get; } | ||
public string Author { get; } | ||
public Uri SrcWebsite { get; } | ||
public WallpaperType Type { get; } | ||
public string Contact { get; } | ||
public bool IsInstalled { get; } | ||
public string DirectorySize { get; } = "--"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
119 changes: 119 additions & 0 deletions
119
src/Lively/Lively.UI.WinUI/Views/Pages/Gallery/GalleryLoginView.xaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
<Page | ||
x:Class="Lively.UI.WinUI.Views.Pages.Gallery.GalleryLoginView" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:animations="using:CommunityToolkit.WinUI.UI.Animations" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:local="using:Lively.UI.WinUI.Views.Pages.Gallery" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
mc:Ignorable="d"> | ||
|
||
<Page.Resources> | ||
<AcrylicBrush | ||
x:Key="DragAcrylicBrush" | ||
FallbackColor="{ThemeResource SystemAltMediumColor}" | ||
TintColor="{ThemeResource SystemAltMediumColor}" | ||
TintOpacity="1.0" /> | ||
</Page.Resources> | ||
|
||
<Grid Margin="-5"> | ||
<!-- | ||
<Grid.Background> | ||
<ImageBrush ImageSource="ms-appx:///Assets/banner-lively-1080.jpg" Stretch="UniformToFill" /> | ||
</Grid.Background> | ||
--> | ||
<Image | ||
x:Name="bgImage" | ||
Source="ms-appx:///Assets/banner-lively-1080.jpg" | ||
Stretch="UniformToFill"> | ||
<animations:Implicit.ShowAnimations> | ||
<animations:TranslationAnimation | ||
From="0,-100,0" | ||
To="0" | ||
Duration="0:0:1" /> | ||
<animations:OpacityAnimation | ||
From="0" | ||
To="1.0" | ||
Duration="0:0:1" /> | ||
</animations:Implicit.ShowAnimations> | ||
</Image> | ||
<Page Background="{ThemeResource SystemAltMediumColor}" /> | ||
|
||
|
||
<StackPanel | ||
x:Name="mainPanel" | ||
Margin="50" | ||
HorizontalAlignment="Center" | ||
VerticalAlignment="Top"> | ||
<animations:Implicit.ShowAnimations> | ||
<animations:TranslationAnimation | ||
From="0,50,0" | ||
To="0" | ||
Duration="0:0:1" /> | ||
<animations:OpacityAnimation | ||
From="0" | ||
To="1.0" | ||
Duration="0:0:1" /> | ||
</animations:Implicit.ShowAnimations> | ||
<Grid> | ||
<PersonPicture | ||
x:Name="personPicture" | ||
Margin="0,0,0,5" | ||
ProfilePicture="{Binding Picture, Mode=OneWay}" /> | ||
<ProgressRing | ||
x:Name="loadingProgressRing" | ||
Width="100" | ||
Height="100" | ||
IsActive="False" | ||
IsIndeterminate="True" /> | ||
</Grid> | ||
<TextBlock | ||
x:Name="mainText" | ||
x:Uid="ComingSoon" | ||
HorizontalAlignment="Center" | ||
FontSize="24" | ||
FontWeight="SemiBold"> | ||
<animations:Implicit.Animations> | ||
<animations:TranslationAnimation | ||
ImplicitTarget="Size" | ||
From="0" | ||
To="0,25,0" | ||
Duration="0:0:1" /> | ||
</animations:Implicit.Animations> | ||
</TextBlock> | ||
<StackPanel | ||
x:Name="loginPanel" | ||
Margin="0,10,0,0" | ||
HorizontalAlignment="Center" | ||
Visibility="Collapsed"> | ||
<animations:Implicit.HideAnimations> | ||
<animations:OpacityAnimation To="0" Duration="0:0:1" /> | ||
</animations:Implicit.HideAnimations> | ||
<animations:Implicit.ShowAnimations> | ||
<animations:OpacityAnimation To="1" Duration="0:0:1" /> | ||
</animations:Implicit.ShowAnimations> | ||
<Button | ||
Width="175" | ||
Height="35" | ||
Margin="0" | ||
Command="{Binding AuthGoogleCommand}"> | ||
<StackPanel Orientation="Horizontal"> | ||
<BitmapIcon Foreground="{ThemeResource SystemControlBackgroundBaseHighBrush}" UriSource="ms-appx:///Assets/icons8-google-96.png" /> | ||
<TextBlock Margin="5,0,0,0" VerticalAlignment="Center">Google</TextBlock> | ||
</StackPanel> | ||
</Button> | ||
<Button | ||
Width="175" | ||
Height="35" | ||
Margin="0,5,0,0" | ||
Command="{Binding AuthGithubCommand}" | ||
Visibility="Visible"> | ||
<StackPanel Orientation="Horizontal"> | ||
<BitmapIcon Foreground="{ThemeResource SystemControlBackgroundBaseHighBrush}" UriSource="ms-appx:///Assets/icons8-github-96.png" /> | ||
<TextBlock Margin="5,0,0,0" VerticalAlignment="Center">Github</TextBlock> | ||
</StackPanel> | ||
</Button> | ||
</StackPanel> | ||
</StackPanel> | ||
</Grid> | ||
</Page> |
25 changes: 11 additions & 14 deletions
25
....UI.WinUI/Views/Pages/GalleryView.xaml.cs → ...ws/Pages/Gallery/GalleryLoginView.xaml.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,31 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.IO; | ||
using System.Linq; | ||
using System.Runtime.InteropServices.WindowsRuntime; | ||
using Windows.Foundation; | ||
using Windows.Foundation.Collections; | ||
using Microsoft.UI.Xaml; | ||
using Microsoft.UI.Xaml; | ||
using Microsoft.UI.Xaml.Controls; | ||
using Microsoft.UI.Xaml.Controls.Primitives; | ||
using Microsoft.UI.Xaml.Data; | ||
using Microsoft.UI.Xaml.Input; | ||
using Microsoft.UI.Xaml.Media; | ||
using Microsoft.UI.Xaml.Navigation; | ||
using Microsoft.Extensions.DependencyInjection; | ||
using Lively.UI.WinUI.ViewModels; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.IO; | ||
using System.Linq; | ||
using System.Runtime.InteropServices.WindowsRuntime; | ||
using Windows.Foundation; | ||
using Windows.Foundation.Collections; | ||
|
||
// To learn more about WinUI, the WinUI project structure, | ||
// and more about our project templates, see: http://aka.ms/winui-project-info. | ||
|
||
namespace Lively.UI.WinUI.Views.Pages | ||
namespace Lively.UI.WinUI.Views.Pages.Gallery | ||
{ | ||
/// <summary> | ||
/// An empty page that can be used on its own or navigated to within a Frame. | ||
/// </summary> | ||
public sealed partial class GalleryView : Page | ||
public sealed partial class GalleryLoginView : Page | ||
{ | ||
public GalleryView() | ||
public GalleryLoginView() | ||
{ | ||
this.InitializeComponent(); | ||
this.DataContext = App.Services.GetRequiredService<LibraryViewModel>(); | ||
} | ||
} | ||
} |
Oops, something went wrong.