Skip to content

Commit 602d0a1

Browse files
committed
fix some errors(style not working as expected
1 parent f67371b commit 602d0a1

File tree

7 files changed

+11
-34
lines changed

7 files changed

+11
-34
lines changed

server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { APP_BASE_HREF } from '@angular/common';
22
import { CommonEngine } from '@angular/ssr';
3-
import express from 'express';
3+
import * as express from 'express';
44
import { fileURLToPath } from 'node:url';
55
import { dirname, join, resolve } from 'node:path';
66
import AppServerModule from './src/main.server';

src/app/services/ConfigService.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@ import { Injectable } from '@angular/core';
77
export class ConfigService {
88

99
public GetApiBaseUrl(): string {
10-
if (window["__env"] && window["__env"]["ApiBaseUrl"]) {
11-
return <string>window["__env"]["ApiBaseUrl"];
10+
if (typeof window !== "undefined") {
11+
if (window["__env"] && window["__env"]["ApiBaseUrl"]) {
12+
return <string>window["__env"]["ApiBaseUrl"];
13+
}
1214
}
1315
return environment.apiBaseUrl;
1416
}

src/app/shared/authConfig.ts

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,32 +2,12 @@
22

33
import { AuthConfig } from 'angular-oauth2-oidc';
44

5-
export const authPasswordFlowConfig: AuthConfig = {
6-
// Url of the Identity Provider
7-
issuer: 'https://id.weihanli.xyz',
8-
9-
// URL of the SPA to redirect the user to after login
10-
redirectUri: window.location.origin + '/account/callback',
11-
12-
// The SPA's id. The SPA is registerd with this id at the auth-server
13-
clientId: 'reservation-angular-client',
14-
15-
dummyClientSecret: 'f6f1f917-0899-ef36-63c8-84728f411e7c',
16-
17-
// set the scope for the permissions the client should request
18-
// The first three are defined by OIDC. The 4th is a usecase-specific one
19-
scope: 'openid profile',
20-
21-
showDebugInformation: true,
22-
23-
oidc: false
24-
};
25-
265
export const authCodeFlowConfig: AuthConfig = {
276
issuer: 'https://id.weihanli.xyz',
287

298
// URL of the SPA to redirect the user to after login
30-
redirectUri: window.location.origin + '/account/callback',
9+
// redirectUri: window.location.origin + '/account/callback',
10+
redirectUri: 'http://localhost:4200' + '/account/callback',
3111

3212
// The SPA's id. The SPA is registerd with this id at the auth-server
3313
// clientId: 'server.code',

src/assets/config.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
var env = {
22
ApiBaseUrl: "https://reservation.weihanli.xyz"
33
};
4-
window["__env"]= env;
4+
if (typeof window !== "undefined") {
5+
window["__env"] = env;
6+
}

src/assets/newrelic.js

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

src/index.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
<base href="/">
88
<meta name="viewport" content="width=device-width, initial-scale=1">
99
<link rel="icon" type="image/x-icon" href="favicon.ico">
10+
<link rel="stylesheet" href="node_modules/@angular/material/prebuilt-themes/azure-blue.css" />
1011
<script src="assets/config.js"></script>
1112
<!-- Google Analytics -->
1213
<script>
@@ -18,8 +19,6 @@
1819
<!-- End Google Analytics -->
1920
<link rel="manifest" href="manifest.webmanifest">
2021
<meta name="theme-color" content="#1976d2">
21-
<!-- newrelic -->
22-
<script type="text/javascript" src="assets/newrelic.js"></script>
2322
</head>
2423
<body>
2524
<app-root></app-root>

src/styles.less

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,3 @@
2424
-webkit-font-feature-settings:'liga';
2525
-webkit-font-smoothing: antialiased;
2626
}
27-
28-
@import "~@angular/material/prebuilt-themes/indigo-pink.css";

0 commit comments

Comments
 (0)