Skip to content

Commit

Permalink
Merge branch 'trunk' of github.com:atsign-foundation/atmosphere_pro
Browse files Browse the repository at this point in the history
  • Loading branch information
sachins-geekyants committed Jun 28, 2022
2 parents b82ef2c + ea1c54d commit be05a8c
Show file tree
Hide file tree
Showing 17 changed files with 115 additions and 75 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
BSD 3-Clause License

Copyright (c) 2020-2022, The @ Foundation
Copyright (c) 2022-2022, The Atsign Foundation
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ confidential information without worrying about your data being stored on
a server in the cloud.

This repo holds the open source code for the @mosphere PRO app, to serve as
an example of apps that can be build on the @ Platform.
an example of apps that can be build on the atPlatform.

## Developer

The purpose of this repo is primarily to be an example of what can be done
with the @ Platform. So if you're a developer take a look at the code here.
with the atPlatform. So if you're a developer take a look at the code here.

### Contributor

Expand Down
2 changes: 1 addition & 1 deletion code_of_conduct.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<img width=250px src="https://atsign.dev/assets/img/@platform_logo_grey.svg?sanitize=true">

# The @ Foundation Code of Conduct
# The Atsign Foundation Code of Conduct

Based on
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.0-4baaaa.svg)](code_of_conduct.md)
Expand Down
12 changes: 6 additions & 6 deletions ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_ENTITLEMENTS = "Share Extension/Share Extension.entitlements";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 43;
CURRENT_PROJECT_VERSION = 44;
DEVELOPMENT_TEAM = 5XUSS6C2DF;
GCC_C_LANGUAGE_STANDARD = gnu11;
INFOPLIST_FILE = "Share Extension/Info.plist";
Expand Down Expand Up @@ -448,7 +448,7 @@
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_ENTITLEMENTS = "Share Extension/Share Extension.entitlements";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 43;
CURRENT_PROJECT_VERSION = 44;
DEVELOPMENT_TEAM = 5XUSS6C2DF;
GCC_C_LANGUAGE_STANDARD = gnu11;
INFOPLIST_FILE = "Share Extension/Info.plist";
Expand Down Expand Up @@ -478,7 +478,7 @@
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_ENTITLEMENTS = "Share Extension/Share Extension.entitlements";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 43;
CURRENT_PROJECT_VERSION = 44;
DEVELOPMENT_TEAM = 5XUSS6C2DF;
GCC_C_LANGUAGE_STANDARD = gnu11;
INFOPLIST_FILE = "Share Extension/Info.plist";
Expand Down Expand Up @@ -560,7 +560,7 @@
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 43;
CURRENT_PROJECT_VERSION = 44;
DEVELOPMENT_TEAM = 5XUSS6C2DF;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
Expand Down Expand Up @@ -708,7 +708,7 @@
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 43;
CURRENT_PROJECT_VERSION = 44;
DEVELOPMENT_TEAM = 5XUSS6C2DF;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
Expand Down Expand Up @@ -747,7 +747,7 @@
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 43;
CURRENT_PROJECT_VERSION = 44;
DEVELOPMENT_TEAM = 5XUSS6C2DF;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class DesktopCustomPersonVerticalTile extends StatelessWidget {
)
: ContactInitial(
initials: title ?? ' ',
size: 30,
size: 50,
maxSize: (80.0 - 30.0),
minSize: 50,
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -623,13 +623,14 @@ class SideBarIcon extends StatelessWidget {
}

Future<void> _launchInBrowser(String url) async {
if (await canLaunchUrl(Uri(path: url))) {
try {
await launchUrl(
Uri(path: url),
// forceSafariVC: false,
// forceWebView: false,
Uri(
scheme: 'https',
path: url,
),
);
} else {
} catch (e) {
throw 'Could not launch $url';
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ class _DesktopEmptySenderState extends State<DesktopEmptySender> {
_list.forEach((element) async {
if (element!.contact != null) {
await provider
.addTrustedContacts(element.contact);
.addTrustedContacts(element.contact!);
}
});
await provider.setTrustedContact();
Expand Down
38 changes: 28 additions & 10 deletions lib/desktop_screens/trusted_sender/desktop_trusted_sender.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import 'dart:typed_data';

import 'package:at_contacts_group_flutter/at_contacts_group_flutter.dart';
import 'package:at_contacts_group_flutter/screens/group_contact_view/group_contact_view.dart';
import 'package:atsign_atmosphere_pro/desktop_routes/desktop_route_names.dart';
import 'package:atsign_atmosphere_pro/desktop_routes/desktop_routes.dart';
import 'package:atsign_atmosphere_pro/desktop_screens/desktop_common_widgets/dektop_custom_person_tile.dart';
import 'package:atsign_atmosphere_pro/desktop_screens/desktop_common_widgets/desktop_custom_input_field.dart';
import 'package:atsign_atmosphere_pro/desktop_screens/desktop_common_widgets/desktop_header.dart';
Expand All @@ -9,6 +10,7 @@ import 'package:atsign_atmosphere_pro/screens/common_widgets/provider_callback.d
import 'package:atsign_atmosphere_pro/screens/common_widgets/provider_handler.dart';
import 'package:atsign_atmosphere_pro/screens/trusted_contacts/widgets/remove_trusted_contact_dialog.dart';
import 'package:at_common_flutter/services/size_config.dart';
import 'package:atsign_atmosphere_pro/services/common_utility_functions.dart';
import 'package:atsign_atmosphere_pro/utils/colors.dart';
import 'package:atsign_atmosphere_pro/utils/text_strings.dart';
import 'package:atsign_atmosphere_pro/view_models/trusted_sender_view_model.dart';
Expand Down Expand Up @@ -122,7 +124,16 @@ class _DesktopTrustedSenderState extends State<DesktopTrustedSender> {
spacing: 30.0,
children: List.generate(
provider.trustedContacts.length, (index) {
if (provider.trustedContacts[index]!.atSign!
Uint8List? byteImage;

if (provider.trustedContacts[index].atSign !=
null) {
byteImage = CommonUtilityFunctions()
.getCachedContactImage(provider
.trustedContacts[index].atSign!);
}

if (provider.trustedContacts[index].atSign!
.contains(searchText)) {
return InkWell(
onTap: () {
Expand All @@ -134,17 +145,21 @@ class _DesktopTrustedSenderState extends State<DesktopTrustedSender> {
TextStrings().removeTrustedSender,
contact: AtContact(
atSign: provider
.trustedContacts[index]!
.trustedContacts[index]
.atSign),
),
);
},
child: DesktopCustomPersonVerticalTile(
title: provider
.trustedContacts[index]!.atSign,
subTitle: provider
.trustedContacts[index]!.atSign,
showCancelIcon: false),
title: provider
.trustedContacts[index].atSign,
subTitle: provider
.trustedContacts[index].atSign,
showCancelIcon: false,
showImage:
byteImage != null ? true : false,
image: byteImage,
),
);
} else {
return SizedBox();
Expand All @@ -163,14 +178,17 @@ class _DesktopTrustedSenderState extends State<DesktopTrustedSender> {
showGroups: false,
showContacts: true,
isDesktop: true,
contactSelectedHistory: provider.trustedContacts
.map((e) => GroupContactsModel(contact: e))
.toList(),
selectedList: (_list) {
providerCallback<TrustedContactProvider>(
context,
task: (provider) async {
_list.forEach((element) async {
if (element!.contact != null) {
await provider.addTrustedContacts(
element.contact);
element.contact!);
}
});

Expand Down
9 changes: 7 additions & 2 deletions lib/screens/common_widgets/app_bar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -164,19 +164,24 @@ class _CustomAppBarState extends State<CustomAppBar> {
}
}
} else if (widget.isTrustedContactScreen) {
var trustedContacts =
Provider.of<TrustedContactProvider>(
NavService.navKey.currentContext!,
listen: false)
.trustedContacts;
await Navigator.push(
context,
MaterialPageRoute(
builder: (context) => ContactsScreen(
asSelectionScreen: true,
context: NavService.navKey.currentContext,
selectedContactsHistory: trustedContacts,
selectedList: (s) async {
s.forEach((element) async {
await Provider.of<
TrustedContactProvider>(
context,
listen: false)
.addTrustedContacts(element);
.addTrustedContacts(element!);
});
await Provider.of<TrustedContactProvider>(
context,
Expand Down
7 changes: 7 additions & 0 deletions lib/screens/common_widgets/website_webview.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import 'package:atsign_atmosphere_pro/services/snackbar_service.dart';
import 'package:atsign_atmosphere_pro/utils/colors.dart';
import 'package:atsign_atmosphere_pro/utils/text_strings.dart';
import 'package:atsign_atmosphere_pro/utils/text_styles.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:webview_flutter/webview_flutter.dart';
Expand Down Expand Up @@ -72,6 +74,11 @@ class _WebsiteScreenState extends State<WebsiteScreen> {
WebView(
initialUrl: widget.url,
javascriptMode: JavascriptMode.unrestricted,
gestureRecognizers: {
Factory<VerticalDragGestureRecognizer>(
() => VerticalDragGestureRecognizer()..onUpdate = (_) {},
)
},
onPageFinished: (test1) {
this.setState(() {
loading = false;
Expand Down
27 changes: 13 additions & 14 deletions lib/screens/trusted_contacts/trusted_contacts.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import 'dart:typed_data';

import 'package:at_contacts_flutter/screens/contacts_screen.dart';
import 'package:atsign_atmosphere_pro/services/common_utility_functions.dart';
import 'package:atsign_atmosphere_pro/services/navigation_service.dart';
import 'package:atsign_atmosphere_pro/utils/text_strings.dart'
as pro_text_strings;
import 'package:atsign_atmosphere_pro/utils/colors.dart' as pro_color_constants;
Expand Down Expand Up @@ -78,6 +77,7 @@ class _TrustedContactsState extends State<TrustedContacts> {
pro_text_strings.TextStrings()
.addTrustedSender,
style: CustomTextStyles.secondaryRegular16,
textAlign: TextAlign.center,
),
SizedBox(
height: 25.toHeight,
Expand All @@ -95,13 +95,13 @@ class _TrustedContactsState extends State<TrustedContacts> {
builder: (context) =>
ContactsScreen(
asSelectionScreen: true,
context: NavService
.navKey.currentContext,
selectedContactsHistory:
provider.trustedContacts,
selectedList: (s) async {
s.forEach((element) async {
await provider
.addTrustedContacts(
element);
element!);
});
await provider
.setTrustedContact();
Expand All @@ -117,12 +117,11 @@ class _TrustedContactsState extends State<TrustedContacts> {
itemBuilder: (context, index) {
Uint8List? byteImage;

if (provider.trustedContacts[index]!
.tags!['image'] !=
if (provider.trustedContacts[index].atSign !=
null) {
byteImage = CommonUtilityFunctions()
.getContactImage(
provider.trustedContacts[index]!);
.getCachedContactImage(provider
.trustedContacts[index].atSign!);
}

return ContactListTile(
Expand All @@ -145,26 +144,26 @@ class _TrustedContactsState extends State<TrustedContacts> {
onAdd: () {},
onRemove: () {},
name:
provider.trustedContacts[index]!.tags !=
provider.trustedContacts[index].tags !=
null &&
provider.trustedContacts[index]!
provider.trustedContacts[index]
.tags!['name'] !=
null
? provider.trustedContacts[index]!
? provider.trustedContacts[index]
.tags!['name']
: provider
.trustedContacts[index]!.atSign!
.trustedContacts[index].atSign!
.substring(1),
atSign:
provider.trustedContacts[index]!.atSign,
provider.trustedContacts[index].atSign,
image: byteImage != null
? CustomCircleAvatar(
byteImage: byteImage,
nonAsset: true,
)
: ContactInitial(
initials: provider
.trustedContacts[index]!.atSign,
.trustedContacts[index].atSign,
),
);
},
Expand Down
2 changes: 1 addition & 1 deletion lib/services/backend_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ class BackendService {
Provider.of<TrustedContactProvider>(context, listen: false);

trustedContactProvider.trustedContacts.forEach((element) {
if (element!.atSign == fromAtSign) {
if (element.atSign == fromAtSign) {
trustedSender = true;
}
});
Expand Down
15 changes: 8 additions & 7 deletions lib/services/overlay_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,14 @@ class OverlayService {
fontWeight: FontWeight.normal,
),
),
SizedBox(height: 5),
Text(
getFileUploadMessage(
provider.sentFileTransferProgress,
),
style: TextStyle(fontSize: 12.toFont),
),
//// Not showing estimated file upload time.
// SizedBox(height: 5),
// Text(
// getFileUploadMessage(
// provider.sentFileTransferProgress,
// ),
// style: TextStyle(fontSize: 12.toFont),
// ),
],
),
),
Expand Down
4 changes: 2 additions & 2 deletions lib/utils/constants.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ class MixedConstants {

static const int ROOT_PORT = 64;

static const String TERMS_CONDITIONS = 'https://atsign.com/terms-conditions/';
static const String TERMS_CONDITIONS = 'atsign.com/terms-conditions/';

static const String FILEBIN_URL = 'https://ck6agzxiog6kmb.atsign.com/';
// static const String PRIVACY_POLICY = 'https://atsign.com/privacy-policy/';
static const String PRIVACY_POLICY =
"https://atsign.com/apps/atmosphere/atmosphere-privacy/";
static const String FAQ = "https://atsign.com/faqs/";
static const String FAQ = "atsign.com/faqs/";

static const MACOS_STORE_LINK = 'https://apps.apple.com/app/id1550936444';

Expand Down
Loading

0 comments on commit be05a8c

Please sign in to comment.