Skip to content

Commit 7d78fd3

Browse files
committed
Switch to standalone components
1 parent 8648f72 commit 7d78fd3

File tree

236 files changed

+1322
-1843
lines changed

Some content is hidden

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

236 files changed

+1322
-1843
lines changed

frontend/src/.browserslistrc

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
# For additional information regarding the format and rule options, please see:
33
# https://github.com/browserslist/browserslist#queries
44
# For IE 9-11 support, please uncomment the last line of the file and adjust as needed
5-
> 0.5%
6-
last 2 versions
7-
Firefox ESR
5+
defaults
86
not dead
9-
# IE 9-11
7+
> 0.2%

frontend/src/app/_app.theme.scss

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1+
@use "sass:map";
12
@use '@angular/material' as mat;
23

34
@mixin global-theme($theme) {
45
// Extract whichever individual palettes you need from the theme.
5-
$primary: map-get($theme, primary);
6-
$accent: map-get($theme, accent);
7-
$warn: map-get($theme, warn);
8-
$background: map-get($theme, background);
9-
$foreground: map-get($theme, foreground);
6+
$primary: map.get($theme, primary);
7+
$accent: map.get($theme, accent);
8+
$warn: map.get($theme, warn);
9+
$background: map.get($theme, background);
10+
$foreground: map.get($theme, foreground);
1011

1112
a {
1213
color: mat.m2-get-color-from-palette($primary, 500);

frontend/src/app/action/action.module.ts

Lines changed: 0 additions & 30 deletions
This file was deleted.

frontend/src/app/action/nhbk-action-editor-dialog.component.ts

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,20 @@ import {Observable} from 'rxjs';
1414
import {ActiveStatsModifier, AutocompleteValue, MiscService} from '../shared';
1515

1616
import {ItemTemplate} from '../item-template';
17-
import {MAT_DIALOG_DATA, MatDialogRef} from '@angular/material/dialog';
17+
import { MAT_DIALOG_DATA, MatDialogRef, MatDialogTitle, MatDialogContent, MatDialogClose } from '@angular/material/dialog';
1818
import {Effect} from '../effect';
19+
import { CdkScrollable } from '@angular/cdk/scrolling';
20+
import { MatFormField, MatPrefix, MatSuffix } from '@angular/material/form-field';
21+
import { MatSelect } from '@angular/material/select';
22+
import { FormsModule } from '@angular/forms';
23+
import { MatOption } from '@angular/material/autocomplete';
24+
import { MatCheckbox } from '@angular/material/checkbox';
25+
import { AutocompleteInputComponent } from '../shared/autocomplete-input.component';
26+
import { MatInput } from '@angular/material/input';
27+
import { StatModifierEditorComponent } from '../effect/stats-modifier-editor.component';
28+
import { ActiveEffectEditorComponent } from '../effect/active-effect-editor.component';
29+
import { MatCardActions } from '@angular/material/card';
30+
import { MatButton } from '@angular/material/button';
1931

2032
export interface NhbkActionEditorDialogData {
2133
action?: NhbkAction
@@ -24,7 +36,7 @@ export interface NhbkActionEditorDialogData {
2436
@Component({
2537
styleUrls: ['./nhbk-action-editor-dialog.component.scss'],
2638
templateUrl: './nhbk-action-editor-dialog.component.html',
27-
standalone: false
39+
imports: [MatDialogTitle, CdkScrollable, MatDialogContent, MatFormField, MatSelect, FormsModule, MatOption, MatCheckbox, AutocompleteInputComponent, MatInput, MatPrefix, MatSuffix, StatModifierEditorComponent, ActiveEffectEditorComponent, MatCardActions, MatButton, MatDialogClose]
2840
})
2941
export class NhbkActionEditorDialogComponent {
3042
action: NhbkAction = NhbkActionFactory.createFromType(NhbkActionType.addEv, {ev: 1});

frontend/src/app/action/nhbk-action.component.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,13 @@ import {EffectService} from '../effect';
1010
import {Effect} from '../effect';
1111
import {duration2text} from '../date/util';
1212
import {ActiveStatsModifier} from '../shared';
13+
import { ModifierPipe } from '../shared/modifier.pipe';
1314

1415
@Component({
1516
selector: 'nhbk-action',
1617
styleUrls: ['./nhbk-action.component.scss'],
1718
templateUrl: './nhbk-action.component.html',
18-
standalone: false
19+
imports: [ModifierPipe]
1920
})
2021
export class NhbkActionComponent implements OnInit, OnChanges {
2122
@Input() action: NhbkAction;

frontend/src/app/app.component.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
import {Component, OnInit} from '@angular/core';
22

33
import {ThemeService} from './theme.service';
4+
import { RouterOutlet } from '@angular/router';
5+
import { QuickCommandComponent } from './quick-command/quick-command.component';
46

57
@Component({
68
selector: 'app-root',
79
templateUrl: './app.component.html',
810
styleUrls: ['./app.component.scss'],
9-
standalone: false
11+
imports: [RouterOutlet, QuickCommandComponent]
1012
})
1113
export class AppComponent implements OnInit {
1214
public initialized = false;

frontend/src/app/app.module.ts

Lines changed: 0 additions & 67 deletions
This file was deleted.

frontend/src/app/app.routes.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,19 @@ export const routes: Routes = [
1313
},
1414
{
1515
path: 'gm',
16-
loadChildren: () => import('./home-gm/home-gm.module').then(m => m.GmHomeModule)
16+
loadChildren: () => import('./home-gm/home-gm.routes').then(m => m.routes)
1717
},
1818
{
1919
path: 'database',
20-
loadChildren: () => import('./home-database/home-database.module').then(m => m.DatabaseHomeModule)
20+
loadChildren: () => import('./home-database/home-database.routes').then(m => m.routes)
2121
},
2222
{
2323
path: 'player',
24-
loadChildren: () => import('./home-player/home-player.module').then(m => m.PlayerHomeModule)
24+
loadChildren: () => import('./home-player/home-player.routes').then(m => m.routes)
2525
},
2626
{
2727
path: 'map',
28-
loadChildren: () => import('./map/map.module').then(m => m.MapModule)
28+
loadChildren: () => import('./map/map.routes').then(m => m.routes)
2929
},
3030
{
3131
path: 'login/:redirect',

frontend/src/app/character/_character.theme.scss

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1+
@use "sass:map";
12
@use '@angular/material' as mat;
23

34
@mixin character-theme($theme) {
45
// Extract whichever individual palettes you need from the theme.
5-
$primary: map-get($theme, primary);
6-
$accent: map-get($theme, accent);
7-
$warn: map-get($theme, warn);
8-
$background: map-get($theme, background);
9-
$foreground: map-get($theme, foreground);
6+
$primary: map.get($theme, primary);
7+
$accent: map.get($theme, accent);
8+
$warn: map.get($theme, warn);
9+
$background: map.get($theme, background);
10+
$foreground: map.get($theme, foreground);
1011

1112
.stat-details {
1213
.stat-detail-reason {
@@ -57,14 +58,14 @@
5758

5859
span {
5960
&.game-icon-hearts {
60-
@if (map_get($theme, is-dark)) {
61+
@if (map.get($theme, is-dark)) {
6162
color: #a01219;
6263
} @else {
6364
color: #ff0d26;
6465
}
6566
}
6667
&.game-icon-abstract-061 {
67-
@if (map_get($theme, is-dark)) {
68+
@if (map.get($theme, is-dark)) {
6869
color: #400a71;
6970
} @else {
7071
color: blueviolet;

frontend/src/app/character/add-item-dialog.component.ts

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
11
import {Component, ViewChild} from '@angular/core';
22
import {ItemTemplate, ItemTemplateService} from '../item-template';
33
import {ItemData} from '../item';
4-
import {MatDialogRef} from '@angular/material/dialog';
5-
import {MatStep} from '@angular/material/stepper';
4+
import { MatDialogRef, MatDialogClose } from '@angular/material/dialog';
5+
import { MatStep, MatStepper, MatStepLabel } from '@angular/material/stepper';
66
import {forkJoin} from 'rxjs';
77
import {IconDescription} from '../shared/icon.model';
88
import {Guid} from '../api/shared/util';
9+
import { MatToolbar } from '@angular/material/toolbar';
10+
import { MatIconButton, MatButton } from '@angular/material/button';
11+
import { MatIcon } from '@angular/material/icon';
12+
import { MatFormField } from '@angular/material/form-field';
13+
import { MatInput } from '@angular/material/input';
14+
import { MatActionList, MatListItem } from '@angular/material/list';
15+
import { IconComponent } from '../shared/icon.component';
16+
import { FormsModule } from '@angular/forms';
917

1018
export interface AddItemDialogResult {
1119
itemTemplateId: Guid;
@@ -16,7 +24,7 @@ export interface AddItemDialogResult {
1624
selector: 'app-add-item-dialog',
1725
templateUrl: './add-item-dialog.component.html',
1826
styleUrls: ['../shared/full-screen-dialog.scss', './add-item-dialog.component.scss'],
19-
standalone: false
27+
imports: [MatToolbar, MatIconButton, MatDialogClose, MatIcon, MatStepper, MatStep, MatStepLabel, MatFormField, MatInput, MatActionList, MatListItem, IconComponent, FormsModule, MatButton]
2028
})
2129
export class AddItemDialogComponent {
2230
@ViewChild('searchStep', {static: true})

0 commit comments

Comments
 (0)