upload ticket files

This commit is contained in:
2026-05-07 18:08:45 +02:00
parent 4cc1c9d157
commit 5c1f9c0ebc
6 changed files with 17 additions and 40 deletions

View File

@@ -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

2
.gitignore vendored
View File

@@ -6,7 +6,7 @@
*.env *.env
.DS_Store .DS_Store
.atom/ .atom/
.build/ .build/*
.buildlog/ .buildlog/
.history .history
.svn/ .svn/

4
.wrangler/cache/pages.json vendored Normal file
View File

@@ -0,0 +1,4 @@
{
"account_id": "6badf20faeef39fa5c99283f46f07508",
"project_name": "flux"
}

6
.wrangler/cache/wrangler-account.json vendored Normal file
View File

@@ -0,0 +1,6 @@
{
"account": {
"id": "6badf20faeef39fa5c99283f46f07508",
"name": "Marco@catelli.it's Account"
}
}

View File

@@ -51,6 +51,11 @@ class AppRouter {
final isGoingToLogin = state.matchedLocation == '/login'; final isGoingToLogin = state.matchedLocation == '/login';
final isGoingToOnboarding = state.matchedLocation == '/onboarding'; final isGoingToOnboarding = state.matchedLocation == '/onboarding';
final isGoingToSetPassword = state.matchedLocation == '/set-password'; 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; if (sessionState.status == SessionStatus.initial) return null;

View File

@@ -65,7 +65,7 @@ class SharedFilesSection extends StatelessWidget {
// GENERAZIONE DEL DEEP LINK AGNOSTICO // GENERAZIONE DEL DEEP LINK AGNOSTICO
final deepLink = final deepLink =
'flux://app/upload/${state.parentType.name}/$targetId'; 'https://flux.catelli.it/upload/${state.parentType.name}/$targetId';
if (context.mounted) { if (context.mounted) {
showDialog( showDialog(