From 8bb76da6b5efa0360e0860f9a96197684919c36c Mon Sep 17 00:00:00 2001
From: syuilo <syuilotan@yahoo.co.jp>
Date: Sun, 7 Feb 2021 18:11:56 +0900
Subject: [PATCH] Tweak UI

---
 src/client/pages/settings/plugin.manage.vue | 10 +++++-----
 src/client/pages/settings/plugin.vue        |  4 +++-
 src/client/pages/settings/theme.vue         |  4 +++-
 3 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/src/client/pages/settings/plugin.manage.vue b/src/client/pages/settings/plugin.manage.vue
index b6946e30d0..88eeef2bb2 100644
--- a/src/client/pages/settings/plugin.manage.vue
+++ b/src/client/pages/settings/plugin.manage.vue
@@ -1,15 +1,11 @@
 <template>
 <FormBase>
 	<FormGroup v-for="plugin in plugins" :key="plugin.id">
-		<template #label>{{ plugin.name }}</template>
+		<template #label><span style="display: flex;"><b>{{ plugin.name }}</b><span style="margin-left: auto;">v{{ plugin.version }}</span></span></template>
 
 		<FormSwitch :value="plugin.active" @update:value="changeActive(plugin, $event)">{{ $ts.makeActive }}</FormSwitch>
 		<div class="_formItem">
 			<div class="_formPanel" style="padding: 16px;">
-				<div class="_keyValue">
-					<div>{{ $ts.version }}:</div>
-					<div>{{ plugin.version }}</div>
-				</div>
 				<div class="_keyValue">
 					<div>{{ $ts.author }}:</div>
 					<div>{{ plugin.author }}</div>
@@ -18,6 +14,10 @@
 					<div>{{ $ts.description }}:</div>
 					<div>{{ plugin.description }}</div>
 				</div>
+				<div class="_keyValue">
+					<div>{{ $ts.permission }}:</div>
+					<div>{{ plugin.permissions }}</div>
+				</div>
 			</div>
 		</div>
 		<div class="_formItem">
diff --git a/src/client/pages/settings/plugin.vue b/src/client/pages/settings/plugin.vue
index 5bc615b164..fecb99bfe1 100644
--- a/src/client/pages/settings/plugin.vue
+++ b/src/client/pages/settings/plugin.vue
@@ -1,7 +1,7 @@
 <template>
 <FormBase>
 	<FormLink to="/settings/plugin/install"><template #icon><Fa :icon="faDownload"/></template>{{ $ts._plugin.install }}</FormLink>
-	<FormLink to="/settings/plugin/manage"><template #icon><Fa :icon="faFolderOpen"/></template>{{ $ts._plugin.manage }}</FormLink>
+	<FormLink to="/settings/plugin/manage"><template #icon><Fa :icon="faFolderOpen"/></template>{{ $ts._plugin.manage }}<template #suffix>{{ plugins }}</template></FormLink>
 </FormBase>
 </template>
 
@@ -12,6 +12,7 @@ import FormBase from '@/components/form/base.vue';
 import FormGroup from '@/components/form/group.vue';
 import FormLink from '@/components/form/link.vue';
 import * as os from '@/os';
+import { ColdDeviceStorage } from '@/store';
 
 export default defineComponent({
 	components: {
@@ -27,6 +28,7 @@ export default defineComponent({
 				title: this.$ts.plugins,
 				icon: faPlug
 			},
+			plugins: ColdDeviceStorage.get('plugins').length,
 			faPlug, faSave, faTrashAlt, faFolderOpen, faDownload, faCog
 		}
 	},
diff --git a/src/client/pages/settings/theme.vue b/src/client/pages/settings/theme.vue
index ddb5254410..ac57c51df4 100644
--- a/src/client/pages/settings/theme.vue
+++ b/src/client/pages/settings/theme.vue
@@ -58,7 +58,7 @@
 		<FormLink to="/advanced-theme-editor"><template #icon><Fa :icon="faPaintRoller"/></template>{{ $ts._theme.make }} ({{ $ts.advanced }})</FormLink>
 	</FormGroup>
 
-	<FormLink to="/settings/theme/manage"><template #icon><Fa :icon="faFolderOpen"/></template>{{ $ts._theme.manage }}</FormLink>
+	<FormLink to="/settings/theme/manage"><template #icon><Fa :icon="faFolderOpen"/></template>{{ $ts._theme.manage }}<template #suffix>{{ themesCount }}</template></FormLink>
 </FormBase>
 </template>
 
@@ -106,6 +106,7 @@ export default defineComponent({
 		const darkMode = computed(defaultStore.makeGetterSetter('darkMode'));
 		const syncDeviceDarkMode = computed(ColdDeviceStorage.makeGetterSetter('syncDeviceDarkMode'));
 		const wallpaper = ref(localStorage.getItem('wallpaper'));
+		const themesCount = installedThemes.value.length;
 
 		watch(darkTheme, () => {
 			if (defaultStore.state.darkMode) {
@@ -150,6 +151,7 @@ export default defineComponent({
 			lightTheme,
 			darkMode,
 			syncDeviceDarkMode,
+			themesCount,
 			wallpaper,
 			setWallpaper(e) {
 				selectFile(e.currentTarget || e.target, null, false).then(file => {
-- 
GitLab