dev #12401
This commit is contained in:
parent
f8054fe3ac
commit
3f0774dfae
@ -1,14 +1,14 @@
|
||||
<div class="footer-buttons-container">
|
||||
<!-- *ngIf="deferredPrompt && token?.length" -->
|
||||
<button
|
||||
*ngIf="true"
|
||||
class="footer-buttons-container__button"
|
||||
*ngIf="deferredPrompt && token?.length"
|
||||
class="footer-buttons-container__button download"
|
||||
(click)="downloadPWA()"
|
||||
>
|
||||
<img src="./assets/download.svg" alt="download" />
|
||||
</button>
|
||||
<button
|
||||
*ngIf="!isPermissionNotifications"
|
||||
*ngIf="!isPermissionNotifications && token?.length"
|
||||
class="footer-buttons-container__button"
|
||||
(click)="requestPermission()"
|
||||
value="click to copy"
|
||||
|
||||
@ -30,4 +30,10 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media (display-mode: standalone) {
|
||||
.download {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -40,10 +40,6 @@ export class RefSystemComponent implements OnInit {
|
||||
})
|
||||
.then(() => console.log('Successful share'))
|
||||
.catch((error) => {
|
||||
this.messageService.add({
|
||||
severity: 'error',
|
||||
summary: 'Произошла ошибка!',
|
||||
});
|
||||
console.log('Error sharing:', error)
|
||||
});
|
||||
}
|
||||
|
||||
@ -13,6 +13,7 @@ import { CardComponent } from 'src/app/components/card/card.component';
|
||||
import { AccountComponent } from '../account/account.component';
|
||||
import { MessageService } from 'primeng/api';
|
||||
import { MessagingService } from 'src/app/services/messaging.service';
|
||||
import { CookiesService } from 'src/app/services/cookies.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-main',
|
||||
@ -35,7 +36,8 @@ export class MainComponent implements OnInit {
|
||||
public el: ElementRef,
|
||||
public renderer: Renderer2,
|
||||
private messageService: MessageService,
|
||||
private messagingService: MessagingService
|
||||
private messagingService: MessagingService,
|
||||
private cookiesService: CookiesService,
|
||||
) {
|
||||
renderer.listen('window', 'appinstalled', (evt) => {
|
||||
console.log('INSTALLED!!!');
|
||||
@ -45,7 +47,12 @@ export class MainComponent implements OnInit {
|
||||
this.deferredPrompt = e;
|
||||
});
|
||||
route.queryParams.subscribe((params) => {
|
||||
if (params['token']) this.token = params['token'];
|
||||
if (params['token']) {
|
||||
this.token = params['token']
|
||||
} else {
|
||||
const token = this.cookiesService.getItem('token')
|
||||
this.token = token ? token : '';
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user