Skip to content

Commit

Permalink
refactor(routes): 格式化代码
Browse files Browse the repository at this point in the history
  • Loading branch information
Encaik committed Sep 25, 2024
1 parent c529eb5 commit 7f28adb
Show file tree
Hide file tree
Showing 9 changed files with 84 additions and 79 deletions.
2 changes: 1 addition & 1 deletion src/app/app.routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import { Routes } from '@angular/router';

import { startPageGuard } from './guards/start-page.guard';
import { HomeComponent } from './pages/home/home.component';
import { UniverseComponent } from './pages/universe/universe.component';
import { MethodComponent } from './pages/method/method.component';
import { ShopComponent } from './pages/shop/shop.component';
import { UniverseComponent } from './pages/universe/universe.component';

export const routes: Routes = [
{ path: '', redirectTo: '/home', pathMatch: 'full' },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import { CommonModule } from '@angular/common';
import { Component, inject, Input } from '@angular/core';
import { NzButtonModule } from 'ng-zorro-antd/button';
import { NzCardModule } from 'ng-zorro-antd/card';
import { BagItem, getItemLevelClass, ItemLevelMap, ItemMap } from '../../models/item.model';
import { NzMessageModule, NzMessageService } from 'ng-zorro-antd/message';
import { NzPopoverModule } from 'ng-zorro-antd/popover';

import { LogType, LogLevel } from '../../models';
import { BagItem, getItemLevelClass, ItemLevelMap, ItemMap } from '../../models/item.model';
import { BackpackService } from '../../services/backpack.service';
import { LogService } from '../../services/log.service';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';

import { RewardItemViewComponent } from './reward-item-view.component';

describe('RewardItemViewComponent', () => {
let component: RewardItemViewComponent;
let fixture: ComponentFixture<RewardItemViewComponent>;

beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [RewardItemViewComponent]
})
.compileComponents();

fixture = TestBed.createComponent(RewardItemViewComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});
import { ComponentFixture, TestBed } from '@angular/core/testing';

import { RewardItemViewComponent } from './reward-item-view.component';

describe('RewardItemViewComponent', () => {
let component: RewardItemViewComponent;
let fixture: ComponentFixture<RewardItemViewComponent>;

beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [RewardItemViewComponent]
}).compileComponents();

fixture = TestBed.createComponent(RewardItemViewComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
import { getItemLevelClass, Item, ItemLevelMap, ItemMap, RewardPool } from '../../models';
import { NzCardModule } from 'ng-zorro-antd/card';
import { CommonModule } from '@angular/common';
import { ChangeDetectionStrategy, Component, Input, OnInit } from '@angular/core';
import { NzCardModule } from 'ng-zorro-antd/card';

import { getItemLevelClass, Item, ItemLevelMap, ItemMap, RewardPool } from '../../models';

@Component({
selector: 'app-reward-item-view',
Expand All @@ -11,7 +12,7 @@ import { CommonModule } from '@angular/common';
styleUrl: './reward-item-view.component.less',
changeDetection: ChangeDetectionStrategy.OnPush
})
export class RewardItemViewComponent {
export class RewardItemViewComponent implements OnInit {
@Input() reward: RewardPool = [];

rewardItems: Item[] = [];
Expand Down
9 changes: 5 additions & 4 deletions src/app/pages/challenge/challenge.component.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { Component, inject } from '@angular/core';
import { Challenge, RewardPoolMap } from '../../models';
import { Router } from '@angular/router';
import { NzButtonModule } from 'ng-zorro-antd/button';
import { NzCardModule } from 'ng-zorro-antd/card';
import { NzTagModule } from 'ng-zorro-antd/tag';

import { RewardItemViewComponent } from '../../components/reward-item-view/reward-item-view.component';
import { Challenge, RewardPoolMap } from '../../models';
import { EnvService } from '../../services/env.service';
import { NzTagModule } from 'ng-zorro-antd/tag';
import { NzButtonModule } from 'ng-zorro-antd/button';
import { Router } from '@angular/router';

@Component({
selector: 'app-challenge',
Expand Down
45 changes: 22 additions & 23 deletions src/app/pages/challenge/pages/explore/explore.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';

import { ExploreComponent } from './explore.component';

describe('ExploreComponent', () => {
let component: ExploreComponent;
let fixture: ComponentFixture<ExploreComponent>;

beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [ExploreComponent]
})
.compileComponents();

fixture = TestBed.createComponent(ExploreComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});
import { ComponentFixture, TestBed } from '@angular/core/testing';

import { ExploreComponent } from './explore.component';

describe('ExploreComponent', () => {
let component: ExploreComponent;
let fixture: ComponentFixture<ExploreComponent>;

beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [ExploreComponent]
}).compileComponents();

fixture = TestBed.createComponent(ExploreComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
:host {
flex: 1;
height: 0;
overflow: auto;
}
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';

import { QuickExploreComponent } from './quick-explore.component';

describe('QuickExploreComponent', () => {
let component: QuickExploreComponent;
let fixture: ComponentFixture<QuickExploreComponent>;

beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [QuickExploreComponent]
})
.compileComponents();

fixture = TestBed.createComponent(QuickExploreComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});
import { ComponentFixture, TestBed } from '@angular/core/testing';

import { QuickExploreComponent } from './quick-explore.component';

describe('QuickExploreComponent', () => {
let component: QuickExploreComponent;
let fixture: ComponentFixture<QuickExploreComponent>;

beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [QuickExploreComponent]
}).compileComponents();

fixture = TestBed.createComponent(QuickExploreComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});
1 change: 1 addition & 0 deletions src/app/pages/challenge/routes.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Routes } from '@angular/router';

import { ChallengeComponent } from './challenge.component';
import { ExploreComponent } from './pages/explore/explore.component';
import { QuickExploreComponent } from './pages/quick-explore/quick-explore.component';
Expand Down

1 comment on commit 7f28adb

@vercel
Copy link

@vercel vercel bot commented on 7f28adb Sep 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

wanjie – ./

wanjie.vercel.app
wanjie-git-main-encaiks-projects.vercel.app
wanjie-encaiks-projects.vercel.app

Please sign in to comment.