forked from eatvio/eatvio_app
feat(env): Issue-588
This commit is contained in:
@@ -39,8 +39,9 @@ cp env.example .env
|
||||
- `APP_STORE_URL` - URL App Store
|
||||
- `RUSTORE_URL` - URL RuStore
|
||||
|
||||
### Telegram Support
|
||||
### Support URLs
|
||||
- `TELEGRAM_SUPPORT_URL` - URL поддержки в Telegram
|
||||
- `SUPPORT_EMAIL` - email для поддержки
|
||||
|
||||
### Test Credentials (только для разработки)
|
||||
- `TEST_EMAIL` - тестовый email
|
||||
@@ -79,4 +80,5 @@ String sentryDsn = EnvConfig.sentryDsn;
|
||||
5. **URL для обновления приложения** - из `update_screen.dart`
|
||||
6. **URL поддержки Telegram** - из `support_screen.dart`
|
||||
7. **API для валидации email** - из `registration_repository.dart`
|
||||
8. **Тестовые учетные данные** - из `test_cases.dart`
|
||||
8. **Тестовые учетные данные** - из `test_cases.dart`
|
||||
9. **Email поддержки** - из `support_screen.dart`
|
||||
@@ -28,6 +28,7 @@ class EnvConfig {
|
||||
|
||||
// Telegram Support
|
||||
static String get telegramSupportUrl => dotenv.env['TELEGRAM_SUPPORT_URL'] ?? 'https://t.me/eatvio';
|
||||
static String get supportEmail => dotenv.env['SUPPORT_EMAIL'] ?? 'help@eatv.io';
|
||||
|
||||
// Test Credentials (for development only)
|
||||
static String get testEmail => dotenv.env['TEST_EMAIL'] ?? 'reshetnick.mike+user1@gmail.com';
|
||||
|
||||
@@ -7,6 +7,7 @@ import 'package:flutter/services.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
import 'package:eatvio_app/core/env_config.dart';
|
||||
import 'package:eatvio_app/core/const.dart';
|
||||
|
||||
class SupportScreen extends StatelessWidget {
|
||||
const SupportScreen({super.key});
|
||||
@@ -37,7 +38,7 @@ class SupportScreen extends StatelessWidget {
|
||||
children: [
|
||||
SvgPicture.asset('assets/icons/telegram.svg', colorFilter: const ColorFilter.mode(Colors.black, BlendMode.srcIn)),
|
||||
const SizedBox(width: 12),
|
||||
const Text('Telegram: t.me/eatvio', style: TextStyle(fontSize: 16)),
|
||||
Text('Telegram: ${EnvConfig.telegramSupportUrl.replaceFirst('https://', '')}', style: const TextStyle(fontSize: 16)),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -45,7 +46,7 @@ class SupportScreen extends StatelessWidget {
|
||||
const SizedBox(height: 8),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
Clipboard.setData(const ClipboardData(text: 'help@eatv.io'));
|
||||
Clipboard.setData(ClipboardData(text: EnvConfig.supportEmail));
|
||||
showInfoToast(s.mail_was_copied);
|
||||
},
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
@@ -53,11 +54,11 @@ class SupportScreen extends StatelessWidget {
|
||||
decoration: BoxDecoration(borderRadius: BorderRadius.circular(16)),
|
||||
width: double.infinity,
|
||||
padding: const EdgeInsets.all(16),
|
||||
child: const Row(
|
||||
child: Row(
|
||||
children: [
|
||||
Icon(Icons.alternate_email_rounded),
|
||||
SizedBox(width: 12),
|
||||
Text('E-mail: help@eatv.io', style: TextStyle(fontSize: 16)),
|
||||
const Icon(Icons.alternate_email_rounded),
|
||||
const SizedBox(width: 12),
|
||||
Text('E-mail: ${EnvConfig.supportEmail}', style: const TextStyle(fontSize: 16)),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user