create admin account and show PIN (WIP)
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
parent
0d2ae30b24
commit
6b9394a50a
@ -22,7 +22,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { onMounted, ref, watch } from 'vue'
|
||||
import { onMounted, ref } from 'vue'
|
||||
import { PlayerEdit } from '@/composables/engine.d'
|
||||
import type { Button } from '@/components/admin/PlayerModal'
|
||||
|
||||
|
@ -8,6 +8,12 @@
|
||||
</div>
|
||||
<div class="page-setup__button">
|
||||
<Button @click="createAdminAccount">{{ $t('create admin user') }}</Button>
|
||||
|
||||
<ModalDialog v-if="showAdminAccountCreatedDialog" :no-close-button="true" @close="showAdminAccountCreatedDialog = false">
|
||||
<div class="create-team-dialog__auth-message">{{ $t('pin') }}</div>
|
||||
<div class="create-team-dialog__pin">{{ authcode }}</div>
|
||||
<div class="create-team-dialog__auth-message">{{ $t('remember-and-log-in') }}</div>
|
||||
</ModalDialog>
|
||||
</div>
|
||||
</div>
|
||||
<CopyrightNotice />
|
||||
@ -15,6 +21,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
import useAuth from '@/composables/useAuth'
|
||||
import useI18n from '@/composables/useI18n'
|
||||
|
||||
@ -30,10 +37,17 @@ const { $t } = useI18n({
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
await useAuth().authenticateAndLoadUserInfo(['setup'])
|
||||
|
||||
const createAdminAccount = () => {}
|
||||
const showAdminAccountCreatedDialog = ref(false)
|
||||
const authcode = ref('000000')
|
||||
const createAdminAccount = () => {
|
||||
authcode.value = ''
|
||||
for (var i = 0; i < 6; i++) {
|
||||
authcode.value += '' + Math.floor(Math.floor(Math.random() * 10000) / 100) % 10
|
||||
}
|
||||
showAdminAccountCreatedDialog.value = true
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
Loading…
Reference in New Issue
Block a user