diff --git a/android/app/src/main/res/drawable-hdpi/ic_launcher_background.png b/android/app/src/main/res/drawable-hdpi/ic_launcher_background.png
new file mode 100644
index 00000000..3192442c
Binary files /dev/null and b/android/app/src/main/res/drawable-hdpi/ic_launcher_background.png differ
diff --git a/android/app/src/main/res/drawable-hdpi/ic_launcher_foreground.png b/android/app/src/main/res/drawable-hdpi/ic_launcher_foreground.png
index ecdab274..3692e40b 100644
Binary files a/android/app/src/main/res/drawable-hdpi/ic_launcher_foreground.png and b/android/app/src/main/res/drawable-hdpi/ic_launcher_foreground.png differ
diff --git a/android/app/src/main/res/drawable-mdpi/ic_launcher_background.png b/android/app/src/main/res/drawable-mdpi/ic_launcher_background.png
new file mode 100644
index 00000000..3272d7b5
Binary files /dev/null and b/android/app/src/main/res/drawable-mdpi/ic_launcher_background.png differ
diff --git a/android/app/src/main/res/drawable-mdpi/ic_launcher_foreground.png b/android/app/src/main/res/drawable-mdpi/ic_launcher_foreground.png
index 34e930b4..46ae07a9 100644
Binary files a/android/app/src/main/res/drawable-mdpi/ic_launcher_foreground.png and b/android/app/src/main/res/drawable-mdpi/ic_launcher_foreground.png differ
diff --git a/android/app/src/main/res/drawable-night-v21/background.png b/android/app/src/main/res/drawable-night-v21/background.png
new file mode 100644
index 00000000..4e0f4cf0
Binary files /dev/null and b/android/app/src/main/res/drawable-night-v21/background.png differ
diff --git a/android/app/src/main/res/drawable-night-v21/launch_background.xml b/android/app/src/main/res/drawable-night-v21/launch_background.xml
new file mode 100644
index 00000000..f88598cf
--- /dev/null
+++ b/android/app/src/main/res/drawable-night-v21/launch_background.xml
@@ -0,0 +1,6 @@
+
+
+ -
+
+
+
diff --git a/android/app/src/main/res/drawable-night/background.png b/android/app/src/main/res/drawable-night/background.png
new file mode 100644
index 00000000..4e0f4cf0
Binary files /dev/null and b/android/app/src/main/res/drawable-night/background.png differ
diff --git a/android/app/src/main/res/drawable-night/launch_background.xml b/android/app/src/main/res/drawable-night/launch_background.xml
new file mode 100644
index 00000000..f88598cf
--- /dev/null
+++ b/android/app/src/main/res/drawable-night/launch_background.xml
@@ -0,0 +1,6 @@
+
+
+ -
+
+
+
diff --git a/android/app/src/main/res/drawable-v21/background.png b/android/app/src/main/res/drawable-v21/background.png
new file mode 100644
index 00000000..195c52e1
Binary files /dev/null and b/android/app/src/main/res/drawable-v21/background.png differ
diff --git a/android/app/src/main/res/drawable-v21/launch_background.xml b/android/app/src/main/res/drawable-v21/launch_background.xml
new file mode 100644
index 00000000..f88598cf
--- /dev/null
+++ b/android/app/src/main/res/drawable-v21/launch_background.xml
@@ -0,0 +1,6 @@
+
+
+ -
+
+
+
diff --git a/android/app/src/main/res/drawable-xhdpi/ic_launcher_background.png b/android/app/src/main/res/drawable-xhdpi/ic_launcher_background.png
new file mode 100644
index 00000000..dc4bbd90
Binary files /dev/null and b/android/app/src/main/res/drawable-xhdpi/ic_launcher_background.png differ
diff --git a/android/app/src/main/res/drawable-xhdpi/ic_launcher_foreground.png b/android/app/src/main/res/drawable-xhdpi/ic_launcher_foreground.png
index fcbab0db..01e4e8e5 100644
Binary files a/android/app/src/main/res/drawable-xhdpi/ic_launcher_foreground.png and b/android/app/src/main/res/drawable-xhdpi/ic_launcher_foreground.png differ
diff --git a/android/app/src/main/res/drawable-xxhdpi/ic_launcher_background.png b/android/app/src/main/res/drawable-xxhdpi/ic_launcher_background.png
new file mode 100644
index 00000000..d7768ea7
Binary files /dev/null and b/android/app/src/main/res/drawable-xxhdpi/ic_launcher_background.png differ
diff --git a/android/app/src/main/res/drawable-xxhdpi/ic_launcher_foreground.png b/android/app/src/main/res/drawable-xxhdpi/ic_launcher_foreground.png
index 1a18294c..99150e82 100644
Binary files a/android/app/src/main/res/drawable-xxhdpi/ic_launcher_foreground.png and b/android/app/src/main/res/drawable-xxhdpi/ic_launcher_foreground.png differ
diff --git a/android/app/src/main/res/drawable-xxxhdpi/ic_launcher_background.png b/android/app/src/main/res/drawable-xxxhdpi/ic_launcher_background.png
new file mode 100644
index 00000000..64b817d5
Binary files /dev/null and b/android/app/src/main/res/drawable-xxxhdpi/ic_launcher_background.png differ
diff --git a/android/app/src/main/res/drawable-xxxhdpi/ic_launcher_foreground.png b/android/app/src/main/res/drawable-xxxhdpi/ic_launcher_foreground.png
index 6e8223c8..c6107b11 100644
Binary files a/android/app/src/main/res/drawable-xxxhdpi/ic_launcher_foreground.png and b/android/app/src/main/res/drawable-xxxhdpi/ic_launcher_foreground.png differ
diff --git a/android/app/src/main/res/drawable/background.png b/android/app/src/main/res/drawable/background.png
new file mode 100644
index 00000000..195c52e1
Binary files /dev/null and b/android/app/src/main/res/drawable/background.png differ
diff --git a/android/app/src/main/res/drawable/launch_background.xml b/android/app/src/main/res/drawable/launch_background.xml
index 304732f8..f88598cf 100644
--- a/android/app/src/main/res/drawable/launch_background.xml
+++ b/android/app/src/main/res/drawable/launch_background.xml
@@ -1,12 +1,6 @@
-
-
-
-
-
+ -
+
+
diff --git a/android/app/src/main/res/mipmap-anydpi-v26/launcher_icon.xml b/android/app/src/main/res/mipmap-anydpi-v26/launcher_icon.xml
index 5f349f7f..7e91a578 100644
--- a/android/app/src/main/res/mipmap-anydpi-v26/launcher_icon.xml
+++ b/android/app/src/main/res/mipmap-anydpi-v26/launcher_icon.xml
@@ -1,5 +1,5 @@
-
+
diff --git a/android/app/src/main/res/mipmap-hdpi/launcher_icon.png b/android/app/src/main/res/mipmap-hdpi/launcher_icon.png
index 700a0b05..6393a24a 100644
Binary files a/android/app/src/main/res/mipmap-hdpi/launcher_icon.png and b/android/app/src/main/res/mipmap-hdpi/launcher_icon.png differ
diff --git a/android/app/src/main/res/mipmap-mdpi/launcher_icon.png b/android/app/src/main/res/mipmap-mdpi/launcher_icon.png
index 5ba9a3e5..700c5ea3 100644
Binary files a/android/app/src/main/res/mipmap-mdpi/launcher_icon.png and b/android/app/src/main/res/mipmap-mdpi/launcher_icon.png differ
diff --git a/android/app/src/main/res/mipmap-xhdpi/launcher_icon.png b/android/app/src/main/res/mipmap-xhdpi/launcher_icon.png
index 165a9bce..9637619a 100644
Binary files a/android/app/src/main/res/mipmap-xhdpi/launcher_icon.png and b/android/app/src/main/res/mipmap-xhdpi/launcher_icon.png differ
diff --git a/android/app/src/main/res/mipmap-xxhdpi/launcher_icon.png b/android/app/src/main/res/mipmap-xxhdpi/launcher_icon.png
index 254231b7..2b3a8145 100644
Binary files a/android/app/src/main/res/mipmap-xxhdpi/launcher_icon.png and b/android/app/src/main/res/mipmap-xxhdpi/launcher_icon.png differ
diff --git a/android/app/src/main/res/mipmap-xxxhdpi/launcher_icon.png b/android/app/src/main/res/mipmap-xxxhdpi/launcher_icon.png
index 4663a1e9..763e5499 100644
Binary files a/android/app/src/main/res/mipmap-xxxhdpi/launcher_icon.png and b/android/app/src/main/res/mipmap-xxxhdpi/launcher_icon.png differ
diff --git a/android/app/src/main/res/values-night-v31/styles.xml b/android/app/src/main/res/values-night-v31/styles.xml
new file mode 100644
index 00000000..42dbbfa9
--- /dev/null
+++ b/android/app/src/main/res/values-night-v31/styles.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
diff --git a/android/app/src/main/res/values-night/styles.xml b/android/app/src/main/res/values-night/styles.xml
new file mode 100644
index 00000000..dbc9ea9f
--- /dev/null
+++ b/android/app/src/main/res/values-night/styles.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
diff --git a/android/app/src/main/res/values-v31/styles.xml b/android/app/src/main/res/values-v31/styles.xml
new file mode 100644
index 00000000..b96aa1a6
--- /dev/null
+++ b/android/app/src/main/res/values-v31/styles.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
diff --git a/assets/adaptive_foreground.png b/assets/adaptive_foreground.png
deleted file mode 100644
index ef040700..00000000
Binary files a/assets/adaptive_foreground.png and /dev/null differ
diff --git a/assets/i18n/en.json b/assets/i18n/en.json
index c48246d4..d479b2d0 100644
--- a/assets/i18n/en.json
+++ b/assets/i18n/en.json
@@ -1,10 +1,18 @@
{
"app_bar": {
- "search": "Search",
- "refresh": "Refresh",
"logout": "Logout",
"clear_all": "Clear all"
},
+ "alert": {
+ "discard": "Discard",
+ "clear": "Clear"
+ },
+ "form": {
+ "validators": {
+ "invalid_number": "not a valid number",
+ "required": "required"
+ }
+ },
"login": {
"title": "Login",
"server_url": {
@@ -46,6 +54,12 @@
"categories": {
"title": "Cookbook",
"all_categories": "All",
+ "uncategorized": "Uncategorized",
+ "items": {
+ "0": "no items",
+ "1": "1 item",
+ "else": "{{value}} items"
+ },
"drawer": {
"import": "Import Recipe",
"settings": "Settings"
@@ -71,18 +85,21 @@
"cook": "Cooking time",
"total": "Total time",
"fields": {
- "name": "Recipe Name:",
- "description": "Recipe Description:",
- "keywords": "Keywords:",
- "category": "Category:",
- "servings": "Servings:",
- "source": "Source:",
+ "name": "Recipe Name",
+ "description": "Recipe Description",
+ "keywords": "Keywords",
+ "category": "Category",
+ "servings": {
+ "1": "Serving",
+ "else": "Servings"
+ },
+ "source": "Source",
"source_button": "Source",
- "image": "Image:",
+ "image": "Image",
"time": {
- "prep": "Preparation time:",
- "cook": "Cooking time:",
- "total": "Total time:",
+ "prep": "Preparation time",
+ "cook": "Cooking time",
+ "total": "Total time",
"hours": "Hours",
"minutes": "Minutes"
},
@@ -103,9 +120,11 @@
"unsaturatedFatContent": "Unsaturated-fat content"
}
},
- "tools": "Tools:",
- "ingredients": "Ingredients:",
- "instructions": "Instructions:"
+ "general": "General",
+ "times": "Times",
+ "tools": "Tools",
+ "ingredients": "Ingredients",
+ "instructions": "Instructions"
},
"errors": {
"load_failed": "Failed to load Recipe!"
@@ -116,26 +135,42 @@
"button": "Save",
"errors": {
"update_failed": "Update Failed {error_msg}"
+ },
+ "delete": {
+ "title": "Delete Recipe",
+ "dialog": "Are you sure you want to permanently delete {recipe}?"
}
},
"recipe_create": {
"title": "Create Recipe",
"button": "Create",
+ "add_field": "add",
+ "remove_field": "remove",
"errors": {
"update_failed": "Create Failed {error_msg}"
}
},
+ "recipe_form": {
+ "dismiss_edit": {
+ "title": "Cancel edit",
+ "dialog": "Are you sure you want to discard your changes to {recipe}?"
+ },
+ "dismiss_create": {
+ "title": "Cancel create",
+ "dialog": "Are you sure you want to discard the creation?"
+ }
+ },
"recipe_import": {
"title": "Import Recipe",
"button": "Import",
"field": "URL to Recipe",
- "clipboard": "Paste Clipboard",
"errors": {
"import_failed": "Import Failed {error_msg}"
}
},
"search": {
"title": "Search Recipe",
+ "description": "Search for recipes by name or keyword",
"nothing_found": "No recipe found!",
"errors": {
"search_failed": "Unable to load all Recipes!\n{error_msg}"
@@ -145,8 +180,13 @@
"title": "Your timers",
"started": "Timer started.",
"finished": "is finished.",
+ "button": {
+ "start": "start timer",
+ "cancel": "cancel timer"
+ },
"done": "Timer is done.",
- "missing": "You need to set the cooking time to use a timer."
+ "missing": "You need to set the cooking time to use a timer.",
+ "empty_list": "Your running timers will be shown here."
},
"settings": {
"title": "App Settings",
@@ -172,4 +212,4 @@
"subtitle": "Changes the font size of category title. This can be useful if you have long category names."
}
}
-}
+}
\ No newline at end of file
diff --git a/assets/icon.png b/assets/icon.png
deleted file mode 100644
index 77c3844f..00000000
Binary files a/assets/icon.png and /dev/null differ
diff --git a/assets/launcher/adaptive_background.png b/assets/launcher/adaptive_background.png
new file mode 100644
index 00000000..bbd297c9
Binary files /dev/null and b/assets/launcher/adaptive_background.png differ
diff --git a/assets/launcher/adaptive_foreground.png b/assets/launcher/adaptive_foreground.png
new file mode 100644
index 00000000..f1ab9a16
Binary files /dev/null and b/assets/launcher/adaptive_foreground.png differ
diff --git a/assets/launcher/icon.png b/assets/launcher/icon.png
new file mode 100644
index 00000000..31d664ce
Binary files /dev/null and b/assets/launcher/icon.png differ
diff --git a/docker-compose.yaml b/docker-compose.yaml
index 21386cff..11d1a04a 100644
--- a/docker-compose.yaml
+++ b/docker-compose.yaml
@@ -1,18 +1,19 @@
version: '3.8'
services:
nextcloud:
- image: lscr.io/linuxserver/nextcloud:22.2.3
+ image: lscr.io/linuxserver/nextcloud:latest
container_name: plugin_development
environment:
- PUID=1000
- PGID=1000
- TZ=Europe/London
- - COOKBOOK=0.9.8
+ - COOKBOOK=0.10.2
volumes:
- /config
- /data
- ./docker/data:/config/www/nextcloud/data/preset
- - ./docker/80-setup:/etc/cont-init.d/80-setup
+ - ./docker/80-setup:/custom-cont-init.d/80-setup:ro
+ - ./docker/setup_library:/etc/setup_library:ro
ports:
- 443:443
- 80:80
\ No newline at end of file
diff --git a/docker/80-setup b/docker/80-setup
index dbd03da7..dc1eea18 100644
--- a/docker/80-setup
+++ b/docker/80-setup
@@ -12,8 +12,4 @@ tar -zxf /config/www/nextcloud/apps/Cookbook-"${COOKBOOK}".tar.gz -C /config/www
rm /config/www/nextcloud/apps/Cookbook-"${COOKBOOK}".tar.gz
occ app:enable cookbook
-# Setup Cookbook Library
-rm -R /config/www/nextcloud/data/admin/files
-cp -R /config/www/nextcloud/data/preset /config/www/nextcloud/data/admin/files
-chown abc:users -R /config/www/nextcloud/data/admin/files/
-occ files:scan admin
\ No newline at end of file
+bash /etc/setup_library
\ No newline at end of file
diff --git a/docker/setup_library b/docker/setup_library
new file mode 100644
index 00000000..83833eff
--- /dev/null
+++ b/docker/setup_library
@@ -0,0 +1,7 @@
+#!/usr/bin/with-contenv bash
+
+# Setup Cookbook Library
+rm -R /config/www/nextcloud/data/admin/files
+cp -R /config/www/nextcloud/data/preset /config/www/nextcloud/data/admin/files
+chown abc:users -R /config/www/nextcloud/data/admin/files/
+occ files:scan admin
\ No newline at end of file
diff --git a/flutter_launcher_icons.yaml b/flutter_launcher_icons.yaml
new file mode 100644
index 00000000..7a2c5f5f
--- /dev/null
+++ b/flutter_launcher_icons.yaml
@@ -0,0 +1,7 @@
+flutter_icons:
+ android: "launcher_icon"
+ ios: true
+ remove_alpha_ios: true
+ image_path: "assets/launcher/icon.png"
+ adaptive_icon_background: "assets/launcher/adaptive_background.png"
+ adaptive_icon_foreground: "assets/launcher/adaptive_foreground.png"
diff --git a/flutter_native_splash.yaml b/flutter_native_splash.yaml
new file mode 100644
index 00000000..50849fc2
--- /dev/null
+++ b/flutter_native_splash.yaml
@@ -0,0 +1,10 @@
+flutter_native_splash:
+ color: "#fcfcff"
+ color_dark: "#1a1c1e"
+ #image: assets/splash_icon.png
+ android_12:
+ #image: assets/splash_icon_android_12.png
+ icon_background_color: "#fcfcff"
+ icon_background_color_dark: "#1a1c1e"
+ ios: false
+ web: false
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
index 6da96660..46d0d23f 100644
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
index 713d8537..0385784b 100644
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
index 47bd6fb9..10f9e8af 100644
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
index a8b34f66..fd9d6d9a 100644
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
index e9a5bd41..3d57ddc0 100644
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
index c5450e6c..95d1069c 100644
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
index d3caaf3a..95d5c8d8 100644
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
index 47bd6fb9..10f9e8af 100644
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
index bb6ed50f..292cdfee 100644
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
index 9c66327f..5052e130 100644
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png
new file mode 100644
index 00000000..494708de
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png
new file mode 100644
index 00000000..2507739c
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png
new file mode 100644
index 00000000..ffcbfd6d
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png
new file mode 100644
index 00000000..355558f3
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
index 9c66327f..5052e130 100644
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
index 85268c64..151cf2ad 100644
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png
new file mode 100644
index 00000000..6393a24a
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png
new file mode 100644
index 00000000..2b3a8145
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
index 98962751..7ebc22d1 100644
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
index fca796d6..d008bf40 100644
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
index df59f355..74ddf64e 100644
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ
diff --git a/lib/main.dart b/lib/main.dart
index 1fcf4baa..865a05a0 100644
--- a/lib/main.dart
+++ b/lib/main.dart
@@ -1,12 +1,14 @@
import 'package:flutter/material.dart';
+import 'package:flutter/services.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
+import 'package:flutter_native_splash/flutter_native_splash.dart';
import 'package:flutter_settings_screens/flutter_settings_screens.dart';
import 'package:flutter_translate/flutter_translate.dart';
import 'package:nextcloud_cookbook_flutter/src/blocs/authentication/authentication_bloc.dart';
import 'package:nextcloud_cookbook_flutter/src/blocs/categories/categories_bloc.dart';
import 'package:nextcloud_cookbook_flutter/src/blocs/recipes_short/recipes_short_bloc.dart';
import 'package:nextcloud_cookbook_flutter/src/blocs/simple_bloc_delegatae.dart';
-import 'package:nextcloud_cookbook_flutter/src/screens/category/category_screen.dart';
+import 'package:nextcloud_cookbook_flutter/src/screens/category_screen.dart';
import 'package:nextcloud_cookbook_flutter/src/screens/loading_screen.dart';
import 'package:nextcloud_cookbook_flutter/src/screens/login_screen.dart';
import 'package:nextcloud_cookbook_flutter/src/screens/splash_screen.dart';
@@ -14,6 +16,7 @@ import 'package:nextcloud_cookbook_flutter/src/services/services.dart';
import 'package:nextcloud_cookbook_flutter/src/util/lifecycle_event_handler.dart';
import 'package:nextcloud_cookbook_flutter/src/util/setting_keys.dart';
import 'package:nextcloud_cookbook_flutter/src/util/supported_locales.dart';
+import 'package:nextcloud_cookbook_flutter/src/util/theme_data.dart';
import 'package:nextcloud_cookbook_flutter/src/util/theme_mode_manager.dart';
import 'package:nextcloud_cookbook_flutter/src/util/translate_preferences.dart';
import 'package:theme_mode_handler/theme_mode_handler.dart';
@@ -30,6 +33,9 @@ void main() async {
await Settings.init();
// Wait for Notifications to be ready
await NotificationService().init();
+ final widgetsBinding = WidgetsFlutterBinding.ensureInitialized();
+ FlutterNativeSplash.preserve(widgetsBinding: widgetsBinding);
+
runApp(
LocalizedApp(
delegate,
@@ -65,8 +71,6 @@ class App extends StatefulWidget {
}
class _AppState extends State {
- final UserRepository userRepository = UserRepository();
-
@override
void initState() {
super.initState();
@@ -93,63 +97,22 @@ class _AppState extends State {
builder: (ThemeMode themeMode) => MaterialApp(
navigatorKey: IntentRepository().getNavigationKey(),
themeMode: themeMode,
- theme: ThemeData(
- brightness: Brightness.light,
- hintColor: Colors.grey,
- ),
- darkTheme: ThemeData(
- brightness: Brightness.dark,
- hintColor: Colors.grey,
- ),
- home: BlocBuilder(
+ theme: AppTheme.lightThemeData,
+ darkTheme: AppTheme.darkThemeData,
+ home: BlocConsumer(
builder: (context, state) {
+ SystemChrome.setSystemUIOverlayStyle(
+ SystemUiOverlayStyle(
+ systemNavigationBarColor:
+ Theme.of(context).scaffoldBackgroundColor,
+ ),
+ );
+
switch (state.status) {
case AuthenticationStatus.loading:
return const SplashPage();
case AuthenticationStatus.authenticated:
- return FutureBuilder(
- future: UserRepository().fetchApiVersion(),
- builder: (context, snapshot) {
- if (!snapshot.hasData) {
- return Container();
- }
-
- if (snapshot.hasError) {
- ScaffoldMessenger.of(context).showSnackBar(
- SnackBar(
- content: Text(
- translate(
- "categories.errors.api_version_check_failed",
- args: {"error_msg": snapshot.error},
- ),
- ),
- backgroundColor: Colors.red,
- ),
- );
- }
-
- if (!UserRepository().isVersionSupported(snapshot.data!)) {
- ScaffoldMessenger.of(context).showSnackBar(
- SnackBar(
- content: Text(
- translate(
- "categories.errors.api_version_above_confirmed",
- args: {
- "version":
- "${snapshot.data!.major}.${snapshot.data!.minor}"
- },
- ),
- ),
- backgroundColor: Colors.orange,
- ),
- );
- }
-
- IntentRepository().handleIntent();
- return const CategoryScreen();
- },
- );
-
+ return const CategoryScreen();
case AuthenticationStatus.unauthenticated:
return const LoginScreen();
case AuthenticationStatus.invalid:
@@ -157,7 +120,14 @@ class _AppState extends State {
invalidCredentials: true,
);
case AuthenticationStatus.error:
- return const LoadingErrorScreen();
+ return LoadingErrorScreen(message: state.error!);
+ }
+ },
+ listener: (context, state) async {
+ if (state.status != AuthenticationStatus.loading) {
+ FlutterNativeSplash.remove();
+ } else if (state.status == AuthenticationStatus.authenticated) {
+ await IntentRepository().handleIntent();
}
},
),
diff --git a/lib/src/blocs/recipe/recipe_bloc.dart b/lib/src/blocs/recipe/recipe_bloc.dart
index b080f24c..63df7aab 100644
--- a/lib/src/blocs/recipe/recipe_bloc.dart
+++ b/lib/src/blocs/recipe/recipe_bloc.dart
@@ -14,6 +14,7 @@ class RecipeBloc extends Bloc {
on(_mapRecipeUpdatedToState);
on(_mapRecipeImportedToState);
on(_mapRecipeCreatedToState);
+ on(_mapRecipeDeletedToState);
}
Future _mapRecipeLoadedToState(
@@ -81,4 +82,22 @@ class RecipeBloc extends Bloc {
);
}
}
+
+ Future _mapRecipeDeletedToState(
+ RecipeDeleted recipeDeleted,
+ Emitter emit,
+ ) async {
+ try {
+ emit(RecipeState(status: RecipeStatus.deleteInProgress));
+ await dataRepository.deleteRecipe(recipeDeleted.recipe);
+ emit(RecipeState(status: RecipeStatus.delteSuccess));
+ } catch (e) {
+ emit(
+ RecipeState(
+ status: RecipeStatus.deleteFailure,
+ error: e.toString(),
+ ),
+ );
+ }
+ }
}
diff --git a/lib/src/blocs/recipe/recipe_event.dart b/lib/src/blocs/recipe/recipe_event.dart
index a6ae5189..4a6c4260 100644
--- a/lib/src/blocs/recipe/recipe_event.dart
+++ b/lib/src/blocs/recipe/recipe_event.dart
@@ -42,3 +42,12 @@ class RecipeImported extends RecipeEvent {
@override
List