2023-12-01 15:29:26 +01:00
|
|
|
<script setup>
|
|
|
|
import systemService from '@/services/systemService'
|
|
|
|
import { UseColorMode } from '@vueuse/components'
|
2024-01-19 17:06:16 +01:00
|
|
|
import CopyButton from '@/components/CopyButton.vue'
|
2023-12-01 15:29:26 +01:00
|
|
|
|
|
|
|
const $2fauth = inject('2fauth')
|
|
|
|
const router = useRouter()
|
|
|
|
|
|
|
|
const returnTo = router.options.history.state.back
|
|
|
|
const infos = ref()
|
|
|
|
const listInfos = ref(null)
|
|
|
|
const userPreferences = ref(false)
|
|
|
|
const listUserPreferences = ref(null)
|
|
|
|
const adminSettings = ref(false)
|
|
|
|
const listAdminSettings = ref(null)
|
|
|
|
|
|
|
|
onMounted(() => {
|
|
|
|
systemService.getSystemInfos({returnError: true}).then(response => {
|
|
|
|
infos.value = response.data.common
|
|
|
|
|
|
|
|
if (response.data.admin_settings) {
|
|
|
|
adminSettings.value = response.data.admin_settings
|
|
|
|
}
|
|
|
|
|
|
|
|
if (response.data.user_preferences) {
|
|
|
|
userPreferences.value = response.data.user_preferences
|
|
|
|
}
|
|
|
|
})
|
|
|
|
.catch(() => {
|
|
|
|
infos.value = null
|
|
|
|
})
|
|
|
|
})
|
|
|
|
</script>
|
|
|
|
|
2022-07-21 15:48:23 +02:00
|
|
|
<template>
|
2023-12-01 15:29:26 +01:00
|
|
|
<ResponsiveWidthWrapper>
|
|
|
|
<h1 class="title has-text-grey-dark">{{ $t('commons.about') }}</h1>
|
2022-10-12 12:56:16 +02:00
|
|
|
<p class="block">
|
2023-12-01 15:29:26 +01:00
|
|
|
<UseColorMode v-slot="{ mode }">
|
|
|
|
<span :class="mode == 'dark' ? 'has-text-white':'has-text-black'"><span class="is-size-5">2FAuth</span> v{{ $2fauth.version }}</span>
|
|
|
|
</UseColorMode>
|
|
|
|
<br />
|
2022-10-12 12:56:16 +02:00
|
|
|
{{ $t('commons.2fauth_teaser')}}
|
|
|
|
</p>
|
2023-02-01 17:21:55 +01:00
|
|
|
<img class="about-logo" src="logo.svg" alt="2FAuth logo" />
|
2023-03-10 16:01:23 +01:00
|
|
|
<p class="block">
|
2022-10-12 12:56:16 +02:00
|
|
|
©Bubka <a class="is-size-7" href="https://github.com/Bubka/2FAuth/blob/master/LICENSE">AGPL-3.0 license</a>
|
|
|
|
</p>
|
|
|
|
<h2 class="title is-5 has-text-grey-light">
|
|
|
|
{{ $t('commons.resources') }}
|
|
|
|
</h2>
|
|
|
|
<div class="buttons">
|
2023-12-01 15:29:26 +01:00
|
|
|
<UseColorMode v-slot="{ mode }">
|
|
|
|
<a class="button" :class="{'is-dark' : mode == 'dark'}" href="https://github.com/Bubka/2FAuth" target="_blank">
|
|
|
|
<span class="icon is-small">
|
|
|
|
<FontAwesomeIcon :icon="['fab', 'github-alt']" />
|
|
|
|
</span>
|
|
|
|
<span>Github</span>
|
|
|
|
</a>
|
|
|
|
<a class="button" :class="{'is-dark' : mode == 'dark'}" href="https://docs.2fauth.app/" target="_blank">
|
|
|
|
<span class="icon is-small">
|
|
|
|
<FontAwesomeIcon :icon="['fas', 'book']" />
|
|
|
|
</span>
|
|
|
|
<span>Docs</span>
|
|
|
|
</a>
|
|
|
|
<a class="button" :class="{'is-dark' : mode == 'dark'}" href="https://demo.2fauth.app/" target="_blank">
|
|
|
|
<span class="icon is-small">
|
|
|
|
<FontAwesomeIcon :icon="['fas', 'flask']" />
|
|
|
|
</span>
|
|
|
|
<span>Demo</span>
|
|
|
|
</a>
|
|
|
|
<a class="button" :class="{'is-dark' : mode == 'dark'}" href="https://docs.2fauth.app/resources/rapidoc.html" target="_blank">
|
|
|
|
<span class="icon is-small">
|
|
|
|
<FontAwesomeIcon :icon="['fas', 'code']" />
|
|
|
|
</span>
|
|
|
|
<span>API</span>
|
|
|
|
</a>
|
|
|
|
</UseColorMode>
|
2022-10-12 12:56:16 +02:00
|
|
|
</div>
|
|
|
|
<h2 class="title is-5 has-text-grey-light">
|
|
|
|
{{ $t('commons.credits') }}
|
|
|
|
</h2>
|
|
|
|
<p class="block">
|
|
|
|
<ul>
|
2023-12-01 15:29:26 +01:00
|
|
|
<li>{{ $t('commons.made_with') }} <a href="https://docs.2fauth.app/credits/">Laravel, Bulma CSS, Vue.js and more</a></li>
|
|
|
|
<li>{{ $t('commons.ui_icons_by') }} <a href="https://fontawesome.com/">Font Awesome</a> <a class="is-size-7" href="https://fontawesome.com/license/free">(CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)</a></li>
|
|
|
|
<li>{{ $t('commons.logos_by') }} <a href="https://2fa.directory/">2FA Directory</a> <a class="is-size-7" href="https://github.com/2factorauth/twofactorauth/blob/master/LICENSE.md">(MIT License)</a></li>
|
2022-10-12 12:56:16 +02:00
|
|
|
</ul>
|
|
|
|
</p>
|
|
|
|
<h2 class="title is-5 has-text-grey-light">
|
|
|
|
{{ $t('commons.environment') }}
|
|
|
|
</h2>
|
2023-12-01 15:29:26 +01:00
|
|
|
<div v-if="infos" class="about-debug box is-family-monospace is-size-7">
|
2024-01-19 17:06:16 +01:00
|
|
|
<CopyButton id="btnCopyEnvVars" :token="listInfos?.innerText" />
|
2023-08-29 09:10:10 +02:00
|
|
|
<ul ref="listInfos" id="listInfos">
|
2022-10-12 12:56:16 +02:00
|
|
|
<li v-for="(value, key) in infos" :value="value" :key="key"><b>{{key}}</b>: {{value}}</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
2023-12-01 15:29:26 +01:00
|
|
|
<div v-else-if="infos === null" class="about-debug box is-family-monospace is-size-7 has-text-warning-dark">
|
|
|
|
{{ $t('errors.error_during_data_fetching') }}
|
|
|
|
</div>
|
|
|
|
<h2 v-if="adminSettings" class="title is-5 has-text-grey-light">
|
2023-03-10 16:01:23 +01:00
|
|
|
{{ $t('settings.admin_settings') }}
|
|
|
|
</h2>
|
2023-12-01 15:29:26 +01:00
|
|
|
<div v-if="adminSettings" class="about-debug box is-family-monospace is-size-7">
|
2024-01-19 17:06:16 +01:00
|
|
|
<CopyButton id="btnCopyAdminSettings" :token="listAdminSettings?.innerText" />
|
2023-08-29 09:10:10 +02:00
|
|
|
<ul ref="listAdminSettings" id="listAdminSettings">
|
2023-03-10 16:01:23 +01:00
|
|
|
<li v-for="(value, setting) in adminSettings" :value="value" :key="setting"><b>{{setting}}</b>: {{value}}</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
2023-12-01 15:29:26 +01:00
|
|
|
<h2 v-if="userPreferences" class="title is-5 has-text-grey-light">
|
2023-03-10 16:01:23 +01:00
|
|
|
{{ $t('settings.user_preferences') }}
|
|
|
|
</h2>
|
2023-12-01 15:29:26 +01:00
|
|
|
<div v-if="userPreferences" class="about-debug box is-family-monospace is-size-7">
|
2024-01-19 17:06:16 +01:00
|
|
|
<CopyButton id="btnCopyUserPreferences" :token="listUserPreferences?.innerText" />
|
2023-08-29 09:10:10 +02:00
|
|
|
<ul ref="listUserPreferences" id="listUserPreferences">
|
2023-03-10 16:01:23 +01:00
|
|
|
<li v-for="(value, preference) in userPreferences" :value="value" :key="preference"><b>{{preference}}</b>: {{value}}</li>
|
|
|
|
</ul>
|
2022-07-21 15:48:23 +02:00
|
|
|
</div>
|
2022-10-12 12:56:16 +02:00
|
|
|
<!-- footer -->
|
2023-12-01 15:29:26 +01:00
|
|
|
<VueFooter :showButtons="true">
|
|
|
|
<ButtonBackCloseCancel :returnTo="{ path: returnTo }" action="back" />
|
|
|
|
</VueFooter>
|
|
|
|
</ResponsiveWidthWrapper>
|
|
|
|
</template>
|