diff --git a/App_Resources/Android/app.gradle b/App_Resources/Android/app.gradle
index f31990b6..130279f2 100644
--- a/App_Resources/Android/app.gradle
+++ b/App_Resources/Android/app.gradle
@@ -15,7 +15,7 @@
android {
defaultConfig {
- versionCode 1
+ versionCode 2
versionName '1.0.0'
minSdkVersion 19
generatedDensities = []
diff --git a/App_Resources/Android/src/main/AndroidManifest.xml b/App_Resources/Android/src/main/AndroidManifest.xml
index d3173fb4..478fb4f8 100644
--- a/App_Resources/Android/src/main/AndroidManifest.xml
+++ b/App_Resources/Android/src/main/AndroidManifest.xml
@@ -5,7 +5,7 @@
-
+
diff --git a/App_Resources/Android/src/main/res/drawable-anydpi-v26/ic_launcher.xml b/App_Resources/Android/src/main/res/drawable-anydpi-v26/ic_launcher.xml
new file mode 100644
index 00000000..8e05188f
--- /dev/null
+++ b/App_Resources/Android/src/main/res/drawable-anydpi-v26/ic_launcher.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/App_Resources/Android/src/main/res/drawable-anydpi-v26/ic_launcher_round.xml b/App_Resources/Android/src/main/res/drawable-anydpi-v26/ic_launcher_round.xml
new file mode 100644
index 00000000..8e05188f
--- /dev/null
+++ b/App_Resources/Android/src/main/res/drawable-anydpi-v26/ic_launcher_round.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/App_Resources/Android/src/main/res/drawable-hdpi/background.png b/App_Resources/Android/src/main/res/drawable-hdpi/background.png
deleted file mode 100644
index e9a0a565..00000000
Binary files a/App_Resources/Android/src/main/res/drawable-hdpi/background.png and /dev/null differ
diff --git a/App_Resources/Android/src/main/res/drawable-hdpi/ic_launcher.png b/App_Resources/Android/src/main/res/drawable-hdpi/ic_launcher.png
new file mode 100755
index 00000000..c0411f4c
Binary files /dev/null and b/App_Resources/Android/src/main/res/drawable-hdpi/ic_launcher.png differ
diff --git a/App_Resources/Android/src/main/res/drawable-hdpi/ic_launcher_background.png b/App_Resources/Android/src/main/res/drawable-hdpi/ic_launcher_background.png
new file mode 100755
index 00000000..8161b036
Binary files /dev/null and b/App_Resources/Android/src/main/res/drawable-hdpi/ic_launcher_background.png differ
diff --git a/App_Resources/Android/src/main/res/drawable-hdpi/ic_launcher_foreground.png b/App_Resources/Android/src/main/res/drawable-hdpi/ic_launcher_foreground.png
new file mode 100755
index 00000000..d062897c
Binary files /dev/null and b/App_Resources/Android/src/main/res/drawable-hdpi/ic_launcher_foreground.png differ
diff --git a/App_Resources/Android/src/main/res/drawable-hdpi/icon.png b/App_Resources/Android/src/main/res/drawable-hdpi/icon.png
deleted file mode 100644
index efac9ab6..00000000
Binary files a/App_Resources/Android/src/main/res/drawable-hdpi/icon.png and /dev/null differ
diff --git a/App_Resources/Android/src/main/res/drawable-hdpi/icon_gray.png b/App_Resources/Android/src/main/res/drawable-hdpi/icon_gray.png
new file mode 100644
index 00000000..0340fa2e
Binary files /dev/null and b/App_Resources/Android/src/main/res/drawable-hdpi/icon_gray.png differ
diff --git a/App_Resources/Android/src/main/res/drawable-hdpi/logo.png b/App_Resources/Android/src/main/res/drawable-hdpi/logo.png
deleted file mode 100644
index 38863819..00000000
Binary files a/App_Resources/Android/src/main/res/drawable-hdpi/logo.png and /dev/null differ
diff --git a/App_Resources/Android/src/main/res/drawable-hdpi/logo_dark.png b/App_Resources/Android/src/main/res/drawable-hdpi/logo_dark.png
new file mode 100644
index 00000000..999838b2
Binary files /dev/null and b/App_Resources/Android/src/main/res/drawable-hdpi/logo_dark.png differ
diff --git a/App_Resources/Android/src/main/res/drawable-hdpi/logo_white.png b/App_Resources/Android/src/main/res/drawable-hdpi/logo_white.png
new file mode 100644
index 00000000..df271bea
Binary files /dev/null and b/App_Resources/Android/src/main/res/drawable-hdpi/logo_white.png differ
diff --git a/App_Resources/Android/src/main/res/drawable-ldpi/background.png b/App_Resources/Android/src/main/res/drawable-ldpi/background.png
deleted file mode 100644
index 85bfae47..00000000
Binary files a/App_Resources/Android/src/main/res/drawable-ldpi/background.png and /dev/null differ
diff --git a/App_Resources/Android/src/main/res/drawable-ldpi/ic_launcher.png b/App_Resources/Android/src/main/res/drawable-ldpi/ic_launcher.png
new file mode 100755
index 00000000..c0411f4c
Binary files /dev/null and b/App_Resources/Android/src/main/res/drawable-ldpi/ic_launcher.png differ
diff --git a/App_Resources/Android/src/main/res/drawable-ldpi/icon.png b/App_Resources/Android/src/main/res/drawable-ldpi/icon.png
deleted file mode 100644
index 0c967e1f..00000000
Binary files a/App_Resources/Android/src/main/res/drawable-ldpi/icon.png and /dev/null differ
diff --git a/App_Resources/Android/src/main/res/drawable-ldpi/icon_gray.png b/App_Resources/Android/src/main/res/drawable-ldpi/icon_gray.png
new file mode 100644
index 00000000..345f885b
Binary files /dev/null and b/App_Resources/Android/src/main/res/drawable-ldpi/icon_gray.png differ
diff --git a/App_Resources/Android/src/main/res/drawable-ldpi/logo.png b/App_Resources/Android/src/main/res/drawable-ldpi/logo.png
deleted file mode 100644
index 4151089d..00000000
Binary files a/App_Resources/Android/src/main/res/drawable-ldpi/logo.png and /dev/null differ
diff --git a/App_Resources/Android/src/main/res/drawable-ldpi/logo_dark.png b/App_Resources/Android/src/main/res/drawable-ldpi/logo_dark.png
new file mode 100644
index 00000000..4accb1d5
Binary files /dev/null and b/App_Resources/Android/src/main/res/drawable-ldpi/logo_dark.png differ
diff --git a/App_Resources/Android/src/main/res/drawable-ldpi/logo_white.png b/App_Resources/Android/src/main/res/drawable-ldpi/logo_white.png
new file mode 100644
index 00000000..42f91fdf
Binary files /dev/null and b/App_Resources/Android/src/main/res/drawable-ldpi/logo_white.png differ
diff --git a/App_Resources/Android/src/main/res/drawable-mdpi/background.png b/App_Resources/Android/src/main/res/drawable-mdpi/background.png
deleted file mode 100644
index 4a0d2cd8..00000000
Binary files a/App_Resources/Android/src/main/res/drawable-mdpi/background.png and /dev/null differ
diff --git a/App_Resources/Android/src/main/res/drawable-mdpi/ic_launcher.png b/App_Resources/Android/src/main/res/drawable-mdpi/ic_launcher.png
new file mode 100755
index 00000000..8f853cc5
Binary files /dev/null and b/App_Resources/Android/src/main/res/drawable-mdpi/ic_launcher.png differ
diff --git a/App_Resources/Android/src/main/res/drawable-mdpi/ic_launcher_background.png b/App_Resources/Android/src/main/res/drawable-mdpi/ic_launcher_background.png
new file mode 100755
index 00000000..5d7860f4
Binary files /dev/null and b/App_Resources/Android/src/main/res/drawable-mdpi/ic_launcher_background.png differ
diff --git a/App_Resources/Android/src/main/res/drawable-mdpi/ic_launcher_foreground.png b/App_Resources/Android/src/main/res/drawable-mdpi/ic_launcher_foreground.png
new file mode 100755
index 00000000..29b7f6ec
Binary files /dev/null and b/App_Resources/Android/src/main/res/drawable-mdpi/ic_launcher_foreground.png differ
diff --git a/App_Resources/Android/src/main/res/drawable-mdpi/icon.png b/App_Resources/Android/src/main/res/drawable-mdpi/icon.png
deleted file mode 100644
index 023aeea6..00000000
Binary files a/App_Resources/Android/src/main/res/drawable-mdpi/icon.png and /dev/null differ
diff --git a/App_Resources/Android/src/main/res/drawable-mdpi/icon_gray.png b/App_Resources/Android/src/main/res/drawable-mdpi/icon_gray.png
new file mode 100644
index 00000000..4b347d88
Binary files /dev/null and b/App_Resources/Android/src/main/res/drawable-mdpi/icon_gray.png differ
diff --git a/App_Resources/Android/src/main/res/drawable-mdpi/logo.png b/App_Resources/Android/src/main/res/drawable-mdpi/logo.png
deleted file mode 100644
index 169514f5..00000000
Binary files a/App_Resources/Android/src/main/res/drawable-mdpi/logo.png and /dev/null differ
diff --git a/App_Resources/Android/src/main/res/drawable-mdpi/logo_dark.png b/App_Resources/Android/src/main/res/drawable-mdpi/logo_dark.png
new file mode 100644
index 00000000..9a1173eb
Binary files /dev/null and b/App_Resources/Android/src/main/res/drawable-mdpi/logo_dark.png differ
diff --git a/App_Resources/Android/src/main/res/drawable-mdpi/logo_white.png b/App_Resources/Android/src/main/res/drawable-mdpi/logo_white.png
new file mode 100644
index 00000000..0a0f110c
Binary files /dev/null and b/App_Resources/Android/src/main/res/drawable-mdpi/logo_white.png differ
diff --git a/App_Resources/Android/src/main/res/drawable-nodpi/splash_screen.xml b/App_Resources/Android/src/main/res/drawable-nodpi/splash_screen.xml
index 9ff0f1ab..c4c6975f 100644
--- a/App_Resources/Android/src/main/res/drawable-nodpi/splash_screen.xml
+++ b/App_Resources/Android/src/main/res/drawable-nodpi/splash_screen.xml
@@ -2,10 +2,10 @@
-
-
+
-
-
+
diff --git a/App_Resources/Android/src/main/res/drawable-xhdpi/background.png b/App_Resources/Android/src/main/res/drawable-xhdpi/background.png
deleted file mode 100644
index 144c5c47..00000000
Binary files a/App_Resources/Android/src/main/res/drawable-xhdpi/background.png and /dev/null differ
diff --git a/App_Resources/Android/src/main/res/drawable-xhdpi/ic_launcher.png b/App_Resources/Android/src/main/res/drawable-xhdpi/ic_launcher.png
new file mode 100755
index 00000000..d05868b9
Binary files /dev/null and b/App_Resources/Android/src/main/res/drawable-xhdpi/ic_launcher.png differ
diff --git a/App_Resources/Android/src/main/res/drawable-xhdpi/ic_launcher_background.png b/App_Resources/Android/src/main/res/drawable-xhdpi/ic_launcher_background.png
new file mode 100755
index 00000000..75ba0aa1
Binary files /dev/null and b/App_Resources/Android/src/main/res/drawable-xhdpi/ic_launcher_background.png differ
diff --git a/App_Resources/Android/src/main/res/drawable-xhdpi/ic_launcher_foreground.png b/App_Resources/Android/src/main/res/drawable-xhdpi/ic_launcher_foreground.png
new file mode 100755
index 00000000..fe43cf35
Binary files /dev/null and b/App_Resources/Android/src/main/res/drawable-xhdpi/ic_launcher_foreground.png differ
diff --git a/App_Resources/Android/src/main/res/drawable-xhdpi/icon.png b/App_Resources/Android/src/main/res/drawable-xhdpi/icon.png
deleted file mode 100644
index be251781..00000000
Binary files a/App_Resources/Android/src/main/res/drawable-xhdpi/icon.png and /dev/null differ
diff --git a/App_Resources/Android/src/main/res/drawable-xhdpi/icon_gray.png b/App_Resources/Android/src/main/res/drawable-xhdpi/icon_gray.png
new file mode 100644
index 00000000..b7b9413a
Binary files /dev/null and b/App_Resources/Android/src/main/res/drawable-xhdpi/icon_gray.png differ
diff --git a/App_Resources/Android/src/main/res/drawable-xhdpi/logo.png b/App_Resources/Android/src/main/res/drawable-xhdpi/logo.png
deleted file mode 100644
index 66d10c42..00000000
Binary files a/App_Resources/Android/src/main/res/drawable-xhdpi/logo.png and /dev/null differ
diff --git a/App_Resources/Android/src/main/res/drawable-xhdpi/logo_dark.png b/App_Resources/Android/src/main/res/drawable-xhdpi/logo_dark.png
new file mode 100644
index 00000000..e6aecd77
Binary files /dev/null and b/App_Resources/Android/src/main/res/drawable-xhdpi/logo_dark.png differ
diff --git a/App_Resources/Android/src/main/res/drawable-xhdpi/logo_white.png b/App_Resources/Android/src/main/res/drawable-xhdpi/logo_white.png
new file mode 100644
index 00000000..b4e53700
Binary files /dev/null and b/App_Resources/Android/src/main/res/drawable-xhdpi/logo_white.png differ
diff --git a/App_Resources/Android/src/main/res/drawable-xxhdpi/background.png b/App_Resources/Android/src/main/res/drawable-xxhdpi/background.png
deleted file mode 100644
index 52c6977e..00000000
Binary files a/App_Resources/Android/src/main/res/drawable-xxhdpi/background.png and /dev/null differ
diff --git a/App_Resources/Android/src/main/res/drawable-xxhdpi/ic_launcher.png b/App_Resources/Android/src/main/res/drawable-xxhdpi/ic_launcher.png
new file mode 100755
index 00000000..76366d66
Binary files /dev/null and b/App_Resources/Android/src/main/res/drawable-xxhdpi/ic_launcher.png differ
diff --git a/App_Resources/Android/src/main/res/drawable-xxhdpi/ic_launcher_background.png b/App_Resources/Android/src/main/res/drawable-xxhdpi/ic_launcher_background.png
new file mode 100755
index 00000000..d8cd163c
Binary files /dev/null and b/App_Resources/Android/src/main/res/drawable-xxhdpi/ic_launcher_background.png differ
diff --git a/App_Resources/Android/src/main/res/drawable-xxhdpi/ic_launcher_foreground.png b/App_Resources/Android/src/main/res/drawable-xxhdpi/ic_launcher_foreground.png
new file mode 100755
index 00000000..c367edab
Binary files /dev/null and b/App_Resources/Android/src/main/res/drawable-xxhdpi/ic_launcher_foreground.png differ
diff --git a/App_Resources/Android/src/main/res/drawable-xxhdpi/icon.png b/App_Resources/Android/src/main/res/drawable-xxhdpi/icon.png
deleted file mode 100644
index 63c9182a..00000000
Binary files a/App_Resources/Android/src/main/res/drawable-xxhdpi/icon.png and /dev/null differ
diff --git a/App_Resources/Android/src/main/res/drawable-xxhdpi/icon_gray.png b/App_Resources/Android/src/main/res/drawable-xxhdpi/icon_gray.png
new file mode 100644
index 00000000..dd68262f
Binary files /dev/null and b/App_Resources/Android/src/main/res/drawable-xxhdpi/icon_gray.png differ
diff --git a/App_Resources/Android/src/main/res/drawable-xxhdpi/logo.png b/App_Resources/Android/src/main/res/drawable-xxhdpi/logo.png
deleted file mode 100644
index 65b73844..00000000
Binary files a/App_Resources/Android/src/main/res/drawable-xxhdpi/logo.png and /dev/null differ
diff --git a/App_Resources/Android/src/main/res/drawable-xxhdpi/logo_dark.png b/App_Resources/Android/src/main/res/drawable-xxhdpi/logo_dark.png
new file mode 100644
index 00000000..79c58b80
Binary files /dev/null and b/App_Resources/Android/src/main/res/drawable-xxhdpi/logo_dark.png differ
diff --git a/App_Resources/Android/src/main/res/drawable-xxhdpi/logo_white.png b/App_Resources/Android/src/main/res/drawable-xxhdpi/logo_white.png
new file mode 100644
index 00000000..3cdfb61d
Binary files /dev/null and b/App_Resources/Android/src/main/res/drawable-xxhdpi/logo_white.png differ
diff --git a/App_Resources/Android/src/main/res/drawable-xxxhdpi/background.png b/App_Resources/Android/src/main/res/drawable-xxxhdpi/background.png
deleted file mode 100644
index cadc2180..00000000
Binary files a/App_Resources/Android/src/main/res/drawable-xxxhdpi/background.png and /dev/null differ
diff --git a/App_Resources/Android/src/main/res/drawable-xxxhdpi/ic_launcher.png b/App_Resources/Android/src/main/res/drawable-xxxhdpi/ic_launcher.png
new file mode 100755
index 00000000..533f56ed
Binary files /dev/null and b/App_Resources/Android/src/main/res/drawable-xxxhdpi/ic_launcher.png differ
diff --git a/App_Resources/Android/src/main/res/drawable-xxxhdpi/ic_launcher_background.png b/App_Resources/Android/src/main/res/drawable-xxxhdpi/ic_launcher_background.png
new file mode 100755
index 00000000..eac4c1bb
Binary files /dev/null and b/App_Resources/Android/src/main/res/drawable-xxxhdpi/ic_launcher_background.png differ
diff --git a/App_Resources/Android/src/main/res/drawable-xxxhdpi/ic_launcher_foreground.png b/App_Resources/Android/src/main/res/drawable-xxxhdpi/ic_launcher_foreground.png
new file mode 100755
index 00000000..3ebdbd61
Binary files /dev/null and b/App_Resources/Android/src/main/res/drawable-xxxhdpi/ic_launcher_foreground.png differ
diff --git a/App_Resources/Android/src/main/res/drawable-xxxhdpi/icon.png b/App_Resources/Android/src/main/res/drawable-xxxhdpi/icon.png
deleted file mode 100644
index accf6acc..00000000
Binary files a/App_Resources/Android/src/main/res/drawable-xxxhdpi/icon.png and /dev/null differ
diff --git a/App_Resources/Android/src/main/res/drawable-xxxhdpi/icon_gray.png b/App_Resources/Android/src/main/res/drawable-xxxhdpi/icon_gray.png
new file mode 100644
index 00000000..8a4b65e9
Binary files /dev/null and b/App_Resources/Android/src/main/res/drawable-xxxhdpi/icon_gray.png differ
diff --git a/App_Resources/Android/src/main/res/drawable-xxxhdpi/logo.png b/App_Resources/Android/src/main/res/drawable-xxxhdpi/logo.png
deleted file mode 100644
index b31b8bbd..00000000
Binary files a/App_Resources/Android/src/main/res/drawable-xxxhdpi/logo.png and /dev/null differ
diff --git a/App_Resources/Android/src/main/res/drawable-xxxhdpi/logo_dark.png b/App_Resources/Android/src/main/res/drawable-xxxhdpi/logo_dark.png
new file mode 100644
index 00000000..8369bc3c
Binary files /dev/null and b/App_Resources/Android/src/main/res/drawable-xxxhdpi/logo_dark.png differ
diff --git a/App_Resources/Android/src/main/res/drawable-xxxhdpi/logo_white.png b/App_Resources/Android/src/main/res/drawable-xxxhdpi/logo_white.png
new file mode 100644
index 00000000..7b34f6ba
Binary files /dev/null and b/App_Resources/Android/src/main/res/drawable-xxxhdpi/logo_white.png differ
diff --git a/app/app.scss b/app/app.scss
index ae6a154c..4e33785d 100644
--- a/app/app.scss
+++ b/app/app.scss
@@ -13,8 +13,7 @@ $grayL1: #e0e0e0;
$grayL2: #eeeeee;
$grayL3: #f5f5f5;
$grayL4: #fafafa;
-$orange400: #ff7043;
-$orange500: #ff5722;
+$orange: #ff5722;
// Global SCSS styling
// @see https://docs.nativescript.org/ui/styling
@@ -78,7 +77,7 @@ Page {
}
.fab-button {
color: white;
- background-color: $orange500;
+ background-color: $orange;
}
.option,
.icon-option {
@@ -97,13 +96,14 @@ Page {
}
.instruction {
border-color: $grayD4;
- }
+ } // prettier-ignore
.text-btn,
.group-header,
.category,
ActivityIndicator,
- .selected-sd-item {
- color: $orange500;
+ .selected-sd-item,
+ Progress {
+ color: $orange;
}
}
.ns-dark {
@@ -130,8 +130,7 @@ Page {
.recipeText,
.overviewItem,
.recipeItem,
- .option-highlight,
- .appIconContainer {
+ .option-highlight {
background: $grayD3;
}
.sd-item,
@@ -144,13 +143,13 @@ Page {
}
.fab-button {
color: #111;
- background: $orange400;
+ background: $orange;
}
.option,
.icon-option {
.bx,
.option-info {
- color: $grayL2;
+ color: $gray;
}
}
.imageHolder {
@@ -164,12 +163,14 @@ Page {
.instruction {
border-color: $grayL4;
}
+ // prettier-ignore
.text-btn,
.group-header,
.category,
ActivityIndicator,
- .selected-sd-item {
- color: $orange400;
+ .selected-sd-item,
+ Progress {
+ color: $orange;
}
}
// -----------------------------
@@ -200,6 +201,10 @@ TabView {
margin-left: 8;
padding: 0 8;
}
+// prettier-ignore
+.progressContainer{
+ width: 100%;
+}
// -----------------------------
// ActionBar
ActionBar {
@@ -260,6 +265,10 @@ ActionBar {
color: $gray;
margin-bottom: 16;
}
+ .logo {
+ width: 64;
+ margin-bottom: 16;
+ }
.title {
font-size: 20;
text-align: center;
@@ -280,7 +289,7 @@ RadListView {
}
.recipeItem {
margin: 8 16;
- border-radius: 6;
+ border-radius: 4;
.recipeInfo {
margin: 4;
.category,
@@ -304,10 +313,10 @@ RadListView {
.imageHolder {
vertical-alignment: center;
&.card {
- border-radius: 6 0 0 6;
+ border-radius: 4 0 0 4;
// prettier-ignore
Image {
- border-radius: 6 0 0 6;
+ border-radius: 4 0 0 4;
}
}
}
@@ -316,7 +325,7 @@ RadListView {
background: #c62828;
color: #fff;
height: 128;
- border-radius: 6;
+ border-radius: 4;
}
// -----------------------------
// SETTINGS
@@ -333,22 +342,18 @@ RadListView {
}
.option-info {
font-size: 12;
+ line-height: 4;
}
}
}
// -----------------------------
// ABOUT
.appIconContainer {
- padding: 32 0;
+ background: $orange;
+ padding: 16 0;
width: 100%;
.appIcon {
- width: 56;
- height: 56;
- margin: 0 6 0 0;
- padding: 0;
- }
- .appName {
- font-size: 24;
+ height: 128;
}
}
// -----------------------------
@@ -376,7 +381,7 @@ RadListView {
.overviewContainer {
margin-top: 12;
.overviewItem {
- border-radius: 6;
+ border-radius: 4;
padding: 8;
margin: 8;
android-elevation: 1;
@@ -405,7 +410,7 @@ RadListView {
padding-top: 4%;
margin: 0 0 0 8;
text-align: center;
- border-radius: 100;
+ border-radius: 99;
&.square {
clip-path: polygon(
5% 0,
@@ -437,7 +442,7 @@ RadListView {
.referenceItem {
padding: 14 16;
margin: 8 16 8;
- border-radius: 6;
+ border-radius: 4;
font-size: 16;
.bx {
font-size: 24;
@@ -452,7 +457,7 @@ RadListView {
line-height: 6;
padding: 16;
margin: 8 16 8;
- border-radius: 6;
+ border-radius: 4;
}
}
// -----------------------------
diff --git a/app/components/About.vue b/app/components/About.vue
index d7ab282a..04806916 100644
--- a/app/components/About.vue
+++ b/app/components/About.vue
@@ -19,12 +19,7 @@
orientation="horizontal"
class="appIconContainer"
>
-
-
+
@@ -98,6 +93,7 @@ export default {
data() {
return {
viewIsScrolled: false,
+ appTheme: "Light",
}
},
methods: {
diff --git a/app/components/App.vue b/app/components/App.vue
index 99573acb..fe27a2ed 100644
--- a/app/components/App.vue
+++ b/app/components/App.vue
@@ -105,6 +105,7 @@
:showDrawer="showDrawer"
:hijackGlobalBackEvent="hijackGlobalBackEvent"
:releaseGlobalBackEvent="releaseGlobalBackEvent"
+ :openAppSettingsPage="openAppSettingsPage"
/>
@@ -117,6 +118,7 @@ import {
Utils,
ApplicationSettings,
AndroidApplication,
+ Application,
} from "@nativescript/core"
import Theme from "@nativescript/theme"
@@ -286,6 +288,7 @@ export default {
restartApp: this.restartApp,
hijackGlobalBackEvent: this.hijackGlobalBackEvent,
releaseGlobalBackEvent: this.releaseGlobalBackEvent,
+ openAppSettingsPage: this.openAppSettingsPage,
},
backstackVisible: false,
})
@@ -326,6 +329,18 @@ export default {
)
android.os.Process.killProcess(android.os.Process.myPid())
},
+ openAppSettingsPage() {
+ const intent = new android.content.Intent(
+ android.provider.Settings.ACTION_APPLICATION_DETAILS_SETTINGS
+ )
+ intent.addCategory(android.content.Intent.CATEGORY_DEFAULT)
+ intent.setData(
+ android.net.Uri.parse(
+ "package:" + Application.android.context.getPackageName()
+ )
+ )
+ Application.android.foregroundActivity.startActivity(intent)
+ },
showDrawer() {
this.$refs.drawer.nativeView.showDrawer()
},
diff --git a/app/components/EditRecipe.vue b/app/components/EditRecipe.vue
index 2093ef8d..1dd119b2 100644
--- a/app/components/EditRecipe.vue
+++ b/app/components/EditRecipe.vue
@@ -28,7 +28,6 @@
scrollBarIndicatorVisible="false"
>
-
-
-
-
-
-
{
this.blockModal = false
if (action) {
- this.imagePicker()
+ this.permissionCheck(
+ this.imagePickerPermissionConfirmation,
+ this.imagePicker
+ )
} else if (action != null) {
this.recipeContent.imageSrc = null
this.releaseBackEvent()
}
})
} else {
- this.imagePicker()
+ this.permissionCheck(
+ this.imagePickerPermissionConfirmation,
+ this.imagePicker
+ )
+ }
+ },
+ imagePickerPermissionConfirmation() {
+ return this.$showModal(ConfirmDialog, {
+ props: {
+ title: "Grant permission",
+ description:
+ "EnRecipes requires storage and camera permission in order to set recipe photo.",
+ cancelButtonText: "NOT NOW",
+ okButtonText: "CONTINUE",
+ },
+ })
+ },
+ permissionCheck(confirmation, action) {
+ if (!ApplicationSettings.getBoolean("storagePermissionAsked", false)) {
+ confirmation().then((e) => {
+ if (e) {
+ Permissions.request("camera").then((res) => {
+ let status = res[Object.keys(res)[0]]
+ if (status === "authorized") action()
+ if (status === "never_ask_again")
+ ApplicationSettings.setBoolean("storagePermissionAsked", true)
+ if (status === "denied")
+ Toast.makeText("Permission denied").show()
+ })
+ }
+ })
+ } else {
+ Permissions.check("camera").then((res) => {
+ if (res[0] !== "authorized") {
+ confirmation().then((e) => {
+ e && this.openAppSettingsPage()
+ })
+ } else {
+ Permissions.request("storage").then((res) => {
+ let status = res[Object.keys(res)[0]]
+ if (status !== "authorized") {
+ confirmation().then((e) => {
+ e && this.openAppSettingsPage()
+ })
+ } else action()
+ })
+ }
+ })
}
},
imagePicker() {
@@ -541,6 +587,7 @@ export default {
},
})
mediafilepicker.on("getFiles", (image) => {
+ ApplicationSettings.setBoolean("storagePermissionAsked", true)
vm.recipeContent.imageSrc = image.object.get("results")[0].file
})
},
@@ -611,7 +658,10 @@ export default {
},
imageSaveOperation() {
let imgSavedToPath = path.join(
- knownFolders.documents().getFolder("EnRecipes").path,
+ knownFolders
+ .documents()
+ .getFolder("EnRecipes")
+ .getFolder("Images").path,
`${this.getRandomID()}.jpg`
)
let workerService = new WorkerService()
diff --git a/app/components/EnRecipes.vue b/app/components/EnRecipes.vue
index 752c9f20..56394645 100644
--- a/app/components/EnRecipes.vue
+++ b/app/components/EnRecipes.vue
@@ -76,6 +76,8 @@
v-if="recipe.imageSrc"
:src="recipe.imageSrc"
stretch="aspectFill"
+ decodeWidth="112"
+ decodeHeight="112"
/>