From 4d9f0b2b31f86af53f3725c2ff142dbb9bdf3872 Mon Sep 17 00:00:00 2001 From: vishnuraghavb Date: Sun, 18 Apr 2021 18:58:25 +0530 Subject: [PATCH] added strings --- app/components/EditRecipe.vue | 2 +- app/components/EnRecipes.vue | 23 +++++++++++++---------- app/components/ViewRecipe.vue | 8 ++++---- app/components/modal/ConfirmDialog.vue | 2 +- app/i18n/en-GB.default.json | 3 ++- 5 files changed, 21 insertions(+), 17 deletions(-) diff --git a/app/components/EditRecipe.vue b/app/components/EditRecipe.vue index a932923e..34aaf6ce 100644 --- a/app/components/EditRecipe.vue +++ b/app/components/EditRecipe.vue @@ -761,7 +761,7 @@ export default { let binarySource = File.fromPath(this.cacheImagePath).readSync(); File.fromPath(recipeImage).writeSync(binarySource); this.recipe.imageSrc = recipeImage; - knownFolders.temp().clear(); + knownFolders.temp().clear() } if (this.recipe.imageSrc) { if ( diff --git a/app/components/EnRecipes.vue b/app/components/EnRecipes.vue index 6065279e..c8b6097b 100644 --- a/app/components/EnRecipes.vue +++ b/app/components/EnRecipes.vue @@ -565,9 +565,6 @@ export default { const window = Application.android.startActivity.getWindow(); const decorView = window.getDecorView(); let sdkv = Device.sdkVersion; - this.appTheme == "Light" - ? decorView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR) - : decorView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_DARK_STATUS_BAR); function setColors(color) { window.setStatusBarColor(new Color(color).android); sdkv >= 27 && window.setNavigationBarColor(new Color(color).android); @@ -584,13 +581,19 @@ export default { break; } if (sdkv >= 27) - this.appTheme == "Light" - ? decorView.setSystemUiVisibility( - View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR - ) - : decorView.setSystemUiVisibility( - View.SYSTEM_UI_FLAG_DARK_NAVIGATION_BAR - ); + decorView.setSystemUiVisibility( + this.appTheme == "Light" + ? View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR | + View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR + : View.SYSTEM_UI_FLAG_DARK_STATUS_BAR | + View.SYSTEM_UI_FLAG_DARK_NAVIGATION_BAR + ); + else + decorView.setSystemUiVisibility( + this.appTheme == "Light" + ? View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR + : View.SYSTEM_UI_FLAG_DARK_STATUS_BAR + ); }, onPageLoad(args) { const page = args.object; diff --git a/app/components/ViewRecipe.vue b/app/components/ViewRecipe.vue index a501fbc6..b8d961d7 100644 --- a/app/components/ViewRecipe.vue +++ b/app/components/ViewRecipe.vue @@ -603,18 +603,18 @@ export default { this.$showModal(ActionDialog, { props: { title: "shr", - list: ["pht", "rec"], + list: ["rec", "pht"], }, }).then((result) => { switch (result) { + case "rec": + this.shareRecipe(); + break; case "pht": ImageSource.fromFile(this.recipe.imageSrc).then((res) => utils.shareImage(res, localize("srpu")) ); break; - case "rec": - this.shareRecipe(); - break; } }); } else { diff --git a/app/components/modal/ConfirmDialog.vue b/app/components/modal/ConfirmDialog.vue index 9b66e042..14ceee36 100644 --- a/app/components/modal/ConfirmDialog.vue +++ b/app/components/modal/ConfirmDialog.vue @@ -45,7 +45,7 @@ export default { }, cancelButtonText: { type: String, - required: true, + required: false, }, okButtonText: { type: String, diff --git a/app/i18n/en-GB.default.json b/app/i18n/en-GB.default.json index 6db442a3..88e4e291 100644 --- a/app/i18n/en-GB.default.json +++ b/app/i18n/en-GB.default.json @@ -287,5 +287,6 @@ "yesterday": "yesterday", "yieldQ": "Yield quantity", "yieldU": "Yield unit", - "yld": "Yield" + "yld": "Yield", + "buto": "Backed up to %s" }