-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c94c3db
commit 5fa6d3b
Showing
5 changed files
with
205 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<script setup lang="ts"> | ||
import AccountCreation from '@/components/account/new/AccountCreation.vue'; | ||
import { IonNav } from '@ionic/vue'; | ||
import { provide, ref } from 'vue'; | ||
const nav = ref<HTMLIonNavElement>(); | ||
provide('nav', nav); | ||
</script> | ||
|
||
<template> | ||
<ion-nav ref="nav" :root="AccountCreation"> | ||
|
||
</ion-nav> | ||
</template> | ||
|
||
<style scoped> | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<script setup lang="ts"> | ||
import ModalLayout from '@/components/layout/ModalLayout.vue'; | ||
import { IonLabel, IonSegment, IonSegmentButton } from '@ionic/vue'; | ||
import { ref } from 'vue'; | ||
const currentSegment = ref<'qrcode'|'entering'>('qrcode'); | ||
</script> | ||
|
||
<template> | ||
<ModalLayout title="Create an account"> | ||
<template #title> | ||
<ion-segment v-model="currentSegment"> | ||
<ion-segment-button value="qrcode"> | ||
<ion-label>QRCode</ion-label> | ||
</ion-segment-button> | ||
<ion-segment-button value="entering"> | ||
<ion-label>Entering</ion-label> | ||
</ion-segment-button> | ||
</ion-segment> | ||
</template> | ||
|
||
|
||
</ModalLayout> | ||
</template> | ||
|
||
<style scoped> | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
<script setup lang="ts"> | ||
import { faTimes } from '@fortawesome/free-solid-svg-icons'; | ||
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'; | ||
import { | ||
IonButton, | ||
IonButtons, | ||
IonContent, | ||
IonFooter, | ||
IonHeader, | ||
IonPage, | ||
IonTitle, | ||
IonToolbar, | ||
modalController, | ||
} from '@ionic/vue'; | ||
import { inject, nextTick, ref } from 'vue'; | ||
defineProps<{ | ||
title?: string; | ||
}>(); | ||
const nav: any = inject('nav'); | ||
// Nav | ||
const canGoBack = ref(false); | ||
if (nav) { | ||
nextTick(async () => { | ||
canGoBack.value = await nav.value.$el.canGoBack(); | ||
}); | ||
} | ||
async function back() { | ||
if (!nav) { | ||
return; | ||
} | ||
nav.value.$el.pop(); | ||
} | ||
function dismissModal() { | ||
modalController.dismiss(); | ||
} | ||
</script> | ||
|
||
<template> | ||
<ion-page> | ||
<ion-header> | ||
<ion-toolbar> | ||
<div slot="start"> | ||
<ion-buttons v-if="canGoBack"> | ||
<ion-button @click="back">返回</ion-button> | ||
</ion-buttons> | ||
</div> | ||
|
||
<slot name="title"> | ||
<ion-title v-if="title" class="">{{ title }}</ion-title> | ||
</slot> | ||
|
||
<ion-buttons slot="end"> | ||
<ion-button @click="dismissModal" size="large" color="dark"> | ||
<FontAwesomeIcon :icon="faTimes" /> | ||
</ion-button> | ||
</ion-buttons> | ||
</ion-toolbar> | ||
</ion-header> | ||
|
||
<ion-content> | ||
<slot></slot> | ||
</ion-content> | ||
|
||
<ion-footer v-if="$slots.footer"> | ||
<ion-toolbar> | ||
<slot name="footer"></slot> | ||
</ion-toolbar> | ||
</ion-footer> | ||
</ion-page> | ||
</template> | ||
|
||
<style scoped> | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters