Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.17.3 - Angular 17 + Quality of Life improvements #156

Merged
merged 20 commits into from
Feb 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
303cc19
upgrade to angular v17.
spencernaugler7 Jan 28, 2024
7f64891
Merge branch 'develop' into angular_upgrade
SakuraIsayeki Feb 2, 2024
e70955b
feat(environment): add development environment configuration
SakuraIsayeki Feb 2, 2024
fe39505
feat(html-loader): Update logic for loading HTML content
SakuraIsayeki Feb 2, 2024
303f2ae
refactor(web)!: Partial update to signals + Fix broken components
SakuraIsayeki Feb 9, 2024
3ad7a6b
fix(api/posts/sent): Include replay in post queries
SakuraIsayeki Feb 9, 2024
529008b
refactor(web)!: Further update to components
SakuraIsayeki Feb 23, 2024
ea830cd
feat(package.json): add SSL flag to dev script
SakuraIsayeki Feb 23, 2024
1b45030
Merge pull request #155 from SakuraIsayeki/angular_upgrade
SakuraIsayeki Feb 23, 2024
1630c99
feat(package): update Angular and dependencies
SakuraIsayeki Feb 23, 2024
252fde9
feat(launchSettings.json): Update applicationUrl to use HTTPS in dev
SakuraIsayeki Feb 23, 2024
057a15a
feat(profile): improve UI layout and move mod actions modal
SakuraIsayeki Feb 23, 2024
44e5400
feat(profile-mod-actions-view): improve mod actions modal
SakuraIsayeki Feb 23, 2024
d39b380
chore(web): Comment out global PSA
SakuraIsayeki Feb 23, 2024
6c4d301
feat(profile-platform-bans-view): improve modal layout and add player ID
SakuraIsayeki Feb 23, 2024
05eef0b
feat(navbar): Add environment badge to navbar
SakuraIsayeki Feb 23, 2024
c2810ff
feat(api/host): Add UseSystemd to host configuration
SakuraIsayeki Feb 23, 2024
41e89bb
feat(profile): Move button to display platform bans details
SakuraIsayeki Feb 23, 2024
decd8aa
fix(posts-received): Add async/await to openEditor method
SakuraIsayeki Feb 23, 2024
6c8bdb1
build: Update project and package versions
SakuraIsayeki Feb 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion WowsKarma.Api/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,6 @@ public static IHostBuilder CreateHostBuilder(string[] args) =>
.UseSerilog((hostingContext, loggerConfiguration) => loggerConfiguration
.ReadFrom.Configuration(hostingContext.Configuration)
.Enrich.WithProperty("_Region", Startup.ApiRegion.ToRegionString())
);
)
.UseSystemd();
}
2 changes: 1 addition & 1 deletion WowsKarma.Api/Properties/launchSettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
},
"sqlDebugging": false,
"dotnetRunMessages": "true",
"applicationUrl": "http://localhost:5010"
"applicationUrl": "https://localhost:5010"
},
"Docker": {
"commandName": "Docker",
Expand Down
4 changes: 4 additions & 0 deletions WowsKarma.Api/Services/Posts/PostService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ public IQueryable<Post> GetReceivedPosts(uint playerId) => _context.Posts.AsNoTr
.ThenInclude(p => p.ClanMember)
.ThenInclude(p => p.Clan)

.Include(p => p.Replay)

.Where(p => p.PlayerId == playerId)
.OrderByDescending(p => p.CreatedAt);

Expand All @@ -92,6 +94,8 @@ public IQueryable<Post> GetSentPosts(uint authorId) => _context.Posts.AsNoTracki
.ThenInclude(p => p.ClanMember)
.ThenInclude(p => p.Clan)

.Include(p => p.Replay)

.Where(p => p.AuthorId == authorId)
.OrderByDescending(p => p.CreatedAt);

Expand Down
19 changes: 10 additions & 9 deletions WowsKarma.Api/WowsKarma.Api.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>

<Version>0.17.2</Version>
<ProductVersion>0.17.2</ProductVersion>
<Version>0.17.3</Version>
<ProductVersion>0.17.3</ProductVersion>
<Authors>Sakura Akeno Isayeki</Authors>
<Company>Nodsoft Systems</Company>
<Product>WOWS Karma (API)</Product>
<PackageProjectUrl>https://wows-karma.com</PackageProjectUrl>
<RepositoryUrl>https://github.com/SakuraIsayeki/WoWS-Karma</RepositoryUrl>
<RepositoryType>Git</RepositoryType>
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>

<UserSecretsId>8247eff5-32cd-4d58-ae32-52f2201e69c5</UserSecretsId>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
Expand All @@ -30,22 +31,22 @@
<PackageReference Include="DSharpPlus" Version="4.4.6" />
<PackageReference Include="ExpressionDebugger" Version="2.2.1" />
<PackageReference Include="FlexLabs.EntityFrameworkCore.Upsert" Version="8.0.0" />
<PackageReference Include="Hangfire.AspNetCore" Version="1.8.7" />
<PackageReference Include="Hangfire.PostgreSql" Version="1.20.5" />
<PackageReference Include="Hangfire.AspNetCore" Version="1.8.11" />
<PackageReference Include="Hangfire.PostgreSql" Version="1.20.6" />
<PackageReference Include="Hangfire.Tags.PostgreSql" Version="1.9.6" />
<PackageReference Include="JetBrains.Annotations" Version="2023.3.0" />
<PackageReference Include="Mapster" Version="7.4.0" />
<PackageReference Include="Mapster.DependencyInjection" Version="1.0.1" />
<PackageReference Include="Mapster.EFCore" Version="5.1.1" />
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.22.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.1" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.2" />
<PackageReference Include="Microsoft.AspNetCore.SignalR.Protocols.MessagePack" Version="8.0.1" />
<PackageReference Include="Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson" Version="8.0.1" />
<PackageReference Include="Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson" Version="8.0.2" />
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="8.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.1">
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand All @@ -54,8 +55,8 @@
<PackageReference Include="NodaTime" Version="3.1.9" />
<PackageReference Include="Nodsoft.Wargaming.Api.Client" Version="0.3.5" />
<PackageReference Include="Nodsoft.WowsReplaysUnpack.ExtendedData" Version="2.0.2" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="8.0.0" />
<PackageReference Include="Polly.Extensions" Version="8.2.1" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="8.0.2" />
<PackageReference Include="Polly.Extensions" Version="8.3.0" />
<PackageReference Include="Serilog.AspNetCore" Version="8.0.1" />
<PackageReference Include="Serilog.Extensions.Logging" Version="8.0.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
Expand Down
58 changes: 29 additions & 29 deletions wowskarma.app/package.json
Original file line number Diff line number Diff line change
@@ -1,44 +1,44 @@
{
"name": "wowskarma.app",
"version": "0.17.1",
"version": "0.17.3",
"scripts": {
"ng": "ng",
"dev": "ng serve --watch",
"dev": "ng serve --watch --ssl true",
"start": "ng serve",
"build": "ng build",
"watch": "ng build --watch --configuration development",
"test": "ng test"
},
"private": true,
"dependencies": {
"@angular/animations": "^14.2.12",
"@angular/common": "^14.2.12",
"@angular/compiler": "^14.2.12",
"@angular/core": "^14.2.12",
"@angular/forms": "^14.2.12",
"@angular/localize": "^14.2.12",
"@angular/platform-browser": "^14.2.12",
"@angular/platform-browser-dynamic": "^14.2.12",
"@angular/router": "^14.2.12",
"@angular/service-worker": "^14.2.12",
"@microsoft/applicationinsights-angularplugin-js": "^3.0.0",
"@microsoft/applicationinsights-web": "^2.8.9",
"@microsoft/signalr": "^6.0.11",
"@ng-bootstrap/ng-bootstrap": "^13.1.1",
"@popperjs/core": "^2.11.6",
"@types/bootstrap": "^5.2.6",
"bootstrap": "^5.2.3",
"bootstrap-icons": "^1.10.2",
"bootswatch": "^5.2.3",
"ng-openapi-gen": "^0.23.0",
"rxjs": "~7.5.7",
"tslib": "^2.4.1",
"zone.js": "~0.11.8"
"@angular/animations": "^17.2.2",
"@angular/common": "17.2.2",
"@angular/compiler": "^17.2.2",
"@angular/core": "^17.2.2",
"@angular/forms": "^17.2.2",
"@angular/localize": "^17.2.2",
"@angular/platform-browser": "^17.2.2",
"@angular/platform-browser-dynamic": "^17.2.2",
"@angular/router": "^17.2.2",
"@angular/service-worker": "^17.2.2",
"@microsoft/applicationinsights-angularplugin-js": "^15.1.0",
"@microsoft/applicationinsights-web": "^3.1.0",
"@microsoft/signalr": "^8.0.0",
"@ng-bootstrap/ng-bootstrap": "^16.0.0",
"@popperjs/core": "^2.11.8",
"@types/bootstrap": "^5.2.10",
"bootstrap": "^5.3.3",
"bootstrap-icons": "^1.11.3",
"bootswatch": "^5.3.2",
"ng-openapi-gen": "^0.51.0",
"rxjs": "~7.8.1",
"tslib": "^2.6.2",
"zone.js": "~0.14.4"
},
"devDependencies": {
"@angular-devkit/build-angular": "^14.2.10",
"@angular/cli": "~14.2.10",
"@angular/compiler-cli": "^14.2.12",
"typescript": "~4.8.4"
"@angular-devkit/build-angular": "^17.2.1",
"@angular/cli": "~17.2.1",
"@angular/compiler-cli": "^17.2.2",
"typescript": "~5.3.3"
}
}
7 changes: 5 additions & 2 deletions wowskarma.app/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { NgModule } from "@angular/core";
import { FormsModule, ReactiveFormsModule } from "@angular/forms";
import { BrowserModule } from "@angular/platform-browser";
import { ServiceWorkerModule } from "@angular/service-worker";
import { NgbCollapseModule, NgbPaginationModule, NgbTooltipModule } from '@ng-bootstrap/ng-bootstrap';
import { NgbCollapseModule, NgbPaginationModule, NgbTooltipModule, NgbModule } from '@ng-bootstrap/ng-bootstrap';
import { ModActionTypeDisplayPipe } from 'src/app/services/pipes/mod-action-type-display.pipe';
import { AppRoutingModule } from "./app-routing.module";
import { AppWrapperComponent } from "./app-wrapper.component";
Expand Down Expand Up @@ -65,6 +65,7 @@ import { PlayerNamelinkComponent } from './shared/components/player-namelink/pla
import { ProfileModActionsViewComponent } from './shared/modals/profile-mod-actions-view/profile-mod-actions-view.component';
import { ProfilePlatformBansViewComponent } from './shared/modals/profile-platform-bans-view/profile-platform-bans-view.component';
import { UserRolesComponent } from './shared/components/icons/user-roles/user-roles.component';
import { NgOptimizedImage } from "@angular/common";

@NgModule({
declarations: [
Expand Down Expand Up @@ -135,7 +136,9 @@ import { UserRolesComponent } from './shared/components/icons/user-roles/user-ro
}),
NgbCollapseModule,
NgbPaginationModule,
NgbTooltipModule
NgbTooltipModule,
NgbModule,
NgOptimizedImage
],
providers: [
AuthService,
Expand Down
6 changes: 4 additions & 2 deletions wowskarma.app/src/app/pages/clan/profile/profile.component.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ChangeDetectionStrategy, Component } from "@angular/core";
import {ChangeDetectionStrategy, Component, inject} from "@angular/core";
import { ActivatedRoute } from "@angular/router";
import { Observable } from "rxjs";
import { map } from "rxjs/operators";
Expand All @@ -23,6 +23,8 @@ type ApiModelState<T> = {
})
export class ProfileComponent {
//loaded$ = new BehaviorSubject<boolean>(false);
private route: ActivatedRoute = inject(ActivatedRoute);
private clanService: ClanService = inject(ClanService);

// Get the "ID,username" from the route params.
profile$: Observable<ApiModelState<ClanProfileFullDto>> = routeParam(this.route, "idNamePair").pipe(
Expand All @@ -47,7 +49,7 @@ export class ProfileComponent {
shareReplayRefCount(1),
);

constructor(private route: ActivatedRoute, private clanService: ClanService) {
constructor() {
// Empty subscription to preemptively load the clan profile ahead of view tree.
// (uses shareReplayRefCount to prevent multiple requests)
this.profile$.subscribe();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
<div class="row justify-content-around align-items-center">
<div class="col-lg-4 order-3 order-lg-1">
<img src="../../../../assets/media/akatsuki-torp-oops.png"
class="my-5 my-lg-1 mx-lg-5 img-fluid rounded h-50"
alt="Oops, Akatsuki messed up her salvo."
title="Oops, Akatsuki messed up her salvo.">
<img
ngSrc="../../../../assets/media/akatsuki-torp-oops.png" fill
class="position-static my-5 my-lg-1 mx-lg-5 h-50"
alt="Oops, Akatsuki messed up her salvo."
title="Oops, Akatsuki messed up her salvo."
>
</div>

<div class="col-lg-8 text-center order-1 order-lg-3">
<h1 class="display-1">404</h1>
<h3 class="text-warning">{{message}}</h3>
<h3 class="text-warning">{{message()}}</h3>
</div>
</div>
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import { Component, Input } from '@angular/core';
import { ChangeDetectionStrategy, Component, input } from '@angular/core';

@Component({
selector: 'app-not-found',
templateUrl: './not-found.component.html',
styleUrls: ['./not-found.component.scss']
styleUrls: ['./not-found.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush
})
export class NotFoundComponent {
@Input() message = 'Sorry, there\'s nothing at this address.';

constructor() { }
message = input("Sorry, there's nothing at this address.");
}
Loading
Loading