feat(shortcuts): запуск/стоп прокси по long-press иконки

This commit is contained in:
samosvalishe committed 2026-06-17 19:41:24 +03:00
1 parent a49a61ddec
commit 9bb468b1d3
4 files changed
+67

No files matched your search

+6
View File
@@ -339,6 +339,12 @@
<string name="tile_service_label">Free Turn</string>
<string name="proxy_active_wireguard">Прокси и WireGuard активны</string>
<!-- App Shortcuts (long-press иконки) -->
<string name="shortcut_start_short">Запуск</string>
<string name="shortcut_start_long">Запустить прокси</string>
<string name="shortcut_stop_short">Стоп</string>
<string name="shortcut_stop_long">Остановить прокси</string>
<!-- Туннельное приложение (WireGuard) -->
<string name="wireguard_tunnel_name">Имя туннеля</string>
<string name="wireguard_mtu">MTU</string>
+25
View File
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<shortcuts xmlns:android="http://schemas.android.com/apk/res/android">
<shortcut
android:shortcutId="start_proxy"
android:enabled="true"
android:icon="@drawable/play_arrow_24px"
android:shortcutShortLabel="@string/shortcut_start_short"
android:shortcutLongLabel="@string/shortcut_start_long">
<intent
android:action="com.freeturn.app.START_PROXY"
android:targetPackage="com.freeturn.app"
android:targetClass="com.freeturn.app.service.ProxyShortcutActivity" />
</shortcut>
<shortcut
android:shortcutId="stop_proxy"
android:enabled="true"
android:icon="@drawable/stop_24px"
android:shortcutShortLabel="@string/shortcut_stop_short"
android:shortcutLongLabel="@string/shortcut_stop_long">
<intent
android:action="com.freeturn.app.STOP_PROXY"
android:targetPackage="com.freeturn.app"
android:targetClass="com.freeturn.app.service.ProxyShortcutActivity" />
</shortcut>
</shortcuts>