Added device location to home screen.
This commit is contained in:
@ -5,6 +5,7 @@ import { map } from 'rxjs/operators';
|
||||
|
||||
import { environment } from '../../environments/environment';
|
||||
import { Device } from '../core/device';
|
||||
import { Section } from '../core/section';
|
||||
import { User } from '../core/user';
|
||||
import { CookieService } from '../shared/cookie.service';
|
||||
|
||||
@ -23,7 +24,12 @@ export class AuthService {
|
||||
this.currentUser = this.currentUserSubject.asObservable();
|
||||
const deviceId = this.cs.getCookie('device_id');
|
||||
const device = this.cs.getCookie('device');
|
||||
this.device = new Device({ id: deviceId, name: device });
|
||||
const section = this.cs.getCookie('section');
|
||||
this.device = new Device({
|
||||
id: deviceId,
|
||||
name: device,
|
||||
section: new Section({ name: section }),
|
||||
});
|
||||
}
|
||||
|
||||
static parseJwt(token: string): User {
|
||||
|
||||
@ -270,5 +270,8 @@
|
||||
</mat-card>
|
||||
</div>
|
||||
<footer class="footer">
|
||||
<p>Backend: v{{ auth.user?.ver }} / Frontend: v{{ version }} on {{ auth.device.name }}</p>
|
||||
<p>
|
||||
Backend: v{{ auth.user?.ver }} / Frontend: v{{ version }} on {{ auth.device.name }} @
|
||||
{{ auth.device.section.name }}
|
||||
</p>
|
||||
</footer>
|
||||
|
||||
Reference in New Issue
Block a user