mirror of
https://github.com/h44z/wg-portal.git
synced 2026-05-28 08:56:17 +00:00
Initial alpha codebase for version 2 of WireGuard Portal. This version is considered unstable and incomplete (for example, no public REST API)! Use with care! Fixes/Implements the following issues: - OAuth support #154, #1 - New Web UI with internationalisation support #98, #107, #89, #62 - Postgres Support #49 - Improved Email handling #47, #119 - DNS Search Domain support #46 - Bugfixes #94, #48 --------- Co-authored-by: Fabian Wechselberger <wechselbergerf@hotmail.com>
55 lines
1.3 KiB
Vue
55 lines
1.3 KiB
Vue
<script setup>
|
|
import {ref} from "vue";
|
|
import {useI18n} from "vue-i18n";
|
|
|
|
const { t } = useI18n()
|
|
|
|
const title = ref("Default Title")
|
|
const question = ref("Default Question")
|
|
const visible = ref(true)
|
|
|
|
const emit = defineEmits(['no', 'yes'])
|
|
|
|
function showDialog(titleStr, questionStr) {
|
|
visible.value = true
|
|
title.value = titleStr
|
|
question.value = questionStr
|
|
}
|
|
|
|
function yes() {
|
|
visible.value = false
|
|
emit('yes')
|
|
}
|
|
|
|
function no() {
|
|
visible.value = false
|
|
emit('no')
|
|
}
|
|
</script>
|
|
|
|
<template>
|
|
<Teleport to="#dialogs">
|
|
<div v-if="visible" class="modal-backdrop fade show">
|
|
<div class="modal fade show" tabindex="-1">
|
|
<div class="modal-dialog modal-dialog-scrollable" @click.stop="">
|
|
<div class="modal-content" ref="body">
|
|
<div class="modal-header">
|
|
<h5 class="modal-title">{{ title }}</h5>
|
|
</div>
|
|
<div class="modal-body">
|
|
{{ question }}
|
|
</div>
|
|
<div class="modal-footer pt-0 border-top-0">
|
|
<button type="button" class="btn btn-primary" @click="no">{{ $t('general.no') }}</button>
|
|
<button type="button" class="btn btn-success" @click="yes">{{ $t('general.yes') }}</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</Teleport>
|
|
</template>
|
|
|
|
<style>
|
|
</style>
|