Skip to content

Add support for Bot API 9.0 #56

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
May 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## `vue-tg` - Telegram integration for Vue

[![docs](https://img.shields.io/badge/Documentation-gray?style=flat)](https://vue-tg.deptyped.com/)
[![version](https://img.shields.io/badge/Bot%20API-8.0-478be6?logo=telegram&style=flat)](https://core.telegram.org/bots/webapps#november-17-2024)
[![version](https://img.shields.io/badge/Bot%20API-9.0-478be6?logo=telegram&style=flat)](https://core.telegram.org/bots/webapps#november-17-2024)
[![downloads](https://img.shields.io/npm/dm/vue-tg?label=Downloads&logo=npm&style=flat&color=478be6)](https://www.npmjs.com/package/vue-tg)

A lightweight package for seamless integration of [Telegram Mini Apps](https://core.telegram.org/bots/webapps) and [Telegram Widgets](https://core.telegram.org/widgets) features.
Expand Down Expand Up @@ -105,6 +105,8 @@ To connect your Mini App to the Telegram client, place the script `telegram-web-
| DeviceOrientation | [useDeviceOrientation](https://vue-tg.deptyped.com/mini-apps.html#usedeviceorientation) |
| Gyroscope | [useGyroscope](https://vue-tg.deptyped.com/mini-apps.html#usegyroscope) |
| LocationManager | [useLocationManager](https://vue-tg.deptyped.com/mini-apps.html#uselocationmanager) |
| DeviceStorage | [useDeviceStorage](https://vue-tg.deptyped.com/mini-apps.html#usedevicestorage) |
| SecureStorage | [useSecureStorage](https://vue-tg.deptyped.com/mini-apps.html#usesecurestorage) |
| isVersionAtLeast | [useMiniApp](https://vue-tg.deptyped.com/mini-apps.html#useminiapp) |
| setHeaderColor | [useTheme](https://vue-tg.deptyped.com/mini-apps.html#usetheme) |
| setBackgroundColor | [useTheme](https://vue-tg.deptyped.com/mini-apps.html#usetheme) |
Expand Down
6 changes: 6 additions & 0 deletions docs/mini-apps.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ outline: [2, 3]
| DeviceOrientation | [useDeviceOrientation](#usedeviceorientation) |
| Gyroscope | [useGyroscope](#usegyroscope) |
| LocationManager | [useLocationManager](#uselocationmanager) |
| DeviceStorage | [useDeviceStorage ](#usedevicestorage) |
| SecureStorage | [useSecureStorage](#usesecurestorage) |
| isVersionAtLeast | [useMiniApp](#useminiapp) |
| setHeaderColor | [useTheme](#usetheme) |
| setBackgroundColor | [useTheme](#usetheme) |
Expand Down Expand Up @@ -301,6 +303,8 @@ Improper management may lead to memory leaks or other issues.

<!--@include: @/mini-apps/composables/use-device-orientation.md-->

<!--@include: @/mini-apps/composables/use-device-storage.md-->

<!--@include: @/mini-apps/composables/use-emoji-status.md-->

<!--@include: @/mini-apps/composables/use-gyroscope.md-->
Expand All @@ -319,6 +323,8 @@ Improper management may lead to memory leaks or other issues.

<!--@include: @/mini-apps/composables/use-secondary-button.md-->

<!--@include: @/mini-apps/composables/use-secure-storage.md-->

<!--@include: @/mini-apps/composables/use-settings-button.md-->

<!--@include: @/mini-apps/composables/use-theme.md-->
Expand Down
16 changes: 16 additions & 0 deletions docs/mini-apps/composables/use-device-storage.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
### useDeviceStorage

```ts
import { useDeviceStorage } from 'vue-tg'

const deviceStorage = useDeviceStorage()
```

| Name | Type |
| :----------------- | :------------------------------------------------------------------------------------------------- |
| `setItem` | <!--@include: @/generated/DeviceStorage-setItem.md --><br/><Badge type="info" text="⭐️ async" /> |
| `getItem` | <!--@include: @/generated/DeviceStorage-getItem.md --><br/><Badge type="info" text="⭐️ async" /> |
| `removeItem` | <!--@include: @/generated/DeviceStorage-removeItem.md --><br/><Badge type="info" text="⭐️ async" /> |
| `clear` | <!--@include: @/generated/DeviceStorage-clear.md --><br/><Badge type="info" text="⭐️ async" /> |
| `version` | <!--@include: @/generated/WebApp-version.md --> |
| `isVersionAtLeast` | <!--@include: @/generated/WebApp-isVersionAtLeast.md --> |
17 changes: 17 additions & 0 deletions docs/mini-apps/composables/use-secure-storage.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
### useSecureStorage

```ts
import { useSecureStorage } from 'vue-tg'

const secureStorage = useSecureStorage()
```

| Name | Type |
| :----------------- | :------------------------------------------------------------------------------------------------- |
| `setItem` | <!--@include: @/generated/SecureStorage-setItem.md --><br/><Badge type="info" text="⭐️ async" /> |
| `getItem` | <!--@include: @/generated/SecureStorage-getItem.md --><br/><Badge type="info" text="⭐️ async" /> |
| `restoreItem` | <!--@include: @/generated/SecureStorage-restoreItem.md --><br/><Badge type="info" text="⭐️ async" /> |
| `removeItem` | <!--@include: @/generated/SecureStorage-removeItem.md --><br/><Badge type="info" text="⭐️ async" /> |
| `clear` | <!--@include: @/generated/SecureStorage-clear.md --><br/><Badge type="info" text="⭐️ async" /> |
| `version` | <!--@include: @/generated/WebApp-version.md --> |
| `isVersionAtLeast` | <!--@include: @/generated/WebApp-isVersionAtLeast.md --> |
Loading