mirror of
https://github.com/1721518185/WeCloud.git
synced 2026-07-28 01:25:14 +00:00
initial
This commit is contained in:
+49
@@ -0,0 +1,49 @@
|
||||
# See http://help.github.com/ignore-files/ for more about ignoring files.
|
||||
|
||||
# Compiled output
|
||||
/dist
|
||||
/tmp
|
||||
/out-tsc
|
||||
/bazel-out
|
||||
|
||||
# Node
|
||||
/front/node_modules
|
||||
npm-debug.log
|
||||
yarn-error.log
|
||||
|
||||
# front
|
||||
.angular/
|
||||
|
||||
#backend
|
||||
__pycache__/
|
||||
|
||||
|
||||
# IDEs and editors
|
||||
.idea/
|
||||
.project
|
||||
.classpath
|
||||
.c9/
|
||||
*.launch
|
||||
.settings/
|
||||
*.sublime-workspace
|
||||
|
||||
# Visual Studio Code
|
||||
.vscode/*
|
||||
!.vscode/settings.json
|
||||
!.vscode/tasks.json
|
||||
!.vscode/launch.json
|
||||
!.vscode/extensions.json
|
||||
.history/*
|
||||
|
||||
# Miscellaneous
|
||||
/.angular/cache
|
||||
.sass-cache/
|
||||
/connect.lock
|
||||
/coverage
|
||||
/libpeerconnection.log
|
||||
testem.log
|
||||
/typings
|
||||
|
||||
# System files
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
@@ -0,0 +1,16 @@
|
||||
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
|
||||
# For additional information regarding the format and rule options, please see:
|
||||
# https://github.com/browserslist/browserslist#queries
|
||||
|
||||
# For the full list of supported browsers by the Angular framework, please see:
|
||||
# https://angular.io/guide/browser-support
|
||||
|
||||
# You can see what browsers were selected by your queries by running:
|
||||
# npx browserslist
|
||||
|
||||
last 1 Chrome version
|
||||
last 1 Firefox version
|
||||
last 2 Edge major versions
|
||||
last 2 Safari major versions
|
||||
last 2 iOS major versions
|
||||
Firefox ESR
|
||||
@@ -0,0 +1,16 @@
|
||||
# Editor configuration, see https://editorconfig.org
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[*.ts]
|
||||
quote_type = single
|
||||
|
||||
[*.md]
|
||||
max_line_length = off
|
||||
trim_trailing_whitespace = false
|
||||
@@ -0,0 +1,115 @@
|
||||
{
|
||||
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
|
||||
"version": 1,
|
||||
"newProjectRoot": "projects",
|
||||
"projects": {
|
||||
"ng_front": {
|
||||
"projectType": "application",
|
||||
"schematics": {
|
||||
"@schematics/angular:component": {
|
||||
"style": "scss"
|
||||
}
|
||||
},
|
||||
"root": "",
|
||||
"sourceRoot": "src",
|
||||
"prefix": "app",
|
||||
"architect": {
|
||||
"build": {
|
||||
"builder": "@angular-devkit/build-angular:browser",
|
||||
"options": {
|
||||
"outputPath": "dist/ng_front",
|
||||
"index": "src/index.html",
|
||||
"main": "src/main.ts",
|
||||
"polyfills": "src/polyfills.ts",
|
||||
"tsConfig": "tsconfig.app.json",
|
||||
"inlineStyleLanguage": "scss",
|
||||
"assets": [
|
||||
"src/favicon.ico",
|
||||
"src/assets",
|
||||
{
|
||||
"glob": "**/*",
|
||||
"input": "./node_modules/@ant-design/icons-angular/src/inline-svg/",
|
||||
"output": "/assets/"
|
||||
}
|
||||
],
|
||||
"styles": [
|
||||
"src/theme.less",
|
||||
"src/styles.scss",
|
||||
"node_modules/ng-zorro-antd/ng-zorro-antd.variable.min.css"
|
||||
],
|
||||
"allowedCommonJsDependencies": [
|
||||
"events"
|
||||
],
|
||||
"scripts": []
|
||||
},
|
||||
"configurations": {
|
||||
"production": {
|
||||
"budgets": [
|
||||
{
|
||||
"type": "initial",
|
||||
"maximumWarning": "2500kb",
|
||||
"maximumError": "2mb"
|
||||
},
|
||||
{
|
||||
"type": "anyComponentStyle",
|
||||
"maximumWarning": "2kb",
|
||||
"maximumError": "4kb"
|
||||
}
|
||||
],
|
||||
"fileReplacements": [
|
||||
{
|
||||
"replace": "src/environments/environment.ts",
|
||||
"with": "src/environments/environment.prod.ts"
|
||||
}
|
||||
],
|
||||
"outputHashing": "all"
|
||||
},
|
||||
"development": {
|
||||
"buildOptimizer": false,
|
||||
"optimization": false,
|
||||
"vendorChunk": true,
|
||||
"extractLicenses": false,
|
||||
"sourceMap": true,
|
||||
"namedChunks": true
|
||||
}
|
||||
},
|
||||
"defaultConfiguration": "production"
|
||||
},
|
||||
"serve": {
|
||||
"builder": "@angular-devkit/build-angular:dev-server",
|
||||
"configurations": {
|
||||
"production": {
|
||||
"browserTarget": "ng_front:build:production"
|
||||
},
|
||||
"development": {
|
||||
"browserTarget": "ng_front:build:development"
|
||||
}
|
||||
},
|
||||
"defaultConfiguration": "development"
|
||||
},
|
||||
"extract-i18n": {
|
||||
"builder": "@angular-devkit/build-angular:extract-i18n",
|
||||
"options": {
|
||||
"browserTarget": "ng_front:build"
|
||||
}
|
||||
},
|
||||
"test": {
|
||||
"builder": "@angular-devkit/build-angular:karma",
|
||||
"options": {
|
||||
"main": "src/test.ts",
|
||||
"polyfills": "src/polyfills.ts",
|
||||
"tsConfig": "tsconfig.spec.json",
|
||||
"karmaConfig": "karma.conf.js",
|
||||
"inlineStyleLanguage": "scss",
|
||||
"assets": ["src/favicon.ico", "src/assets"],
|
||||
"styles": ["src/styles.scss"],
|
||||
"scripts": []
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"cli": {
|
||||
"analytics": "24da8ee6-8259-4a0c-af26-6229ddc5476e"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
// Karma configuration file, see link for more information
|
||||
// https://karma-runner.github.io/1.0/config/configuration-file.html
|
||||
|
||||
module.exports = function (config) {
|
||||
config.set({
|
||||
basePath: '',
|
||||
frameworks: ['jasmine', '@angular-devkit/build-angular'],
|
||||
plugins: [
|
||||
require('karma-jasmine'),
|
||||
require('karma-chrome-launcher'),
|
||||
require('karma-jasmine-html-reporter'),
|
||||
require('karma-coverage'),
|
||||
require('@angular-devkit/build-angular/plugins/karma')
|
||||
],
|
||||
client: {
|
||||
jasmine: {
|
||||
// you can add configuration options for Jasmine here
|
||||
// the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
|
||||
// for example, you can disable the random execution with `random: false`
|
||||
// or set a specific seed with `seed: 4321`
|
||||
},
|
||||
clearContext: false // leave Jasmine Spec Runner output visible in browser
|
||||
},
|
||||
jasmineHtmlReporter: {
|
||||
suppressAll: true // removes the duplicated traces
|
||||
},
|
||||
coverageReporter: {
|
||||
dir: require('path').join(__dirname, './coverage/ng_front'),
|
||||
subdir: '.',
|
||||
reporters: [
|
||||
{ type: 'html' },
|
||||
{ type: 'text-summary' }
|
||||
]
|
||||
},
|
||||
reporters: ['progress', 'kjhtml'],
|
||||
port: 9876,
|
||||
colors: true,
|
||||
logLevel: config.LOG_INFO,
|
||||
autoWatch: true,
|
||||
browsers: ['Chrome'],
|
||||
singleRun: false,
|
||||
restartOnFileChange: true
|
||||
});
|
||||
};
|
||||
Generated
+19780
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,39 @@
|
||||
{
|
||||
"name": "ng-front",
|
||||
"version": "0.0.0",
|
||||
"scripts": {
|
||||
"ng": "ng",
|
||||
"start": "ng serve",
|
||||
"build": "ng build",
|
||||
"watch": "ng build --watch --configuration development",
|
||||
"test": "ng test"
|
||||
},
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@angular/animations": "^14.2.0",
|
||||
"@angular/common": "^14.2.0",
|
||||
"@angular/compiler": "^14.2.0",
|
||||
"@angular/core": "^14.2.0",
|
||||
"@angular/forms": "^14.2.0",
|
||||
"@angular/platform-browser": "^14.2.0",
|
||||
"@angular/platform-browser-dynamic": "^14.2.0",
|
||||
"@angular/router": "^14.2.0",
|
||||
"ng-zorro-antd": "^14.2.1",
|
||||
"rxjs": "~7.5.0",
|
||||
"tslib": "^2.3.0",
|
||||
"zone.js": "~0.11.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular-devkit/build-angular": "^14.2.9",
|
||||
"@angular/cli": "~14.2.9",
|
||||
"@angular/compiler-cli": "^14.2.0",
|
||||
"@types/jasmine": "~4.0.0",
|
||||
"jasmine-core": "~4.3.0",
|
||||
"karma": "~6.4.0",
|
||||
"karma-chrome-launcher": "~3.1.0",
|
||||
"karma-coverage": "~2.2.0",
|
||||
"karma-jasmine": "~5.1.0",
|
||||
"karma-jasmine-html-reporter": "~2.0.0",
|
||||
"typescript": "~4.7.2"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { Routes, RouterModule } from '@angular/router';
|
||||
|
||||
import { PageNotFoundComponent } from './pages/pageNotFound.component';
|
||||
|
||||
import { LocationStrategy, HashLocationStrategy } from '@angular/common';
|
||||
|
||||
const routes: Routes = [
|
||||
{ path: '', pathMatch: 'full', redirectTo: '/login' },
|
||||
{
|
||||
path: 'login',
|
||||
loadChildren: () =>
|
||||
import('./pages/login/login.module').then((m) => m.LoginModule),
|
||||
},
|
||||
{
|
||||
path: 'layout',
|
||||
loadChildren: () =>
|
||||
import('./pages/layout/layout.module').then((m) => m.LayoutModule),
|
||||
},
|
||||
{ path: '**', component: PageNotFoundComponent }, // Wildcard route for a 404 page
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [RouterModule.forRoot(routes)],
|
||||
providers: [{ provide: LocationStrategy, useClass: HashLocationStrategy }],
|
||||
exports: [RouterModule],
|
||||
})
|
||||
export class AppRoutingModule {}
|
||||
@@ -0,0 +1 @@
|
||||
<router-outlet></router-outlet>
|
||||
@@ -0,0 +1,35 @@
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
import { RouterTestingModule } from '@angular/router/testing';
|
||||
import { AppComponent } from './app.component';
|
||||
|
||||
describe('AppComponent', () => {
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
imports: [
|
||||
RouterTestingModule
|
||||
],
|
||||
declarations: [
|
||||
AppComponent
|
||||
],
|
||||
}).compileComponents();
|
||||
});
|
||||
|
||||
it('should create the app', () => {
|
||||
const fixture = TestBed.createComponent(AppComponent);
|
||||
const app = fixture.componentInstance;
|
||||
expect(app).toBeTruthy();
|
||||
});
|
||||
|
||||
it(`should have as title 'ng_front'`, () => {
|
||||
const fixture = TestBed.createComponent(AppComponent);
|
||||
const app = fixture.componentInstance;
|
||||
expect(app.title).toEqual('ng_front');
|
||||
});
|
||||
|
||||
it('should render title', () => {
|
||||
const fixture = TestBed.createComponent(AppComponent);
|
||||
fixture.detectChanges();
|
||||
const compiled = fixture.nativeElement as HTMLElement;
|
||||
expect(compiled.querySelector('.content span')?.textContent).toContain('ng_front app is running!');
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,10 @@
|
||||
import { Component } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-root',
|
||||
templateUrl: './app.component.html',
|
||||
styleUrls: ['./app.component.scss'],
|
||||
})
|
||||
export class AppComponent {
|
||||
isCollapsed = false;
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
|
||||
import { AppRoutingModule } from './app-routing.module';
|
||||
import { AppComponent } from './app.component';
|
||||
import { NZ_I18N, zh_CN, en_US } from 'ng-zorro-antd/i18n';
|
||||
import { NzConfig, NZ_CONFIG } from 'ng-zorro-antd/core/config';
|
||||
import { registerLocaleData } from '@angular/common';
|
||||
import zh from '@angular/common/locales/zh';
|
||||
import { ReactiveFormsModule, FormsModule } from '@angular/forms';
|
||||
import { HttpClientModule, HttpClient } from '@angular/common/http';
|
||||
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
||||
import { IconsProviderModule } from './icons-provider.module';
|
||||
import { NzLayoutModule } from 'ng-zorro-antd/layout';
|
||||
import { NzMenuModule } from 'ng-zorro-antd/menu';
|
||||
import { NzBreadCrumbModule } from 'ng-zorro-antd/breadcrumb';
|
||||
import { NzMessageService } from 'ng-zorro-antd/message';
|
||||
|
||||
registerLocaleData(zh);
|
||||
|
||||
const ngZorroConfig: NzConfig = {
|
||||
theme: {
|
||||
primaryColor: '#cfb338',
|
||||
},
|
||||
};
|
||||
|
||||
@NgModule({
|
||||
declarations: [AppComponent],
|
||||
imports: [
|
||||
BrowserModule,
|
||||
AppRoutingModule,
|
||||
FormsModule,
|
||||
ReactiveFormsModule,
|
||||
HttpClientModule,
|
||||
BrowserAnimationsModule,
|
||||
IconsProviderModule,
|
||||
NzLayoutModule,
|
||||
NzMenuModule,
|
||||
NzBreadCrumbModule,
|
||||
],
|
||||
providers: [
|
||||
{ provide: NZ_I18N, useValue: en_US },
|
||||
{ provide: NZ_CONFIG, useValue: ngZorroConfig },
|
||||
NzMessageService,
|
||||
HttpClient,
|
||||
],
|
||||
bootstrap: [AppComponent],
|
||||
})
|
||||
export class AppModule {}
|
||||
@@ -0,0 +1,21 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { NZ_ICONS, NzIconModule } from 'ng-zorro-antd/icon';
|
||||
|
||||
import {
|
||||
MenuFoldOutline,
|
||||
MenuUnfoldOutline,
|
||||
FormOutline,
|
||||
DashboardOutline
|
||||
} from '@ant-design/icons-angular/icons';
|
||||
|
||||
const icons = [MenuFoldOutline, MenuUnfoldOutline, DashboardOutline, FormOutline];
|
||||
|
||||
@NgModule({
|
||||
imports: [NzIconModule],
|
||||
exports: [NzIconModule],
|
||||
providers: [
|
||||
{ provide: NZ_ICONS, useValue: icons }
|
||||
]
|
||||
})
|
||||
export class IconsProviderModule {
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { Routes, RouterModule } from '@angular/router';
|
||||
import { LayoutComponent } from './layout.component';
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
component: LayoutComponent,
|
||||
children: [
|
||||
{ path: '', redirectTo: 'list', pathMatch: 'full' },
|
||||
{
|
||||
path: 'list',
|
||||
loadChildren: () =>
|
||||
import('../list/list.module').then((m) => m.ListModule),
|
||||
},
|
||||
{
|
||||
path: 'wegame-details',
|
||||
loadChildren: () =>
|
||||
import('../wegame-details/wegame-details.module').then(
|
||||
(m) => m.MovieDetailsModule
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [RouterModule.forChild(routes)],
|
||||
exports: [RouterModule],
|
||||
})
|
||||
export class LayoutRoutingModule {}
|
||||
@@ -0,0 +1,22 @@
|
||||
<div class="layout">
|
||||
<nz-layout>
|
||||
<nz-header>
|
||||
<div class="logo">The Best Games</div>
|
||||
<ul nz-menu nzTheme="dark" nzMode="inline" nzMode="horizontal">
|
||||
<li nz-menu-item nzMatchRouter>
|
||||
<a routerLink="/layout/list">Game Toplist</a>
|
||||
</li>
|
||||
</ul>
|
||||
<span class="right-top-tool"
|
||||
>{{ username
|
||||
}}<span routerLink="/login" class="sign">sign out</span></span
|
||||
>
|
||||
</nz-header>
|
||||
<nz-content>
|
||||
<div class="inner-content">
|
||||
<router-outlet></router-outlet>
|
||||
</div>
|
||||
</nz-content>
|
||||
<nz-footer>The Best Games ©2023 Implement By ABC</nz-footer>
|
||||
</nz-layout>
|
||||
</div>
|
||||
@@ -0,0 +1,122 @@
|
||||
::ng-deep .ant-menu-dark.ant-menu-horizontal > .ant-menu-item {
|
||||
padding: 0 40px;
|
||||
font-size: 20px;
|
||||
}
|
||||
::ng-deep .ant-menu.ant-menu-dark {
|
||||
background-color: #000;
|
||||
}
|
||||
.layout {
|
||||
width: 100%;
|
||||
}
|
||||
:host {
|
||||
display: flex;
|
||||
text-rendering: optimizeLegibility;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
.app-layout {
|
||||
height: 100vh;
|
||||
}
|
||||
.ant-layout-content {
|
||||
min-height: auto;
|
||||
}
|
||||
|
||||
.menu-sidebar {
|
||||
position: relative;
|
||||
z-index: 10;
|
||||
min-height: 100vh;
|
||||
box-shadow: 2px 0 6px rgba(0, 21, 41, 0.35);
|
||||
}
|
||||
|
||||
.header-trigger {
|
||||
height: 64px;
|
||||
padding: 20px 24px;
|
||||
font-size: 20px;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s, padding 0s;
|
||||
}
|
||||
|
||||
.sidebar-logo h1 {
|
||||
display: inline-block;
|
||||
margin: 0 0 0 20px;
|
||||
color: #fff;
|
||||
font-weight: 600;
|
||||
font-size: 14px;
|
||||
font-family: Avenir, Helvetica Neue, Arial, Helvetica, sans-serif;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.app-header {
|
||||
position: relative;
|
||||
height: 64px;
|
||||
padding: 0;
|
||||
background: #fff;
|
||||
box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
|
||||
}
|
||||
|
||||
.inner-content {
|
||||
padding: 24px;
|
||||
background: #fff;
|
||||
height: 100%;
|
||||
min-height: 360px;
|
||||
}
|
||||
|
||||
.logo {
|
||||
width: 700px;
|
||||
height: 64px;
|
||||
line-height: 64px;
|
||||
color: #fff;
|
||||
padding: 0 20px;
|
||||
float: left;
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
nz-header {
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
nz-breadcrumb {
|
||||
margin: 16px 0;
|
||||
}
|
||||
|
||||
nz-header {
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
nz-footer {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.menu-ul {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.right-top-tool {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 50px;
|
||||
line-height: 60px;
|
||||
height: 40px;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.sign {
|
||||
margin-left: 20px;
|
||||
// color: $baseColor;
|
||||
cursor: pointer;
|
||||
}
|
||||
.sign:hover {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.inner-content {
|
||||
background: #fff;
|
||||
padding: 24px;
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-layout',
|
||||
templateUrl: './layout.component.html',
|
||||
styleUrls: ['./layout.component.scss'],
|
||||
})
|
||||
export class LayoutComponent implements OnInit {
|
||||
username: any = '';
|
||||
isCollapsed = false;
|
||||
constructor() {}
|
||||
|
||||
ngOnInit() {
|
||||
this.username = localStorage.getItem('username');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { LayoutRoutingModule } from './layout-routing.module';
|
||||
import { LayoutComponent } from './layout.component';
|
||||
import { NzLayoutModule } from 'ng-zorro-antd/layout';
|
||||
import { NzMenuModule } from 'ng-zorro-antd/menu';
|
||||
import { NzBreadCrumbModule } from 'ng-zorro-antd/breadcrumb';
|
||||
import { NzDropDownModule } from 'ng-zorro-antd/dropdown';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
LayoutRoutingModule,
|
||||
NzLayoutModule,
|
||||
NzMenuModule,
|
||||
NzBreadCrumbModule,
|
||||
NzDropDownModule,
|
||||
],
|
||||
declarations: [LayoutComponent],
|
||||
exports: [LayoutComponent],
|
||||
})
|
||||
export class LayoutModule {}
|
||||
@@ -0,0 +1,143 @@
|
||||
<form
|
||||
nz-form
|
||||
nzLayout="inline"
|
||||
[formGroup]="searchForm"
|
||||
(ngSubmit)="getWegameList()"
|
||||
style="padding: 20px 10%"
|
||||
>
|
||||
<div nz-row style="width: 100%">
|
||||
<div nz-col nzSpan="6" *ngFor="let field of searchField">
|
||||
<nz-form-item>
|
||||
<nz-form-label>{{ field.label }}</nz-form-label>
|
||||
<nz-form-control [nzErrorTip]="'Please input ' + field.label!">
|
||||
<nz-select
|
||||
*ngIf="field.value == 'type'"
|
||||
[ngModel]="field.value"
|
||||
[nzPlaceHolder]="field.label"
|
||||
[formControlName]="field.value"
|
||||
>
|
||||
<nz-option
|
||||
*ngFor="let item of typeOption"
|
||||
[nzValue]="item.value"
|
||||
[nzLabel]="item.label"
|
||||
></nz-option>
|
||||
</nz-select>
|
||||
<input
|
||||
*ngIf="field.value != 'type'"
|
||||
nz-input
|
||||
[formControlName]="field.value"
|
||||
[placeholder]="field.label"
|
||||
/>
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
</div>
|
||||
<div nz-col nzSpan="6">
|
||||
<button nz-button nzType="primary">Submit</button>
|
||||
<button
|
||||
nz-button
|
||||
nzType="default"
|
||||
(click)="isVisible = true"
|
||||
style="margin-left: 15px"
|
||||
>
|
||||
<i nz-icon nzType="plus" nzTheme="outline"></i>Add
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div style="padding: 5px 10%">
|
||||
<nz-spin [nzSpinning]="loading" style="margin: 20px auto">
|
||||
<nz-list nzItemLayout="vertical">
|
||||
<nz-list-item *ngFor="let item of wegameList">
|
||||
<nz-list-item-meta>
|
||||
<nz-list-item-meta-title>
|
||||
<a
|
||||
style="
|
||||
color: #373737;
|
||||
font-weight: bolder;
|
||||
font-size: 18px;
|
||||
margin-right: 15px;
|
||||
text-decoration: underline;
|
||||
"
|
||||
(click)="toDetail(item)"
|
||||
>{{ item.Name }}</a
|
||||
>
|
||||
<span>{{ item.Developer }}</span>
|
||||
</nz-list-item-meta-title>
|
||||
<nz-list-item-meta-description>
|
||||
{{ item["Release Date"] }}
|
||||
<span style="color: #333">By</span> {{ item["Distributer"] }}
|
||||
</nz-list-item-meta-description>
|
||||
</nz-list-item-meta>
|
||||
<div class="text-overflow" [title]="item.Summary">
|
||||
{{ item["Summary"] }}
|
||||
</div>
|
||||
<ul nz-list-item-actions>
|
||||
<nz-list-item-action>
|
||||
<span style="margin-right: 8px">💬</span>
|
||||
{{ item["# of Critic Reviews"] }}
|
||||
</nz-list-item-action>
|
||||
<nz-list-item-action>
|
||||
<span style="margin-right: 8px">🙂</span>
|
||||
{{ item["Critic Positive"] }}
|
||||
</nz-list-item-action>
|
||||
<nz-list-item-action>
|
||||
<span style="margin-right: 8px">😐</span>
|
||||
{{ item["Critic Negative"] }}
|
||||
</nz-list-item-action>
|
||||
</ul>
|
||||
<nz-list-item-extra>
|
||||
<img
|
||||
width="180"
|
||||
alt="logo"
|
||||
src="../../../../assets/images/game.png"
|
||||
/>
|
||||
</nz-list-item-extra>
|
||||
</nz-list-item>
|
||||
</nz-list>
|
||||
</nz-spin>
|
||||
<nz-pagination
|
||||
[nzPageIndex]="page"
|
||||
[nzTotal]="total"
|
||||
nzShowSizeChanger
|
||||
[nzPageSize]="size"
|
||||
(nzPageIndexChange)="pageChange($event)"
|
||||
(nzPageSizeChange)="pageSizeChange($event)"
|
||||
style="text-align: right"
|
||||
></nz-pagination>
|
||||
</div>
|
||||
|
||||
<nz-modal
|
||||
[(nzVisible)]="isVisible"
|
||||
nzTitle="Add Wegame"
|
||||
nzOkText="Ok"
|
||||
nzCancelText="Cancel"
|
||||
(nzOnOk)="submitForm()"
|
||||
(nzOnCancel)="isVisible = false"
|
||||
>
|
||||
<ng-container *nzModalContent>
|
||||
<form nz-form [formGroup]="addForm">
|
||||
<div nz-row [nzGutter]="24">
|
||||
<div nz-col [nzSpan]="24" *ngFor="let field of addField">
|
||||
<nz-form-item>
|
||||
<nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="name"
|
||||
>{{ field.label }}
|
||||
</nz-form-label>
|
||||
<nz-form-control
|
||||
[nzSm]="14"
|
||||
[nzXs]="24"
|
||||
[nzErrorTip]="'Please input ' + field.label!"
|
||||
>
|
||||
<input
|
||||
nz-input
|
||||
[formControlName]="field.value"
|
||||
id="name"
|
||||
[placeholder]="field.label"
|
||||
/>
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</ng-container>
|
||||
</nz-modal>
|
||||
@@ -0,0 +1,23 @@
|
||||
::ng-deep .ant-list-vertical .ant-list-item-action > li {
|
||||
color: #999;
|
||||
}
|
||||
.wegame-search {
|
||||
width: 500px;
|
||||
margin: 0 auto;
|
||||
display: block;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
a {
|
||||
color: #99a1c8;
|
||||
}
|
||||
.card-shadow:hover {
|
||||
box-shadow: 0 1px 2px -2px #00000029, 0 3px 6px #0000001f,
|
||||
0 5px 12px 4px #00000017;
|
||||
}
|
||||
.text-overflow {
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 3;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
@@ -0,0 +1,197 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { NzMessageService } from 'ng-zorro-antd/message';
|
||||
import { NavigateService } from 'src/app/services/navigate.service';
|
||||
import { ApiService } from 'src/app/services/api.service';
|
||||
import { Router } from '@angular/router';
|
||||
import { NzModalService } from 'ng-zorro-antd/modal';
|
||||
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
||||
|
||||
@Component({
|
||||
selector: 'app-list',
|
||||
templateUrl: './list.component.html',
|
||||
styleUrls: ['./list.component.scss'],
|
||||
})
|
||||
export class ListComponent implements OnInit {
|
||||
wegameList: any = [];
|
||||
loading: boolean = true;
|
||||
isVisible: boolean = false;
|
||||
addForm!: FormGroup;
|
||||
addField: any = [
|
||||
{
|
||||
label: 'Name',
|
||||
value: 'Name',
|
||||
},
|
||||
{
|
||||
label: 'Distributer',
|
||||
value: 'Distributer',
|
||||
},
|
||||
{
|
||||
label: 'Developer',
|
||||
value: 'Developer',
|
||||
},
|
||||
{
|
||||
label: 'Release Date',
|
||||
value: 'Release Date',
|
||||
},
|
||||
{
|
||||
label: 'Summary',
|
||||
value: 'Summary',
|
||||
},
|
||||
{
|
||||
label: '# of Critic Reviews',
|
||||
value: '# of Critic Reviews',
|
||||
},
|
||||
{
|
||||
label: 'Critic Positive',
|
||||
value: 'Critic Positive',
|
||||
},
|
||||
{
|
||||
label: 'Critic Negative',
|
||||
value: 'Critic Negative',
|
||||
},
|
||||
];
|
||||
page: number = 1;
|
||||
size: number = 10;
|
||||
total: number = 10;
|
||||
searchForm!: FormGroup;
|
||||
searchField: any = [
|
||||
{
|
||||
label: 'Name',
|
||||
value: 'Name',
|
||||
},
|
||||
{
|
||||
label: 'Distributer',
|
||||
value: 'Distributer',
|
||||
},
|
||||
{
|
||||
label: 'Developer',
|
||||
value: 'Developer',
|
||||
},
|
||||
];
|
||||
typeOption: any = [
|
||||
{
|
||||
label: 'Wegame',
|
||||
value: 'Wegame',
|
||||
},
|
||||
{
|
||||
label: 'TV Show',
|
||||
value: 'TV Show',
|
||||
},
|
||||
{
|
||||
label: 'all',
|
||||
value: 'all',
|
||||
},
|
||||
];
|
||||
|
||||
constructor(
|
||||
private apiService: ApiService,
|
||||
private $message: NzMessageService,
|
||||
private navigateService: NavigateService,
|
||||
public router: Router,
|
||||
private modalService: NzModalService,
|
||||
private fb: FormBuilder
|
||||
) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.addForm = this.fb.group({
|
||||
Name: [null, [Validators.required]],
|
||||
Distributer: [null, [Validators.required]],
|
||||
Developer: [null, [Validators.required]],
|
||||
'Release Date': [null, [Validators.required]],
|
||||
Summary: [null, [Validators.required]],
|
||||
'# of Critic Reviews': [null, [Validators.required]],
|
||||
'Critic Positive': [null, [Validators.required]],
|
||||
'Critic Negative': [null, [Validators.required]],
|
||||
});
|
||||
this.searchForm = this.fb.group({
|
||||
Name: [null],
|
||||
Distributer: [null],
|
||||
Developer: [null],
|
||||
});
|
||||
this.getWegameList();
|
||||
}
|
||||
|
||||
submitForm(): void {
|
||||
if (this.addForm.valid) {
|
||||
let params = { ...this.addForm.value };
|
||||
this.apiService.post('new_game', params).subscribe(
|
||||
(res: any) => {
|
||||
this.isVisible = false;
|
||||
this.getWegameList();
|
||||
this.$message.success(`add success!`);
|
||||
},
|
||||
() => {}
|
||||
);
|
||||
} else {
|
||||
Object.values(this.addForm.controls).forEach((control: any) => {
|
||||
if (control.invalid) {
|
||||
control.markAsDirty();
|
||||
control.updateValueAndValidity({ onlySelf: true });
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
onSearch() {
|
||||
this.page = 1;
|
||||
this.size = 18;
|
||||
this.getWegameList();
|
||||
}
|
||||
toDetail(data: any) {
|
||||
localStorage.setItem('wegameInfo', JSON.stringify(data));
|
||||
this.router.navigate(['/layout/wegame-details']);
|
||||
}
|
||||
|
||||
getReviewTotalAndPositive(str: string) {
|
||||
if (!str) return ['0', '0'];
|
||||
const strArray = str.split(' ');
|
||||
const total =
|
||||
strArray.filter((item: string) => item?.indexOf(',') !== -1)[0] || '0';
|
||||
const positive =
|
||||
strArray.filter((item: string) => item?.indexOf('%') !== -1)[0] || '0';
|
||||
return [total, positive];
|
||||
}
|
||||
|
||||
getWegameList() {
|
||||
let params = {
|
||||
page: this.page,
|
||||
size: this.size,
|
||||
...this.searchForm.value,
|
||||
};
|
||||
this.apiService.post('game_list', params).subscribe(
|
||||
(res: any) => {
|
||||
this.loading = false;
|
||||
const { code, data, total } = res;
|
||||
if (code == 200) {
|
||||
this.loading = false;
|
||||
this.wegameList = data;
|
||||
this.wegameList.forEach((item: any, index: number) => {
|
||||
item.idx = index;
|
||||
item.reviewTotal = this.getReviewTotalAndPositive(
|
||||
item['All Reviews Number']
|
||||
)[0];
|
||||
item.reviewPositive = this.getReviewTotalAndPositive(
|
||||
item['All Reviews Number']
|
||||
)[1];
|
||||
});
|
||||
this.total = total;
|
||||
console.log('this.wegameList', this.wegameList);
|
||||
} else {
|
||||
this.wegameList = [];
|
||||
}
|
||||
},
|
||||
() => {
|
||||
this.loading = false;
|
||||
}
|
||||
);
|
||||
}
|
||||
pageChange(val: number) {
|
||||
this.page = val;
|
||||
console.log(val);
|
||||
this.getWegameList();
|
||||
}
|
||||
pageSizeChange(val: number) {
|
||||
this.size = val;
|
||||
this.getWegameList();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { RouterModule } from '@angular/router';
|
||||
import { SharedModule } from '../../shared/shared.module';
|
||||
import { ListComponent } from './list.component';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
SharedModule,
|
||||
RouterModule.forChild([
|
||||
{
|
||||
path: '',
|
||||
component: ListComponent,
|
||||
},
|
||||
]),
|
||||
],
|
||||
declarations: [ListComponent],
|
||||
exports: [ListComponent],
|
||||
})
|
||||
export class ListModule {}
|
||||
@@ -0,0 +1,116 @@
|
||||
<div class="login">
|
||||
<div class="login">
|
||||
<div
|
||||
class="header"
|
||||
style="
|
||||
text-align: left;
|
||||
padding-left: 50px;
|
||||
color: #4a291f;
|
||||
font-weight: bold;
|
||||
"
|
||||
>
|
||||
The Best Games 🎮
|
||||
</div>
|
||||
<div class="login-container">
|
||||
<div class="contenter">
|
||||
<div>
|
||||
<div class="login-title">{{ curStatus }}🕹️</div>
|
||||
</div>
|
||||
<div>
|
||||
<form
|
||||
*ngIf="curStatus == 'Login'"
|
||||
nz-form
|
||||
[formGroup]="validateForm"
|
||||
class="login-form"
|
||||
(ngSubmit)="submitForm('login')"
|
||||
>
|
||||
<nz-form-item>
|
||||
<nz-form-control nzErrorTip="Please input your username!">
|
||||
<nz-input-group nzPrefixIcon="user">
|
||||
<input
|
||||
type="text"
|
||||
nz-input
|
||||
formControlName="username"
|
||||
placeholder="Username"
|
||||
/>
|
||||
</nz-input-group>
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
<nz-form-item>
|
||||
<nz-form-control nzErrorTip="Please input your Password!">
|
||||
<nz-input-group nzPrefixIcon="lock">
|
||||
<input
|
||||
type="password"
|
||||
nz-input
|
||||
formControlName="password"
|
||||
placeholder="Password"
|
||||
/>
|
||||
</nz-input-group>
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
<button
|
||||
nz-button
|
||||
class="login-form-button login-form-margin"
|
||||
[nzType]="'primary'"
|
||||
>
|
||||
Log in
|
||||
</button>
|
||||
<!-- Don't have an account? -->
|
||||
<a (click)="changeLogin()" class="base-color"
|
||||
>Go To Register ->🐖🚗</a
|
||||
>
|
||||
</form>
|
||||
<form
|
||||
*ngIf="curStatus == 'Register'"
|
||||
nz-form
|
||||
nzLayout="horizontal"
|
||||
[formGroup]="validateForm"
|
||||
class="login-form"
|
||||
(ngSubmit)="submitForm('register')"
|
||||
>
|
||||
<nz-form-item>
|
||||
<nz-form-control nzErrorTip="Please input your username!">
|
||||
<input
|
||||
nz-input
|
||||
id="username"
|
||||
formControlName="username"
|
||||
placeholder="Username"
|
||||
/>
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
<nz-form-item style="width: 100%">
|
||||
<nz-form-control
|
||||
nzErrorTip="Please input your password!"
|
||||
style="width: 100%"
|
||||
>
|
||||
<input
|
||||
nz-input
|
||||
type="password"
|
||||
id="password"
|
||||
formControlName="password"
|
||||
placeholder="Password"
|
||||
/>
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
<button
|
||||
nz-button
|
||||
class="login-form-button login-form-margin"
|
||||
[nzType]="'primary'"
|
||||
>
|
||||
Register
|
||||
</button>
|
||||
<button
|
||||
nz-button
|
||||
[nzType]="'default'"
|
||||
style="width: 100%"
|
||||
class="base-color"
|
||||
(click)="changeLogin()"
|
||||
>
|
||||
Back to Login
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,123 @@
|
||||
:host ::ng-deep .login .login-form {
|
||||
max-width: 100%;
|
||||
margin-top: 60px;
|
||||
}
|
||||
.login {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: url("../../../assets/images/bg.png") no-repeat fixed center;
|
||||
background-size: cover;
|
||||
.login-form,
|
||||
.slide-fade-enter-active {
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
.login-form,
|
||||
.slide-fade-leave-active {
|
||||
transition: all 0.5s cubic-bezier(1, 0.5, 0.8, 1);
|
||||
}
|
||||
.slide-fade-enter, .slide-fade-leave-to
|
||||
/* .slide-fade-leave-active for below version 2.1.8 */ {
|
||||
transform: translateX(10px);
|
||||
opacity: 0;
|
||||
}
|
||||
.login-title {
|
||||
// margin: 10px 0 20px 0;
|
||||
// text-align: center;
|
||||
font-weight: bold;
|
||||
font-size: 30px;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding-bottom: 40px;
|
||||
}
|
||||
.login-container {
|
||||
padding-top: calc(50% - 200px);
|
||||
}
|
||||
.login-bottom {
|
||||
height: 60px;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
}
|
||||
.header {
|
||||
width: 100%;
|
||||
height: 80px;
|
||||
position: absolute;
|
||||
top: 37px;
|
||||
text-align: left;
|
||||
padding-left: 89px;
|
||||
color: #fff;
|
||||
font-size: 30px;
|
||||
font-weight: 600;
|
||||
}
|
||||
.content {
|
||||
width: 360px;
|
||||
position: relative;
|
||||
left: calc(50% - 180px);
|
||||
z-index: 9;
|
||||
// background-color: rgba(251, 252, 241, 0.8);
|
||||
/* opacity: 0.9; */
|
||||
border-radius: 10px;
|
||||
padding: 10px;
|
||||
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
.contenter {
|
||||
width: 600px;
|
||||
height: 340px;
|
||||
position: absolute;
|
||||
top: calc(50% - 200px);
|
||||
right: calc(50% - 300px);
|
||||
z-index: 999;
|
||||
// background-color: rgba(255, 255, 255, 0.8);
|
||||
border-radius: 10px;
|
||||
// padding: 20px 30px 20px;
|
||||
box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.2), 0 5px 5px 0 rgba(0, 0, 0, 0.24);
|
||||
display: flex;
|
||||
> div {
|
||||
width: 40%;
|
||||
height: 100%;
|
||||
padding: 20px 30px 20px;
|
||||
&:last-child {
|
||||
width: 60%;
|
||||
background-color: rgba(255, 255, 255, 0.8);
|
||||
border-top-right-radius: 10px;
|
||||
border-bottom-right-radius: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.title {
|
||||
font-size: 26px;
|
||||
font-weight: 600;
|
||||
margin-top: 10px;
|
||||
margin-bottom: 40px;
|
||||
text-align: center;
|
||||
letter-spacing: 16px;
|
||||
}
|
||||
.ruleForm {
|
||||
position: absolute;
|
||||
width: calc(100% - 60px);
|
||||
/* padding-top: 20px; */
|
||||
}
|
||||
.con-title {
|
||||
text-align: left;
|
||||
}
|
||||
.img-logo {
|
||||
position: relative;
|
||||
z-index: 9999;
|
||||
/* top: 100px; */
|
||||
left: calc(50% - 90px);
|
||||
}
|
||||
|
||||
.login-form-margin {
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.login-form-forgot {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.login-form-button {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import {
|
||||
UntypedFormBuilder,
|
||||
UntypedFormGroup,
|
||||
Validators,
|
||||
} from '@angular/forms';
|
||||
import { NzMessageService } from 'ng-zorro-antd/message';
|
||||
import { NavigateService } from 'src/app/services/navigate.service';
|
||||
import { ApiService } from 'src/app/services/api.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-login',
|
||||
templateUrl: './login.component.html',
|
||||
styleUrls: ['./login.component.scss'],
|
||||
})
|
||||
export class LoginComponent implements OnInit {
|
||||
curStatus: string = 'Login';
|
||||
validateForm!: UntypedFormGroup;
|
||||
|
||||
changeLogin() {
|
||||
if (this.curStatus == 'Login') this.curStatus = 'Register';
|
||||
else this.curStatus = 'Login';
|
||||
this.validateForm.reset();
|
||||
}
|
||||
|
||||
submitForm(type: string): void {
|
||||
if (this.validateForm.valid) {
|
||||
console.log('submit', this.validateForm.value);
|
||||
let loginModel = Object.assign(this.validateForm.value, {});
|
||||
let url = type == 'login' ? 'login' : 'register';
|
||||
console.log(url);
|
||||
this.apiService.post(url, loginModel).subscribe((res: any) => {
|
||||
const { code, msg, data } = res;
|
||||
if (code === 200) {
|
||||
if (type == 'login') {
|
||||
this.$message.success('Login Success!');
|
||||
localStorage.setItem('username', loginModel.username);
|
||||
localStorage.setItem('token', data?.token);
|
||||
localStorage.setItem('role', data?.role);
|
||||
setTimeout(() => {
|
||||
this.navigateService.navigate('layout');
|
||||
}, 200);
|
||||
} else {
|
||||
this.$message.success('Regist success!');
|
||||
setTimeout(() => {
|
||||
this.curStatus = 'Login';
|
||||
}, 200);
|
||||
}
|
||||
} else {
|
||||
this.$message.error(msg);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
Object.values(this.validateForm.controls).forEach((control: any) => {
|
||||
if (control.invalid) {
|
||||
control.markAsDirty();
|
||||
control.updateValueAndValidity({ onlySelf: true });
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
constructor(
|
||||
private fb: UntypedFormBuilder,
|
||||
private apiService: ApiService,
|
||||
private $message: NzMessageService,
|
||||
private navigateService: NavigateService
|
||||
) {}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.validateForm = this.fb.group({
|
||||
username: [null, [Validators.required]],
|
||||
password: [null, [Validators.required]],
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { RouterModule } from '@angular/router';
|
||||
import { SharedModule } from '../../shared/shared.module';
|
||||
import { LoginComponent } from './login.component';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
SharedModule,
|
||||
RouterModule.forChild([
|
||||
{
|
||||
path: '',
|
||||
component: LoginComponent,
|
||||
},
|
||||
]),
|
||||
],
|
||||
declarations: [LoginComponent],
|
||||
exports: [LoginComponent],
|
||||
})
|
||||
export class LoginModule {}
|
||||
@@ -0,0 +1,10 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
template: `<h2>404 Page</h2>`,
|
||||
})
|
||||
export class PageNotFoundComponent implements OnInit {
|
||||
constructor() {}
|
||||
|
||||
ngOnInit() {}
|
||||
}
|
||||
@@ -0,0 +1,115 @@
|
||||
<div style="padding: 10px 10%">
|
||||
<div class="song-info">
|
||||
<img
|
||||
style="width: 60%; height: 450px"
|
||||
src="../../../../assets/images/game.png"
|
||||
/>
|
||||
<div class="song-info-basic">
|
||||
<div class="title">
|
||||
{{ movieInfo.Name }}
|
||||
</div>
|
||||
<h2 style="margin-top: 20px; border-bottom: 1px solid #999"></h2>
|
||||
<div class="detail-item-title">Developer:</div>
|
||||
<div>{{ movieInfo.Developer }}</div>
|
||||
<div class="detail-item-title">Release Date:</div>
|
||||
<div>{{ movieInfo["Release Date"] }}</div>
|
||||
<div class="detail-item-title">Metascore:</div>
|
||||
<div>{{ movieInfo.Metascore || 0 }}</div>
|
||||
<h2
|
||||
style="
|
||||
margin-top: 20px;
|
||||
border-bottom: 1px dashed var(--ant-primary-color);
|
||||
"
|
||||
></h2>
|
||||
<button
|
||||
nz-button
|
||||
class="login-form-button login-form-margin"
|
||||
[nzType]="'primary'"
|
||||
(click)="onEdit()"
|
||||
>
|
||||
Edit Game Detail
|
||||
</button>
|
||||
<button
|
||||
nz-button
|
||||
nzType="default"
|
||||
style="margin: 20px 0 20px 10px"
|
||||
(click)="onDelete()"
|
||||
>
|
||||
Delete game
|
||||
</button>
|
||||
<button
|
||||
nz-button
|
||||
nzType="dashed"
|
||||
style="width: 100%"
|
||||
routerLink="/layout/list"
|
||||
>
|
||||
< Back To
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<h2 style="margin-top: 20px; border-bottom: 1px solid #eee">Details</h2>
|
||||
<nz-descriptions nzTitle="">
|
||||
<nz-descriptions-item nzTitle="Distributer">{{
|
||||
movieInfo.Distributer || "--"
|
||||
}}</nz-descriptions-item>
|
||||
<nz-descriptions-item nzTitle="Developer">{{
|
||||
movieInfo.Developer || "--"
|
||||
}}</nz-descriptions-item>
|
||||
<nz-descriptions-item nzTitle="Release Date">{{
|
||||
movieInfo["Release Date"] || "--"
|
||||
}}</nz-descriptions-item>
|
||||
<nz-descriptions-item nzTitle="Genres">{{
|
||||
movieInfo.Genres || "--"
|
||||
}}</nz-descriptions-item>
|
||||
<nz-descriptions-item nzTitle="Awards">{{
|
||||
movieInfo.Awards || "--"
|
||||
}}</nz-descriptions-item>
|
||||
</nz-descriptions>
|
||||
<h2 style="margin-top: 40px; border-bottom: 1px solid #eee">All Platforms</h2>
|
||||
<nz-card nzTitle="Also on" *ngIf="movieInfo['Also On']; else elseBlock">
|
||||
<div
|
||||
nz-card-grid
|
||||
*ngFor="let item of movieInfo['Also On'].split(',')"
|
||||
style="font-weight: bold"
|
||||
>
|
||||
{{ item }}
|
||||
</div>
|
||||
</nz-card>
|
||||
<ng-template #elseBlock>
|
||||
<nz-empty nzNotFoundImage="simple"></nz-empty>
|
||||
</ng-template>
|
||||
<nz-modal
|
||||
[(nzVisible)]="isVisible"
|
||||
nzTitle="Edit Wegame"
|
||||
nzOkText="Ok"
|
||||
nzCancelText="Cancel"
|
||||
(nzOnOk)="submitForm()"
|
||||
(nzOnCancel)="isVisible = false"
|
||||
>
|
||||
<ng-container *nzModalContent>
|
||||
<form nz-form [formGroup]="editForm">
|
||||
<div nz-row [nzGutter]="24">
|
||||
<div nz-col [nzSpan]="24" *ngFor="let field of editField">
|
||||
<nz-form-item>
|
||||
<nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="name"
|
||||
>{{ field.label }}
|
||||
</nz-form-label>
|
||||
<nz-form-control
|
||||
[nzSm]="14"
|
||||
[nzXs]="24"
|
||||
[nzErrorTip]="'Please input ' + field.label!"
|
||||
>
|
||||
<input
|
||||
nz-input
|
||||
[formControlName]="field.value"
|
||||
id="name"
|
||||
[placeholder]="field.label"
|
||||
/>
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</ng-container>
|
||||
</nz-modal>
|
||||
</div>
|
||||
@@ -0,0 +1,36 @@
|
||||
.song-title {
|
||||
text-align: center;
|
||||
font-weight: bolder;
|
||||
padding-bottom: 20px;
|
||||
margin-bottom: 30px;
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
.song-info {
|
||||
display: flex;
|
||||
text-align: left;
|
||||
}
|
||||
.song-info-basic {
|
||||
padding: 40px 0;
|
||||
margin-left: 20px;
|
||||
.detail-item-title {
|
||||
color: #666;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
.song-info-basic > div {
|
||||
line-height: 26px;
|
||||
}
|
||||
.title {
|
||||
font-weight: bold;
|
||||
font-size: 24px;
|
||||
margin: 8px 0;
|
||||
}
|
||||
.song-info-basic > div {
|
||||
&:first-child {
|
||||
color: #000;
|
||||
font-weight: bold;
|
||||
font-size: 24px;
|
||||
}
|
||||
font-size: 16px;
|
||||
color: #333;
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ApiService } from 'src/app/services/api.service';
|
||||
import { NzMessageService } from 'ng-zorro-antd/message';
|
||||
import { Router } from '@angular/router';
|
||||
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
||||
@Component({
|
||||
selector: 'app-wegame-details',
|
||||
templateUrl: './wegame-details.component.html',
|
||||
styleUrls: ['./wegame-details.component.scss'],
|
||||
})
|
||||
export class MovieDetailsComponent implements OnInit {
|
||||
movieInfo: any = {};
|
||||
fps: any = '';
|
||||
editForm!: FormGroup;
|
||||
editField: any = [
|
||||
{
|
||||
label: 'Name',
|
||||
value: 'Name',
|
||||
},
|
||||
{
|
||||
label: 'Distributor',
|
||||
value: 'Distributor',
|
||||
},
|
||||
{
|
||||
label: 'Developer',
|
||||
value: 'Developer',
|
||||
},
|
||||
{
|
||||
label: 'Release Date',
|
||||
value: 'Release Date',
|
||||
},
|
||||
{
|
||||
label: 'Summary',
|
||||
value: 'Summary',
|
||||
},
|
||||
{
|
||||
label: '# of Critic Reviews',
|
||||
value: '# of Critic Reviews',
|
||||
},
|
||||
{
|
||||
label: 'Critic Positive',
|
||||
value: 'Critic Positive',
|
||||
},
|
||||
{
|
||||
label: 'Critic Negative',
|
||||
value: 'Critic Negative',
|
||||
},
|
||||
];
|
||||
isVisible: boolean = false;
|
||||
|
||||
constructor(
|
||||
private apiService: ApiService,
|
||||
private $message: NzMessageService,
|
||||
public router: Router,
|
||||
private fb: FormBuilder
|
||||
) {}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.movieInfo = JSON.parse(localStorage.getItem('movieInfo') as any);
|
||||
this.editForm = this.fb.group({
|
||||
Name: [null, [Validators.required]],
|
||||
Distributor: [null, [Validators.required]],
|
||||
Developer: [null, [Validators.required]],
|
||||
'Release Date': [null, [Validators.required]],
|
||||
Summary: [null, [Validators.required]],
|
||||
'# of Critic Reviews': [null, [Validators.required]],
|
||||
'Critic Positive': [null, [Validators.required]],
|
||||
'Critic Negative': [null, [Validators.required]],
|
||||
});
|
||||
}
|
||||
|
||||
onDelete() {
|
||||
this.apiService.post('del_game', { _id: this.movieInfo._id }).subscribe(
|
||||
(res: any) => {
|
||||
this.$message.success(`Delete ${this.movieInfo.Name} Success!`);
|
||||
this.router.navigate(['/layout/list'], {});
|
||||
},
|
||||
() => {}
|
||||
);
|
||||
}
|
||||
onEdit() {
|
||||
this.isVisible = true;
|
||||
this.editForm.patchValue(this.movieInfo);
|
||||
}
|
||||
submitForm(): void {
|
||||
if (this.editForm.valid) {
|
||||
let params = { ...this.editForm.value, _id: this.movieInfo._id };
|
||||
this.apiService.post('update_game', params).subscribe(
|
||||
(res: any) => {
|
||||
this.isVisible = false;
|
||||
this.$message.success(`edit success!`);
|
||||
this.router.navigate(['/layout/list'], {});
|
||||
},
|
||||
() => {}
|
||||
);
|
||||
} else {
|
||||
Object.values(this.editForm.controls).forEach((control: any) => {
|
||||
if (control.invalid) {
|
||||
control.markAsDirty();
|
||||
control.updateValueAndValidity({ onlySelf: true });
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { RouterModule } from '@angular/router';
|
||||
import { SharedModule } from '../../shared/shared.module';
|
||||
import { MovieDetailsComponent } from './wegame-details.component';
|
||||
// import {FormatTimePipe} from "../../../pipe/formatTime.pipe";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
SharedModule,
|
||||
RouterModule.forChild([
|
||||
{
|
||||
path: '',
|
||||
component: MovieDetailsComponent,
|
||||
},
|
||||
]),
|
||||
],
|
||||
declarations: [MovieDetailsComponent],
|
||||
exports: [MovieDetailsComponent],
|
||||
})
|
||||
export class MovieDetailsModule {}
|
||||
@@ -0,0 +1,23 @@
|
||||
import { Pipe, PipeTransform } from '@angular/core';
|
||||
|
||||
@Pipe({ name: 'formatTime' })
|
||||
export class FormatTimePipe implements PipeTransform {
|
||||
//管道所要执行的事件 这个管道是身份证号的中间部分隐藏
|
||||
//例如{{Name | 管道}} value指的是Name值
|
||||
transform(value: number): any {
|
||||
//idCard 将你value传过来的值进行正则修改 之后再返回idCard
|
||||
var time;
|
||||
var hours = parseInt(
|
||||
(value % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60) + ''
|
||||
);
|
||||
var minutes = parseInt((value % (1000 * 60 * 60)) / (1000 * 60) + '');
|
||||
var seconds = Math.ceil((value % (1000 * 60)) / 1000);
|
||||
let hasHours = (hours < 10 ? '0' + hours : hours) + ':';
|
||||
time =
|
||||
(hours == 0 ? '' : hasHours) +
|
||||
(minutes < 10 ? '0' + minutes : minutes) +
|
||||
':' +
|
||||
(seconds < 10 ? '0' + seconds : seconds);
|
||||
return time;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { HttpClient, HttpHeaders } from '@angular/common/http';
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class ApiService {
|
||||
_baseUrl = 'http://127.0.0.1:5000/api/wegame/';
|
||||
|
||||
constructor(private httpClient: HttpClient) {}
|
||||
|
||||
get(url: string, params: any) {
|
||||
return this.httpClient.get(this._baseUrl + url, params);
|
||||
}
|
||||
post(url: string, params: any) {
|
||||
if (url == 'login' || url == 'register') {
|
||||
return this.httpClient.post(this._baseUrl + url, params);
|
||||
}
|
||||
return this.httpClient.post(this._baseUrl + url, params, {
|
||||
headers: new HttpHeaders().set(
|
||||
'token',
|
||||
localStorage.getItem('token') as any
|
||||
),
|
||||
});
|
||||
}
|
||||
}
|
||||
export function isNullOrUndefine(target: any): boolean {
|
||||
return target === null || typeof target === 'undefined';
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
import { Location } from '@angular/common';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class NavigateService {
|
||||
constructor(private router: Router, private location: Location) {}
|
||||
|
||||
goToLogin() {
|
||||
this.navigate('/login');
|
||||
}
|
||||
|
||||
navigate(path: String, ext?: any) {
|
||||
// 默认不记录历史
|
||||
// let defaultExt = { skipLocationChange: true };
|
||||
// ext = ext == null ? defaultExt : Object.assign(ext, defaultExt);
|
||||
this.router.navigate([path], ext);
|
||||
}
|
||||
|
||||
back() {
|
||||
//history.back();
|
||||
this.location.back();
|
||||
}
|
||||
|
||||
// backTo(url) {
|
||||
// if (url === '/tabs/business') {
|
||||
// this.eventService.event.emit('load-business');
|
||||
// }
|
||||
// this.router.navigateByUrl(url);
|
||||
// }
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { ReactiveFormsModule, FormsModule } from '@angular/forms';
|
||||
|
||||
import { NzFormModule } from 'ng-zorro-antd/form';
|
||||
import { NzButtonModule } from 'ng-zorro-antd/button';
|
||||
import { NzInputModule } from 'ng-zorro-antd/input';
|
||||
import { NzIconModule } from 'ng-zorro-antd/icon';
|
||||
import { NzTableModule } from 'ng-zorro-antd/table';
|
||||
import { NzDividerModule } from 'ng-zorro-antd/divider';
|
||||
import { NzPopconfirmModule } from 'ng-zorro-antd/popconfirm';
|
||||
import { NzMessageService } from 'ng-zorro-antd/message';
|
||||
import { NzModalModule } from 'ng-zorro-antd/modal';
|
||||
import { NzCommentModule } from 'ng-zorro-antd/comment';
|
||||
import { NzListModule } from 'ng-zorro-antd/list';
|
||||
import { NzAvatarModule } from 'ng-zorro-antd/avatar';
|
||||
import { NzCardModule } from 'ng-zorro-antd/card';
|
||||
import { NzPaginationModule } from 'ng-zorro-antd/pagination';
|
||||
import { NzSpinModule } from 'ng-zorro-antd/spin';
|
||||
import { NzDropDownModule } from 'ng-zorro-antd/dropdown';
|
||||
import { NzSelectModule } from 'ng-zorro-antd/select';
|
||||
import { NzDescriptionsModule } from 'ng-zorro-antd/descriptions';
|
||||
import { NzEmptyModule } from 'ng-zorro-antd/empty';
|
||||
|
||||
import { FormatTimePipe } from '../pipe/formatTime.pipe';
|
||||
|
||||
@NgModule({
|
||||
imports: [],
|
||||
declarations: [FormatTimePipe],
|
||||
exports: [
|
||||
ReactiveFormsModule,
|
||||
FormsModule,
|
||||
NzFormModule,
|
||||
NzInputModule,
|
||||
NzButtonModule,
|
||||
NzIconModule,
|
||||
NzTableModule,
|
||||
NzDividerModule,
|
||||
NzPopconfirmModule,
|
||||
NzModalModule,
|
||||
NzCommentModule,
|
||||
NzListModule,
|
||||
NzAvatarModule,
|
||||
NzCardModule,
|
||||
NzPaginationModule,
|
||||
NzSpinModule,
|
||||
NzDropDownModule,
|
||||
NzSelectModule,
|
||||
NzDescriptionsModule,
|
||||
NzEmptyModule,
|
||||
FormatTimePipe,
|
||||
],
|
||||
providers: [{ provide: NzMessageService }],
|
||||
})
|
||||
export class SharedModule {}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 62 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 3.0 KiB |
@@ -0,0 +1,3 @@
|
||||
export const environment = {
|
||||
production: true
|
||||
};
|
||||
@@ -0,0 +1,16 @@
|
||||
// This file can be replaced during build by using the `fileReplacements` array.
|
||||
// `ng build` replaces `environment.ts` with `environment.prod.ts`.
|
||||
// The list of file replacements can be found in `angular.json`.
|
||||
|
||||
export const environment = {
|
||||
production: false
|
||||
};
|
||||
|
||||
/*
|
||||
* For easier debugging in development mode, you can import the following file
|
||||
* to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`.
|
||||
*
|
||||
* This import should be commented out in production mode because it will have a negative impact
|
||||
* on performance if an error is thrown.
|
||||
*/
|
||||
// import 'zone.js/plugins/zone-error'; // Included with Angular CLI.
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 4.2 KiB |
@@ -0,0 +1,13 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>Wegame app</title>
|
||||
<base href="/" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<link rel="icon" type="image/x-icon" href="music_favicon.ico" />
|
||||
</head>
|
||||
<body>
|
||||
<app-root></app-root>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,12 @@
|
||||
import { enableProdMode } from '@angular/core';
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
|
||||
import { AppModule } from './app/app.module';
|
||||
import { environment } from './environments/environment';
|
||||
|
||||
if (environment.production) {
|
||||
enableProdMode();
|
||||
}
|
||||
|
||||
platformBrowserDynamic().bootstrapModule(AppModule)
|
||||
.catch(err => console.error(err));
|
||||
@@ -0,0 +1,53 @@
|
||||
/**
|
||||
* This file includes polyfills needed by Angular and is loaded before the app.
|
||||
* You can add your own extra polyfills to this file.
|
||||
*
|
||||
* This file is divided into 2 sections:
|
||||
* 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.
|
||||
* 2. Application imports. Files imported after ZoneJS that should be loaded before your main
|
||||
* file.
|
||||
*
|
||||
* The current setup is for so-called "evergreen" browsers; the last versions of browsers that
|
||||
* automatically update themselves. This includes recent versions of Safari, Chrome (including
|
||||
* Opera), Edge on the desktop, and iOS and Chrome on mobile.
|
||||
*
|
||||
* Learn more in https://angular.io/guide/browser-support
|
||||
*/
|
||||
|
||||
/***************************************************************************************************
|
||||
* BROWSER POLYFILLS
|
||||
*/
|
||||
|
||||
/**
|
||||
* By default, zone.js will patch all possible macroTask and DomEvents
|
||||
* user can disable parts of macroTask/DomEvents patch by setting following flags
|
||||
* because those flags need to be set before `zone.js` being loaded, and webpack
|
||||
* will put import in the top of bundle, so user need to create a separate file
|
||||
* in this directory (for example: zone-flags.ts), and put the following flags
|
||||
* into that file, and then add the following code before importing zone.js.
|
||||
* import './zone-flags';
|
||||
*
|
||||
* The flags allowed in zone-flags.ts are listed here.
|
||||
*
|
||||
* The following flags will work for all browsers.
|
||||
*
|
||||
* (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
|
||||
* (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
|
||||
* (window as any).__zone_symbol__UNPATCHED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames
|
||||
*
|
||||
* in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
|
||||
* with the following flag, it will bypass `zone.js` patch for IE/Edge
|
||||
*
|
||||
* (window as any).__Zone_enable_cross_context_check = true;
|
||||
*
|
||||
*/
|
||||
|
||||
/***************************************************************************************************
|
||||
* Zone JS is required by default for Angular itself.
|
||||
*/
|
||||
import 'zone.js'; // Included with Angular CLI.
|
||||
|
||||
|
||||
/***************************************************************************************************
|
||||
* APPLICATION IMPORTS
|
||||
*/
|
||||
@@ -0,0 +1,2 @@
|
||||
/* You can add global styles to this file, and also import other style files */
|
||||
@import "../node_modules/ng-zorro-antd/ng-zorro-antd.variable.min.css";
|
||||
@@ -0,0 +1,26 @@
|
||||
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
|
||||
|
||||
import 'zone.js/testing';
|
||||
import { getTestBed } from '@angular/core/testing';
|
||||
import {
|
||||
BrowserDynamicTestingModule,
|
||||
platformBrowserDynamicTesting
|
||||
} from '@angular/platform-browser-dynamic/testing';
|
||||
|
||||
declare const require: {
|
||||
context(path: string, deep?: boolean, filter?: RegExp): {
|
||||
<T>(id: string): T;
|
||||
keys(): string[];
|
||||
};
|
||||
};
|
||||
|
||||
// First, initialize the Angular testing environment.
|
||||
getTestBed().initTestEnvironment(
|
||||
BrowserDynamicTestingModule,
|
||||
platformBrowserDynamicTesting(),
|
||||
);
|
||||
|
||||
// Then we find all the tests.
|
||||
const context = require.context('./', true, /\.spec\.ts$/);
|
||||
// And load the modules.
|
||||
context.keys().forEach(context);
|
||||
@@ -0,0 +1,9 @@
|
||||
// Custom Theming for NG-ZORRO
|
||||
// For more information: https://ng.ant.design/docs/customize-theme/en
|
||||
// @import "../node_modules/ng-zorro-antd/ng-zorro-antd.less";
|
||||
// @import "~ng-zorro-antd/ng-zorro-antd.less";
|
||||
|
||||
// Override less variables to here
|
||||
// View all variables: https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/components/style/themes/default.less
|
||||
|
||||
// @primary-color: #1890ff;
|
||||
@@ -0,0 +1,15 @@
|
||||
/* To learn more about this file see: https://angular.io/config/tsconfig. */
|
||||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "./out-tsc/app",
|
||||
"types": []
|
||||
},
|
||||
"files": [
|
||||
"src/main.ts",
|
||||
"src/polyfills.ts"
|
||||
],
|
||||
"include": [
|
||||
"src/**/*.d.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
/* To learn more about this file see: https://angular.io/config/tsconfig. */
|
||||
{
|
||||
"compileOnSave": false,
|
||||
"compilerOptions": {
|
||||
"baseUrl": "./",
|
||||
"outDir": "./dist/out-tsc",
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"strict": true,
|
||||
"noImplicitOverride": true,
|
||||
"noPropertyAccessFromIndexSignature": true,
|
||||
"noImplicitReturns": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"sourceMap": true,
|
||||
"declaration": false,
|
||||
"downlevelIteration": true,
|
||||
"experimentalDecorators": true,
|
||||
"moduleResolution": "node",
|
||||
"importHelpers": true,
|
||||
"target": "es2020",
|
||||
"module": "es2020",
|
||||
"lib": [
|
||||
"es2020",
|
||||
"dom"
|
||||
]
|
||||
},
|
||||
"angularCompilerOptions": {
|
||||
"enableI18nLegacyMessageIdFormat": false,
|
||||
"strictInjectionParameters": true,
|
||||
"strictInputAccessModifiers": true,
|
||||
"strictTemplates": true
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
/* To learn more about this file see: https://angular.io/config/tsconfig. */
|
||||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "./out-tsc/spec",
|
||||
"types": [
|
||||
"jasmine"
|
||||
]
|
||||
},
|
||||
"files": [
|
||||
"src/test.ts",
|
||||
"src/polyfills.ts"
|
||||
],
|
||||
"include": [
|
||||
"src/**/*.spec.ts",
|
||||
"src/**/*.d.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
## Start my azure cloud applocation
|
||||
Reference in New Issue
Block a user