-
Notifications
You must be signed in to change notification settings - Fork 230
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
145 changed files
with
4,547 additions
and
1,955 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
org.gradle.jvmargs=-Xmx4G | ||
org.gradle.jvmargs=-Xmx4G -XX:MaxMetaspaceSize=2G -XX:+HeapDumpOnOutOfMemoryError | ||
android.useAndroidX=true | ||
android.enableJetifier=true | ||
android.enableJetifier=true |
3 changes: 1 addition & 2 deletions
3
LabelStoreMax/android/gradle/wrapper/gradle-wrapper.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
#Fri Jun 23 08:50:38 CEST 2017 | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict/> | ||
<dict> | ||
<key>aps-environment</key> | ||
<string>development</string> | ||
</dict> | ||
</plist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import '/resources/pages/cart_page.dart'; | ||
import 'package:nylo_framework/nylo_framework.dart'; | ||
|
||
import '/resources/widgets/shopping_cart_total_widget.dart'; | ||
import '/app/models/cart.dart'; | ||
|
||
class CartRemoveAllEvent implements NyEvent { | ||
@override | ||
final listeners = { | ||
DefaultListener: DefaultListener(), | ||
}; | ||
} | ||
|
||
class DefaultListener extends NyListener { | ||
@override | ||
handle(dynamic event) async { | ||
await Cart.getInstance.clear(); | ||
|
||
// update states | ||
updateState(ShoppingCartTotal.state); | ||
NyListView.stateReset("shopping_cart_items_list_view"); | ||
updateState(CartPage.path, data: {"action": "showToastCartCleared"}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import '/resources/widgets/cart_quantity_widget.dart'; | ||
import '/resources/pages/cart_page.dart'; | ||
import 'package:nylo_framework/nylo_framework.dart'; | ||
|
||
import '/resources/widgets/shopping_cart_total_widget.dart'; | ||
import '/app/models/cart.dart'; | ||
import '/app/models/cart_line_item.dart'; | ||
|
||
class CartRemoveItemEvent implements NyEvent { | ||
@override | ||
final listeners = { | ||
DefaultListener: DefaultListener(), | ||
}; | ||
} | ||
|
||
class DefaultListener extends NyListener { | ||
@override | ||
handle(dynamic event) async { | ||
CartLineItem cartLineItem = event["cartLineItem"]; | ||
bool complete = (await Cart.getInstance.removeCartItem(cartLineItem)); | ||
if (complete != true) { | ||
return; | ||
} | ||
|
||
// update states | ||
updateState(CartPage.path, data: {"action": "showToastCartItemRemoved"}); | ||
|
||
updateState(ShoppingCartTotal.state); | ||
NyListView.stateReset("shopping_cart_items_list_view"); | ||
updateState(CartQuantity.state); | ||
} | ||
} |
39 changes: 39 additions & 0 deletions
39
LabelStoreMax/lib/app/events/category_notification_event.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import 'package:firebase_messaging/firebase_messaging.dart'; | ||
import '/resources/pages/browse_category_page.dart'; | ||
import 'package:nylo_framework/nylo_framework.dart'; | ||
import 'package:wp_json_api/wp_json_api.dart'; | ||
|
||
class CategoryNotificationEvent implements NyEvent { | ||
@override | ||
final listeners = { | ||
DefaultListener: DefaultListener(), | ||
}; | ||
} | ||
|
||
class DefaultListener extends NyListener { | ||
@override | ||
handle(dynamic event) async { | ||
RemoteMessage message = event['RemoteMessage']; | ||
|
||
if (!message.data.containsKey('order_id')) { | ||
return; | ||
} | ||
if (!message.data.containsKey('user_id')) { | ||
return; | ||
} | ||
|
||
String userId = message.data['user_id']; | ||
|
||
if ((await WPJsonAPI.wpUserLoggedIn()) != true) { | ||
return; | ||
} | ||
|
||
String? currentUserId = await WPJsonAPI.wpUserId(); | ||
if (currentUserId != userId) { | ||
return; | ||
} | ||
|
||
routeTo(BrowseCategoryPage.path, | ||
data: int.parse(message.data['category_id'])); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import 'package:nylo_framework/nylo_framework.dart'; | ||
|
||
/* Login Form | ||
|-------------------------------------------------------------------------- | ||
| Usage: https://nylo.dev/docs/6.x/forms#how-it-works | ||
| Casts: https://nylo.dev/docs/6.x/forms#form-casts | ||
| Validation Rules: https://nylo.dev/docs/6.x/validation#validation-rules | ||
|-------------------------------------------------------------------------- */ | ||
|
||
class LoginForm extends NyFormData { | ||
LoginForm({String? name}) : super(name ?? "login"); | ||
|
||
@override | ||
fields() => [ | ||
Field.email( | ||
"Email", | ||
style: "compact", | ||
validate: FormValidator.email(), | ||
), | ||
Field.password( | ||
"Password", | ||
style: "compact", | ||
viewable: true, | ||
validate: FormValidator.password(), | ||
), | ||
]; | ||
} |
Oops, something went wrong.