Skip to content
This repository was archived by the owner on Apr 30, 2024. It is now read-only.

Commit d602d92

Browse files
authored
Merge pull request #583 from UWPCommunity/rewrite/main
Alpha update
2 parents 8569b4a + 4fc8288 commit d602d92

File tree

55 files changed

+829
-216
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+829
-216
lines changed

azure-pipelines-package-alpha.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ pool:
2222

2323
variables:
2424
solution: '**/Quarrel.App.sln'
25-
buildPlatform: 'x86|x64|arm'
25+
buildPlatform: 'x86|x64|arm|arm64'
2626
buildConfiguration: 'Alpha'
2727
installerDirectory: './QuarrelInstaller'
2828
appxPackageDir: '$(build.artifactStagingDirectory)\AppxPackages\\'
@@ -32,6 +32,7 @@ variables:
3232
msixPackages: '$(appxPackageDir)\**\\*.msix'
3333
appInstaller: '$(installerDirectory)\Quarrel.appinstaller'
3434
siteUri: 'https://quarrelfordiscord.github.io/QuarrelInstaller/'
35+
dailyNumber: $[counter(format('{0:yyyyMMdd}', pipeline.startTime), 0)]
3536

3637
steps:
3738
- checkout: self
@@ -53,10 +54,17 @@ steps:
5354
displayName: Place AppCenterToken
5455
inputs:
5556
targetType: 'inline'
56-
script: 'Copy-Item $Env:APP_CENTER_TOKEN_PATH -Destination "$($Env:BUILD_SOURCESDIRECTORY)/Quarrel/src/Quarrel/Assets/Tokens/AppCenter/"'
57+
script: 'Copy-Item $Env:APP_CENTER_TOKEN_PATH -Destination "$($Env:BUILD_SOURCESDIRECTORY)\Quarrel\src\Quarrel\Assets\Tokens\AppCenter\"'
5758
env:
5859
APP_CENTER_TOKEN_PATH: $(appCenterToken.secureFilePath)
5960

61+
- powershell: |
62+
# Update appxmanifest. This must be done before the build.
63+
[xml]$manifest= get-content "$($Env:BUILD_SOURCESDIRECTORY)\Quarrel\src\Quarrel\Package.Alpha.appxmanifest";
64+
$manifest.Package.Identity.Version = "$(Get-Date -format "y.M.d").$(dailyNumber)";
65+
$manifest.save("$($Env:BUILD_SOURCESDIRECTORY)\Quarrel\src\Quarrel\Package.Alpha.appxmanifest");
66+
displayName: 'Version Package Manifest'
67+
6068
- task: NuGetToolInstaller@1
6169
displayName: 'NuGet Installer'
6270

samples/Quarrel.Samples.RichPresence/App.xaml.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,9 @@ public App()
3131
/// <param name="e">Details about the launch request and process.</param>
3232
protected override void OnLaunched(LaunchActivatedEventArgs e)
3333
{
34-
Frame rootFrame = Window.Current.Content as Frame;
35-
3634
// Do not repeat app initialization when the Window already has content,
3735
// just ensure that the window is active
38-
if (rootFrame == null)
36+
if (Window.Current.Content is not Frame rootFrame)
3937
{
4038
// Create a Frame to act as the navigation context and navigate to the first page
4139
rootFrame = new Frame();

src/API/Discord.API.Status/Models/AffectedComponent.cs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,32 @@
77

88
namespace Discord.API.Status.Models
99
{
10+
/// <summary>
11+
/// A component that is affected by an issue.
12+
/// </summary>
1013
public class AffectedComponent
1114
{
15+
/// <summary>
16+
/// Gets the code of the issue that altered the component status.
17+
/// </summary>
1218
[JsonPropertyName("code")]
1319
public string Code { get; set; }
1420

21+
/// <summary>
22+
/// Gets the name of the comonent.
23+
/// </summary>
1524
[JsonPropertyName("name")]
1625
public string Name { get; set; }
1726

27+
/// <summary>
28+
/// Gets the status of the component before the issue.
29+
/// </summary>
1830
[JsonPropertyName("old_status")]
1931
public string OldStatus { get; set; }
2032

33+
/// <summary>
34+
/// Gets the status of the component with the issue.
35+
/// </summary>
2136
[JsonPropertyName("new_status")]
2237
public string NewStatus { get; set; }
2338
}

src/API/Discord.API.Status/Models/AllMetrics.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,26 @@
77

88
namespace Discord.API.Status.Models
99
{
10+
/// <summary>
11+
/// The set of all response time metrics over a period.
12+
/// </summary>
1013
public class AllMetrics
1114
{
15+
/// <summary>
16+
/// Gets the peroid of time the metrics cover.
17+
/// </summary>
1218
[JsonPropertyName("period")]
1319
public Period Period { get; set; }
1420

21+
/// <summary>
22+
/// Gets the set of individual response time elements.
23+
/// </summary>
1524
[JsonPropertyName("metrics")]
1625
public MetricElement[] Metrics { get; set; }
1726

27+
/// <summary>
28+
/// Gets the summary of the response time.
29+
/// </summary>
1830
[JsonPropertyName("summary")]
1931
public Summary Summary { get; set; }
2032
}

src/API/Discord.API.Status/Models/Component.cs

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,38 +8,74 @@
88

99
namespace Discord.API.Status.Models
1010
{
11+
/// <summary>
12+
/// A component status of the Discord API.
13+
/// </summary>
1114
public partial class Component
1215
{
16+
/// <summary>
17+
/// Gets the status of the component.
18+
/// </summary>
1319
[JsonPropertyName("status")]
1420
public string Status { get; set; }
1521

22+
/// <summary>
23+
/// Gets the name of the component.
24+
/// </summary>
1625
[JsonPropertyName("name")]
1726
public string Name { get; set; }
1827

28+
/// <summary>
29+
/// Gets the time the component was created.
30+
/// </summary>
1931
[JsonPropertyName("created_at")]
2032
public DateTimeOffset CreatedAt { get; set; }
2133

34+
/// <summary>
35+
/// Gets the time the component status was last updated.
36+
/// </summary>
2237
[JsonPropertyName("updated_at")]
2338
public DateTimeOffset UpdatedAt { get; set; }
2439

40+
/// <summary>
41+
/// Gets the ordering position of the component.
42+
/// </summary>
2543
[JsonPropertyName("position")]
2644
public long Position { get; set; }
2745

46+
/// <summary>
47+
/// Gets the description of the component.
48+
/// </summary>
2849
[JsonPropertyName("description")]
2950
public string? Description { get; set; }
3051

52+
/// <summary>
53+
/// Gets a value indicating whether or not the component is a showcase.
54+
/// </summary>
3155
[JsonPropertyName("showcase")]
3256
public bool Showcase { get; set; }
3357

58+
/// <summary>
59+
/// Gets the id of the component.
60+
/// </summary>
3461
[JsonPropertyName("id")]
3562
public string Id { get; set; }
3663

64+
/// <summary>
65+
/// Gets the page id of the component.
66+
/// </summary>
3767
[JsonPropertyName("page_id")]
3868
public string PageId { get; set; }
3969

70+
/// <summary>
71+
/// Gets the group id of the component.
72+
/// </summary>
4073
[JsonPropertyName("group_id")]
4174
public object GroupId { get; set; }
4275

76+
/// <summary>
77+
/// Gets a list of child components.
78+
/// </summary>
4379
[JsonPropertyName("components")]
4480
public string[]? Components { get; set; }
4581
}

src/API/Discord.API.Status/Models/Datum.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,20 @@
44

55
namespace Discord.API.Status.Models
66
{
7+
/// <summary>
8+
/// A response time datum.
9+
/// </summary>
710
public partial class Datum
811
{
12+
/// <summary>
13+
/// Gets the timestamp represented.
14+
/// </summary>
915
[JsonPropertyName("timestamp")]
1016
public long Timestamp { get; set; }
1117

18+
/// <summary>
19+
/// Gets the average response time during this time.
20+
/// </summary>
1221
[JsonPropertyName("value")]
1322
public ushort Value { get; set; }
1423
}

src/API/Discord.API.Status/Models/Incident.cs

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,77 +8,152 @@
88

99
namespace Discord.API.Status.Models
1010
{
11+
/// <summary>
12+
/// An incident in the Discord API.
13+
/// </summary>
1114
public partial class Incident
1215
{
16+
/// <summary>
17+
/// Gets the name of the incident.
18+
/// </summary>
1319
[JsonPropertyName("name")]
1420
public string Name { get; set; }
1521

22+
/// <summary>
23+
/// Gets the status of the api.
24+
/// </summary>
1625
[JsonPropertyName("status")]
1726
public string Status { get; set; }
1827

28+
/// <summary>
29+
/// Gets the time the incident began.
30+
/// </summary>
1931
[JsonPropertyName("created_at")]
2032
public DateTimeOffset? CreatedAt { get; set; }
2133

34+
/// <summary>
35+
/// Gets the time of the last incident update.
36+
/// </summary>
2237
[JsonPropertyName("updated_at")]
2338
public DateTimeOffset? UpdatedAt { get; set; }
2439

40+
/// <summary>
41+
/// Gets the time monitoring began.
42+
/// </summary>
2543
[JsonPropertyName("monitoring_at")]
2644
public DateTimeOffset? MonitoringAt { get; set; }
2745

46+
/// <summary>
47+
/// Gets the time the incident was resolved at.
48+
/// </summary>
2849
[JsonPropertyName("resolved_at")]
2950
public DateTimeOffset? ResolvedAt { get; set; }
3051

52+
/// <summary>
53+
/// Gets the impact of the incident.
54+
/// </summary>
3155
[JsonPropertyName("impact")]
3256
public string Impact { get; set; }
3357

58+
/// <summary>
59+
/// Gets the short link url to the incident.
60+
/// </summary>
3461
[JsonPropertyName("shortlink")]
3562
public string Shortlink { get; set; }
3663

64+
/// <summary>
65+
/// Gets a value indicating whether or not the post mortem of the incident is ignored.
66+
/// </summary>
3767
[JsonPropertyName("postmortem_ignored")]
3868
public bool PostmortemIgnored { get; set; }
3969

70+
/// <summary>
71+
/// Gets the post mortem of the incident.
72+
/// </summary>
4073
[JsonPropertyName("postmortem_body")]
4174
public object PostmortemBody { get; set; }
4275

76+
/// <summary>
77+
/// Gets the time the post mortem body was last updated.
78+
/// </summary>
4379
[JsonPropertyName("postmortem_body_last_updated_at")]
4480
public object PostmortemBodyLastUpdatedAt { get; set; }
4581

82+
/// <summary>
83+
/// Gets the time when the post mortem was published.
84+
/// </summary>
4685
[JsonPropertyName("postmortem_published_at")]
4786
public object PostmortemPublishedAt { get; set; }
4887

88+
/// <summary>
89+
/// Gets a value indicating whether or not post mortem subscribers are notified.
90+
/// </summary>
4991
[JsonPropertyName("postmortem_notified_subscribers")]
5092
public bool PostmortemNotifiedSubscribers { get; set; }
5193

94+
/// <summary>
95+
/// Gets a value indicating whether or not the post mortem was posted on Twitter.
96+
/// </summary>
5297
[JsonPropertyName("postmortem_notified_twitter")]
5398
public bool PostmortemNotifiedTwitter { get; set; }
5499

100+
/// <summary>
101+
/// TODO: Investigate.
102+
/// </summary>
55103
[JsonPropertyName("scheduled_for")]
56104
public object ScheduledFor { get; set; }
57105

106+
/// <summary>
107+
/// TODO: Investigate.
108+
/// </summary>
58109
[JsonPropertyName("scheduled_until")]
59110
public object ScheduledUntil { get; set; }
60111

112+
/// <summary>
113+
/// TODO: Investigate.
114+
/// </summary>
61115
[JsonPropertyName("scheduled_remind_prior")]
62116
public bool ScheduledRemindPrior { get; set; }
63117

118+
/// <summary>
119+
/// TODO: Investigate.
120+
/// </summary>
64121
[JsonPropertyName("scheduled_reminded_at")]
65122
public object ScheduledRemindedAt { get; set; }
66123

124+
/// <summary>
125+
/// TODO: Investigate.
126+
/// </summary>
67127
[JsonPropertyName("impact_override")]
68128
public string ImpactOverride { get; set; }
69129

130+
/// <summary>
131+
/// TODO: Investigate.
132+
/// </summary>
70133
[JsonPropertyName("scheduled_auto_in_progress")]
71134
public bool ScheduledAutoInProgress { get; set; }
72135

136+
/// <summary>
137+
/// Gets a value indicating whether or not the incident is scheduled for auto complete.
138+
/// </summary>
73139
[JsonPropertyName("scheduled_auto_completed")]
74140
public bool ScheduledAutoCompleted { get; set; }
75141

142+
/// <summary>
143+
/// Gets the incident id.
144+
/// </summary>
76145
[JsonPropertyName("id")]
77146
public string Id { get; set; }
78147

148+
/// <summary>
149+
/// Gets the page id for the incident.
150+
/// </summary>
79151
[JsonPropertyName("page_id")]
80152
public string PageId { get; set; }
81153

154+
/// <summary>
155+
/// Gets a list of updates to the incident.
156+
/// </summary>
82157
[JsonPropertyName("incident_updates")]
83158
public IncidentUpdate[] IncidentUpdates { get; set; }
84159
}

src/API/Discord.API.Status/Models/Index.cs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,32 @@
77

88
namespace Discord.API.Status.Models
99
{
10+
/// <summary>
11+
/// An index of the discord api status.
12+
/// </summary>
1013
public class Index
1114
{
15+
/// <summary>
16+
/// Gets the index page.
17+
/// </summary>
1218
[JsonPropertyName("page")]
1319
public Page Page { get; set; }
1420

21+
/// <summary>
22+
/// Gets the status for the index.
23+
/// </summary>
1524
[JsonPropertyName("status")]
1625
public StatusClass Status { get; set; }
1726

27+
/// <summary>
28+
/// Gets the component statuses for the index.
29+
/// </summary>
1830
[JsonPropertyName("components")]
1931
public Component[] Components { get; set; }
2032

33+
/// <summary>
34+
/// Gets the index incidents.
35+
/// </summary>
2136
[JsonPropertyName("incidents")]
2237
public Incident[] Incidents { get; set; }
2338
}

0 commit comments

Comments
 (0)