feat: implement automated deployment pipeline and add identity management settings screen with account status synchronization
Deploy Backendia / deploy (push) Successful in 3s
Deploy Backendia / deploy (push) Successful in 3s
This commit is contained in:
@@ -4,6 +4,11 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
paths:
|
||||||
|
- 'backendia/**'
|
||||||
|
- 'docker-compose.prod.yml'
|
||||||
|
- '.gitea/workflows/deploy.yaml'
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
deploy:
|
deploy:
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ class _SettingsScreenState extends State<SettingsScreen> {
|
|||||||
bool _isUploadEnabled = false;
|
bool _isUploadEnabled = false;
|
||||||
bool _isBanned = false;
|
bool _isBanned = false;
|
||||||
String? _banReason;
|
String? _banReason;
|
||||||
String _serverUrl = 'http://localhost:3000';
|
String _serverUrl = 'https://backendia.kevlar.cloud';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
@@ -398,20 +398,20 @@ class _SettingsScreenState extends State<SettingsScreen> {
|
|||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
const Text(
|
const Text(
|
||||||
'Indiquez l\'adresse IP ou l\'URL du serveur backend IA (port 3000) :',
|
'Indiquez l\'URL du serveur backend IA :',
|
||||||
style: TextStyle(fontSize: 13, color: Colors.grey),
|
style: TextStyle(fontSize: 13, color: Colors.grey),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 12),
|
const SizedBox(height: 12),
|
||||||
TextField(
|
TextField(
|
||||||
controller: urlController,
|
controller: urlController,
|
||||||
decoration: const InputDecoration(
|
decoration: const InputDecoration(
|
||||||
hintText: 'Ex: http://192.168.1.50:3000',
|
hintText: 'https://backendia.kevlar.cloud',
|
||||||
border: OutlineInputBorder(),
|
border: OutlineInputBorder(),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 8),
|
const SizedBox(height: 8),
|
||||||
const Text(
|
const Text(
|
||||||
'💡 Sur émulateur : http://10.0.2.2:3000\n💡 Sur smartphone réel : IP locale de votre PC (ex: http://192.168.1.X:3000)',
|
'💡 Serveur officiel : https://backendia.kevlar.cloud',
|
||||||
style: TextStyle(fontSize: 11, color: Colors.grey),
|
style: TextStyle(fontSize: 11, color: Colors.grey),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -44,17 +44,17 @@ class WalletIdentityService {
|
|||||||
'bulk', 'bullet', 'bundle', 'bunker', 'burden', 'burger', 'burst', 'bus', 'business', 'butter'
|
'bulk', 'bullet', 'bundle', 'bunker', 'burden', 'burger', 'burst', 'bus', 'business', 'butter'
|
||||||
];
|
];
|
||||||
|
|
||||||
/// Retourne l'URL de base du serveur configuré (ex: http://192.168.1.50:3000 ou http://10.0.2.2:3000)
|
/// URL par défaut du serveur de production
|
||||||
|
static const String defaultServerUrl = 'https://backendia.kevlar.cloud';
|
||||||
|
|
||||||
|
/// Retourne l'URL de base du serveur configuré (par défaut: https://backendia.kevlar.cloud)
|
||||||
Future<String> getServerBaseUrl() async {
|
Future<String> getServerBaseUrl() async {
|
||||||
final prefs = await SharedPreferences.getInstance();
|
final prefs = await SharedPreferences.getInstance();
|
||||||
final customUrl = prefs.getString(_serverUrlKey);
|
final customUrl = prefs.getString(_serverUrlKey);
|
||||||
if (customUrl != null && customUrl.trim().isNotEmpty) {
|
if (customUrl != null && customUrl.trim().isNotEmpty) {
|
||||||
return customUrl.trim().replaceAll(RegExp(r'/api/upload/?$'), '');
|
return customUrl.trim().replaceAll(RegExp(r'/api/upload/?$'), '');
|
||||||
}
|
}
|
||||||
if (Platform.isAndroid) {
|
return defaultServerUrl;
|
||||||
return 'http://10.0.2.2:3000';
|
|
||||||
}
|
|
||||||
return 'http://localhost:3000';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Définit une URL personnalisée pour le serveur IA
|
/// Définit une URL personnalisée pour le serveur IA
|
||||||
|
|||||||
Reference in New Issue
Block a user