enrecipes/app/components/settings/AppSettings.vue

89 lines
2 KiB
Vue
Raw Normal View History

2021-05-25 14:32:53 +00:00
<template>
2021-06-15 11:04:42 +00:00
<Page @loaded="pgLoad" actionBarHidden="true">
<RGridLayout :rtl="RTL" rows="*, auto" columns="auto, *">
2021-05-25 14:32:53 +00:00
<OptionsList title="Settings" :items="items" :action="navigateTo" />
2021-06-15 11:04:42 +00:00
<GridLayout row="1" class="appbar rtl" rows="*" columns="auto, *">
2021-05-25 14:32:53 +00:00
<Button class="ico" :text="icon.back" @tap="$navigateBack()" />
</GridLayout>
2021-06-18 12:52:03 +00:00
<Label rowSpan="2" class="edge hal rtl" @swipe="swipeBack" />
<Label
rowSpan="2"
colSpan="2"
class="edge har rtl f"
@swipe="swipeBack"
/>
2021-06-15 11:04:42 +00:00
</RGridLayout>
2021-05-25 14:32:53 +00:00
</Page>
</template>
<script lang="ts">
import { Observable } from "@nativescript/core";
2021-06-15 11:04:42 +00:00
import { mapState } from "vuex";
2021-05-25 14:32:53 +00:00
import Interface from "./Interface.vue";
import Options from "./Options.vue";
import Database from "./Database.vue";
import Reset from "./Reset.vue";
import About from "./About.vue";
import OptionsList from "../sub/OptionsList.vue";
export default {
components: { OptionsList },
data() {
return {
items: [
{},
{
type: "list",
icon: "interface",
2021-06-15 11:04:42 +00:00
rtl: 0,
2021-05-25 14:32:53 +00:00
title: "intf",
data: Interface,
},
{
type: "list",
icon: "opts",
2021-06-15 11:04:42 +00:00
rtl: 1,
2021-05-25 14:32:53 +00:00
title: "opts",
data: Options,
},
{
type: "list",
icon: "db",
2021-06-15 11:04:42 +00:00
rtl: 0,
2021-05-25 14:32:53 +00:00
title: "db",
data: Database,
},
{
type: "list",
icon: "reset",
2021-06-15 11:04:42 +00:00
rtl: 1,
2021-05-25 14:32:53 +00:00
title: "rest",
data: Reset,
},
{
type: "list",
icon: "info",
2021-06-15 11:04:42 +00:00
rtl: 0,
2021-05-25 14:32:53 +00:00
title: "About",
data: About,
},
{},
],
};
},
computed: {
2021-06-15 11:04:42 +00:00
...mapState(["icon", "RTL"]),
2021-05-25 14:32:53 +00:00
},
methods: {
2021-06-15 11:04:42 +00:00
pgLoad({ object }) {
2021-05-25 14:32:53 +00:00
object.bindingContext = new Observable();
},
// HELPERS
navigateTo(view) {
this.$navigateTo(view, {
2021-06-15 11:04:42 +00:00
animated: false,
2021-05-25 14:32:53 +00:00
});
},
},
};
</script>