diff --git a/.env.example b/.env.example index 3ef399f7..e3b58f9e 100644 --- a/.env.example +++ b/.env.example @@ -1,2 +1,4 @@ MAIN_VITE_API_URL=API_URL MAIN_VITE_AUTH_URL=AUTH_URL +RENDERER_VITE_REAL_DEBRID_REFERRAL_ID= +RENDERER_VITE_TORBOX_REFERRAL_CODE= diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a11ae546..539f837c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -47,12 +47,13 @@ jobs: MAIN_VITE_API_URL: ${{ vars.MAIN_VITE_STAGING_API_URL }} MAIN_VITE_AUTH_URL: ${{ vars.MAIN_VITE_STAGING_AUTH_URL }} MAIN_VITE_CHECKOUT_URL: ${{ vars.MAIN_VITE_STAGING_CHECKOUT_URL }} - RENDERER_VITE_INTERCOM_APP_ID: ${{ vars.RENDERER_VITE_INTERCOM_APP_ID }} RENDERER_VITE_EXTERNAL_RESOURCES_URL: ${{ vars.EXTERNAL_RESOURCES_URL }} MAIN_VITE_EXTERNAL_RESOURCES_URL: ${{ vars.EXTERNAL_RESOURCES_URL }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} RENDERER_VITE_SENTRY_DSN: ${{ vars.SENTRY_DSN }} + RENDERER_VITE_REAL_DEBRID_REFERRAL_ID: ${{ vars.RENDERER_VITE_REAL_DEBRID_REFERRAL_ID }} + RENDERER_VITE_TORBOX_REFERRAL_CODE: ${{ vars.RENDERER_VITE_TORBOX_REFERRAL_CODE }} - name: Build Windows if: matrix.os == 'windows-latest' @@ -61,14 +62,15 @@ jobs: MAIN_VITE_API_URL: ${{ vars.MAIN_VITE_STAGING_API_URL }} MAIN_VITE_AUTH_URL: ${{ vars.MAIN_VITE_STAGING_AUTH_URL }} MAIN_VITE_CHECKOUT_URL: ${{ vars.MAIN_VITE_STAGING_CHECKOUT_URL }} - RENDERER_VITE_INTERCOM_APP_ID: ${{ vars.RENDERER_VITE_INTERCOM_APP_ID }} RENDERER_VITE_EXTERNAL_RESOURCES_URL: ${{ vars.EXTERNAL_RESOURCES_URL }} MAIN_VITE_EXTERNAL_RESOURCES_URL: ${{ vars.EXTERNAL_RESOURCES_URL }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} RENDERER_VITE_SENTRY_DSN: ${{ vars.SENTRY_DSN }} + RENDERER_VITE_REAL_DEBRID_REFERRAL_ID: ${{ vars.RENDERER_VITE_REAL_DEBRID_REFERRAL_ID }} + RENDERER_VITE_TORBOX_REFERRAL_CODE: ${{ vars.RENDERER_VITE_TORBOX_REFERRAL_CODE }} - - name: Test Upload build + - name: Upload build env: BRANCH_NAME: ${{ github.head_ref || github.ref_name }} S3_ENDPOINT: ${{ secrets.S3_ENDPOINT }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 99a89245..fdd1f103 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -49,13 +49,13 @@ jobs: MAIN_VITE_API_URL: ${{ vars.MAIN_VITE_API_URL }} MAIN_VITE_AUTH_URL: ${{ vars.MAIN_VITE_AUTH_URL }} MAIN_VITE_CHECKOUT_URL: ${{ vars.MAIN_VITE_CHECKOUT_URL }} - MAIN_VITE_ANALYTICS_API_URL: ${{ vars.MAIN_VITE_ANALYTICS_API_URL }} - RENDERER_VITE_INTERCOM_APP_ID: ${{ vars.RENDERER_VITE_INTERCOM_APP_ID }} RENDERER_VITE_EXTERNAL_RESOURCES_URL: ${{ vars.EXTERNAL_RESOURCES_URL }} MAIN_VITE_EXTERNAL_RESOURCES_URL: ${{ vars.EXTERNAL_RESOURCES_URL }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} RENDERER_VITE_SENTRY_DSN: ${{ vars.SENTRY_DSN }} + RENDERER_VITE_REAL_DEBRID_REFERRAL_ID: ${{ vars.RENDERER_VITE_REAL_DEBRID_REFERRAL_ID }} + RENDERER_VITE_TORBOX_REFERRAL_CODE: ${{ vars.RENDERER_VITE_TORBOX_REFERRAL_CODE }} - name: Build Windows if: matrix.os == 'windows-latest' @@ -64,13 +64,13 @@ jobs: MAIN_VITE_API_URL: ${{ vars.MAIN_VITE_API_URL }} MAIN_VITE_AUTH_URL: ${{ vars.MAIN_VITE_AUTH_URL }} MAIN_VITE_CHECKOUT_URL: ${{ vars.MAIN_VITE_CHECKOUT_URL }} - MAIN_VITE_ANALYTICS_API_URL: ${{ vars.MAIN_VITE_ANALYTICS_API_URL }} - RENDERER_VITE_INTERCOM_APP_ID: ${{ vars.RENDERER_VITE_INTERCOM_APP_ID }} RENDERER_VITE_EXTERNAL_RESOURCES_URL: ${{ vars.EXTERNAL_RESOURCES_URL }} MAIN_VITE_EXTERNAL_RESOURCES_URL: ${{ vars.EXTERNAL_RESOURCES_URL }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} RENDERER_VITE_SENTRY_DSN: ${{ vars.SENTRY_DSN }} + RENDERER_VITE_REAL_DEBRID_REFERRAL_ID: ${{ vars.RENDERER_VITE_REAL_DEBRID_REFERRAL_ID }} + RENDERER_VITE_TORBOX_REFERRAL_CODE: ${{ vars.RENDERER_VITE_TORBOX_REFERRAL_CODE }} - name: Create artifact uses: actions/upload-artifact@v4 diff --git a/src/locales/en/translation.json b/src/locales/en/translation.json index 4613f8f4..e4341a00 100644 --- a/src/locales/en/translation.json +++ b/src/locales/en/translation.json @@ -272,7 +272,7 @@ "confirm_button_confirmation_delete_all_sources": "Yes, delete everything", "title_confirmation_delete_all_sources": "Delete all download sources", "description_confirmation_delete_all_sources": "You will delete all download sources", - "button_delete_all_sources": "Remove all download sources", + "button_delete_all_sources": "Remove all", "added_download_source": "Added download source", "download_sources_synced": "All download sources are synced", "insert_valid_json_url": "Insert a valid JSON url", @@ -335,6 +335,8 @@ "enable_torbox": "Enable Torbox", "torbox_description": "TorBox is your premium seedbox service rivaling even the best servers on the market.", "torbox_account_linked": "TorBox account linked", + "create_real_debrid_account": "Click here if you don't have a Real-Debrid account yet", + "create_torbox_account": "Click here if you don't have a TorBox account yet", "real_debrid_account_linked": "Real-Debrid account linked", "name_min_length": "Theme name must be at least 3 characters long", "import_theme": "Import theme", diff --git a/src/locales/pt-BR/translation.json b/src/locales/pt-BR/translation.json index 7f746ac4..ff87ed13 100644 --- a/src/locales/pt-BR/translation.json +++ b/src/locales/pt-BR/translation.json @@ -260,8 +260,8 @@ "cancel_button_confirmation_delete_all_sources": "Não", "confirm_button_confirmation_delete_all_sources": "Sim, excluir tudo", "title_confirmation_delete_all_sources": "Remover todas as fontes de download", - "description_confirmation_delete_all_sources": "Você irá remover todas as fontes de download", - "button_delete_all_sources": "Remover todas as fontes de download", + "description_confirmation_delete_all_sources": "Você irá remover todas as fontes de download. Deseja prosseguir?", + "button_delete_all_sources": "Remover todas", "added_download_source": "Fonte adicionada", "download_sources_synced": "As fontes foram sincronizadas", "insert_valid_json_url": "Insira a url de um JSON válido", @@ -322,6 +322,8 @@ "enable_torbox": "Habilitar Torbox", "torbox_description": "TorBox é o seu serviço de seedbox premium que rivaliza até com os melhores servidores do mercado.", "torbox_account_linked": "Conta do TorBox vinculada", + "create_real_debrid_account": "Clique aqui se você ainda não tem uma conta do Real-Debrid", + "create_torbox_account": "Clique aqui se você ainda não tem uma conta do TorBox", "real_debrid_account_linked": "Conta Real-Debrid associada", "name_min_length": "O nome do tema deve ter pelo menos 3 caracteres", "import_theme": "Importar tema", diff --git a/src/locales/pt-PT/translation.json b/src/locales/pt-PT/translation.json index f946056a..3649afd7 100644 --- a/src/locales/pt-PT/translation.json +++ b/src/locales/pt-PT/translation.json @@ -260,7 +260,7 @@ "description_confirmation_delete_all_sources": "Irá remover todas as fontes de download", "title_confirmation_delete_all_sources": "Remover todas as fontes de download", "removed_download_sources": "Fontes de download removidas", - "button_delete_all_sources": "Remover todas as fontes de download", + "button_delete_all_sources": "Remover todas", "added_download_source": "Fonte adicionada", "download_sources_synced": "As fontes foram sincronizadas", "insert_valid_json_url": "Insere o URL de um JSON válido", diff --git a/src/renderer/src/pages/settings/settings-download-sources.scss b/src/renderer/src/pages/settings/settings-download-sources.scss index b1d12fe3..a12bdff3 100644 --- a/src/renderer/src/pages/settings/settings-download-sources.scss +++ b/src/renderer/src/pages/settings/settings-download-sources.scss @@ -54,8 +54,8 @@ } } - &__remove_all_sources_button { + &__buttons-container { display: flex; - justify-content: flex-end; + gap: globals.$spacing-unit; } } diff --git a/src/renderer/src/pages/settings/settings-download-sources.tsx b/src/renderer/src/pages/settings/settings-download-sources.tsx index 767722a6..cee71ad0 100644 --- a/src/renderer/src/pages/settings/settings-download-sources.tsx +++ b/src/renderer/src/pages/settings/settings-download-sources.tsx @@ -13,7 +13,7 @@ import { NoEntryIcon, PlusCircleIcon, SyncIcon, - XIcon, + TrashIcon, } from "@primer/octicons-react"; import { AddDownloadSourceModal } from "./add-download-source-modal"; import { useAppDispatch, useRepacks, useToast } from "@renderer/hooks"; @@ -173,7 +173,8 @@ export function SettingsDownloadSources() { disabled={ !downloadSources.length || isSyncingDownloadSources || - isRemovingDownloadSource + isRemovingDownloadSource || + isFetchingSources } onClick={syncDownloadSources} > @@ -181,30 +182,37 @@ export function SettingsDownloadSources() { {t("sync_download_sources")} - - - - {!isFetchingSources && downloadSources.length >= 2 && ( -
+
+ +
- )} +