2021-03-21 17:02:04 +00:00
|
|
|
<template>
|
2021-04-01 10:55:35 +00:00
|
|
|
<Page @loaded="onPageLoad" actionBarHidden="true">
|
|
|
|
<GridLayout rows="*, auto" columns="auto, *">
|
|
|
|
<ListView
|
|
|
|
colSpan="2"
|
|
|
|
rowSpan="2"
|
|
|
|
class="options-list"
|
|
|
|
for="item in items"
|
|
|
|
@loaded="listViewLoad"
|
|
|
|
>
|
|
|
|
<v-template if="$index == 0">
|
|
|
|
<Label class="pageTitle" :text="'help' | L" />
|
|
|
|
</v-template>
|
|
|
|
<v-template if="$index == 3">
|
|
|
|
<StackLayout class="listSpace"> </StackLayout>
|
|
|
|
</v-template>
|
2021-03-21 17:02:04 +00:00
|
|
|
<v-template>
|
|
|
|
<GridLayout
|
|
|
|
columns="auto, *"
|
2021-04-01 10:55:35 +00:00
|
|
|
class="option"
|
|
|
|
@touch="touch($event, item.url)"
|
2021-03-21 17:02:04 +00:00
|
|
|
>
|
2021-04-01 10:55:35 +00:00
|
|
|
<Label class="ico" :text="icon[item.icon]" />
|
|
|
|
<Label col="1" :text="item.title | L" class="info" />
|
2021-03-21 17:02:04 +00:00
|
|
|
</GridLayout>
|
|
|
|
</v-template>
|
|
|
|
</ListView>
|
2021-04-01 10:55:35 +00:00
|
|
|
<GridLayout row="1" class="appbar" rows="*" columns="auto, *">
|
|
|
|
<Button
|
|
|
|
class="ico"
|
|
|
|
:text="icon.back"
|
|
|
|
@tap="$navigateBack()"
|
|
|
|
/>
|
|
|
|
</GridLayout>
|
2021-03-21 17:02:04 +00:00
|
|
|
</GridLayout>
|
|
|
|
</Page>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import { Observable, Utils } from "@nativescript/core";
|
|
|
|
import { mapState } from "vuex";
|
|
|
|
|
|
|
|
export default {
|
|
|
|
computed: {
|
|
|
|
...mapState(["icon"]),
|
|
|
|
items() {
|
|
|
|
return [
|
2021-04-01 10:55:35 +00:00
|
|
|
{},
|
2021-03-21 17:02:04 +00:00
|
|
|
{
|
|
|
|
icon: "tg",
|
|
|
|
title: "joinTG",
|
|
|
|
url: "https://t.me/enrecipes",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
icon: "help",
|
|
|
|
title: "guide",
|
|
|
|
url: "https://github.com/vishnuraghavb/EnRecipes/wiki/User-Guide",
|
|
|
|
},
|
2021-04-01 10:55:35 +00:00
|
|
|
{},
|
2021-03-21 17:02:04 +00:00
|
|
|
];
|
|
|
|
},
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
onPageLoad(args) {
|
|
|
|
const page = args.object;
|
|
|
|
page.bindingContext = new Observable();
|
|
|
|
},
|
|
|
|
// HELPERS
|
|
|
|
openURL(url) {
|
|
|
|
Utils.openUrl(url);
|
|
|
|
},
|
2021-04-01 10:55:35 +00:00
|
|
|
touch({ object, action }, url) {
|
|
|
|
object.className = action.match(/down|move/) ? "option fade" : "option";
|
|
|
|
if (action == "up") this.openURL(url);
|
|
|
|
},
|
2021-03-21 17:02:04 +00:00
|
|
|
},
|
|
|
|
};
|
|
|
|
</script>
|