2020-10-21 17:54:45 +00:00
|
|
|
<template>
|
2021-02-28 15:10:26 +00:00
|
|
|
<Page>
|
|
|
|
<StackLayout class="dialogContainer" :class="appTheme">
|
|
|
|
<Label
|
|
|
|
class="er dialogIcon"
|
|
|
|
:backgroundColor="bgColor"
|
|
|
|
:color="iconColor"
|
|
|
|
:text="icon[helpIcon]"
|
|
|
|
/>
|
|
|
|
<Label class="dialogTitle orkm" :text="`${title}` | L" textWrap="true" />
|
|
|
|
<Label
|
|
|
|
v-if="description"
|
|
|
|
class="dialogDescription"
|
|
|
|
:text="description"
|
|
|
|
textWrap="true"
|
|
|
|
/>
|
|
|
|
<GridLayout rows="auto" columns="*, auto, auto" class="actionsContainer">
|
|
|
|
<MDButton
|
|
|
|
v-if="cancelButtonText"
|
|
|
|
variant="text"
|
|
|
|
col="1"
|
|
|
|
class="action orkm"
|
|
|
|
:text="`${cancelButtonText}` | L"
|
|
|
|
@tap="$modal.close(false)"
|
|
|
|
/>
|
|
|
|
<MDButton
|
|
|
|
variant="text"
|
|
|
|
col="2"
|
|
|
|
class="action orkm"
|
|
|
|
:text="`${okButtonText}` | L"
|
|
|
|
@tap="$modal.close(true)"
|
|
|
|
/>
|
|
|
|
</GridLayout>
|
|
|
|
</StackLayout>
|
|
|
|
</Page>
|
2020-10-21 17:54:45 +00:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2021-02-28 15:10:26 +00:00
|
|
|
import { Application } from "@nativescript/core";
|
|
|
|
import { mapState } from "vuex";
|
2020-10-21 17:54:45 +00:00
|
|
|
export default {
|
2021-02-28 15:10:26 +00:00
|
|
|
props: [
|
|
|
|
"title",
|
|
|
|
"description",
|
|
|
|
"cancelButtonText",
|
|
|
|
"okButtonText",
|
|
|
|
"helpIcon",
|
|
|
|
"bgColor",
|
|
|
|
],
|
2020-10-24 18:02:35 +00:00
|
|
|
computed: {
|
2021-02-28 15:10:26 +00:00
|
|
|
...mapState(["icon"]),
|
2020-11-10 18:28:48 +00:00
|
|
|
appTheme() {
|
2021-02-28 15:10:26 +00:00
|
|
|
return Application.systemAppearance();
|
2020-10-24 18:02:35 +00:00
|
|
|
},
|
2021-01-13 05:02:48 +00:00
|
|
|
isLightMode() {
|
2021-02-28 15:10:26 +00:00
|
|
|
return this.appTheme == "light";
|
2021-01-13 05:02:48 +00:00
|
|
|
},
|
|
|
|
iconColor() {
|
2021-02-28 15:10:26 +00:00
|
|
|
return this.isLightMode ? "#f0f0f0" : "#1A1A1A";
|
2020-11-10 18:28:48 +00:00
|
|
|
},
|
2020-10-22 18:36:50 +00:00
|
|
|
},
|
2021-02-28 15:10:26 +00:00
|
|
|
};
|
2020-10-21 17:54:45 +00:00
|
|
|
</script>
|