feat(front): add login form buttons

funkwhale-ui-buttons
Ciarán Ainsworth 2023-11-12 21:50:20 +00:00 zatwierdzone przez Ciarán Ainsworth
rodzic bcab719010
commit f5c76d5f65
Nie znaleziono w bazie danych klucza dla tego podpisu
2 zmienionych plików z 15 dodań i 10 usunięć

Wyświetl plik

@ -7,6 +7,8 @@ import { useRouter } from 'vue-router'
import { useI18n } from 'vue-i18n'
import { useStore } from '~/store'
import { FwButton } from '@funkwhale/ui'
import PasswordInput from '~/components/forms/PasswordInput.vue'
interface Props {
@ -137,11 +139,13 @@ const submit = async () => {
{{ $t('components.auth.LoginForm.message.redirect', { domain: $store.getters['instance/domain'] }) }}
</p>
</template>
<button
:class="['ui', {'loading': isLoading}, 'right', 'floated', buttonClasses, 'button']"
<fw-button
color="primary"
:is-loading="isLoading"
class="right floated"
type="submit"
>
{{ $t('components.auth.LoginForm.button.login') }}
</button>
</fw-button>
</form>
</template>

Wyświetl plik

@ -1,6 +1,7 @@
<script setup lang="ts">
import { computed } from 'vue'
import { useI18n } from 'vue-i18n'
import { FwButton } from '@funkwhale/ui'
const { t } = useI18n()
const labels = computed(() => ({
@ -24,12 +25,12 @@ const labels = computed(() => ({
<p>
{{ $t('components.auth.Logout.message.loggedIn', { username: $store.state.auth.username }) }}
</p>
<button
class="ui button"
<fw-button
color="secondary"
@click="$store.dispatch('auth/logout')"
>
{{ $t('components.auth.Logout.button.logout') }}
</button>
</fw-button>
</div>
<div
v-else
@ -38,12 +39,12 @@ const labels = computed(() => ({
<h2>
{{ $t('components.auth.Logout.header.unauthenticated') }}
</h2>
<router-link
to="/login"
class="ui button"
<fw-button
color="primary"
@click="$router.push('/login')"
>
{{ $t('components.auth.Logout.link.login') }}
</router-link>
</fw-button>
</div>
</section>
</main>