From e8005c8d3a6edf2c8cdce3fe098fb9acff8a57c6 Mon Sep 17 00:00:00 2001
From: syuilo <Syuilotan@yahoo.co.jp>
Date: Sun, 28 Nov 2021 20:07:37 +0900
Subject: client: refine ui

---
 packages/client/src/pages/settings/security.vue | 84 +++++++++++++++++--------
 1 file changed, 57 insertions(+), 27 deletions(-)

(limited to 'packages/client/src/pages/settings/security.vue')

diff --git a/packages/client/src/pages/settings/security.vue b/packages/client/src/pages/settings/security.vue
index c18edd80b0..33dc299f5d 100644
--- a/packages/client/src/pages/settings/security.vue
+++ b/packages/client/src/pages/settings/security.vue
@@ -1,45 +1,61 @@
 <template>
-<FormBase>
-	<X2fa/>
-	<FormLink to="/settings/2fa"><template #icon><i class="fas fa-mobile-alt"></i></template>{{ $ts.twoStepAuthentication }}</FormLink>
-	<FormButton primary @click="change()">{{ $ts.changePassword }}</FormButton>
-	<FormPagination :pagination="pagination">
+<div class="_formRoot">
+	<FormSection>
+		<template #label>{{ $ts.password }}</template>
+		<FormButton primary @click="change()">{{ $ts.changePassword }}</FormButton>
+	</FormSection>
+
+	<FormSection>
+		<template #label>{{ $ts.twoStepAuthentication }}</template>
+		<X2fa/>
+	</FormSection>
+	
+	<FormSection>
 		<template #label>{{ $ts.signinHistory }}</template>
-		<template #default="{items}">
-			<div v-for="item in items" :key="item.id" class="_debobigegoPanel timnmucd">
-				<header>
-					<i v-if="item.success" class="fas fa-check icon succ"></i>
-					<i v-else class="fas fa-times-circle icon fail"></i>
-					<code class="ip _monospace">{{ item.ip }}</code>
-					<MkTime :time="item.createdAt" class="time"/>
-				</header>
-			</div>
-		</template>
-	</FormPagination>
-	<FormGroup>
-		<FormButton danger @click="regenerateToken"><i class="fas fa-sync-alt"></i> {{ $ts.regenerateLoginToken }}</FormButton>
-		<template #caption>{{ $ts.regenerateLoginTokenDescription }}</template>
-	</FormGroup>
-</FormBase>
+		<FormPagination :pagination="pagination">
+			<template #default="{items}">
+				<div>
+					<div v-for="item in items" :key="item.id" v-panel class="timnmucd">
+						<header>
+							<i v-if="item.success" class="fas fa-check icon succ"></i>
+							<i v-else class="fas fa-times-circle icon fail"></i>
+							<code class="ip _monospace">{{ item.ip }}</code>
+							<MkTime :time="item.createdAt" class="time"/>
+						</header>
+					</div>
+				</div>
+			</template>
+		</FormPagination>
+	</FormSection>
+
+	<FormSection>
+		<FormSlot>
+			<FormButton danger @click="regenerateToken"><i class="fas fa-sync-alt"></i> {{ $ts.regenerateLoginToken }}</FormButton>
+			<template #caption>{{ $ts.regenerateLoginTokenDescription }}</template>
+		</FormSlot>
+	</FormSection>
+</div>
 </template>
 
 <script lang="ts">
 import { defineComponent } from 'vue';
-import FormBase from '@/components/debobigego/base.vue';
+import FormSection from '@/components/form/section.vue';
 import FormLink from '@/components/debobigego/link.vue';
-import FormGroup from '@/components/debobigego/group.vue';
-import FormButton from '@/components/debobigego/button.vue';
-import FormPagination from '@/components/debobigego/pagination.vue';
+import FormSlot from '@/components/form/slot.vue';
+import FormButton from '@/components/ui/button.vue';
+import FormPagination from '@/components/form/pagination.vue';
+import X2fa from './2fa.vue';
 import * as os from '@/os';
 import * as symbols from '@/symbols';
 
 export default defineComponent({
 	components: {
-		FormBase,
+		FormSection,
 		FormLink,
 		FormButton,
 		FormPagination,
-		FormGroup,
+		FormSlot,
+		X2fa,
 	},
 	
 	emits: ['info'],
@@ -115,6 +131,20 @@ export default defineComponent({
 .timnmucd {
 	padding: 16px;
 
+	&:first-child {
+		border-top-left-radius: 6px;
+		border-top-right-radius: 6px;
+	}
+
+	&:last-child {
+		border-bottom-left-radius: 6px;
+		border-bottom-right-radius: 6px;
+	}
+
+	&:not(:last-child) {
+		border-bottom: solid 0.5px var(--divider);
+	}
+
 	> header {
 		display: flex;
 		align-items: center;
-- 
cgit v1.2.3-freya

