Skip to content

Commit

Permalink
Correction vue NFC
Browse files Browse the repository at this point in the history
  • Loading branch information
c4software committed Aug 30, 2019
1 parent 0755fc6 commit d1a0184
Showing 1 changed file with 19 additions and 16 deletions.
35 changes: 19 additions & 16 deletions src/views/Nfc.vue
Original file line number Diff line number Diff line change
@@ -1,38 +1,41 @@
// Require Cordova plugin : phonegap-nfc
// TODO UPDATE
<template>
<v-container text-center>
<span v-if="compatible">
{{$t("nfcText.waitingTag")}}
<br>
<v-dialog v-model="dialog" scrollable>
<v-btn slot="activator">{{$t("nfcText.history")}}</v-btn>

<template v-slot:activator="{ on }">
<v-btn v-on="on">{{$t("nfcText.history")}}</v-btn>
</template>

<v-card>
<v-card-title>{{$t("nfcText.history")}}</v-card-title>
<v-divider></v-divider>
<v-card-text style="height: 300px;">
<v-list v-if="items.length > 0">
<v-list-tile v-for="item in items" v-bind:key="item">
<v-list-tile-content>
<v-list-tile-title v-text="item"></v-list-tile-title>
</v-list-tile-content>
</v-list-tile>
</v-list>
<v-list v-else>
<v-list-tile>
<v-list-tile-content>
<v-list-tile-title v-text="$t('nfcText.noHistory')" class="text-xs-center"></v-list-tile-title>
</v-list-tile-content>
</v-list-tile>
</v-list>
<v-list-item v-for="item in items" v-bind:key="item">
<v-list-item-content>
<v-list-item-title v-text="item"></v-list-item-title>
</v-list-item-content>
</v-list-item>
<v-list-item v-if="items.length === 0">
<v-list-item-content>
<v-list-item-title v-text="$t('nfcText.noHistory')" class="text-center"></v-list-item-title>
</v-list-item-content>
</v-list-item>
</v-card-text>
</v-card>

</v-dialog>
</span>
<v-btn v-on:click="showSettings" v-else-if="nfc_disabled">{{$t("nfcText.showSettings")}}</v-btn>
<v-btn @click="showSettings" v-else-if="nfc_disabled">{{$t("nfcText.showSettings")}}</v-btn>
<span v-else>{{$t("nfcText.notAvailable")}}</span>
</v-container>
</template>


<script>
import {nativeAlert} from "../libs";
Expand Down

0 comments on commit d1a0184

Please sign in to comment.