Skip to content

Commit

Permalink
popup
Browse files Browse the repository at this point in the history
  • Loading branch information
NewGrafon committed Dec 21, 2023
1 parent 8e2d6a7 commit b222ae7
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions src/app/services/telegram/telegram.service.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
import { Inject, Injectable } from '@angular/core';
import { DOCUMENT } from '@angular/common';
import { TgButton, TgPopupParams } from '../../static/interfaces/telegram.interfaces';

interface TgButton {
show: () => void;
hide: () => void;
setText: (text: string) => void;
onClick: (callback: Function) => void;
offClick: (callback: Function) => void;
showProgress: (leaveActive: boolean) => void;
hideProgress: () => void;
}

@Injectable({
providedIn: 'root',
Expand All @@ -27,4 +19,8 @@ export class TelegramService {
get MainButton(): TgButton {
return this.tg.MainButton;
}

showPopup(tgPopupParams: TgPopupParams): void {
return this.tg.showPopup(tgPopupParams);
}
}

0 comments on commit b222ae7

Please sign in to comment.