bug fixed
This commit is contained in:
parent
68099247c1
commit
85f56303e1
6
package-lock.json
generated
6
package-lock.json
generated
|
@ -1951,9 +1951,9 @@
|
||||||
"integrity": "sha512-U/tpzUgXSGrWzetmmqEcLYYzgCUEew3C0CcfYSr+ajkt4AvHqcFijqXARVHXVahfAkMXZU69/8etDhzWmOcvGw=="
|
"integrity": "sha512-U/tpzUgXSGrWzetmmqEcLYYzgCUEew3C0CcfYSr+ajkt4AvHqcFijqXARVHXVahfAkMXZU69/8etDhzWmOcvGw=="
|
||||||
},
|
},
|
||||||
"@ucap/ng-ui-authentication": {
|
"@ucap/ng-ui-authentication": {
|
||||||
"version": "0.0.14",
|
"version": "0.0.15",
|
||||||
"resolved": "http://10.81.13.221:8081/nexus/repository/npm-all/@ucap/ng-ui-authentication/-/ng-ui-authentication-0.0.14.tgz",
|
"resolved": "http://10.81.13.221:8081/nexus/repository/npm-all/@ucap/ng-ui-authentication/-/ng-ui-authentication-0.0.15.tgz",
|
||||||
"integrity": "sha512-wejkhebthEUub9nGigu9/fENB7hwOHrYTDq4dPmitxKeb3o1RNdbjAzaEB0QlVmLF+/ReydWZqr2d4d8Dus+/g=="
|
"integrity": "sha512-RDDubvBs14kL5yiISq34lPWDMGCitcwmWR3QFYF1gv2X3xEyqzr8Cg35GWIuhyyaSDIx69sG+mn+IYKBarJwlA=="
|
||||||
},
|
},
|
||||||
"@ucap/ng-ui-organization": {
|
"@ucap/ng-ui-organization": {
|
||||||
"version": "0.0.2",
|
"version": "0.0.2",
|
||||||
|
|
|
@ -75,7 +75,7 @@
|
||||||
"@ucap/ng-web-storage": "~0.0.3",
|
"@ucap/ng-web-storage": "~0.0.3",
|
||||||
"@ucap/ng-ui": "~0.0.3",
|
"@ucap/ng-ui": "~0.0.3",
|
||||||
"@ucap/ng-ui-organization": "~0.0.2",
|
"@ucap/ng-ui-organization": "~0.0.2",
|
||||||
"@ucap/ng-ui-authentication": "~0.0.14",
|
"@ucap/ng-ui-authentication": "~0.0.15",
|
||||||
"@ucap/ng-ui-skin-default": "~0.0.1",
|
"@ucap/ng-ui-skin-default": "~0.0.1",
|
||||||
"@ucap/pi": "~0.0.5",
|
"@ucap/pi": "~0.0.5",
|
||||||
"@ucap/protocol": "~0.0.8",
|
"@ucap/protocol": "~0.0.8",
|
||||||
|
|
|
@ -43,11 +43,11 @@ export class AppAuthenticationGuard implements CanActivate {
|
||||||
} else {
|
} else {
|
||||||
const userStore = this.appAuthenticationService.useAutoLogin();
|
const userStore = this.appAuthenticationService.useAutoLogin();
|
||||||
if (!!userStore) {
|
if (!!userStore) {
|
||||||
const loginSession = this.appAuthenticationService.loginSession;
|
const loginSession = this.appAuthenticationService.getLoginSession();
|
||||||
|
|
||||||
const onWebLoginFailure = (error: any) => {
|
const onWebLoginFailure = (error: any) => {
|
||||||
userStore.settings.general.autoLogin = false;
|
userStore.settings.general.autoLogin = false;
|
||||||
this.appAuthenticationService.userStore = userStore;
|
this.appAuthenticationService.setUserStore(userStore);
|
||||||
|
|
||||||
this.router.navigateByUrl('/account/login');
|
this.router.navigateByUrl('/account/login');
|
||||||
resolve(false);
|
resolve(false);
|
||||||
|
|
|
@ -50,7 +50,7 @@ export class AppAuthenticationResolver implements Resolve<void> {
|
||||||
): void | Observable<void> | Promise<void> {
|
): void | Observable<void> | Promise<void> {
|
||||||
return new Promise<void>(async (resolve, reject) => {
|
return new Promise<void>(async (resolve, reject) => {
|
||||||
try {
|
try {
|
||||||
const loginSession = this.appAuthenticationService.loginSession;
|
const loginSession = this.appAuthenticationService.getLoginSession();
|
||||||
const networkInfo = await this.nativeService.getNetworkInfo();
|
const networkInfo = await this.nativeService.getNetworkInfo();
|
||||||
const localIp =
|
const localIp =
|
||||||
!!networkInfo && 0 < networkInfo.length && !!networkInfo[0].ip
|
!!networkInfo && 0 < networkInfo.length && !!networkInfo[0].ip
|
||||||
|
|
|
@ -26,6 +26,7 @@
|
||||||
*ngIf="useRememberMe"
|
*ngIf="useRememberMe"
|
||||||
class="remember-me"
|
class="remember-me"
|
||||||
aria-label="Remember Me"
|
aria-label="Remember Me"
|
||||||
|
[checked]="!!userStore && userStore.rememberMe"
|
||||||
>
|
>
|
||||||
{{ 'login.labels.rememberMe' | ucapI18n }}
|
{{ 'login.labels.rememberMe' | ucapI18n }}
|
||||||
</mat-checkbox>
|
</mat-checkbox>
|
||||||
|
@ -35,6 +36,12 @@
|
||||||
*ngIf="useAutoLogin"
|
*ngIf="useAutoLogin"
|
||||||
class="auto-login"
|
class="auto-login"
|
||||||
aria-label="Auto Login"
|
aria-label="Auto Login"
|
||||||
|
[checked]="
|
||||||
|
!!userStore &&
|
||||||
|
!!userStore.settings &&
|
||||||
|
!!userStore.settings.general &&
|
||||||
|
userStore.settings.general.autoLogin
|
||||||
|
"
|
||||||
>
|
>
|
||||||
{{ 'login.labels.autoLogin' | ucapI18n }}
|
{{ 'login.labels.autoLogin' | ucapI18n }}
|
||||||
</mat-checkbox>
|
</mat-checkbox>
|
||||||
|
|
|
@ -70,7 +70,7 @@ export class LoginSectionComponent implements OnInit, OnDestroy {
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
this.loginSession = this.appAuthenticationService.loginSession;
|
this.loginSession = this.appAuthenticationService.getLoginSession();
|
||||||
|
|
||||||
this.loginTry = this.sessionStorageService.get<LoginTry>(AppKey.LoginTry);
|
this.loginTry = this.sessionStorageService.get<LoginTry>(AppKey.LoginTry);
|
||||||
|
|
||||||
|
@ -93,19 +93,6 @@ export class LoginSectionComponent implements OnInit, OnDestroy {
|
||||||
.subscribe((param) => {
|
.subscribe((param) => {
|
||||||
this.loginTry = param.value as LoginTry;
|
this.loginTry = param.value as LoginTry;
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!!this.userStore && this.userStore.rememberMe) {
|
|
||||||
this.chkUseRememberMe.checked = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (
|
|
||||||
!!this.userStore &&
|
|
||||||
!!this.userStore.settings &&
|
|
||||||
!!this.userStore.settings.general &&
|
|
||||||
this.userStore.settings.general.autoLogin
|
|
||||||
) {
|
|
||||||
this.chkUseAutoLogin.checked = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnDestroy(): void {
|
ngOnDestroy(): void {
|
||||||
|
|
|
@ -29,7 +29,7 @@ export class AppAuthenticationService {
|
||||||
@Inject(UCAP_NATIVE_SERVICE) private nativeService: NativeService
|
@Inject(UCAP_NATIVE_SERVICE) private nativeService: NativeService
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
get userStore(): UserStore {
|
getUserStore(): UserStore {
|
||||||
const userStore = this.localStorageService.encGet<UserStore>(
|
const userStore = this.localStorageService.encGet<UserStore>(
|
||||||
AppKey.UserStore,
|
AppKey.UserStore,
|
||||||
environment.productConfig.localEncriptionKey
|
environment.productConfig.localEncriptionKey
|
||||||
|
@ -38,8 +38,8 @@ export class AppAuthenticationService {
|
||||||
return userStore;
|
return userStore;
|
||||||
}
|
}
|
||||||
|
|
||||||
set userStore(userStore: UserStore) {
|
setUserStore(userStore: UserStore) {
|
||||||
const oldUserStore = this.userStore;
|
const oldUserStore = this.getUserStore();
|
||||||
this.localStorageService.encSet<UserStore>(
|
this.localStorageService.encSet<UserStore>(
|
||||||
AppKey.UserStore,
|
AppKey.UserStore,
|
||||||
{
|
{
|
||||||
|
@ -50,7 +50,7 @@ export class AppAuthenticationService {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
get loginSession(): LoginSession {
|
getLoginSession(): LoginSession {
|
||||||
const loginSession = this.sessionStorageService.get<LoginSession>(
|
const loginSession = this.sessionStorageService.get<LoginSession>(
|
||||||
AppKey.LoginSession
|
AppKey.LoginSession
|
||||||
);
|
);
|
||||||
|
@ -58,8 +58,8 @@ export class AppAuthenticationService {
|
||||||
return loginSession;
|
return loginSession;
|
||||||
}
|
}
|
||||||
|
|
||||||
set loginSession(loginSession: LoginSession) {
|
setLoginSession(loginSession: LoginSession) {
|
||||||
const oldLoginSession = this.loginSession;
|
const oldLoginSession = this.getLoginSession();
|
||||||
this.sessionStorageService.set<LoginSession>(AppKey.LoginSession, {
|
this.sessionStorageService.set<LoginSession>(AppKey.LoginSession, {
|
||||||
...oldLoginSession,
|
...oldLoginSession,
|
||||||
...loginSession
|
...loginSession
|
||||||
|
@ -67,12 +67,12 @@ export class AppAuthenticationService {
|
||||||
}
|
}
|
||||||
|
|
||||||
loggedIn(): boolean {
|
loggedIn(): boolean {
|
||||||
const loginSession = this.loginSession;
|
const loginSession = this.getLoginSession();
|
||||||
return !!loginSession && !!loginSession.loginId;
|
return !!loginSession && !!loginSession.loginId;
|
||||||
}
|
}
|
||||||
|
|
||||||
useAutoLogin(): UserStore | null {
|
useAutoLogin(): UserStore | null {
|
||||||
const userStore = this.userStore;
|
const userStore = this.getUserStore();
|
||||||
|
|
||||||
return !!userStore &&
|
return !!userStore &&
|
||||||
!!userStore.settings &&
|
!!userStore.settings &&
|
||||||
|
@ -87,7 +87,7 @@ export class AppAuthenticationService {
|
||||||
rememberMe: boolean,
|
rememberMe: boolean,
|
||||||
autoLogin: boolean
|
autoLogin: boolean
|
||||||
) {
|
) {
|
||||||
const prevLoginSession = this.loginSession;
|
const prevLoginSession = this.getLoginSession();
|
||||||
|
|
||||||
const newLoginSession = {
|
const newLoginSession = {
|
||||||
...prevLoginSession,
|
...prevLoginSession,
|
||||||
|
@ -96,13 +96,13 @@ export class AppAuthenticationService {
|
||||||
};
|
};
|
||||||
const encLoginPw = PasswordUtil.encrypt(newLoginSession.loginPw);
|
const encLoginPw = PasswordUtil.encrypt(newLoginSession.loginPw);
|
||||||
|
|
||||||
this.loginSession = {
|
this.setLoginSession({
|
||||||
...newLoginSession,
|
...newLoginSession,
|
||||||
initPw: newLoginSession.loginId === newLoginSession.loginPw,
|
initPw: newLoginSession.loginId === newLoginSession.loginPw,
|
||||||
loginPw: encLoginPw
|
loginPw: encLoginPw
|
||||||
};
|
});
|
||||||
|
|
||||||
let userStore = this.userStore;
|
let userStore = this.getUserStore();
|
||||||
|
|
||||||
if (!userStore) {
|
if (!userStore) {
|
||||||
userStore = {
|
userStore = {
|
||||||
|
@ -142,7 +142,7 @@ export class AppAuthenticationService {
|
||||||
userStore.settings.general.autoLogin = autoLogin;
|
userStore.settings.general.autoLogin = autoLogin;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.userStore = userStore;
|
this.setUserStore(userStore);
|
||||||
|
|
||||||
this.sessionStorageService.remove(AppKey.LogoutSession);
|
this.sessionStorageService.remove(AppKey.LogoutSession);
|
||||||
}
|
}
|
||||||
|
@ -154,7 +154,7 @@ export class AppAuthenticationService {
|
||||||
this.sessionStorageService.remove(AppKey.UrlInfoResponse);
|
this.sessionStorageService.remove(AppKey.UrlInfoResponse);
|
||||||
this.sessionStorageService.remove(AppKey.AuthResponse);
|
this.sessionStorageService.remove(AppKey.AuthResponse);
|
||||||
|
|
||||||
let userStore = this.userStore;
|
let userStore = this.getUserStore();
|
||||||
|
|
||||||
if (!!userStore) {
|
if (!!userStore) {
|
||||||
userStore = {
|
userStore = {
|
||||||
|
@ -168,7 +168,7 @@ export class AppAuthenticationService {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this.userStore = userStore;
|
this.setUserStore(userStore);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,7 +32,7 @@ export class AppService {
|
||||||
initialize(): Promise<void[]> {
|
initialize(): Promise<void[]> {
|
||||||
const initSession = new Promise<void>(async (resolve, reject) => {
|
const initSession = new Promise<void>(async (resolve, reject) => {
|
||||||
try {
|
try {
|
||||||
let loginSession = this.appAuthenticationService.loginSession;
|
let loginSession = this.appAuthenticationService.getLoginSession();
|
||||||
|
|
||||||
loginSession = loginSession || {};
|
loginSession = loginSession || {};
|
||||||
|
|
||||||
|
@ -64,12 +64,12 @@ export class AppService {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.appAuthenticationService.loginSession = {
|
this.appAuthenticationService.setLoginSession({
|
||||||
...loginSession,
|
...loginSession,
|
||||||
deviceType,
|
deviceType,
|
||||||
desktopType,
|
desktopType,
|
||||||
companyGroupCode: this.companyGroupCode
|
companyGroupCode: this.companyGroupCode
|
||||||
};
|
});
|
||||||
|
|
||||||
this.dateService.setDefaultTimezone('Asia/Seoul');
|
this.dateService.setDefaultTimezone('Asia/Seoul');
|
||||||
this.dateService.use('Asia/Seoul');
|
this.dateService.use('Asia/Seoul');
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
@charset 'utf-8';
|
@charset 'utf-8';
|
||||||
$win-min-w: 700px;
|
$win-min-w: 420px;
|
||||||
$win-min-h: 600px;
|
$win-min-h: 640px;
|
||||||
html {
|
html {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
@ -11,9 +11,9 @@ body {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
/*min-width: 1160px;
|
/*min-width: 1160px;
|
||||||
min-height: 800px;*/
|
min-height: 800px;*/
|
||||||
min-width: $win-min-w;
|
min-width: $win-min-w !important;
|
||||||
min-height: $win-min-h;
|
min-height: $win-min-h !important;
|
||||||
overflow: auto;
|
overflow: hidden;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
color: #333;
|
color: #333;
|
||||||
|
@ -25,6 +25,7 @@ body {
|
||||||
-moz-box-sizing: border-box;
|
-moz-box-sizing: border-box;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
div,
|
div,
|
||||||
p,
|
p,
|
||||||
ol,
|
ol,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user