From 27e0d0fe91f6a05ef1fdd9eaf9bf564466c14eb9 Mon Sep 17 00:00:00 2001 From: vishnuraghavb Date: Tue, 13 Apr 2021 00:55:14 +0530 Subject: [PATCH] removed socialShare plugin --- app/components/ViewRecipe.vue | 10 ++++------ app/i18n/en-GB.default.json | 4 +++- package-lock.json | 32 ++++++++++++++------------------ package.json | 1 - 4 files changed, 21 insertions(+), 26 deletions(-) diff --git a/app/components/ViewRecipe.vue b/app/components/ViewRecipe.vue index 21cd28e4..ff5a3360 100644 --- a/app/components/ViewRecipe.vue +++ b/app/components/ViewRecipe.vue @@ -250,7 +250,6 @@ import { Screen, CoreTypes, } from "@nativescript/core"; -import * as SocialShare from "@nativescript/social-share"; import { localize } from "@nativescript/localize"; const intl = require("nativescript-intl"); import { mapActions, mapState } from "vuex"; @@ -547,9 +546,9 @@ export default { }).then((result) => { switch (result) { case "pht": - ImageSource.fromFile(this.recipe.imageSrc).then((res) => { - SocialShare.shareImage(res, "Share recipe photo using"); - }); + ImageSource.fromFile(this.recipe.imageSrc).then((res) => + utils.shareImage(res, localize("srpu")) + ); break; case "rec": this.shareRecipe(); @@ -614,8 +613,7 @@ export default { } let sharenote = "\n" + localize("appCrd"); shareContent += sharenote; - // SocialShare.shareText(shareContent, "Share recipe using"); - utils.shareText(shareContent, "Share recipe using"); + utils.shareText(shareContent, localize("sru")); }, // DATA HANDLERS diff --git a/app/i18n/en-GB.default.json b/app/i18n/en-GB.default.json index 7ab83727..b034bc2d 100644 --- a/app/i18n/en-GB.default.json +++ b/app/i18n/en-GB.default.json @@ -309,5 +309,7 @@ "yld": "Yield", "swm": "Start week on Monday", "expip": "Export in progress", - "impip": "Import in progress" + "impip": "Import in progress", + "srpu": "Share recipe photo using...", + "sru": "Share recipe using..." } diff --git a/package-lock.json b/package-lock.json index ce4c8932..1488b4dc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,7 +12,6 @@ "@nativescript-community/ui-collectionview": "^4.0.29", "@nativescript/core": "~8.0.1", "@nativescript/localize": "^5.0.4", - "@nativescript/social-share": "^2.0.4", "@triniwiz/nativescript-accelerometer": "^4.0.3", "@triniwiz/nativescript-couchbase": "^1.2.2", "@triniwiz/nativescript-image-zoom": "^4.0.0", @@ -409,11 +408,6 @@ "sprintf-js": "^1.1.1" } }, - "node_modules/@nativescript/social-share": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@nativescript/social-share/-/social-share-2.0.4.tgz", - "integrity": "sha512-fP/lK/wMmHDmWo4Uq8gG/mpsgUjT+/y7Qc+IdCgiqQkgWQtgXTM7H1ecemMYD9dCZo+gZ5UyOXE/E23ZN0DBAg==" - }, "node_modules/@nativescript/webpack": { "version": "5.0.0-beta.5", "resolved": "https://registry.npmjs.org/@nativescript/webpack/-/webpack-5.0.0-beta.5.tgz", @@ -5041,11 +5035,6 @@ "sprintf-js": "^1.1.1" } }, - "@nativescript/social-share": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@nativescript/social-share/-/social-share-2.0.4.tgz", - "integrity": "sha512-fP/lK/wMmHDmWo4Uq8gG/mpsgUjT+/y7Qc+IdCgiqQkgWQtgXTM7H1ecemMYD9dCZo+gZ5UyOXE/E23ZN0DBAg==" - }, "@nativescript/webpack": { "version": "5.0.0-beta.5", "resolved": "https://registry.npmjs.org/@nativescript/webpack/-/webpack-5.0.0-beta.5.tgz", @@ -5439,7 +5428,8 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-1.0.2.tgz", "integrity": "sha512-3OBzV2fBGZ5TBfdW50cha1lHDVf9vlvRXnjpVbJBa20pSZQaSkMJZiwA8V2vD9ogyeXn8nU5s5A6mHyf5jhMzA==", - "dev": true + "dev": true, + "requires": {} }, "@webpack-cli/info": { "version": "1.2.3", @@ -5454,7 +5444,8 @@ "version": "1.3.1", "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-1.3.1.tgz", "integrity": "sha512-0qXvpeYO6vaNoRBI52/UsbcaBydJCggoBBnIo/ovQQdn6fug0BgwsjorV1hVS7fMqGVTZGcVxv8334gjmbj5hw==", - "dev": true + "dev": true, + "requires": {} }, "@xtuc/ieee754": { "version": "1.2.0", @@ -5496,7 +5487,8 @@ "version": "3.5.2", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", - "dev": true + "dev": true, + "requires": {} }, "ansi-colors": { "version": "4.1.1", @@ -6501,7 +6493,8 @@ "version": "5.1.0", "resolved": "https://registry.npmjs.org/icss-utils/-/icss-utils-5.1.0.tgz", "integrity": "sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA==", - "dev": true + "dev": true, + "requires": {} }, "ignore": { "version": "5.1.8", @@ -7233,7 +7226,8 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.0.0.tgz", "integrity": "sha512-bdHleFnP3kZ4NYDhuGlVK+CMrQ/pqUm8bx/oGL93K6gVwiclvX5x0n76fYMKuIGKzlABOy13zsvqjb0f92TEXw==", - "dev": true + "dev": true, + "requires": {} }, "postcss-modules-local-by-default": { "version": "4.0.0", @@ -7967,7 +7961,8 @@ "vuex": { "version": "3.6.2", "resolved": "https://registry.npmjs.org/vuex/-/vuex-3.6.2.tgz", - "integrity": "sha512-ETW44IqCgBpVomy520DT5jf8n0zoCac+sxWnn+hMe/CzaSejb/eVw2YToiXYX+Ex/AuHHia28vWTq4goAexFbw==" + "integrity": "sha512-ETW44IqCgBpVomy520DT5jf8n0zoCac+sxWnn+hMe/CzaSejb/eVw2YToiXYX+Ex/AuHHia28vWTq4goAexFbw==", + "requires": {} }, "watchpack": { "version": "2.1.1", @@ -8173,7 +8168,8 @@ "version": "7.4.4", "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.4.tgz", "integrity": "sha512-Qm8k8ojNQIMx7S+Zp8u/uHOx7Qazv3Yv4q68MiWWWOJhiwG5W3x7iqmRtJo8xxrciZUY4vRxUTJCKuRnF28ZZw==", - "dev": true + "dev": true, + "requires": {} }, "xmlbuilder": { "version": "9.0.7", diff --git a/package.json b/package.json index b3f0c057..7f4cf418 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,6 @@ "@nativescript-community/ui-collectionview": "^4.0.29", "@nativescript/core": "~8.0.1", "@nativescript/localize": "^5.0.4", - "@nativescript/social-share": "^2.0.4", "@triniwiz/nativescript-accelerometer": "^4.0.3", "@triniwiz/nativescript-couchbase": "^1.2.2", "@triniwiz/nativescript-image-zoom": "^4.0.0",