nanka iroiro (#6853)
* wip * Update maps.ts * wip * wip * wip * wip * Update base.vue * wip * wip * wip * wip * Update link.vue * wip * wip * wip * wip * wip * wip * wip * wip * wip * Update privacy.vue * wip * wip * wip * wip * Update range.vue * wip * wip * wip * wip * Update profile.vue * wip * Update a.vue * Update index.vue * wip * Update sidebar.vue * wip * wip * Update account-info.vue * Update a.vue * wip * wip * Update sounds.vue * wip * wip * wip * wip * wip * wip * wip * wip * Update account-info.vue * Update account-info.vue * wip * wip * wip * Update d-persimmon.json5 * wip
This commit is contained in:
@@ -1,29 +1,45 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="_section">
|
||||
<X2fa/>
|
||||
</div>
|
||||
<div class="_section">
|
||||
<MkButton primary @click="change()" full>{{ $t('changePassword') }}</MkButton>
|
||||
</div>
|
||||
<div class="_section">
|
||||
<MkButton class="_vMargin" primary @click="regenerateToken" full><Fa :icon="faSyncAlt"/> {{ $t('regenerateLoginToken') }}</MkButton>
|
||||
<div class="_caption _vMargin" style="padding: 0 6px;">{{ $t('regenerateLoginTokenDescription') }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<FormBase>
|
||||
<X2fa/>
|
||||
<FormLink to="/settings/2fa"><template #icon><Fa :icon="faMobileAlt"/></template>{{ $t('twoStepAuthentication') }}</FormLink>
|
||||
<FormButton primary @click="change()">{{ $t('changePassword') }}</FormButton>
|
||||
<FormPagination :pagination="pagination">
|
||||
<template #label>{{ $t('signinHistory') }}</template>
|
||||
<template #default="{items}">
|
||||
<div class="_formPanel timnmucd" v-for="item in items" :key="item.id">
|
||||
<header>
|
||||
<Fa class="icon succ" :icon="faCheck" v-if="item.success"/>
|
||||
<Fa class="icon fail" :icon="faTimesCircle" v-else/>
|
||||
<code class="ip _monospace">{{ item.ip }}</code>
|
||||
<MkTime :time="item.createdAt" class="time"/>
|
||||
</header>
|
||||
</div>
|
||||
</template>
|
||||
</FormPagination>
|
||||
<FormGroup>
|
||||
<FormButton danger @click="regenerateToken"><Fa :icon="faSyncAlt"/> {{ $t('regenerateLoginToken') }}</FormButton>
|
||||
<template #caption>{{ $t('regenerateLoginTokenDescription') }}</template>
|
||||
</FormGroup>
|
||||
</FormBase>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue';
|
||||
import { faLock, faSyncAlt } from '@fortawesome/free-solid-svg-icons';
|
||||
import MkButton from '@/components/ui/button.vue';
|
||||
import X2fa from './security.2fa.vue';
|
||||
import { faCheck, faTimesCircle, faLock, faSyncAlt, faMobileAlt } from '@fortawesome/free-solid-svg-icons';
|
||||
import FormBase from '@/components/form/base.vue';
|
||||
import FormLink from '@/components/form/link.vue';
|
||||
import FormGroup from '@/components/form/group.vue';
|
||||
import FormButton from '@/components/form/button.vue';
|
||||
import FormPagination from '@/components/form/pagination.vue';
|
||||
import * as os from '@/os';
|
||||
|
||||
export default defineComponent({
|
||||
components: {
|
||||
MkButton,
|
||||
X2fa,
|
||||
FormBase,
|
||||
FormLink,
|
||||
FormButton,
|
||||
FormPagination,
|
||||
FormGroup,
|
||||
},
|
||||
|
||||
emits: ['info'],
|
||||
@@ -34,7 +50,11 @@ export default defineComponent({
|
||||
title: this.$t('security'),
|
||||
icon: faLock
|
||||
},
|
||||
faLock, faSyncAlt
|
||||
pagination: {
|
||||
endpoint: 'i/signin-history',
|
||||
limit: 5,
|
||||
},
|
||||
faLock, faSyncAlt, faCheck, faTimesCircle, faMobileAlt,
|
||||
}
|
||||
},
|
||||
|
||||
@@ -98,3 +118,32 @@ export default defineComponent({
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.timnmucd {
|
||||
padding: 16px;
|
||||
|
||||
> header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
> .icon {
|
||||
width: 1em;
|
||||
margin-right: 0.75em;
|
||||
|
||||
&.succ {
|
||||
color: var(--success);
|
||||
}
|
||||
|
||||
&.fail {
|
||||
color: var(--error);
|
||||
}
|
||||
}
|
||||
|
||||
> .time {
|
||||
margin-left: auto;
|
||||
opacity: 0.7;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
Reference in New Issue
Block a user