Skip to content

Commit

Permalink
Enhancing UI for inviting (#2229)
Browse files Browse the repository at this point in the history
* Enhancing UI for inviting

* fixing coverage and adding translation

* fixing coverage and adding translation
  • Loading branch information
Dante291 authored Dec 14, 2023
1 parent 405f49d commit 4c61936
Show file tree
Hide file tree
Showing 10 changed files with 174 additions and 137 deletions.
3 changes: 2 additions & 1 deletion lang/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -159,5 +159,6 @@
"No account registered with this email": "Server werkt niet/verkeerde url",
"Dismiss": "afwijzen",
"No organizations found Please contact your admin": "Geen organisaties gevonden! Neem contact op met uw beheerder",
"Notification Feature is not installed": "Meddelelsesfunktionen er ikke installeret"
"Notification Feature is not installed": "Meddelelsesfunktionen er ikke installeret",
"JOIN":"BEITRETEN"
}
3 changes: 2 additions & 1 deletion lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -165,5 +165,6 @@
"Logout": "Logout",
"Settings": "Settings",
"Dark Theme": "Dark Theme",
"No organizations found Please contact your admin": "No organizations found ! Please contact your admin"
"No organizations found Please contact your admin": "No organizations found ! Please contact your admin",
"JOIN":"JOIN"
}
3 changes: 2 additions & 1 deletion lang/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -160,5 +160,6 @@
"Information": "Información",
"No account registered with this email": "El servidor no se está ejecutando/url",
"Dismiss": "despedir",
"No organizations found Please contact your admin": "Neniuj organizoj trovitaj! Bonvolu kontakti vian administranton"
"No organizations found Please contact your admin": "Neniuj organizoj trovitaj! Bonvolu kontakti vian administranton",
"JOIN":"UNIRSE"
}
3 changes: 2 additions & 1 deletion lang/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -162,5 +162,6 @@
"Logout": "Se déconnecter",
"Settings": "Paramètres",
"Dark Theme": "Thème sombre",
"No organizations found Please contact your admin": "Aucune organisation trouvée ! Veuillez contacter votre administrateur"
"No organizations found Please contact your admin": "Aucune organisation trouvée ! Veuillez contacter votre administrateur",
"JOIN":"REJOINDRE"
}
3 changes: 2 additions & 1 deletion lang/hi.json
Original file line number Diff line number Diff line change
Expand Up @@ -158,5 +158,6 @@
"Information": "जानकारी",
"No account registered with this email": "सर्वर नहीं चल रहा/गलत url",
"Dismiss": "नकार",
"No organizations found Please contact your admin": "कोई संगठन नहीं मिला! कृपया अपने व्यवस्थापक से संपर्क करें"
"No organizations found Please contact your admin": "कोई संगठन नहीं मिला! कृपया अपने व्यवस्थापक से संपर्क करें",
"JOIN":"जोड़ना"
}
3 changes: 2 additions & 1 deletion lang/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -161,5 +161,6 @@
"Information": "情報",
"No account registered with this email": "サーバーが実行されていない/間違った URL",
"Dismiss": "解散",
"No organizations found Please contact your admin": "組織が見つかりません!管理者に連絡してください"
"No organizations found Please contact your admin": "組織が見つかりません!管理者に連絡してください",
"JOIN": "参加する"
}
1 change: 1 addition & 0 deletions lang/pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -160,5 +160,6 @@
"Information": "Informação",
"No account registered with this email": "Servidor não está em execução/url errado",
"Dismiss": "liberar",
"JOIN":"ENTRAR",
"No organizations found Please contact your admin": "Neniuj organizoj trovitaj! Bonvolu kontakti vian administranton"
}
3 changes: 2 additions & 1 deletion lang/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -159,5 +159,6 @@
"Information": "信息",
"No account registered with this email": "服务器未运行/网址错误",
"Dismiss": "解雇",
"No organizations found Please contact your admin": "Neniuj organizoj trovitaj! Bonvolu kontakti vian administranton"
"No organizations found Please contact your admin": "Neniuj organizoj trovitaj! Bonvolu kontakti vian administranton",
"JOIN":"加入"
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,16 @@ import 'package:graphql_flutter/graphql_flutter.dart';
import 'package:hive/hive.dart';
import 'package:qr_flutter/qr_flutter.dart';
import 'package:talawa/constants/constants.dart';
import 'package:talawa/custom_painters/talawa_logo.dart';
import 'package:talawa/enums/enums.dart';
import 'package:talawa/locator.dart';
import 'package:talawa/models/organization/org_info.dart';
import 'package:talawa/models/user/user_info.dart';
import 'package:talawa/services/graphql_config.dart';
import 'package:talawa/services/navigation_service.dart';
import 'package:talawa/services/size_config.dart';
import 'package:talawa/services/user_config.dart';
import 'package:talawa/utils/app_localization.dart';
import 'package:talawa/view_model/base_view_model.dart';
import 'package:talawa/view_model/lang_view_model.dart';
import 'package:talawa/widgets/custom_alert_dialog.dart';
Expand Down Expand Up @@ -88,6 +91,7 @@ class ProfilePageViewModel extends BaseModel {
// push custom alert dialog with the confirmation message.
navigationService.pushDialog(
CustomAlertDialog(
key: const Key('customalertdialog'),
reverse: true,
dialogSubTitle: 'Are you sure you want to logout?',
successText: 'Logout',
Expand Down Expand Up @@ -169,95 +173,60 @@ class ProfilePageViewModel extends BaseModel {
/// None
void invite(BuildContext context) {
_appLanguageService.initialize();
// organization url
// final String url =
// 'https://cyberwake.github.io/applink/invite?selectLang=${_appLanguageService.appLocal.languageCode}&setUrl=${GraphqlConfig.orgURI}&selectOrg=${userConfig.currentOrg.id!}';
// QR
const String qrData =
'https://github.com/PalisadoesFoundation/talawa/releases/download/automated/app-release.apk';
print(url);
print(qrData);
showModalBottomSheet(
final String qrData =
'${GraphqlConfig.orgURI}?orgid=${userConfig.currentOrg.id!}';

showDialog(
context: context,
shape: const RoundedRectangleBorder(
borderRadius: BorderRadius.only(
topLeft: Radius.circular(30),
topRight: Radius.circular(30),
),
),
builder: (BuildContext context) {
return ClipRRect(
borderRadius: const BorderRadius.only(
topLeft: Radius.circular(30),
topRight: Radius.circular(30),
return Dialog(
backgroundColor: Colors.white,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(20.0),
),
child: Container(
height: MediaQuery.of(context).size.height * 0.75,
decoration: const BoxDecoration(
color: Colors.white,
padding: const EdgeInsets.all(20),
constraints: BoxConstraints(
maxHeight: MediaQuery.of(context).size.height * 0.80,
),
child: Column(
mainAxisSize: MainAxisSize.max,
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
iconButton(
CustomPaint(
size: const Size(48, 48 * 1),
painter: AppLogo(),
),
() {},
),
const SizedBox(height: 20),
Text(
'${userConfig.currentOrg.name}',
style: const TextStyle(
fontSize: 22,
fontWeight: FontWeight.bold,
color: Colors.black87,
),
),
const SizedBox(height: 20),
QrImageView(
data: qrData,
version: QrVersions.auto,
size: 200.0,
),
SizedBox(
height: SizeConfig.screenHeight! * 0.08,
),
const SizedBox(height: 20),
Text(
'Scan the QR to join ${userConfig.currentOrg.name}',
style: const TextStyle(color: Colors.black),
),
SizedBox(
height: SizeConfig.screenHeight! * 0.02,
AppLocalizations.of(context)!.strictTranslate('JOIN'),
textAlign: TextAlign.center,
style: const TextStyle(
fontSize: 18,
fontWeight: FontWeight.bold,
color: Colors.black87,
),
),
// Row(
// mainAxisAlignment: MainAxisAlignment.spaceEvenly,
// mainAxisSize: MainAxisSize.min,
// children: [
// iconButton(
// const FaIcon(
// FontAwesomeIcons.twitter,
// size: 35,
// color: Color(0xFF1DA1F2),
// ),
// () async => SocialShare.shareTwitter('Join us', url: url),
// ),
// iconButton(
// CustomPaint(
// size: const Size(
// 50,
// 50 * 1.004,
// ), //You can Replace [WIDTH] with your desired width for Custom Paint and height will be calculated automatically
// painter: WhatsappLogo(),
// ),
// () async => SocialShare.shareWhatsapp(url),
// ),
// iconButton(
// CustomPaint(
// size: Size(
// 45,
// (45 * 1).toDouble(),
// ), //You can Replace [WIDTH] with your desired width for Custom Paint and height will be calculated automatically
// painter: TelegramLogo(),
// ),
// () async => SocialShare.shareTelegram(url),
// ),
// iconButton(
// const FaIcon(
// FontAwesomeIcons.shareNodes,
// size: 30,
// color: Color(0xff40c351),
// ),
// () async => SocialShare.shareOptions(url),
// ),
// ],
// ),
const SizedBox(height: 30),
],
),
),
Expand All @@ -278,6 +247,7 @@ class ProfilePageViewModel extends BaseModel {
return Stack(
children: [
IconButton(
key: const Key('iconbtn1'),
onPressed: () {
print('tapped');
onTap();
Expand All @@ -303,6 +273,7 @@ class ProfilePageViewModel extends BaseModel {
void Function(void Function()) setter,
) {
return InkWell(
key: const Key('dombtn1'),
onTap: () {
setter(() {
donationAmount.text = amount;
Expand Down
Loading

0 comments on commit 4c61936

Please sign in to comment.