インスタンス情報に統計追加したり
This commit is contained in:
		
							parent
							
								
									882a81636d
								
							
						
					
					
						commit
						8c0490fef1
					
				|  | @ -1,5 +1,6 @@ | ||||||
| _lang_: "日本語" | _lang_: "日本語" | ||||||
| 
 | 
 | ||||||
|  | headlineMisskey: "ノートでつながるネットワーク" | ||||||
| introMisskey: "ようこそ!Misskeyは、オープンソースの分散型マイクロブログサービスです。\n「ノート」を作成して、いま起こっていることを共有したり、あなたについて皆に発信しよう📡\n「リアクション」機能で、皆のノートに素早く反応を追加することもできます👍\n新しい世界を探検しよう🚀" | introMisskey: "ようこそ!Misskeyは、オープンソースの分散型マイクロブログサービスです。\n「ノート」を作成して、いま起こっていることを共有したり、あなたについて皆に発信しよう📡\n「リアクション」機能で、皆のノートに素早く反応を追加することもできます👍\n新しい世界を探検しよう🚀" | ||||||
| monthAndDay: "{month}月 {day}日" | monthAndDay: "{month}月 {day}日" | ||||||
| search: "検索" | search: "検索" | ||||||
|  | @ -674,6 +675,8 @@ reloadToApplySetting: "設定はページリロード後に反映されます。 | ||||||
| showTitlebar: "タイトルバーを表示する" | showTitlebar: "タイトルバーを表示する" | ||||||
| clearCache: "キャッシュをクリア" | clearCache: "キャッシュをクリア" | ||||||
| onlineUsersCount: "{n}人がオンライン" | onlineUsersCount: "{n}人がオンライン" | ||||||
|  | nUsers: "{n}ユーザー" | ||||||
|  | nNotes: "{n}ノート" | ||||||
| 
 | 
 | ||||||
| _aboutMisskey: | _aboutMisskey: | ||||||
|   about: "Misskeyはsyuiloによって2014年から開発されている、オープンソースのソフトウェアです。" |   about: "Misskeyはsyuiloによって2014年から開発されている、オープンソースのソフトウェアです。" | ||||||
|  |  | ||||||
										
											Binary file not shown.
										
									
								
							| Before Width: | Height: | Size: 9.2 KiB After Width: | Height: | Size: 9.2 KiB | 
|  | @ -23,6 +23,18 @@ | ||||||
| 	</FormGroup> | 	</FormGroup> | ||||||
| 
 | 
 | ||||||
| 	<FormLink v-if="meta.tosUrl" :to="meta.tosUrl" external>{{ $ts.tos }}</FormLink> | 	<FormLink v-if="meta.tosUrl" :to="meta.tosUrl" external>{{ $ts.tos }}</FormLink> | ||||||
|  | 
 | ||||||
|  | 	<FormGroup v-if="stats"> | ||||||
|  | 		<template #label>{{ $ts.statistics }}</template> | ||||||
|  | 		<FormKeyValueView> | ||||||
|  | 			<template #key>{{ $ts.users }}</template> | ||||||
|  | 			<template #value>{{ number(stats.originalUsersCount) }}</template> | ||||||
|  | 		</FormKeyValueView> | ||||||
|  | 		<FormKeyValueView> | ||||||
|  | 			<template #key>{{ $ts.notes }}</template> | ||||||
|  | 			<template #value>{{ number(stats.originalNotesCount) }}</template> | ||||||
|  | 		</FormKeyValueView> | ||||||
|  | 	</FormGroup> | ||||||
| </FormBase> | </FormBase> | ||||||
| </template> | </template> | ||||||
| 
 | 
 | ||||||
|  | @ -35,6 +47,7 @@ import FormBase from '@/components/form/base.vue'; | ||||||
| import FormGroup from '@/components/form/group.vue'; | import FormGroup from '@/components/form/group.vue'; | ||||||
| import FormKeyValueView from '@/components/form/key-value-view.vue'; | import FormKeyValueView from '@/components/form/key-value-view.vue'; | ||||||
| import * as os from '@/os'; | import * as os from '@/os'; | ||||||
|  | import number from '@/filters/number'; | ||||||
| 
 | 
 | ||||||
| export default defineComponent({ | export default defineComponent({ | ||||||
| 	components: { | 	components: { | ||||||
|  | @ -52,7 +65,7 @@ export default defineComponent({ | ||||||
| 			}, | 			}, | ||||||
| 			version, | 			version, | ||||||
| 			instanceName, | 			instanceName, | ||||||
| 			serverInfo: null, | 			stats: null, | ||||||
| 			faInfoCircle | 			faInfoCircle | ||||||
| 		} | 		} | ||||||
| 	}, | 	}, | ||||||
|  | @ -62,6 +75,16 @@ export default defineComponent({ | ||||||
| 			return this.$instance; | 			return this.$instance; | ||||||
| 		}, | 		}, | ||||||
| 	}, | 	}, | ||||||
|  | 
 | ||||||
|  | 	created() { | ||||||
|  | 		os.api('stats').then(stats => { | ||||||
|  | 			this.stats = stats; | ||||||
|  | 		}); | ||||||
|  | 	}, | ||||||
|  | 
 | ||||||
|  | 	methods: { | ||||||
|  | 		number | ||||||
|  | 	} | ||||||
| }); | }); | ||||||
| </script> | </script> | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue