forked from UnicordDev/UniSky
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from UnicordDev/master
dfg
- Loading branch information
Showing
138 changed files
with
12,573 additions
and
1,066 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 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 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,48 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Reflection; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using UniSky.Models; | ||
using Windows.ApplicationModel; | ||
using Windows.UI.Xaml; | ||
|
||
namespace UniSky; | ||
|
||
public static class Constants | ||
{ | ||
public static string Version | ||
{ | ||
get | ||
{ | ||
var gitSha = ""; | ||
var versionedAssembly = typeof(LoginModel).Assembly; | ||
var attribute = versionedAssembly.GetCustomAttribute<AssemblyInformationalVersionAttribute>(); | ||
|
||
int idx; | ||
if (attribute != null && (idx = attribute.InformationalVersion.IndexOf('+')) != -1) | ||
{ | ||
gitSha = "-" + attribute.InformationalVersion.Substring(idx + 1); | ||
} | ||
|
||
var v = Package.Current.Id.Version; | ||
return $"{v.Major}.{v.Minor}.{v.Build}.{v.Revision}{gitSha}"; | ||
} | ||
} | ||
|
||
public static string UserAgent | ||
=> $"UniSky/{Version} (https://github.com/UnicordDev/UniSky)"; | ||
|
||
public static class Settings | ||
{ | ||
public const string REQUESTED_COLOUR_SCHEME = "RequestedColourScheme_v1"; | ||
public const int REQUESTED_COLOUR_SCHEME_DEFAULT = (int)ElementTheme.Default; | ||
|
||
public const string USE_MULTIPLE_WINDOWS = "UseMultipleWindows_v1"; | ||
// default: calculated | ||
|
||
public const string AUTO_FEED_REFRESH = "AutoRefreshFeeds_v1"; | ||
public const bool AUTO_FEED_REFRESH_DEFAULT = true; | ||
} | ||
} |
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,39 @@ | ||
<ContentDialog | ||
x:Class="UniSky.Controls.Compose.ComposeAddAltTextDialog" | ||
x:Uid="ComposeAddAltTextDialog" | ||
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:compose="using:UniSky.ViewModels.Compose" | ||
mc:Ignorable="d" | ||
Title="ADD ALT TEXT" | ||
PrimaryButtonText="OK" | ||
SecondaryButtonText="Cancel" | ||
PrimaryButtonStyle="{ThemeResource AccentButtonStyle}"> | ||
<d:ContentDialog.DataContext> | ||
<d:DesignInstance Type="compose:ComposeViewAttachmentViewModel"/> | ||
</d:ContentDialog.DataContext> | ||
|
||
<Grid> | ||
<Grid.RowDefinitions> | ||
<RowDefinition Height="*"/> | ||
<RowDefinition Height="Auto"/> | ||
</Grid.RowDefinitions> | ||
|
||
<Image Source="{Binding Thumbnail}" MaxHeight="350" /> | ||
|
||
<TextBox x:Uid="ComposeAddAltTextTextBox" | ||
Grid.Row="1" | ||
Margin="0,16,0,0" | ||
PlaceholderText="Describe this image! Be as detailed as you like." | ||
TextWrapping="Wrap" | ||
AcceptsReturn="True" | ||
MaxLength="2000" | ||
MaxHeight="200" | ||
Text="{Binding AltText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"> | ||
|
||
</TextBox> | ||
</Grid> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
using UniSky.ViewModels.Compose; | ||
using Windows.UI.Xaml.Controls; | ||
|
||
namespace UniSky.Controls.Compose; | ||
|
||
public sealed partial class ComposeAddAltTextDialog : ContentDialog | ||
{ | ||
public ComposeAddAltTextDialog(ComposeViewAttachmentViewModel viewModel) | ||
{ | ||
this.InitializeComponent(); | ||
this.DataContext = viewModel; | ||
} | ||
} |
Oops, something went wrong.