[core] logout on capicitor in drawer

This commit is contained in:
Tim Gröger 2021-11-27 22:36:24 +01:00 committed by Ferdinand Thiessen
parent 02f60335d4
commit acf1816b55
2 changed files with 16 additions and 2 deletions

View File

@ -59,7 +59,8 @@
], ],
"cordova": [ "cordova": [
"iOS >= 13.0", "iOS >= 13.0",
"Android >= 76" "Android >= 76",
"ChromeAndroid >= 76"
] ]
}, },
"engines": { "engines": {

View File

@ -40,7 +40,7 @@
<shortcut-link :shortcut="element" context @delete-shortcut="deleteShortcut" /> <shortcut-link :shortcut="element" context @delete-shortcut="deleteShortcut" />
</template> </template>
</drag> </drag>
<q-btn flat round dense icon="mdi-exit-to-app" @click="logout()" /> <q-btn v-if="!platform.is.capacitor" flat round dense icon="mdi-exit-to-app" @click="logout()" />
</q-toolbar> </q-toolbar>
</q-header> </q-header>
@ -64,6 +64,18 @@
:key="'essential' + index" :key="'essential' + index"
:entry="entry" :entry="entry"
/> />
<div v-if="platform.is.capacitor">
<q-separator />
<q-item clickable tag="a" target="self" @click="logout">
<q-item-section avatar>
<q-icon name="mdi-exit-to-app" />
</q-item-section>
<q-item-section>
<q-item-label>Logout</q-item-label>
</q-item-section>
</q-item>
</div>
</q-drawer> </q-drawer>
<q-page-container> <q-page-container>
<router-view /> <router-view />
@ -201,6 +213,7 @@ export default defineComponent({
shortCuts, shortCuts,
addShortcut, addShortcut,
deleteShortcut, deleteShortcut,
platform: Platform,
}; };
}, },
}); });