Skip to content

Commit

Permalink
Merge pull request #43 from NKUST-ITC/develop
Browse files Browse the repository at this point in the history
Update to v.3.1.4
  • Loading branch information
abc873693 authored Mar 25, 2019
2 parents b1fe0e7 + c98968f commit f362c1a
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 40 deletions.
24 changes: 12 additions & 12 deletions feather/macos/FeatherApp.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
/* End PBXCopyFilesBuildPhase section */

/* Begin PBXFileReference section */
33CC10ED2044A3C60003C045 /* FeatherApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; name = FeatherApp.app; path = "app_9vzIF7brk1rN.app"; sourceTree = BUILT_PRODUCTS_DIR; };
33CC10ED2044A3C60003C045 /* app_9vzIF7brk1rN.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = app_9vzIF7brk1rN.app; sourceTree = BUILT_PRODUCTS_DIR; };
33CC10F02044A3C60003C045 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
33CC10F22044A3C60003C045 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
33CC10F52044A3C60003C045 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = "<group>"; };
Expand Down Expand Up @@ -126,7 +126,7 @@
33CC10EE2044A3C60003C045 /* Products */ = {
isa = PBXGroup;
children = (
33CC10ED2044A3C60003C045 /* FeatherApp.app */,
33CC10ED2044A3C60003C045 /* app_9vzIF7brk1rN.app */,
);
name = Products;
sourceTree = "<group>";
Expand Down Expand Up @@ -162,7 +162,7 @@
);
name = FeatherApp;
productName = FeatherApp;
productReference = 33CC10ED2044A3C60003C045 /* FeatherApp.app */;
productReference = 33CC10ED2044A3C60003C045 /* app_9vzIF7brk1rN.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
Expand All @@ -178,7 +178,7 @@
33CC10EC2044A3C60003C045 = {
CreatedOnToolsVersion = 9.2;
LastSwiftMigration = 0920;
ProvisioningStyle = Manual;
ProvisioningStyle = Automatic;
};
33CC111A2044C6BA0003C045 = {
CreatedOnToolsVersion = 9.2;
Expand Down Expand Up @@ -393,10 +393,10 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "";
CODE_SIGN_STYLE = Manual;
CODE_SIGN_IDENTITY = "Mac Developer";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = "";
DEVELOPMENT_TEAM = R7BC26UNC9;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)",
Expand All @@ -405,7 +405,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.10.5;
PRODUCT_BUNDLE_IDENTIFIER = "com.feather-apps.app-9vzIF7brk1rN";
PRODUCT_NAME = "app_9vzIF7brk1rN";
PRODUCT_NAME = app_9vzIF7brk1rN;
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_OBJC_BRIDGING_HEADER = "FeatherApp-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
Expand All @@ -418,10 +418,10 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "";
CODE_SIGN_STYLE = Manual;
CODE_SIGN_IDENTITY = "Mac Developer";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = "";
DEVELOPMENT_TEAM = R7BC26UNC9;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)",
Expand All @@ -430,7 +430,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.10.5;
PRODUCT_BUNDLE_IDENTIFIER = "com.feather-apps.app-9vzIF7brk1rN";
PRODUCT_NAME = "app_9vzIF7brk1rN";
PRODUCT_NAME = app_9vzIF7brk1rN;
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_OBJC_BRIDGING_HEADER = "FeatherApp-Bridging-Header.h";
SWIFT_VERSION = 4.0;
Expand Down
Binary file not shown.
2 changes: 1 addition & 1 deletion ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/FMDB/FMDB.framework",
"${PODS_ROOT}/../.symlinks/flutter/ios-release/Flutter.framework",
"${PODS_ROOT}/../.symlinks/flutter/ios/Flutter.framework",
"${BUILT_PRODUCTS_DIR}/GoogleUtilities/GoogleUtilities.framework",
"${BUILT_PRODUCTS_DIR}/Protobuf/Protobuf.framework",
"${BUILT_PRODUCTS_DIR}/Reachability/Reachability.framework",
Expand Down
6 changes: 3 additions & 3 deletions lib/models/bus_data.dart
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ class BusTime {
'cancelKey': cancelKey,
};

bool hasReserve() {
bool canReserve() {
var now = new DateTime.now();
initializeDateFormatting();
var formatter = new DateFormat('yyyy-MM-dd HH:mm', 'zh');
Expand All @@ -121,13 +121,13 @@ class BusTime {
Color getColorState() {
return isReserve == 1
? Resource.Colors.blue
: hasReserve() ? Resource.Colors.grey : Colors.grey[400];
: canReserve() ? Resource.Colors.grey : Colors.grey[400];
}

String getReserveState(AppLocalizations local) {
return isReserve == 1
? local.reserved
: hasReserve() ? local.reserve : local.canNotReserve;
: canReserve() ? local.reserve : local.canNotReserve;
}

String getDate() {
Expand Down
48 changes: 25 additions & 23 deletions lib/pages/home/bus/bus_reserve_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ class BusReservePageState extends State<BusReservePage>
children: <Widget>[
FlatButton(
padding: EdgeInsets.symmetric(vertical: 16.0, horizontal: 16.0),
onPressed: busTime.hasReserve() && busTime.isReserve == 0
onPressed: busTime.canReserve() && busTime.isReserve == 0
? () {
String start = "";
if (selectStartStation == Station.janGong)
Expand Down Expand Up @@ -145,7 +145,7 @@ class BusReservePageState extends State<BusReservePage>
fontSize: 14.0),
),
TextSpan(
text: '預約截止時間\n',
text: '${app.reserveDeadline}\n',
style: TextStyle(
fontWeight: FontWeight.bold)),
TextSpan(
Expand All @@ -161,27 +161,29 @@ class BusReservePageState extends State<BusReservePage>
),
);
}
: () {
showDialog(
context: context,
builder: (BuildContext context) => YesNoDialog(
title: app.busCancelReserve,
contentWidget: Text(
"${app.busCancelReserveConfirmContent1}${busTime.getStart(app)}"
"${app.busCancelReserveConfirmContent2}${busTime.getEnd(app)}\n"
"${busTime.getTime()}${app.busCancelReserveConfirmContent3}",
textAlign: TextAlign.center,
),
leftActionText: app.back,
rightActionText: app.determine,
rightActionFunction: () {
_cancelBusReservation(busTime);
FA.logAction('cancel_bus', 'click');
},
),
);
FA.logAction('cancel_bus', 'create');
},
: busTime.isReserve != 0
? () {
showDialog(
context: context,
builder: (BuildContext context) => YesNoDialog(
title: app.busCancelReserve,
contentWidget: Text(
"${app.busCancelReserveConfirmContent1}${busTime.getStart(app)}"
"${app.busCancelReserveConfirmContent2}${busTime.getEnd(app)}\n"
"${busTime.getTime()}${app.busCancelReserveConfirmContent3}",
textAlign: TextAlign.center,
),
leftActionText: app.back,
rightActionText: app.determine,
rightActionFunction: () {
_cancelBusReservation(busTime);
FA.logAction('cancel_bus', 'click');
},
),
);
FA.logAction('cancel_bus', 'create');
}
: null,
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Expand Down
1 change: 1 addition & 0 deletions lib/utils/app_localizations.dart
Original file line number Diff line number Diff line change
Expand Up @@ -907,6 +907,7 @@ class AppLocalizations {
String get busRule => _vocabularies['bus_rule'];

String get platformError => _vocabularies['platform_error'];
String get reserveDeadline => _vocabularies['reserve_deadline'];
}

class AppLocalizationsDelegate extends LocalizationsDelegate<AppLocalizations> {
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: nkust_ap
description: A new Flutter application.

version: 3.1.3+30103
version: 3.1.4+30104

environment:
sdk: ">=2.1.0 <3.0.0"
Expand Down

0 comments on commit f362c1a

Please sign in to comment.