merged notes text and url

This commit is contained in:
Vishnu Raghav B 2020-12-02 15:16:25 +05:30
parent 06890b19d3
commit fb6045b520
33 changed files with 570 additions and 544 deletions

View file

@ -38,6 +38,19 @@ EnRecipes is an easy to use, privacy-friendly digital cookbook that lets you cre
Lots of interesting features on the way... Lots of interesting features on the way...
## Screenshots
![EnRecipes](fastlane/metadata/android/en-US/images/phoneScreenshots/1.png)
![Delete Recipe](fastlane/metadata/android/en-US/images/phoneScreenshots/2.png)
![View Recipe](fastlane/metadata/android/en-US/images/phoneScreenshots/3.png)
![Ingredients](fastlane/metadata/android/en-US/images/phoneScreenshots/4.png)
![Edit Recipe](fastlane/metadata/android/en-US/images/phoneScreenshots/5.png)
![Share](fastlane/metadata/android/en-US/images/phoneScreenshots/6.png)
![Side Drawer](fastlane/metadata/android/en-US/images/phoneScreenshots/7.png)
![Mealplanner](fastlane/metadata/android/en-US/images/phoneScreenshots/8.png)
![About](fastlane/metadata/android/en-US/images/phoneScreenshots/9.png)
![Dark Mode](fastlane/metadata/android/en-US/images/phoneScreenshots/10.png)
## Credits ## Credits
This app was written in my free time using NativeScript. I would like to thank all those people who helped me understand the concepts during the process and my special thanks to the NativeScript team and the community. This app was written in my free time using NativeScript. I would like to thank all those people who helped me understand the concepts during the process and my special thanks to the NativeScript team and the community.

View file

@ -383,29 +383,7 @@
</StackLayout> </StackLayout>
</GridLayout> </GridLayout>
<StackLayout v-else padding="8 0 80"> <StackLayout v-else padding="8 0 80">
<StackLayout v-for="(note, index) in recipe.notes" :key="index"> <StackLayout @loaded="createNotes"></StackLayout>
<GridLayout
v-if="isValidURL(note)"
columns="auto, *"
class="urlCard"
androidElevation="1"
>
<MDRipple
colSpan="2"
@longPress="copyURL(note)"
@tap="openURL(note)"
/>
<Label col="0" class="bx linkIcon" :text="icon.source" />
<Label
col="1"
verticalAlignment="center"
class="link"
:text="note"
textWrap="false"
/>
</GridLayout>
<Label v-else class="textCard" :text="note" textWrap="true" />
</StackLayout>
</StackLayout> </StackLayout>
</ScrollView> </ScrollView>
</TabContentItem> </TabContentItem>
@ -438,6 +416,10 @@ import {
Utils, Utils,
GestureTypes, GestureTypes,
Tabs, Tabs,
Span,
FormattedString,
Label,
StackLayout,
} from "@nativescript/core" } from "@nativescript/core"
import { Feedback, FeedbackType, FeedbackPosition } from "nativescript-feedback" import { Feedback, FeedbackType, FeedbackPosition } from "nativescript-feedback"
import * as Toast from "nativescript-toast" import * as Toast from "nativescript-toast"
@ -723,13 +705,44 @@ export default {
openURL(url) { openURL(url) {
Utils.openUrl(url) Utils.openUrl(url)
}, },
copyURL(url) { createNote(note) {
const clipboard = Utils.ad const vm = this
.getApplicationContext() let regex = /(https?:\/\/[^\s]+)/g
.getSystemService(android.content.Context.CLIPBOARD_SERVICE) let label = new Label()
const clip = android.content.ClipData.newPlainText("URl", url) label.class = "textCard"
clipboard.setPrimaryClip(clip) label.textWrap = true
Toast.makeText("URL Copied").show() let dispDensity = Utils.layout.getDisplayDensity()
let formattedString = new FormattedString()
let textArray = note.split(regex)
console.log(dispDensity)
function createSpan(text, isUrl) {
let span = new Span()
span.text = text
span.fontSize = 16
if (isUrl) {
span.textDecoration = "underline"
span.color = "#ff5200"
span.on("linkTap", () => Utils.openUrl(text))
}
formattedString.spans.push(span)
}
textArray.forEach((text) => {
createSpan(text, regex.test(text))
})
label.formattedText = formattedString
return label
},
createNotes(args) {
const stack = args.object
if (!stack.getChildrenCount()) {
this.recipe.notes.forEach((note) => {
stack.addChild(this.createNote(note))
})
}
}, },
}, },
created() { created() {

Binary file not shown.

After

Width:  |  Height:  |  Size: 239 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 239 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 229 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 595 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 584 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 305 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

View file

@ -1,8 +1,8 @@
{ {
"time": "Tue Dec 01 2020 14:41:20 GMT+0530 (India Standard Time)", "time": "Wed Dec 02 2020 15:14:23 GMT+0530 (India Standard Time)",
"nativePlatformStatus": "3", "nativePlatformStatus": "3",
"changesRequireBuild": true, "changesRequireBuild": true,
"projectFileHash": "7e76fcc579c6b048fb6a6099b9da9192f2f9ca58fe7cc504fe760ca454b8d7ae", "projectFileHash": "7e76fcc579c6b048fb6a6099b9da9192f2f9ca58fe7cc504fe760ca454b8d7ae",
"changesRequireBuildTime": "Tue Dec 01 2020 14:41:20 GMT+0530 (India Standard Time)", "changesRequireBuildTime": "Wed Dec 02 2020 15:14:23 GMT+0530 (India Standard Time)",
"release": true "release": true
} }

View file

@ -1,4 +1,4 @@
#Tue Dec 01 14:41:24 IST 2020 #Wed Dec 02 15:14:34 IST 2020
/mnt/82e5ff15-70b8-44a5-bb66-55688fc2381f/Freelance/Projects/WIP/EnRecipes/Developement/EnRecipes/platforms/android/app/src/main/res/drawable-anydpi-v26/ic_launcher.xml=/mnt/82e5ff15-70b8-44a5-bb66-55688fc2381f/Freelance/Projects/WIP/EnRecipes/Developement/EnRecipes/platforms/android/app/build/intermediates/res/merged/release/drawable-anydpi-v26_ic_launcher.xml.flat /mnt/82e5ff15-70b8-44a5-bb66-55688fc2381f/Freelance/Projects/WIP/EnRecipes/Developement/EnRecipes/platforms/android/app/src/main/res/drawable-anydpi-v26/ic_launcher.xml=/mnt/82e5ff15-70b8-44a5-bb66-55688fc2381f/Freelance/Projects/WIP/EnRecipes/Developement/EnRecipes/platforms/android/app/build/intermediates/res/merged/release/drawable-anydpi-v26_ic_launcher.xml.flat
/mnt/82e5ff15-70b8-44a5-bb66-55688fc2381f/Freelance/Projects/WIP/EnRecipes/Developement/EnRecipes/platforms/android/app/src/main/res/drawable-mdpi/logo.png=/mnt/82e5ff15-70b8-44a5-bb66-55688fc2381f/Freelance/Projects/WIP/EnRecipes/Developement/EnRecipes/platforms/android/app/build/intermediates/res/merged/release/drawable-mdpi_logo.png.flat /mnt/82e5ff15-70b8-44a5-bb66-55688fc2381f/Freelance/Projects/WIP/EnRecipes/Developement/EnRecipes/platforms/android/app/src/main/res/drawable-mdpi/logo.png=/mnt/82e5ff15-70b8-44a5-bb66-55688fc2381f/Freelance/Projects/WIP/EnRecipes/Developement/EnRecipes/platforms/android/app/build/intermediates/res/merged/release/drawable-mdpi_logo.png.flat
/mnt/82e5ff15-70b8-44a5-bb66-55688fc2381f/Freelance/Projects/WIP/EnRecipes/Developement/EnRecipes/platforms/android/app/src/main/res/drawable-xxhdpi/share.png=/mnt/82e5ff15-70b8-44a5-bb66-55688fc2381f/Freelance/Projects/WIP/EnRecipes/Developement/EnRecipes/platforms/android/app/build/intermediates/res/merged/release/drawable-xxhdpi_share.png.flat /mnt/82e5ff15-70b8-44a5-bb66-55688fc2381f/Freelance/Projects/WIP/EnRecipes/Developement/EnRecipes/platforms/android/app/src/main/res/drawable-xxhdpi/share.png=/mnt/82e5ff15-70b8-44a5-bb66-55688fc2381f/Freelance/Projects/WIP/EnRecipes/Developement/EnRecipes/platforms/android/app/build/intermediates/res/merged/release/drawable-xxhdpi_share.png.flat

View file

@ -1,4 +1,4 @@
#Tue Dec 01 14:41:56 IST 2020 #Wed Dec 02 15:15:07 IST 2020
base.0=/mnt/82e5ff15-70b8-44a5-bb66-55688fc2381f/Freelance/Projects/WIP/EnRecipes/Developement/EnRecipes/platforms/android/app/build/intermediates/dex/release/out/classes.dex base.0=/mnt/82e5ff15-70b8-44a5-bb66-55688fc2381f/Freelance/Projects/WIP/EnRecipes/Developement/EnRecipes/platforms/android/app/build/intermediates/dex/release/out/classes.dex
path.0=classes.dex path.0=classes.dex
renamed.0=classes.dex renamed.0=classes.dex

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1,4 +1,4 @@
{ {
"prepareTime": "Tue Dec 01 2020 14:41:20 GMT+0530 (India Standard Time)", "prepareTime": "Wed Dec 02 2020 15:14:23 GMT+0530 (India Standard Time)",
"buildTime": "Tue Dec 01 2020 14:51:26 GMT+0530 (India Standard Time)" "buildTime": "Wed Dec 02 2020 15:15:20 GMT+0530 (India Standard Time)"
} }

View file

@ -30,8 +30,8 @@
"/mnt/82e5ff15-70b8-44a5-bb66-55688fc2381f/Freelance/Projects/WIP/EnRecipes/Developement/EnRecipes/platforms/android/app/src/main/assets/app/App_Resources/Android/src/main/res/drawable-mdpi/share.png": "5f4976a18eeacc8509e7bd71d9cc2dae051af149", "/mnt/82e5ff15-70b8-44a5-bb66-55688fc2381f/Freelance/Projects/WIP/EnRecipes/Developement/EnRecipes/platforms/android/app/src/main/assets/app/App_Resources/Android/src/main/res/drawable-mdpi/share.png": "5f4976a18eeacc8509e7bd71d9cc2dae051af149",
"/mnt/82e5ff15-70b8-44a5-bb66-55688fc2381f/Freelance/Projects/WIP/EnRecipes/Developement/EnRecipes/platforms/android/app/src/main/assets/app/App_Resources/Android/src/main/res/drawable-xhdpi/camera.png": "56e67577db1d4ddd5cf78371d523559a9054c477", "/mnt/82e5ff15-70b8-44a5-bb66-55688fc2381f/Freelance/Projects/WIP/EnRecipes/Developement/EnRecipes/platforms/android/app/src/main/assets/app/App_Resources/Android/src/main/res/drawable-xhdpi/camera.png": "56e67577db1d4ddd5cf78371d523559a9054c477",
"/mnt/82e5ff15-70b8-44a5-bb66-55688fc2381f/Freelance/Projects/WIP/EnRecipes/Developement/EnRecipes/platforms/android/app/src/main/assets/app/App_Resources/Android/src/main/res/drawable-xhdpi/check.png": "4e786675947040b6a0f5f0f9d83a4f9f0822a094", "/mnt/82e5ff15-70b8-44a5-bb66-55688fc2381f/Freelance/Projects/WIP/EnRecipes/Developement/EnRecipes/platforms/android/app/src/main/assets/app/App_Resources/Android/src/main/res/drawable-xhdpi/check.png": "4e786675947040b6a0f5f0f9d83a4f9f0822a094",
"/mnt/82e5ff15-70b8-44a5-bb66-55688fc2381f/Freelance/Projects/WIP/EnRecipes/Developement/EnRecipes/platforms/android/app/src/main/assets/app/App_Resources/Android/src/main/res/drawable-xhdpi/ic_launcher.png": "681a23ee3bcbb5c744cb80f224a4baedad3f0075",
"/mnt/82e5ff15-70b8-44a5-bb66-55688fc2381f/Freelance/Projects/WIP/EnRecipes/Developement/EnRecipes/platforms/android/app/src/main/assets/app/App_Resources/Android/src/main/res/drawable-xhdpi/detail.png": "ec0da35c95f4773c8c26e70647b6a974103e9944", "/mnt/82e5ff15-70b8-44a5-bb66-55688fc2381f/Freelance/Projects/WIP/EnRecipes/Developement/EnRecipes/platforms/android/app/src/main/assets/app/App_Resources/Android/src/main/res/drawable-xhdpi/detail.png": "ec0da35c95f4773c8c26e70647b6a974103e9944",
"/mnt/82e5ff15-70b8-44a5-bb66-55688fc2381f/Freelance/Projects/WIP/EnRecipes/Developement/EnRecipes/platforms/android/app/src/main/assets/app/App_Resources/Android/src/main/res/drawable-xhdpi/ic_launcher.png": "681a23ee3bcbb5c744cb80f224a4baedad3f0075",
"/mnt/82e5ff15-70b8-44a5-bb66-55688fc2381f/Freelance/Projects/WIP/EnRecipes/Developement/EnRecipes/platforms/android/app/src/main/assets/app/App_Resources/Android/src/main/res/drawable-xhdpi/ic_launcher_foreground.png": "58375b6039b0bf0fc65802a162d84cba8f6fb368", "/mnt/82e5ff15-70b8-44a5-bb66-55688fc2381f/Freelance/Projects/WIP/EnRecipes/Developement/EnRecipes/platforms/android/app/src/main/assets/app/App_Resources/Android/src/main/res/drawable-xhdpi/ic_launcher_foreground.png": "58375b6039b0bf0fc65802a162d84cba8f6fb368",
"/mnt/82e5ff15-70b8-44a5-bb66-55688fc2381f/Freelance/Projects/WIP/EnRecipes/Developement/EnRecipes/platforms/android/app/src/main/assets/app/App_Resources/Android/src/main/res/drawable-xhdpi/logo.png": "d55b18eecf5018f9a3adc6ebcc24d309dbed4493", "/mnt/82e5ff15-70b8-44a5-bb66-55688fc2381f/Freelance/Projects/WIP/EnRecipes/Developement/EnRecipes/platforms/android/app/src/main/assets/app/App_Resources/Android/src/main/res/drawable-xhdpi/logo.png": "d55b18eecf5018f9a3adc6ebcc24d309dbed4493",
"/mnt/82e5ff15-70b8-44a5-bb66-55688fc2381f/Freelance/Projects/WIP/EnRecipes/Developement/EnRecipes/platforms/android/app/src/main/assets/app/App_Resources/Android/src/main/res/drawable-xhdpi/photo.png": "7a9b1b430fe189e3a918743044bcb77a932b6ccf", "/mnt/82e5ff15-70b8-44a5-bb66-55688fc2381f/Freelance/Projects/WIP/EnRecipes/Developement/EnRecipes/platforms/android/app/src/main/assets/app/App_Resources/Android/src/main/res/drawable-xhdpi/photo.png": "7a9b1b430fe189e3a918743044bcb77a932b6ccf",
@ -60,7 +60,7 @@
"/mnt/82e5ff15-70b8-44a5-bb66-55688fc2381f/Freelance/Projects/WIP/EnRecipes/Developement/EnRecipes/platforms/android/app/src/main/assets/app/package.json": "b5c23d281c6a3d2b571a570721d60bbce6c9be29", "/mnt/82e5ff15-70b8-44a5-bb66-55688fc2381f/Freelance/Projects/WIP/EnRecipes/Developement/EnRecipes/platforms/android/app/src/main/assets/app/package.json": "b5c23d281c6a3d2b571a570721d60bbce6c9be29",
"/mnt/82e5ff15-70b8-44a5-bb66-55688fc2381f/Freelance/Projects/WIP/EnRecipes/Developement/EnRecipes/platforms/android/app/src/main/assets/app/runtime.js": "46d6b98a238721f34ab9bc68b90c0cdea00153cf", "/mnt/82e5ff15-70b8-44a5-bb66-55688fc2381f/Freelance/Projects/WIP/EnRecipes/Developement/EnRecipes/platforms/android/app/src/main/assets/app/runtime.js": "46d6b98a238721f34ab9bc68b90c0cdea00153cf",
"/mnt/82e5ff15-70b8-44a5-bb66-55688fc2381f/Freelance/Projects/WIP/EnRecipes/Developement/EnRecipes/platforms/android/app/src/main/assets/app/vendor.js.LICENSE.txt": "fe0ae576f8684fbe78596ad84eddafc528dba50c", "/mnt/82e5ff15-70b8-44a5-bb66-55688fc2381f/Freelance/Projects/WIP/EnRecipes/Developement/EnRecipes/platforms/android/app/src/main/assets/app/vendor.js.LICENSE.txt": "fe0ae576f8684fbe78596ad84eddafc528dba50c",
"/mnt/82e5ff15-70b8-44a5-bb66-55688fc2381f/Freelance/Projects/WIP/EnRecipes/Developement/EnRecipes/platforms/android/app/src/main/assets/app/bundle.js": "71670860a95aee20ecdf4e9a027b88acc06128a1", "/mnt/82e5ff15-70b8-44a5-bb66-55688fc2381f/Freelance/Projects/WIP/EnRecipes/Developement/EnRecipes/platforms/android/app/src/main/assets/app/bundle.js": "fba7dc9d3f0f793674dd940f45ea1284b61bca82",
"/mnt/82e5ff15-70b8-44a5-bb66-55688fc2381f/Freelance/Projects/WIP/EnRecipes/Developement/EnRecipes/platforms/android/app/src/main/assets/app/fonts/boxicons.ttf": "6c9944326ed3c901afcb78a9ed07906f04f9cbb2", "/mnt/82e5ff15-70b8-44a5-bb66-55688fc2381f/Freelance/Projects/WIP/EnRecipes/Developement/EnRecipes/platforms/android/app/src/main/assets/app/fonts/boxicons.ttf": "6c9944326ed3c901afcb78a9ed07906f04f9cbb2",
"/mnt/82e5ff15-70b8-44a5-bb66-55688fc2381f/Freelance/Projects/WIP/EnRecipes/Developement/EnRecipes/platforms/android/app/src/main/assets/app/vendor.js": "a7ef05c23f9043860c8ecc71b3aaabdfe0b2e7f4" "/mnt/82e5ff15-70b8-44a5-bb66-55688fc2381f/Freelance/Projects/WIP/EnRecipes/Developement/EnRecipes/platforms/android/app/src/main/assets/app/vendor.js": "bed05d377b4836523b46f38e23bb10cea7a7fa5f"
} }

View file

@ -176,7 +176,7 @@ document.getElementById(id).style.display = 'none';
<span class="mdl-layout-title">Lint Report: No errors or warnings</span> <span class="mdl-layout-title">Lint Report: No errors or warnings</span>
<div class="mdl-layout-spacer"></div> <div class="mdl-layout-spacer"></div>
<nav class="mdl-navigation mdl-layout--large-screen-only"> <nav class="mdl-navigation mdl-layout--large-screen-only">
Check performed at Tue Dec 01 14:51:25 IST 2020 </nav> Check performed at Wed Dec 02 15:15:01 IST 2020 </nav>
</div> </div>
</header> </header>
<div class="mdl-layout__drawer"> <div class="mdl-layout__drawer">

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff