diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml deleted file mode 100644 index c407ee9..0000000 --- a/.gitea/workflows/deploy.yml +++ /dev/null @@ -1,38 +0,0 @@ -name: Deploy to Cloudflare Pages -on: - push: - branches: - - main # O il nome del tuo branch principale - -jobs: - build-and-deploy: - runs-on: ubuntu-latest # O il runner configurato sul tuo Gitea - steps: - - name: Checkout del codice - uses: actions/checkout@v4 - - - name: Setup Flutter - uses: subosito/flutter-action@v2 - with: - channel: 'stable' - - - name: Crea il file .env per flutter_dotenv - run: | - echo "SUPABASE_URL=${{ secrets.SUPABASE_URL }}" >> .env - echo "SUPABASE_ANON_KEY=${{ secrets.SUPABASE_ANON_KEY }}" >> .env - - - name: Ottieni le dipendenze - run: flutter pub get - - - name: Compila per il Web - run: flutter build web --release - - - name: Crea file _redirects per Cloudflare - run: echo "/* /index.html 200" > build/web/_redirects - - - name: Deploy su Cloudflare Pages - env: - CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} - CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} - # QUESTA È LA RIGA MAGICA: Gli diciamo di prendere SOLO la cartella build/web - run: npx wrangler@latest pages deploy build/web --project-name Flux --branch main \ No newline at end of file diff --git a/.gitignore b/.gitignore index fdc0a59..d0b022c 100644 --- a/.gitignore +++ b/.gitignore @@ -6,7 +6,7 @@ *.env .DS_Store .atom/ -.build/ +.build/* .buildlog/ .history .svn/ diff --git a/.wrangler/cache/pages.json b/.wrangler/cache/pages.json new file mode 100644 index 0000000..af6013b --- /dev/null +++ b/.wrangler/cache/pages.json @@ -0,0 +1,4 @@ +{ + "account_id": "6badf20faeef39fa5c99283f46f07508", + "project_name": "flux" +} \ No newline at end of file diff --git a/.wrangler/cache/wrangler-account.json b/.wrangler/cache/wrangler-account.json new file mode 100644 index 0000000..62f7a0d --- /dev/null +++ b/.wrangler/cache/wrangler-account.json @@ -0,0 +1,6 @@ +{ + "account": { + "id": "6badf20faeef39fa5c99283f46f07508", + "name": "Marco@catelli.it's Account" + } +} \ No newline at end of file diff --git a/lib/core/routes/app_router.dart b/lib/core/routes/app_router.dart index c68fe4e..da83718 100644 --- a/lib/core/routes/app_router.dart +++ b/lib/core/routes/app_router.dart @@ -51,6 +51,11 @@ class AppRouter { final isGoingToLogin = state.matchedLocation == '/login'; final isGoingToOnboarding = state.matchedLocation == '/onboarding'; final isGoingToSetPassword = state.matchedLocation == '/set-password'; + final isPublicRoute = state.uri.path.startsWith('/upload'); + + if (isPublicRoute) { + return null; // Null significa "Non reindirizzare, lascialo passare" + } if (sessionState.status == SessionStatus.initial) return null; diff --git a/lib/core/widgets/shared_forms/shared_files_section.dart b/lib/core/widgets/shared_forms/shared_files_section.dart index 0fee5a8..e1e2439 100644 --- a/lib/core/widgets/shared_forms/shared_files_section.dart +++ b/lib/core/widgets/shared_forms/shared_files_section.dart @@ -65,7 +65,7 @@ class SharedFilesSection extends StatelessWidget { // GENERAZIONE DEL DEEP LINK AGNOSTICO final deepLink = - 'flux://app/upload/${state.parentType.name}/$targetId'; + 'https://flux.catelli.it/upload/${state.parentType.name}/$targetId'; if (context.mounted) { showDialog(