-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/UnicordDev/UniSky
- Loading branch information
Showing
54 changed files
with
3,683 additions
and
272 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
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 was deleted.
Oops, something went wrong.
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,16 @@ | ||
<ContentDialog | ||
x:Class="UniSky.Controls.Compose.ComposeDiscardDraftDialog" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:local="using:UniSky.Controls.Compose" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
mc:Ignorable="d" | ||
Title="Discard draft?" | ||
PrimaryButtonText="Discard" | ||
SecondaryButtonText="Cancel" | ||
SecondaryButtonStyle="{ThemeResource AccentButtonStyle}"> | ||
|
||
<TextBlock Text="Are you sure you want to discard this draft? This action is irreversible!" | ||
TextWrapping="WrapWholeWords"/> | ||
</ContentDialog> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,184 @@ | ||
<sheet:SheetControl | ||
xmlns:sheet="using:UniSky.Controls.Sheet" | ||
x:Class="UniSky.Controls.Compose.ComposeSheet" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:local="using:UniSky.Controls.Compose" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
xmlns:converters="using:UniSky.Converters" | ||
xmlns:extensions="using:UniSky.Extensions" xmlns:controls="using:Microsoft.Toolkit.Uwp.UI.Controls" xmlns:muxc="using:Microsoft.UI.Xaml.Controls" | ||
mc:Ignorable="d" d:DesignHeight="300" d:DesignWidth="320" | ||
Style="{StaticResource DefaultSheetControlStyle}" | ||
DataContext="{x:Bind ViewModel, Mode=OneWay}" | ||
PrimaryButtonCommand="{x:Bind ViewModel.PostCommand}" | ||
IsPrimaryButtonEnabled="{x:Bind ViewModel.CanPost, Mode=OneWay}" | ||
SecondaryButtonCommand="{x:Bind ViewModel.HideCommand}"> | ||
<sheet:SheetControl.TitleContent> | ||
<TextBlock Text="NEW POST"/> | ||
</sheet:SheetControl.TitleContent> | ||
<sheet:SheetControl.PrimaryButtonContent> | ||
<TextBlock Text="Post" Margin="8,0"/> | ||
</sheet:SheetControl.PrimaryButtonContent> | ||
<sheet:SheetControl.SecondaryButtonContent> | ||
<TextBlock Text="Cancel"/> | ||
</sheet:SheetControl.SecondaryButtonContent> | ||
|
||
<Grid x:Name="ContentGrid"> | ||
<Grid.RowDefinitions> | ||
<RowDefinition Height="Auto"/> | ||
<RowDefinition Height="*"/> | ||
<RowDefinition Height="Auto"/> | ||
</Grid.RowDefinitions> | ||
|
||
<Grid x:Name="ErrorContainer" | ||
x:Load="{x:Bind ViewModel.IsErrored, Mode=OneWay}" | ||
Padding="12,0" | ||
extensions:Hairline.Margin="-1" | ||
extensions:Hairline.BorderThickness="1"> | ||
<Grid.ColumnDefinitions> | ||
<ColumnDefinition Width="Auto"/> | ||
<ColumnDefinition Width="*"/> | ||
</Grid.ColumnDefinitions> | ||
<Grid.Background> | ||
<SolidColorBrush Opacity="0.2" Color="{ThemeResource SystemErrorTextColor}"/> | ||
</Grid.Background> | ||
<Grid.BorderBrush> | ||
<SolidColorBrush Opacity="0.6" Color="{ThemeResource SystemErrorTextColor}"/> | ||
</Grid.BorderBrush> | ||
|
||
<Viewbox Width="16" | ||
Height="16" | ||
Margin="0,10,0,0" | ||
VerticalAlignment="Top"> | ||
<TextBlock FontFamily="{ThemeResource SymbolThemeFontFamily}"></TextBlock> | ||
</Viewbox> | ||
|
||
<TextBlock Text="{Binding Error.Message, FallbackValue='Something went wrong!'}" | ||
TextWrapping="Wrap" | ||
Margin="8" | ||
Grid.Column="1" | ||
MaxLines="2"/> | ||
</Grid> | ||
|
||
<ProgressBar Grid.Row="1" | ||
VerticalAlignment="Top" | ||
Background="Transparent" | ||
IsIndeterminate="{x:Bind ViewModel.IsLoading, Mode=OneWay}" /> | ||
|
||
<ScrollViewer Grid.Row="1" | ||
IsEnabled="{x:Bind converters:Static.Not(ViewModel.IsLoading), Mode=OneWay}" | ||
HorizontalScrollMode="Disabled" | ||
VerticalScrollMode="Enabled" | ||
IsVerticalScrollChainingEnabled="True" | ||
IsVerticalRailEnabled="True" | ||
IsDeferredScrollingEnabled="False" | ||
Padding="12"> | ||
<Grid> | ||
<Grid.RowDefinitions> | ||
<RowDefinition Height="Auto"/> | ||
<RowDefinition Height="*"/> | ||
</Grid.RowDefinitions> | ||
<Grid x:Name="ReplyContainer" | ||
x:Load="{x:Bind ViewModel.HasReply}" | ||
Margin="0,0,0,8" | ||
BorderBrush="{ThemeResource SystemControlSeparatorBrush}" | ||
extensions:Hairline.BorderThickness="0,0,0,1"> | ||
<Grid.ColumnDefinitions> | ||
<ColumnDefinition Width="Auto"/> | ||
<ColumnDefinition Width="*"/> | ||
</Grid.ColumnDefinitions> | ||
<muxc:PersonPicture Width="48" | ||
Height="48" | ||
Margin="0,0,8,0" | ||
VerticalAlignment="Top" | ||
ProfilePicture="{x:Bind ViewModel.ReplyTo.Author.AvatarUrl, Mode=OneWay}"/> | ||
<StackPanel Grid.Column="1" | ||
Margin="0,0,0,8"> | ||
<TextBlock Foreground="{ThemeResource SystemControlForegroundBaseMediumLowBrush}" | ||
VerticalAlignment="Top"> | ||
<Run Text="{x:Bind ViewModel.ReplyTo.Author.Name, Mode=OneWay}" | ||
FontWeight="Bold" | ||
Foreground="{ThemeResource SystemControlForegroundBaseHighBrush}"/> | ||
<Run Text="{x:Bind ViewModel.ReplyTo.Author.Handle, Mode=OneWay}"/> | ||
</TextBlock> | ||
|
||
<TextBlock x:Name="MainContent" | ||
x:Load="{x:Bind converters:Static.NotNullOrWhiteSpace(ViewModel.ReplyTo.Text)}" | ||
Text="{x:Bind ViewModel.ReplyTo.Text}" | ||
TextWrapping="Wrap" | ||
TextTrimming="CharacterEllipsis" | ||
MaxLines="4" | ||
Margin="0,0,0,4" | ||
VerticalAlignment="Top"/> | ||
</StackPanel> | ||
</Grid> | ||
<Grid Grid.Row="1" MinHeight="150"> | ||
<Grid.ColumnDefinitions> | ||
<ColumnDefinition Width="Auto"/> | ||
<ColumnDefinition Width="*"/> | ||
</Grid.ColumnDefinitions> | ||
<Ellipse Width="48" | ||
Height="48" | ||
Margin="0,0,8,0" | ||
VerticalAlignment="Top"> | ||
<Ellipse.Fill> | ||
<ImageBrush> | ||
<ImageBrush.ImageSource> | ||
<BitmapImage UriSource="{Binding AvatarUrl}" | ||
DecodePixelWidth="48" | ||
DecodePixelHeight="48" | ||
DecodePixelType="Logical"/> | ||
</ImageBrush.ImageSource> | ||
</ImageBrush> | ||
</Ellipse.Fill> | ||
</Ellipse> | ||
<TextBox x:Name="PrimaryTextBox" | ||
Style="{StaticResource BorderlessTextBoxStyle}" | ||
Grid.Column="1" | ||
Text="{x:Bind ViewModel.Text, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" | ||
ScrollViewer.VerticalScrollMode="Disabled" | ||
ScrollViewer.HorizontalScrollMode="Disabled" | ||
ScrollViewer.IsDeferredScrollingEnabled="False" | ||
VerticalAlignment="Stretch" | ||
PlaceholderText="What's happening?" | ||
MaxLength="300" /> | ||
</Grid> | ||
</Grid> | ||
</ScrollViewer> | ||
|
||
<Grid x:Name="FooterContainer" | ||
Grid.Row="2" | ||
Background="{ThemeResource SystemControlBackgroundListExtraLowBrush}" | ||
BorderBrush="{ThemeResource SystemControlSeparatorBrush}" | ||
Padding="0,0,0,2" | ||
extensions:Hairline.BorderThickness="0,1,0,0"> | ||
<Grid.ColumnDefinitions> | ||
<ColumnDefinition Width="*"/> | ||
<ColumnDefinition Width="Auto"/> | ||
</Grid.ColumnDefinitions> | ||
|
||
<StackPanel Margin="2,0,0,0" | ||
VerticalAlignment="Stretch" | ||
Orientation="Horizontal"> | ||
<Button Style="{ThemeResource IconButtonStyle}" | ||
Content="" | ||
Margin="0,0,2,0"/> | ||
<Button Style="{ThemeResource IconButtonStyle}" | ||
Content="" | ||
Margin="0,0,2,0"/> | ||
<Button Style="{ThemeResource IconButtonStyle}" | ||
Content="" | ||
Margin="0,0,2,0"/> | ||
</StackPanel> | ||
|
||
<controls:RadialProgressBar Grid.Column="1" | ||
Margin="8,6" | ||
Minimum="0" | ||
Maximum="{x:Bind ViewModel.MaxCharacters}" | ||
Value="{x:Bind ViewModel.Characters, Mode=OneWay}" | ||
Width="32" | ||
Height="32"/> | ||
</Grid> | ||
</Grid> | ||
</sheet:SheetControl> |
Oops, something went wrong.