Add empty WebAPI project
This commit is contained in:
@@ -42,6 +42,7 @@
|
||||
</mat-sidenav>
|
||||
|
||||
<mat-sidenav-content>
|
||||
<div class="" id="google-button"></div>
|
||||
<router-outlet></router-outlet>
|
||||
<div class="footer">
|
||||
<span>© Bim-IT Michał Zieliński {{currentDate | date: 'yyyy'}}</span>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { OnInit } from '@angular/core';
|
||||
import { Component, ViewChild } from '@angular/core';
|
||||
import { MatSidenav } from '@angular/material/sidenav';
|
||||
import * as moment from 'moment';
|
||||
@@ -10,7 +11,7 @@ import { DeviceService } from '../services/device.service';
|
||||
templateUrl: './main-view.component.html',
|
||||
styleUrls: ['./main-view.component.scss']
|
||||
})
|
||||
export class MainViewComponent {
|
||||
export class MainViewComponent implements OnInit {
|
||||
@ViewChild('snav') snav?: MatSidenav;
|
||||
appVersion = packageInfo.version;
|
||||
|
||||
@@ -24,7 +25,31 @@ export class MainViewComponent {
|
||||
constructor(
|
||||
public _data: DataService,
|
||||
public _device: DeviceService
|
||||
) {}
|
||||
) { }
|
||||
|
||||
ngOnInit(): void {
|
||||
// @ts-ignore
|
||||
google.accounts.id.initialize({
|
||||
client_id: "107631825312-bkfe438ehr9k9ecb2h76g802tj6advma.apps.googleusercontent.com",
|
||||
callback: this.handleCredentialResponse.bind(this),
|
||||
auto_select: false,
|
||||
cancel_on_tap_outside: true,
|
||||
|
||||
});
|
||||
// @ts-ignore
|
||||
google.accounts.id.renderButton(
|
||||
// @ts-ignore
|
||||
document.getElementById("google-button"),
|
||||
{ theme: "outline", size: "large", width: "100%" }
|
||||
);
|
||||
// @ts-ignore
|
||||
google.accounts.id.prompt((notification: PromptMomentNotification) => { });
|
||||
}
|
||||
|
||||
async handleCredentialResponse(response: any) {
|
||||
// Here will be your response from Google.
|
||||
console.log(response);
|
||||
}
|
||||
|
||||
reloadApp() {
|
||||
document.location.reload();
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com">
|
||||
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500&display=swap" rel="stylesheet">
|
||||
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
|
||||
<script src="https://accounts.google.com/gsi/client" async defer></script>
|
||||
</head>
|
||||
<body class="mat-typography">
|
||||
<app-root></app-root>
|
||||
|
||||
Reference in New Issue
Block a user