diff --git a/.gitattributes b/.gitattributes index e81c236..aacc8a9 100755 --- a/.gitattributes +++ b/.gitattributes @@ -2,4 +2,5 @@ ** text eol=lf # Denote all files that are truly binary and should not be modified. -module/bin/**/** binary \ No newline at end of file +module/bin/**/** binary +*.png binary diff --git a/module/webui/config.json b/module/webui/config.json new file mode 100644 index 0000000..846f2c2 --- /dev/null +++ b/module/webui/config.json @@ -0,0 +1,6 @@ +{ + "title": "Tricky Addon", + "icon": "icon.png", + "windowResize": false, + "exitConfirm": false +} \ No newline at end of file diff --git a/module/webui/icon.png b/module/webui/icon.png new file mode 100644 index 0000000..e4c7eca Binary files /dev/null and b/module/webui/icon.png differ diff --git a/module/webui/index.html b/module/webui/index.html index 5a8fbea..0974e7b 100644 --- a/module/webui/index.html +++ b/module/webui/index.html @@ -84,6 +84,7 @@
+ diff --git a/module/webui/locales/A-template.json b/module/webui/locales/A-template.json index a1a0e2d..4628db9 100644 --- a/module/webui/locales/A-template.json +++ b/module/webui/locales/A-template.json @@ -57,7 +57,8 @@ "set_custom_keybox": "Set Custom Keybox", "set_verified_boot_hash": "Set Verified Boot Hash", "set_security_patch": "Set Security Patch", - "about": "About" + "about": "About", + "shortcut": "Create home screen shortcut" }, "boot_hash": { "title": "Boot Hash", @@ -99,7 +100,8 @@ "custom_key_set_error": "Failed to set custom keybox", "no_file_selected": "No file selected", "system_app_not_found": "System app not found", - "system_app_error": "Failed to add system app" + "system_app_error": "Failed to add system app", + "shortcut_created": "Home screen shortcut created" }, "security_patch": { "title": "Security Patch", diff --git a/module/webui/locales/ar-EG.json b/module/webui/locales/ar-EG.json index a6ef48b..c0d3c9f 100644 --- a/module/webui/locales/ar-EG.json +++ b/module/webui/locales/ar-EG.json @@ -57,7 +57,8 @@ "set_custom_keybox": "تعيين Keybox مخصص", "set_verified_boot_hash": "تعيين تجزئة التمهيد الموثوق", "set_security_patch": "تعيين تصحيح الأمان", - "about": "حول" + "about": "حول", + "shortcut": "إنشاء اختصار على الشاشة الرئيسية" }, "boot_hash": { "title": "تجزئة التمهيد", @@ -99,7 +100,8 @@ "custom_key_set_error": "فشل في تعيين keybox مخصص", "no_file_selected": "لم يتم اختيار أي ملف", "system_app_not_found": "لم يتم العثور على تطبيق النظام", - "system_app_error": "فشل في إضافة تطبيق النظام" + "system_app_error": "فشل في إضافة تطبيق النظام", + "shortcut_created": "تم إنشاء اختصار على الشاشة الرئيسية" }, "security_patch": { "title": "تصحيح الأمان", diff --git a/module/webui/locales/az-AZ.json b/module/webui/locales/az-AZ.json index 17b6462..6bff2d9 100644 --- a/module/webui/locales/az-AZ.json +++ b/module/webui/locales/az-AZ.json @@ -57,7 +57,8 @@ "set_custom_keybox": "Özəl Keybox təyin et", "set_verified_boot_hash": "Təsdiqlənmiş Boot Hash təyin et", "set_security_patch": "Təhlükəsizlik Təkmilləşdirməsini təyin et", - "about": "Haqqında" + "about": "Haqqında", + "shortcut": "Ana ekran qısayolu yarat" }, "boot_hash": { "title": "Boot Hash", @@ -99,7 +100,8 @@ "custom_key_set_error": "Özəl keybox təyin oluna bilmədi", "no_file_selected": "Fayl seçilməyib", "system_app_not_found": "Sistem tətbiqi tapılmadı", - "system_app_error": "Sistem tətbiqini əlavə etmək mümkün olmadı" + "system_app_error": "Sistem tətbiqini əlavə etmək mümkün olmadı", + "shortcut_created": "Ana ekran qısayolu yaradıldı" }, "security_patch": { "title": "Təhlükəsizlik Təkmilləşdirməsi", diff --git a/module/webui/locales/en-US.json b/module/webui/locales/en-US.json index a1a0e2d..4628db9 100644 --- a/module/webui/locales/en-US.json +++ b/module/webui/locales/en-US.json @@ -57,7 +57,8 @@ "set_custom_keybox": "Set Custom Keybox", "set_verified_boot_hash": "Set Verified Boot Hash", "set_security_patch": "Set Security Patch", - "about": "About" + "about": "About", + "shortcut": "Create home screen shortcut" }, "boot_hash": { "title": "Boot Hash", @@ -99,7 +100,8 @@ "custom_key_set_error": "Failed to set custom keybox", "no_file_selected": "No file selected", "system_app_not_found": "System app not found", - "system_app_error": "Failed to add system app" + "system_app_error": "Failed to add system app", + "shortcut_created": "Home screen shortcut created" }, "security_patch": { "title": "Security Patch", diff --git a/module/webui/locales/es-ES.json b/module/webui/locales/es-ES.json index fc5feb8..a8b5618 100644 --- a/module/webui/locales/es-ES.json +++ b/module/webui/locales/es-ES.json @@ -57,7 +57,8 @@ "set_custom_keybox": "Establecer Keybox Personalizado", "set_security_patch": "Configurar Parche de Seguridad", "set_verified_boot_hash": "Configurar Boot Hash Verificado", - "about": "Acerca de" + "about": "Acerca de", + "shortcut": "Crear acceso directo en la pantalla de inicio" }, "boot_hash": { "title": "Boot Hash", @@ -99,7 +100,8 @@ "custom_key_set_error": "Error al establecer el keybox personalizado", "no_file_selected": "Ningún archivo seleccionado", "system_app_not_found": "Aplicación del sistema no encontrada", - "system_app_error": "Error al agregar la aplicación del sistema" + "system_app_error": "Error al agregar la aplicación del sistema", + "shortcut_created": "Acceso directo creado en la pantalla de inicio" }, "security_patch": { "title": "Parche de Seguridad", diff --git a/module/webui/locales/fr-FR.json b/module/webui/locales/fr-FR.json index 0abf4f0..ee01790 100644 --- a/module/webui/locales/fr-FR.json +++ b/module/webui/locales/fr-FR.json @@ -57,7 +57,8 @@ "set_custom_keybox": "Définir une Keybox personnalisée", "set_verified_boot_hash": "Définir le hash Verified Boot", "set_security_patch": "Définir le patch de sécurité", - "about": "À propos" + "about": "À propos", + "shortcut": "Créer un raccourci sur l'écran d'accueil" }, "boot_hash": { "title": "Hash de démarrage", @@ -99,7 +100,8 @@ "custom_key_set_error": "Échec de la définition de la Keybox personnalisée", "no_file_selected": "Aucun fichier sélectionné", "system_app_not_found": "Application système introuvable", - "system_app_error": "Échec de l'ajout de l'application système" + "system_app_error": "Échec de l'ajout de l'application système", + "shortcut_created": "Raccourci créé sur l'écran d'accueil" }, "security_patch": { "title": "Patch de sécurité", diff --git a/module/webui/locales/id-ID.json b/module/webui/locales/id-ID.json index 781c0af..6c53d56 100644 --- a/module/webui/locales/id-ID.json +++ b/module/webui/locales/id-ID.json @@ -57,7 +57,8 @@ "set_custom_keybox": "Gunakan Keybox Kustom", "set_verified_boot_hash": "Atur Verified Boot Hash", "set_security_patch": "Atur Patch Keamanan", - "about": "Tentang" + "about": "Tentang", + "shortcut": "Buat pintasan di layar utama" }, "boot_hash": { "title": "Verified Boot Hash", @@ -99,7 +100,8 @@ "custom_key_set_error": "Gagal menggunakan keybox kustom", "no_file_selected": "Tidak ada file yang dipilih", "system_app_not_found": "Aplikasi sistem tidak ditemukan", - "system_app_error": "Gagal menambahkan aplikasi sistem" + "system_app_error": "Gagal menambahkan aplikasi sistem", + "shortcut_created": "Pintasan layar utama telah dibuat" }, "security_patch": { "title": "Patch Keamanan", diff --git a/module/webui/locales/it-IT.json b/module/webui/locales/it-IT.json index 2d23776..b3fbbaf 100644 --- a/module/webui/locales/it-IT.json +++ b/module/webui/locales/it-IT.json @@ -57,7 +57,8 @@ "set_custom_keybox": "Imposta Keybox Personalizzata", "set_verified_boot_hash": "Imposta Boot Hash Verificato", "set_security_patch": "Imposta Patch di Sicurezza", - "about": "About" + "about": "About", + "shortcut": "Crea collegamento nella schermata iniziale" }, "boot_hash": { "title": "Boot Hash", @@ -99,7 +100,8 @@ "custom_key_set_error": "Impossibile impostare keybox personalizzata", "no_file_selected": "Nessun file selezionato", "system_app_not_found": "App di sistema non trovata", - "system_app_error": "Impossibile aggiungere l'app di sistema" + "system_app_error": "Impossibile aggiungere l'app di sistema", + "shortcut_created": "Collegamento creato nella schermata iniziale" }, "security_patch": { "title": "Patch di sicurezza", diff --git a/module/webui/locales/ja-JP.json b/module/webui/locales/ja-JP.json index 596e544..3e5f6b9 100644 --- a/module/webui/locales/ja-JP.json +++ b/module/webui/locales/ja-JP.json @@ -57,7 +57,8 @@ "set_custom_keybox": "カスタム Keybox を設定", "set_verified_boot_hash": "確認付きブートハッシュを設定", "set_security_patch": "セキュリティパッチを設定", - "about": "このアドオンについて" + "about": "このアドオンについて", + "shortcut": "ホーム画面にショートカットを作成" }, "boot_hash": { "title": "ブートハッシュ", @@ -99,7 +100,8 @@ "custom_key_set_error": "カスタム Keybox の設定に失敗しました", "no_file_selected": "ファイルが選択されていません", "system_app_not_found": "システムアプリが見つかりません", - "system_app_error": "システムアプリの追加に失敗しました" + "system_app_error": "システムアプリの追加に失敗しました", + "shortcut_created": "ホーム画面にショートカットが作成されました" }, "security_patch": { "title": "セキュリティパッチ", diff --git a/module/webui/locales/pl-PL.json b/module/webui/locales/pl-PL.json index a08f570..0aa1a8e 100644 --- a/module/webui/locales/pl-PL.json +++ b/module/webui/locales/pl-PL.json @@ -57,7 +57,8 @@ "set_custom_keybox": "Ustaw niestandardowy klucz ", "set_verified_boot_hash": "Ustaw zweryfikowany skrót rozruchowy", "set_security_patch": "Ustaw poprawkę bezpieczeństwa", - "about": "O" + "about": "O", + "shortcut": "Utwórz skrót na ekranie głównym" }, "boot_hash": { "title": "Hash rozruchu", @@ -99,7 +100,8 @@ "custom_key_set_error": "Nie udało się ustawić niestandardowego klucza", "no_file_selected": "Nie wybrano pliku", "system_app_not_found": "Aplikacja systemowa nie znaleziona", - "system_app_error": "Nie udało się dodać aplikacji systemowej" + "system_app_error": "Nie udało się dodać aplikacji systemowej", + "shortcut_created": "Skrót na ekranie głównym został utworzony" }, "security_patch": { "title": "Poprawka bezpieczeństwa", diff --git a/module/webui/locales/pt-BR.json b/module/webui/locales/pt-BR.json index b918fd9..6d2758e 100644 --- a/module/webui/locales/pt-BR.json +++ b/module/webui/locales/pt-BR.json @@ -57,7 +57,8 @@ "set_custom_keybox": "Definir Keybox Custom", "set_verified_boot_hash": "Definir Hash de Boot Verificado", "set_security_patch": "Definir Patch de segurança", - "about": "Sobre" + "about": "Sobre", + "shortcut": "Criar atalho na tela inicial" }, "boot_hash": { "title": "Boot Hash", @@ -99,7 +100,8 @@ "custom_key_set_error": "Falha ao definir keybox customizada", "no_file_selected": "Nenhum arquivo selecionado", "system_app_not_found": "App do sistema não encontrado", - "system_app_error": "Falha ao adicionar app do sistema" + "system_app_error": "Falha ao adicionar app do sistema", + "shortcut_created": "Atalho na tela inicial criado com sucesso" }, "security_patch": { "title": "Patch de segurança", diff --git a/module/webui/locales/ru-RU.json b/module/webui/locales/ru-RU.json index 1048d46..86049f8 100644 --- a/module/webui/locales/ru-RU.json +++ b/module/webui/locales/ru-RU.json @@ -57,7 +57,8 @@ "set_custom_keybox": "Установить пользовательский Keybox", "set_security_patch": "Установить Security Patch", "set_verified_boot_hash": "Установить Verified Boot Hash", - "about": "О программе" + "about": "О программе", + "shortcut": "Создать ярлык на главном экране" }, "boot_hash": { "title": "Boot Hash", @@ -99,7 +100,8 @@ "custom_key_set_error": "Не удалось установить пользовательский keybox", "no_file_selected": "Файл не выбран", "system_app_not_found": "Системное приложение не найдено", - "system_app_error": "Не удалось добавить системное приложение" + "system_app_error": "Не удалось добавить системное приложение", + "shortcut_created": "Ярлык на главном экране создан" }, "security_patch": { "title": "Патч безопасности", diff --git a/module/webui/locales/tl-PH.json b/module/webui/locales/tl-PH.json index a642c93..0ed0779 100644 --- a/module/webui/locales/tl-PH.json +++ b/module/webui/locales/tl-PH.json @@ -57,7 +57,8 @@ "set_custom_keybox": "I-set ang Custom Keybox", "set_verified_boot_hash": "I-set ang Verified Boot Hash", "set_security_patch": "I-set ang Security Patch", - "about": "Tungkol" + "about": "Tungkol", + "shortcut": "Gumawa ng shortcut sa home screen" }, "boot_hash": { "title": "Boot Hash", @@ -99,7 +100,8 @@ "custom_key_set_error": "Nabigong i-set ang Custom Keybox", "no_file_selected": "Walang napiling file", "system_app_not_found": "Walang natagpuan na system app", - "system_app_error": "Nabigong dagdag ang system app" + "system_app_error": "Nabigong dagdag ang system app", + "shortcut_created": "Matagumpay na nagawa ang shortcut sa home screen" }, "security_patch": { "title": "Security Patch", diff --git a/module/webui/locales/tr-TR.json b/module/webui/locales/tr-TR.json index 172821e..f09a0a8 100644 --- a/module/webui/locales/tr-TR.json +++ b/module/webui/locales/tr-TR.json @@ -57,7 +57,8 @@ "set_custom_keybox": "Özel Keybox Ayarla", "set_security_patch": "Güvenlik Yaması Ayarla", "set_verified_boot_hash": "Doğrulanmış Boot Hash Ayarla", - "about": "Hakkında" + "about": "Hakkında", + "shortcut": "Ana ekrana kısayol oluştur" }, "boot_hash": { "title": "Boot Hash", @@ -99,7 +100,8 @@ "custom_key_set_error": "Özel keybox ayarlanamadı", "no_file_selected": "Dosya seçilmedi", "system_app_not_found": "Sistem uygulaması bulunamadı", - "system_app_error": "Sistem uygulaması ekleme hatası" + "system_app_error": "Sistem uygulaması ekleme hatası", + "shortcut_created": "Ana ekran kısayolu oluşturuldu" }, "security_patch": { "title": "Güvenlik Yaması", diff --git a/module/webui/locales/zh-CN.json b/module/webui/locales/zh-CN.json index c8c2e94..b874515 100644 --- a/module/webui/locales/zh-CN.json +++ b/module/webui/locales/zh-CN.json @@ -57,7 +57,8 @@ "set_custom_keybox": "设置自定义密钥", "set_security_patch": "设置安全补丁", "set_verified_boot_hash": "设置哈希值", - "about": "关于" + "about": "关于", + "shortcut": "创建桌面快捷方式" }, "boot_hash": { "title": "哈希值", @@ -99,7 +100,8 @@ "custom_key_set_error": "设置自定义密钥失败", "no_file_selected": "未选择文件", "system_app_not_found": "未找到该系统应用", - "system_app_error": "系统应用添加失败" + "system_app_error": "系统应用添加失败", + "shortcut_created": "桌面快捷方式已创建" }, "security_patch": { "title": "安全补丁", diff --git a/module/webui/locales/zh-TW.json b/module/webui/locales/zh-TW.json index ec298ba..cc857ff 100644 --- a/module/webui/locales/zh-TW.json +++ b/module/webui/locales/zh-TW.json @@ -57,7 +57,8 @@ "set_custom_keybox": "設置自定義密鑰", "set_security_patch": "設置安全補丁", "set_verified_boot_hash": "設置哈希值", - "about": "關於" + "about": "關於", + "shortcut": "建立主畫面捷徑" }, "boot_hash": { "title": "哈希值", @@ -99,7 +100,8 @@ "custom_key_set_error": "設置自定義密鑰失敗", "no_file_selected": "未選擇文件", "system_app_not_found": "未找到該系統應用", - "system_app_error": "系統應用添加失敗" + "system_app_error": "系統應用添加失敗", + "shortcut_created": "主畫面捷徑已建立" }, "security_patch": { "title": "安全補丁", diff --git a/module/webui/scripts/main.js b/module/webui/scripts/main.js index 028e287..bd86e62 100644 --- a/module/webui/scripts/main.js +++ b/module/webui/scripts/main.js @@ -192,6 +192,14 @@ function checkMMRL() { if (window.$tricky_store && Object.keys($tricky_store).length > 0) { // Set status bars theme based on device theme $tricky_store.setLightStatusBars(!window.matchMedia('(prefers-color-scheme: dark)').matches) + + // Create home screen shortcut + const shortcutButton = document.getElementById('shortcut'); + shortcutButton.style.display = 'flex'; + shortcutButton.addEventListener('click', () => { + $tricky_store.createShortcut(); + showPrompt("prompt.shortcut_created", true); + }); } } diff --git a/module/webui/styles/search_menu.css b/module/webui/styles/search_menu.css index 562dc1c..1e7c845 100644 --- a/module/webui/styles/search_menu.css +++ b/module/webui/styles/search_menu.css @@ -113,6 +113,7 @@ user-select: none; } +#shortcut, #select-denylist, #security-patch { display: none;