-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
135 additions
and
139 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
import { isVersionAtLeast } from '../isVersionAtLeast' | ||
|
||
export { offClick, onClick } from './events' | ||
export { hide, show } from './visible' | ||
import { isVersionAtLeast } from '../isVersionAtLeast' | ||
|
||
export function isBackButtonSupported(): boolean { | ||
export function isSupported(): boolean { | ||
return isVersionAtLeast('6.1') | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { updateState } from '../../state' | ||
import { webApp } from '../../webApp' | ||
import { isVersionAtLeast } from '../isVersionAtLeast' | ||
|
||
export function isSupported(): boolean { | ||
return isVersionAtLeast('6.1') | ||
} | ||
|
||
export function set(color: string) { | ||
webApp.setBackgroundColor(color) | ||
updateState() | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { updateState } from '../../state' | ||
import { webApp } from '../../webApp' | ||
import { isVersionAtLeast } from '../isVersionAtLeast' | ||
|
||
export function isSupported(): boolean { | ||
return isVersionAtLeast('6.2') | ||
} | ||
|
||
export function enable() { | ||
webApp.enableClosingConfirmation() | ||
updateState() | ||
} | ||
|
||
export function disable() { | ||
webApp.disableClosingConfirmation() | ||
updateState() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
import { isVersionAtLeast } from '../isVersionAtLeast' | ||
|
||
export { getItem } from './getItem' | ||
export { getItems } from './getItems' | ||
export { getKeys } from './getKeys' | ||
export { removeItem } from './removeItem' | ||
export { removeItems } from './removeItems' | ||
export { setItem } from './setItem' | ||
import { isVersionAtLeast } from '../isVersionAtLeast' | ||
|
||
export function isHapticFeedbackSupported(): boolean { | ||
export function isSupported(): boolean { | ||
return isVersionAtLeast('6.9') | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { Events } from '../../enums' | ||
import { webApp } from '../../webApp' | ||
|
||
export function onEvent(eventType: Events, eventHandler: (arg?: any) => void) { | ||
webApp.onEvent(eventType, eventHandler) | ||
} | ||
|
||
export function offEvent(eventType: Events, eventHandler: (arg?: any) => void) { | ||
webApp.offEvent(eventType, eventHandler) | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { state } from '../../options' | ||
import { updateState } from '../../state' | ||
import { webApp } from '../../webApp' | ||
|
||
let autoExpandHandler: any | ||
|
||
export function index() { | ||
webApp.expand() | ||
updateState() | ||
} | ||
|
||
export function enableAutoExpand() { | ||
autoExpandHandler = setInterval(() => { | ||
if (!webApp.isExpanded) { | ||
index() | ||
} | ||
}, state.autoExpandInterval) | ||
} | ||
|
||
export function disableAutoExpand() { | ||
clearInterval(autoExpandHandler) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
import { isVersionAtLeast } from '../isVersionAtLeast' | ||
|
||
export { impactOccurred } from './impactOccurred' | ||
export { notificationOccurred } from './notificationOccurred' | ||
export { selectionChanged } from './selectionChanged' | ||
import { isVersionAtLeast } from '../isVersionAtLeast' | ||
|
||
export function isHapticFeedbackSupported(): boolean { | ||
export function isSupported(): boolean { | ||
return isVersionAtLeast('6.1') | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { updateState } from '../../state' | ||
import { webApp } from '../../webApp' | ||
import { isVersionAtLeast } from '../isVersionAtLeast' | ||
|
||
export function isSupported(): boolean { | ||
return isVersionAtLeast('6.1') | ||
} | ||
|
||
export function set(color: string) { | ||
webApp.setHeaderColor(color) | ||
updateState() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,12 @@ | ||
import * as BackButton from './backButton' | ||
import * as CloudStorage from './cloudStorage' | ||
import * as HapticFeedback from './hapticFeedback' | ||
|
||
export * as BackButton from './backButton' | ||
export * as BackgroundColor from './backgroundColor' | ||
export { close } from './close' | ||
export { | ||
disableClosingConfirmation, | ||
enableClosingConfirmation, | ||
isClosingConfirmationSupported | ||
} from './closingConfirmation' | ||
export { offEvent, onEvent } from './events' | ||
export { autoExpand, expand, stopAutoExpand } from './expand' | ||
export * as ClosingConfirmation from './closingConfirmation' | ||
export * as CloudStorage from './cloudStorage' | ||
export * as Events from './events' | ||
export * as Expand from './expand' | ||
export * as HapticFeedback from './hapticFeedback' | ||
export * as HeaderColor from './headerColor' | ||
export { isVersionAtLeast } from './isVersionAtLeast' | ||
export { ready } from './ready' | ||
export { isBackgroundColorSupported, setBackgroundColor } from './setBackgroundColor' | ||
export { isHeaderColorSupported, setHeaderColor } from './setHeaderColor' | ||
export { disableVerticalSwipes, enableVerticalSwipes, isVerticalSwipesSupported } from './verticalSwipes' | ||
export { BackButton, CloudStorage, HapticFeedback } | ||
export * as VerticalSwipes from './verticalSwipes' |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { updateState } from '../../state' | ||
import { webApp } from '../../webApp' | ||
import { isVersionAtLeast } from '../isVersionAtLeast' | ||
|
||
export function isSupported(): boolean { | ||
return isVersionAtLeast('7.7') | ||
} | ||
|
||
export function enable() { | ||
webApp.enableVerticalSwipes() | ||
updateState() | ||
} | ||
|
||
export function disable() { | ||
webApp.disableVerticalSwipes() | ||
updateState() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
export enum Events { | ||
ThemeChanged = 'themeChanged', | ||
ViewportChanged = 'viewportChanged', | ||
MainButtonClicked = 'mainButtonClicked', | ||
BackButtonClicked = 'backButtonClicked', | ||
SettingsButtonClicked = 'settingsButtonClicked', | ||
InvoiceClosed = 'invoiceClosed', | ||
PopupClosed = 'popupClosed', | ||
QrTextReceived = 'qrTextReceived', | ||
ClipboardTextReceived = 'clipboardTextReceived', | ||
WriteAccessRequested = 'writeAccessRequested', | ||
ContactRequested = 'contactRequested', | ||
BiometricManagerUpdated = 'biometricManagerUpdated', | ||
BiometricAuthRequested = 'biometricAuthRequested', | ||
BiometricTokenUpdated = 'biometricTokenUpdated' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
export * from './actions' | ||
export { Events } from './enums' | ||
export { fixIosMultitaps, unfixIosMultitaps } from './helpers/fixIosMultitaps' | ||
export { fixTma, unfixTma } from './helpers/fixTma' | ||
export { createTelegramMiniApp } from './plugin' | ||
export { state, updateState } from './state' | ||
export { EventType } from './types' | ||
export type { Options } from './types' | ||
export { webApp } from './webApp' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters