Compare commits
26 Commits
Author | SHA1 | Date | |
---|---|---|---|
af2d36a3c9 | |||
42a4f92cfa | |||
ccb9ed3489 | |||
773b2aa3d1 | |||
30d5b8d65b | |||
763676a18c | |||
e166ad6780 | |||
034c96d070 | |||
f34f8d304c | |||
944000c05c | |||
52db63bca2 | |||
55dfd9e2a1 | |||
d193cbf2b7 | |||
bdec56a543 | |||
e0a6d9740c | |||
0ce9c057e1 | |||
12a2fdbc20 | |||
57c294bc89 | |||
9758757805 | |||
f9350fa35f | |||
e120da4ecd | |||
328a10b70c | |||
1ed97c8deb | |||
91b970e2aa | |||
99af1bb479 | |||
11ddcbdee3 |
@ -23,6 +23,7 @@ ultimately sophisticated professional microblogging software.
|
|||||||
* Reactions
|
* Reactions
|
||||||
* User lists
|
* User lists
|
||||||
* Customizable column view (known as MisskeyDeck)
|
* Customizable column view (known as MisskeyDeck)
|
||||||
|
* and widgets!
|
||||||
* Private messages
|
* Private messages
|
||||||
* Mute
|
* Mute
|
||||||
* Streaming
|
* Streaming
|
||||||
|
@ -57,6 +57,7 @@ common:
|
|||||||
memo: "Notizen"
|
memo: "Notizen"
|
||||||
trends: "Trends"
|
trends: "Trends"
|
||||||
photo-stream: "Bilder"
|
photo-stream: "Bilder"
|
||||||
|
posts-monitor: "投稿チャート"
|
||||||
slideshow: "Diashow"
|
slideshow: "Diashow"
|
||||||
version: "Version"
|
version: "Version"
|
||||||
broadcast: "ブロードキャスト"
|
broadcast: "ブロードキャスト"
|
||||||
@ -220,6 +221,9 @@ common/views/widgets/donation.vue:
|
|||||||
common/views/widgets/photo-stream.vue:
|
common/views/widgets/photo-stream.vue:
|
||||||
title: "Fotostream"
|
title: "Fotostream"
|
||||||
no-photos: "Keine Fotos"
|
no-photos: "Keine Fotos"
|
||||||
|
common/views/widgets/posts-monitor.vue:
|
||||||
|
title: "投稿チャート"
|
||||||
|
toggle: "表示を切り替え"
|
||||||
common/views/widgets/server.vue:
|
common/views/widgets/server.vue:
|
||||||
title: "Serverinformationen"
|
title: "Serverinformationen"
|
||||||
toggle: "Sicht umschalten"
|
toggle: "Sicht umschalten"
|
||||||
|
@ -57,6 +57,7 @@ common:
|
|||||||
memo: "Memo"
|
memo: "Memo"
|
||||||
trends: "Trends"
|
trends: "Trends"
|
||||||
photo-stream: "Photo stream"
|
photo-stream: "Photo stream"
|
||||||
|
posts-monitor: "投稿チャート"
|
||||||
slideshow: "Slideshow"
|
slideshow: "Slideshow"
|
||||||
version: "Version"
|
version: "Version"
|
||||||
broadcast: "Broadcast"
|
broadcast: "Broadcast"
|
||||||
@ -220,6 +221,9 @@ common/views/widgets/donation.vue:
|
|||||||
common/views/widgets/photo-stream.vue:
|
common/views/widgets/photo-stream.vue:
|
||||||
title: "Photostream"
|
title: "Photostream"
|
||||||
no-photos: "No photos"
|
no-photos: "No photos"
|
||||||
|
common/views/widgets/posts-monitor.vue:
|
||||||
|
title: "投稿チャート"
|
||||||
|
toggle: "表示を切り替え"
|
||||||
common/views/widgets/server.vue:
|
common/views/widgets/server.vue:
|
||||||
title: "Server info"
|
title: "Server info"
|
||||||
toggle: "Toggle views"
|
toggle: "Toggle views"
|
||||||
|
@ -57,6 +57,7 @@ common:
|
|||||||
memo: "メモ"
|
memo: "メモ"
|
||||||
trends: "トレンド"
|
trends: "トレンド"
|
||||||
photo-stream: "フォトストリーム"
|
photo-stream: "フォトストリーム"
|
||||||
|
posts-monitor: "投稿チャート"
|
||||||
slideshow: "スライドショー"
|
slideshow: "スライドショー"
|
||||||
version: "バージョン"
|
version: "バージョン"
|
||||||
broadcast: "ブロードキャスト"
|
broadcast: "ブロードキャスト"
|
||||||
@ -220,6 +221,9 @@ common/views/widgets/donation.vue:
|
|||||||
common/views/widgets/photo-stream.vue:
|
common/views/widgets/photo-stream.vue:
|
||||||
title: "フォトストリーム"
|
title: "フォトストリーム"
|
||||||
no-photos: "写真はありません"
|
no-photos: "写真はありません"
|
||||||
|
common/views/widgets/posts-monitor.vue:
|
||||||
|
title: "投稿チャート"
|
||||||
|
toggle: "表示を切り替え"
|
||||||
common/views/widgets/server.vue:
|
common/views/widgets/server.vue:
|
||||||
title: "サーバー情報"
|
title: "サーバー情報"
|
||||||
toggle: "表示を切り替え"
|
toggle: "表示を切り替え"
|
||||||
|
@ -57,6 +57,7 @@ common:
|
|||||||
memo: "Note"
|
memo: "Note"
|
||||||
trends: "Tendances"
|
trends: "Tendances"
|
||||||
photo-stream: "Flux de photos"
|
photo-stream: "Flux de photos"
|
||||||
|
posts-monitor: "投稿チャート"
|
||||||
slideshow: "Diaporama"
|
slideshow: "Diaporama"
|
||||||
version: "Version"
|
version: "Version"
|
||||||
broadcast: "Diffusion"
|
broadcast: "Diffusion"
|
||||||
@ -220,6 +221,9 @@ common/views/widgets/donation.vue:
|
|||||||
common/views/widgets/photo-stream.vue:
|
common/views/widgets/photo-stream.vue:
|
||||||
title: "Flux de photo"
|
title: "Flux de photo"
|
||||||
no-photos: "Pas de photos"
|
no-photos: "Pas de photos"
|
||||||
|
common/views/widgets/posts-monitor.vue:
|
||||||
|
title: "投稿チャート"
|
||||||
|
toggle: "表示を切り替え"
|
||||||
common/views/widgets/server.vue:
|
common/views/widgets/server.vue:
|
||||||
title: "Info sur le serveur"
|
title: "Info sur le serveur"
|
||||||
toggle: "Afficher les vues"
|
toggle: "Afficher les vues"
|
||||||
|
@ -57,6 +57,7 @@ common:
|
|||||||
memo: "メモ"
|
memo: "メモ"
|
||||||
trends: "トレンド"
|
trends: "トレンド"
|
||||||
photo-stream: "フォトストリーム"
|
photo-stream: "フォトストリーム"
|
||||||
|
posts-monitor: "投稿チャート"
|
||||||
slideshow: "スライドショー"
|
slideshow: "スライドショー"
|
||||||
version: "バージョン"
|
version: "バージョン"
|
||||||
broadcast: "ブロードキャスト"
|
broadcast: "ブロードキャスト"
|
||||||
@ -220,6 +221,9 @@ common/views/widgets/donation.vue:
|
|||||||
common/views/widgets/photo-stream.vue:
|
common/views/widgets/photo-stream.vue:
|
||||||
title: "フォトストリーム"
|
title: "フォトストリーム"
|
||||||
no-photos: "写真はありません"
|
no-photos: "写真はありません"
|
||||||
|
common/views/widgets/posts-monitor.vue:
|
||||||
|
title: "投稿チャート"
|
||||||
|
toggle: "表示を切り替え"
|
||||||
common/views/widgets/server.vue:
|
common/views/widgets/server.vue:
|
||||||
title: "サーバー情報"
|
title: "サーバー情報"
|
||||||
toggle: "表示を切り替え"
|
toggle: "表示を切り替え"
|
||||||
|
@ -57,6 +57,7 @@ common:
|
|||||||
memo: "メモ"
|
memo: "メモ"
|
||||||
trends: "トレンド"
|
trends: "トレンド"
|
||||||
photo-stream: "フォトストリーム"
|
photo-stream: "フォトストリーム"
|
||||||
|
posts-monitor: "投稿チャート"
|
||||||
slideshow: "スライドショー"
|
slideshow: "スライドショー"
|
||||||
version: "バージョン"
|
version: "バージョン"
|
||||||
broadcast: "ブロードキャスト"
|
broadcast: "ブロードキャスト"
|
||||||
@ -220,6 +221,9 @@ common/views/widgets/donation.vue:
|
|||||||
common/views/widgets/photo-stream.vue:
|
common/views/widgets/photo-stream.vue:
|
||||||
title: "フォトストリーム"
|
title: "フォトストリーム"
|
||||||
no-photos: "写真はありません"
|
no-photos: "写真はありません"
|
||||||
|
common/views/widgets/posts-monitor.vue:
|
||||||
|
title: "投稿チャート"
|
||||||
|
toggle: "表示を切り替え"
|
||||||
common/views/widgets/server.vue:
|
common/views/widgets/server.vue:
|
||||||
title: "サーバー情報"
|
title: "サーバー情報"
|
||||||
toggle: "表示を切り替え"
|
toggle: "表示を切り替え"
|
||||||
|
@ -57,6 +57,7 @@ common:
|
|||||||
memo: "Notatki"
|
memo: "Notatki"
|
||||||
trends: "Na czasie"
|
trends: "Na czasie"
|
||||||
photo-stream: "Photostream"
|
photo-stream: "Photostream"
|
||||||
|
posts-monitor: "投稿チャート"
|
||||||
slideshow: "Pokaz slajdów"
|
slideshow: "Pokaz slajdów"
|
||||||
version: "Wersja"
|
version: "Wersja"
|
||||||
broadcast: "Transmisja"
|
broadcast: "Transmisja"
|
||||||
@ -220,6 +221,9 @@ common/views/widgets/donation.vue:
|
|||||||
common/views/widgets/photo-stream.vue:
|
common/views/widgets/photo-stream.vue:
|
||||||
title: "Photostream"
|
title: "Photostream"
|
||||||
no-photos: "Brak zdjęć"
|
no-photos: "Brak zdjęć"
|
||||||
|
common/views/widgets/posts-monitor.vue:
|
||||||
|
title: "投稿チャート"
|
||||||
|
toggle: "表示を切り替え"
|
||||||
common/views/widgets/server.vue:
|
common/views/widgets/server.vue:
|
||||||
title: "Informacje o serwerze"
|
title: "Informacje o serwerze"
|
||||||
toggle: "Przełącz widok"
|
toggle: "Przełącz widok"
|
||||||
|
@ -57,6 +57,7 @@ common:
|
|||||||
memo: "メモ"
|
memo: "メモ"
|
||||||
trends: "トレンド"
|
trends: "トレンド"
|
||||||
photo-stream: "フォトストリーム"
|
photo-stream: "フォトストリーム"
|
||||||
|
posts-monitor: "投稿チャート"
|
||||||
slideshow: "スライドショー"
|
slideshow: "スライドショー"
|
||||||
version: "バージョン"
|
version: "バージョン"
|
||||||
broadcast: "ブロードキャスト"
|
broadcast: "ブロードキャスト"
|
||||||
@ -220,6 +221,9 @@ common/views/widgets/donation.vue:
|
|||||||
common/views/widgets/photo-stream.vue:
|
common/views/widgets/photo-stream.vue:
|
||||||
title: "フォトストリーム"
|
title: "フォトストリーム"
|
||||||
no-photos: "写真はありません"
|
no-photos: "写真はありません"
|
||||||
|
common/views/widgets/posts-monitor.vue:
|
||||||
|
title: "投稿チャート"
|
||||||
|
toggle: "表示を切り替え"
|
||||||
common/views/widgets/server.vue:
|
common/views/widgets/server.vue:
|
||||||
title: "サーバー情報"
|
title: "サーバー情報"
|
||||||
toggle: "表示を切り替え"
|
toggle: "表示を切り替え"
|
||||||
|
@ -57,6 +57,7 @@ common:
|
|||||||
memo: "メモ"
|
memo: "メモ"
|
||||||
trends: "トレンド"
|
trends: "トレンド"
|
||||||
photo-stream: "フォトストリーム"
|
photo-stream: "フォトストリーム"
|
||||||
|
posts-monitor: "投稿チャート"
|
||||||
slideshow: "スライドショー"
|
slideshow: "スライドショー"
|
||||||
version: "バージョン"
|
version: "バージョン"
|
||||||
broadcast: "ブロードキャスト"
|
broadcast: "ブロードキャスト"
|
||||||
@ -220,6 +221,9 @@ common/views/widgets/donation.vue:
|
|||||||
common/views/widgets/photo-stream.vue:
|
common/views/widgets/photo-stream.vue:
|
||||||
title: "フォトストリーム"
|
title: "フォトストリーム"
|
||||||
no-photos: "写真はありません"
|
no-photos: "写真はありません"
|
||||||
|
common/views/widgets/posts-monitor.vue:
|
||||||
|
title: "投稿チャート"
|
||||||
|
toggle: "表示を切り替え"
|
||||||
common/views/widgets/server.vue:
|
common/views/widgets/server.vue:
|
||||||
title: "サーバー情報"
|
title: "サーバー情報"
|
||||||
toggle: "表示を切り替え"
|
toggle: "表示を切り替え"
|
||||||
|
@ -57,6 +57,7 @@ common:
|
|||||||
memo: "メモ"
|
memo: "メモ"
|
||||||
trends: "トレンド"
|
trends: "トレンド"
|
||||||
photo-stream: "フォトストリーム"
|
photo-stream: "フォトストリーム"
|
||||||
|
posts-monitor: "投稿チャート"
|
||||||
slideshow: "スライドショー"
|
slideshow: "スライドショー"
|
||||||
version: "バージョン"
|
version: "バージョン"
|
||||||
broadcast: "ブロードキャスト"
|
broadcast: "ブロードキャスト"
|
||||||
@ -220,6 +221,9 @@ common/views/widgets/donation.vue:
|
|||||||
common/views/widgets/photo-stream.vue:
|
common/views/widgets/photo-stream.vue:
|
||||||
title: "フォトストリーム"
|
title: "フォトストリーム"
|
||||||
no-photos: "写真はありません"
|
no-photos: "写真はありません"
|
||||||
|
common/views/widgets/posts-monitor.vue:
|
||||||
|
title: "投稿チャート"
|
||||||
|
toggle: "表示を切り替え"
|
||||||
common/views/widgets/server.vue:
|
common/views/widgets/server.vue:
|
||||||
title: "サーバー情報"
|
title: "サーバー情報"
|
||||||
toggle: "表示を切り替え"
|
toggle: "表示を切り替え"
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"name": "misskey",
|
"name": "misskey",
|
||||||
"author": "syuilo <i@syuilo.com>",
|
"author": "syuilo <i@syuilo.com>",
|
||||||
"version": "2.34.0",
|
"version": "2.34.3",
|
||||||
"clientVersion": "1.0.6302",
|
"clientVersion": "1.0.6328",
|
||||||
"codename": "nighthike",
|
"codename": "nighthike",
|
||||||
"main": "./built/index.js",
|
"main": "./built/index.js",
|
||||||
"private": true,
|
"private": true,
|
||||||
|
@ -42,7 +42,7 @@ html
|
|||||||
| JavaScriptを有効にしてください
|
| JavaScriptを有効にしてください
|
||||||
br
|
br
|
||||||
| Please turn on your JavaScript
|
| Please turn on your JavaScript
|
||||||
div#ini: p
|
div#ini.
|
||||||
span .
|
<svg viewBox="0 0 50 50">
|
||||||
span .
|
<path fill=#{themeColor} d="M25.251,6.461c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615V6.461z" />
|
||||||
span .
|
</svg>
|
||||||
|
@ -59,7 +59,7 @@ export default Vue.extend({
|
|||||||
created() {
|
created() {
|
||||||
if (this.mode == 'relative' || this.mode == 'detail') {
|
if (this.mode == 'relative' || this.mode == 'detail') {
|
||||||
this.tick();
|
this.tick();
|
||||||
this.tickId = setInterval(this.tick, 5000);
|
this.tickId = setInterval(this.tick, 10000);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
destroyed() {
|
destroyed() {
|
||||||
|
@ -5,46 +5,64 @@
|
|||||||
<button slot="func" @click="toggle" title="%i18n:@toggle%">%fa:sort%</button>
|
<button slot="func" @click="toggle" title="%i18n:@toggle%">%fa:sort%</button>
|
||||||
|
|
||||||
<div class="qpdmibaztplkylerhdbllwcokyrfxeyj" :class="{ dual: props.view == 0 }" :data-darkmode="$store.state.device.darkmode">
|
<div class="qpdmibaztplkylerhdbllwcokyrfxeyj" :class="{ dual: props.view == 0 }" :data-darkmode="$store.state.device.darkmode">
|
||||||
<svg :viewBox="`0 0 ${ viewBoxX } ${ viewBoxY }`" preserveAspectRatio="none" v-show="props.view != 2">
|
<svg :viewBox="`0 0 ${ viewBoxX } ${ viewBoxY }`" v-show="props.view != 2">
|
||||||
<defs>
|
|
||||||
<linearGradient :id="fediGradientId" x1="0" x2="0" y1="1" y2="0">
|
|
||||||
<stop offset="0%" stop-color="hsl(200, 80%, 70%)"></stop>
|
|
||||||
<stop offset="100%" stop-color="hsl(90, 80%, 70%)"></stop>
|
|
||||||
</linearGradient>
|
|
||||||
<mask :id="fediMaskId" x="0" y="0" :width="viewBoxX" :height="viewBoxY">
|
|
||||||
<polyline
|
|
||||||
:points="fediPolylinePoints"
|
|
||||||
fill="none"
|
|
||||||
stroke="#fff"
|
|
||||||
stroke-width="1"/>
|
|
||||||
</mask>
|
|
||||||
</defs>
|
|
||||||
<rect
|
|
||||||
x="-1" y="-1"
|
|
||||||
:width="viewBoxX + 2" :height="viewBoxY + 2"
|
|
||||||
:style="`stroke: none; fill: url(#${ fediGradientId }); mask: url(#${ fediMaskId })`"/>
|
|
||||||
<text x="1" y="5">Fedi</text>
|
|
||||||
</svg>
|
|
||||||
<svg :viewBox="`0 0 ${ viewBoxX } ${ viewBoxY }`" preserveAspectRatio="none" v-show="props.view != 1">
|
|
||||||
<defs>
|
<defs>
|
||||||
<linearGradient :id="localGradientId" x1="0" x2="0" y1="1" y2="0">
|
<linearGradient :id="localGradientId" x1="0" x2="0" y1="1" y2="0">
|
||||||
<stop offset="0%" stop-color="hsl(200, 80%, 70%)"></stop>
|
<stop offset="0%" stop-color="hsl(200, 80%, 70%)"></stop>
|
||||||
<stop offset="100%" stop-color="hsl(90, 80%, 70%)"></stop>
|
<stop offset="100%" stop-color="hsl(90, 80%, 70%)"></stop>
|
||||||
</linearGradient>
|
</linearGradient>
|
||||||
<mask :id="localMaskId" x="0" y="0" :width="viewBoxX" :height="viewBoxY">
|
<mask :id="localMaskId" x="0" y="0" :width="viewBoxX" :height="viewBoxY">
|
||||||
|
<polygon
|
||||||
|
:points="localPolygonPoints"
|
||||||
|
fill="#fff"
|
||||||
|
fill-opacity="0.5"/>
|
||||||
<polyline
|
<polyline
|
||||||
:points="localPolylinePoints"
|
:points="localPolylinePoints"
|
||||||
fill="none"
|
fill="none"
|
||||||
stroke="#fff"
|
stroke="#fff"
|
||||||
stroke-width="1"/>
|
stroke-width="1"/>
|
||||||
|
<circle
|
||||||
|
:cx="localHeadX"
|
||||||
|
:cy="localHeadY"
|
||||||
|
r="1.5"
|
||||||
|
fill="#fff"/>
|
||||||
</mask>
|
</mask>
|
||||||
</defs>
|
</defs>
|
||||||
<rect
|
<rect
|
||||||
x="-1" y="-1"
|
x="-2" y="-2"
|
||||||
:width="viewBoxX + 2" :height="viewBoxY + 2"
|
:width="viewBoxX + 4" :height="viewBoxY + 4"
|
||||||
:style="`stroke: none; fill: url(#${ localGradientId }); mask: url(#${ localMaskId })`"/>
|
:style="`stroke: none; fill: url(#${ localGradientId }); mask: url(#${ localMaskId })`"/>
|
||||||
<text x="1" y="5">Local</text>
|
<text x="1" y="5">Local</text>
|
||||||
</svg>
|
</svg>
|
||||||
|
<svg :viewBox="`0 0 ${ viewBoxX } ${ viewBoxY }`" v-show="props.view != 1">
|
||||||
|
<defs>
|
||||||
|
<linearGradient :id="fediGradientId" x1="0" x2="0" y1="1" y2="0">
|
||||||
|
<stop offset="0%" stop-color="hsl(200, 80%, 70%)"></stop>
|
||||||
|
<stop offset="100%" stop-color="hsl(90, 80%, 70%)"></stop>
|
||||||
|
</linearGradient>
|
||||||
|
<mask :id="fediMaskId" x="0" y="0" :width="viewBoxX" :height="viewBoxY">
|
||||||
|
<polygon
|
||||||
|
:points="fediPolygonPoints"
|
||||||
|
fill="#fff"
|
||||||
|
fill-opacity="0.5"/>
|
||||||
|
<polyline
|
||||||
|
:points="fediPolylinePoints"
|
||||||
|
fill="none"
|
||||||
|
stroke="#fff"
|
||||||
|
stroke-width="1"/>
|
||||||
|
<circle
|
||||||
|
:cx="fediHeadX"
|
||||||
|
:cy="fediHeadY"
|
||||||
|
r="1.5"
|
||||||
|
fill="#fff"/>
|
||||||
|
</mask>
|
||||||
|
</defs>
|
||||||
|
<rect
|
||||||
|
x="-2" y="-2"
|
||||||
|
:width="viewBoxX + 4" :height="viewBoxY + 4"
|
||||||
|
:style="`stroke: none; fill: url(#${ fediGradientId }); mask: url(#${ fediMaskId })`"/>
|
||||||
|
<text x="1" y="5">Fedi</text>
|
||||||
|
</svg>
|
||||||
</div>
|
</div>
|
||||||
</mk-widget-container>
|
</mk-widget-container>
|
||||||
</div>
|
</div>
|
||||||
@ -74,7 +92,11 @@ export default define({
|
|||||||
fediPolylinePoints: '',
|
fediPolylinePoints: '',
|
||||||
localPolylinePoints: '',
|
localPolylinePoints: '',
|
||||||
fediPolygonPoints: '',
|
fediPolygonPoints: '',
|
||||||
localPolygonPoints: ''
|
localPolygonPoints: '',
|
||||||
|
fediHeadX: null,
|
||||||
|
fediHeadY: null,
|
||||||
|
localHeadX: null,
|
||||||
|
localHeadY: null
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -121,15 +143,22 @@ export default define({
|
|||||||
this.save();
|
this.save();
|
||||||
},
|
},
|
||||||
draw() {
|
draw() {
|
||||||
const stats = this.props.view == 0 ? this.stats.slice(0, 50) : this.stats;
|
const stats = this.props.view == 0 ? this.stats.slice(-50) : this.stats;
|
||||||
const fediPeak = Math.max.apply(null, this.stats.map(x => x.all)) || 1;
|
const fediPeak = Math.max.apply(null, stats.map(x => x.all)) || 1;
|
||||||
const localPeak = Math.max.apply(null, this.stats.map(x => x.local)) || 1;
|
const localPeak = Math.max.apply(null, stats.map(x => x.local)) || 1;
|
||||||
|
|
||||||
this.fediPolylinePoints = this.stats.map((s, i) => `${this.viewBoxX - ((this.stats.length - 1) - i)},${(1 - (s.all / fediPeak)) * this.viewBoxY}`).join(' ');
|
const fediPolylinePoints = stats.map((s, i) => [this.viewBoxX - ((stats.length - 1) - i), (1 - (s.all / fediPeak)) * this.viewBoxY]);
|
||||||
this.localPolylinePoints = this.stats.map((s, i) => `${this.viewBoxX - ((this.stats.length - 1) - i)},${(1 - (s.local / localPeak)) * this.viewBoxY}`).join(' ');
|
const localPolylinePoints = stats.map((s, i) => [this.viewBoxX - ((stats.length - 1) - i), (1 - (s.local / localPeak)) * this.viewBoxY]);
|
||||||
|
this.fediPolylinePoints = fediPolylinePoints.map(xy => `${xy[0]},${xy[1]}`).join(' ');
|
||||||
|
this.localPolylinePoints = localPolylinePoints.map(xy => `${xy[0]},${xy[1]}`).join(' ');
|
||||||
|
|
||||||
this.fediPolygonPoints = `${this.viewBoxX - (this.stats.length - 1)},${ this.viewBoxY } ${ this.fediPolylinePoints } ${ this.viewBoxX },${ this.viewBoxY }`;
|
this.fediPolygonPoints = `${this.viewBoxX - (stats.length - 1)},${ this.viewBoxY } ${ this.fediPolylinePoints } ${ this.viewBoxX },${ this.viewBoxY }`;
|
||||||
this.localPolygonPoints = `${this.viewBoxX - (this.stats.length - 1)},${ this.viewBoxY } ${ this.localPolylinePoints } ${ this.viewBoxX },${ this.viewBoxY }`;
|
this.localPolygonPoints = `${this.viewBoxX - (stats.length - 1)},${ this.viewBoxY } ${ this.localPolylinePoints } ${ this.viewBoxX },${ this.viewBoxY }`;
|
||||||
|
|
||||||
|
this.fediHeadX = fediPolylinePoints[fediPolylinePoints.length - 1][0];
|
||||||
|
this.fediHeadY = fediPolylinePoints[fediPolylinePoints.length - 1][1];
|
||||||
|
this.localHeadX = localPolylinePoints[localPolylinePoints.length - 1][0];
|
||||||
|
this.localHeadY = localPolylinePoints[localPolylinePoints.length - 1][1];
|
||||||
},
|
},
|
||||||
onStats(stats) {
|
onStats(stats) {
|
||||||
this.stats.push(stats);
|
this.stats.push(stats);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="cpu-memory">
|
<div class="cpu-memory">
|
||||||
<svg :viewBox="`0 0 ${ viewBoxX } ${ viewBoxY }`" preserveAspectRatio="none">
|
<svg :viewBox="`0 0 ${ viewBoxX } ${ viewBoxY }`">
|
||||||
<defs>
|
<defs>
|
||||||
<linearGradient :id="cpuGradientId" x1="0" x2="0" y1="1" y2="0">
|
<linearGradient :id="cpuGradientId" x1="0" x2="0" y1="1" y2="0">
|
||||||
<stop offset="0%" stop-color="hsl(180, 80%, 70%)"></stop>
|
<stop offset="0%" stop-color="hsl(180, 80%, 70%)"></stop>
|
||||||
@ -16,15 +16,20 @@
|
|||||||
fill="none"
|
fill="none"
|
||||||
stroke="#fff"
|
stroke="#fff"
|
||||||
stroke-width="1"/>
|
stroke-width="1"/>
|
||||||
|
<circle
|
||||||
|
:cx="cpuHeadX"
|
||||||
|
:cy="cpuHeadY"
|
||||||
|
r="1.5"
|
||||||
|
fill="#fff"/>
|
||||||
</mask>
|
</mask>
|
||||||
</defs>
|
</defs>
|
||||||
<rect
|
<rect
|
||||||
x="-1" y="-1"
|
x="-2" y="-2"
|
||||||
:width="viewBoxX + 2" :height="viewBoxY + 2"
|
:width="viewBoxX + 4" :height="viewBoxY + 4"
|
||||||
:style="`stroke: none; fill: url(#${ cpuGradientId }); mask: url(#${ cpuMaskId })`"/>
|
:style="`stroke: none; fill: url(#${ cpuGradientId }); mask: url(#${ cpuMaskId })`"/>
|
||||||
<text x="1" y="5">CPU <tspan>{{ cpuP }}%</tspan></text>
|
<text x="1" y="5">CPU <tspan>{{ cpuP }}%</tspan></text>
|
||||||
</svg>
|
</svg>
|
||||||
<svg :viewBox="`0 0 ${ viewBoxX } ${ viewBoxY }`" preserveAspectRatio="none">
|
<svg :viewBox="`0 0 ${ viewBoxX } ${ viewBoxY }`">
|
||||||
<defs>
|
<defs>
|
||||||
<linearGradient :id="memGradientId" x1="0" x2="0" y1="1" y2="0">
|
<linearGradient :id="memGradientId" x1="0" x2="0" y1="1" y2="0">
|
||||||
<stop offset="0%" stop-color="hsl(180, 80%, 70%)"></stop>
|
<stop offset="0%" stop-color="hsl(180, 80%, 70%)"></stop>
|
||||||
@ -40,11 +45,16 @@
|
|||||||
fill="none"
|
fill="none"
|
||||||
stroke="#fff"
|
stroke="#fff"
|
||||||
stroke-width="1"/>
|
stroke-width="1"/>
|
||||||
|
<circle
|
||||||
|
:cx="memHeadX"
|
||||||
|
:cy="memHeadY"
|
||||||
|
r="1.5"
|
||||||
|
fill="#fff"/>
|
||||||
</mask>
|
</mask>
|
||||||
</defs>
|
</defs>
|
||||||
<rect
|
<rect
|
||||||
x="-1" y="-1"
|
x="-2" y="-2"
|
||||||
:width="viewBoxX + 2" :height="viewBoxY + 2"
|
:width="viewBoxX + 4" :height="viewBoxY + 4"
|
||||||
:style="`stroke: none; fill: url(#${ memGradientId }); mask: url(#${ memMaskId })`"/>
|
:style="`stroke: none; fill: url(#${ memGradientId }); mask: url(#${ memMaskId })`"/>
|
||||||
<text x="1" y="5">MEM <tspan>{{ memP }}%</tspan></text>
|
<text x="1" y="5">MEM <tspan>{{ memP }}%</tspan></text>
|
||||||
</svg>
|
</svg>
|
||||||
@ -70,6 +80,10 @@ export default Vue.extend({
|
|||||||
memPolylinePoints: '',
|
memPolylinePoints: '',
|
||||||
cpuPolygonPoints: '',
|
cpuPolygonPoints: '',
|
||||||
memPolygonPoints: '',
|
memPolygonPoints: '',
|
||||||
|
cpuHeadX: null,
|
||||||
|
cpuHeadY: null,
|
||||||
|
memHeadX: null,
|
||||||
|
memHeadY: null,
|
||||||
cpuP: '',
|
cpuP: '',
|
||||||
memP: ''
|
memP: ''
|
||||||
};
|
};
|
||||||
@ -92,12 +106,19 @@ export default Vue.extend({
|
|||||||
this.stats.push(stats);
|
this.stats.push(stats);
|
||||||
if (this.stats.length > 50) this.stats.shift();
|
if (this.stats.length > 50) this.stats.shift();
|
||||||
|
|
||||||
this.cpuPolylinePoints = this.stats.map((s, i) => `${this.viewBoxX - ((this.stats.length - 1) - i)},${(1 - s.cpu_usage) * this.viewBoxY}`).join(' ');
|
const cpuPolylinePoints = this.stats.map((s, i) => [this.viewBoxX - ((this.stats.length - 1) - i), (1 - s.cpu_usage) * this.viewBoxY]);
|
||||||
this.memPolylinePoints = this.stats.map((s, i) => `${this.viewBoxX - ((this.stats.length - 1) - i)},${(1 - (s.mem.used / s.mem.total)) * this.viewBoxY}`).join(' ');
|
const memPolylinePoints = this.stats.map((s, i) => [this.viewBoxX - ((this.stats.length - 1) - i), (1 - (s.mem.used / s.mem.total)) * this.viewBoxY]);
|
||||||
|
this.cpuPolylinePoints = cpuPolylinePoints.map(xy => `${xy[0]},${xy[1]}`).join(' ');
|
||||||
|
this.memPolylinePoints = memPolylinePoints.map(xy => `${xy[0]},${xy[1]}`).join(' ');
|
||||||
|
|
||||||
this.cpuPolygonPoints = `${this.viewBoxX - (this.stats.length - 1)},${ this.viewBoxY } ${ this.cpuPolylinePoints } ${ this.viewBoxX },${ this.viewBoxY }`;
|
this.cpuPolygonPoints = `${this.viewBoxX - (this.stats.length - 1)},${ this.viewBoxY } ${ this.cpuPolylinePoints } ${ this.viewBoxX },${ this.viewBoxY }`;
|
||||||
this.memPolygonPoints = `${this.viewBoxX - (this.stats.length - 1)},${ this.viewBoxY } ${ this.memPolylinePoints } ${ this.viewBoxX },${ this.viewBoxY }`;
|
this.memPolygonPoints = `${this.viewBoxX - (this.stats.length - 1)},${ this.viewBoxY } ${ this.memPolylinePoints } ${ this.viewBoxX },${ this.viewBoxY }`;
|
||||||
|
|
||||||
|
this.cpuHeadX = cpuPolylinePoints[cpuPolylinePoints.length - 1][0];
|
||||||
|
this.cpuHeadY = cpuPolylinePoints[cpuPolylinePoints.length - 1][1];
|
||||||
|
this.memHeadX = memPolylinePoints[memPolylinePoints.length - 1][0];
|
||||||
|
this.memHeadY = memPolylinePoints[memPolylinePoints.length - 1][1];
|
||||||
|
|
||||||
this.cpuP = (stats.cpu_usage * 100).toFixed(0);
|
this.cpuP = (stats.cpu_usage * 100).toFixed(0);
|
||||||
this.memP = (stats.mem.used / stats.mem.total * 100).toFixed(0);
|
this.memP = (stats.mem.used / stats.mem.total * 100).toFixed(0);
|
||||||
},
|
},
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<svg viewBox="0 0 21 7" preserveAspectRatio="none">
|
<svg viewBox="0 0 21 7">
|
||||||
<rect v-for="record in data" class="day"
|
<rect v-for="record in data" class="day"
|
||||||
width="1" height="1"
|
width="1" height="1"
|
||||||
:x="record.x" :y="record.date.weekday"
|
:x="record.x" :y="record.date.weekday"
|
||||||
@ -15,7 +15,7 @@
|
|||||||
style="pointer-events: none;"/>
|
style="pointer-events: none;"/>
|
||||||
<rect class="today"
|
<rect class="today"
|
||||||
width="1" height="1"
|
width="1" height="1"
|
||||||
:x="data[data.length - 1].x" :y="data[data.length - 1].date.weekday"
|
:x="data[0].x" :y="data[0].date.weekday"
|
||||||
rx="1" ry="1"
|
rx="1" ry="1"
|
||||||
fill="none"
|
fill="none"
|
||||||
stroke-width="0.1"
|
stroke-width="0.1"
|
||||||
@ -33,7 +33,7 @@ export default Vue.extend({
|
|||||||
const peak = Math.max.apply(null, this.data.map(d => d.total));
|
const peak = Math.max.apply(null, this.data.map(d => d.total));
|
||||||
|
|
||||||
let x = 0;
|
let x = 0;
|
||||||
this.data.reverse().forEach(d => {
|
this.data.slice().reverse().forEach(d => {
|
||||||
d.x = x;
|
d.x = x;
|
||||||
d.date.weekday = (new Date(d.date.year, d.date.month - 1, d.date.day)).getDay();
|
d.date.weekday = (new Date(d.date.year, d.date.month - 1, d.date.day)).getDay();
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<svg :viewBox="`0 0 ${ viewBoxX } ${ viewBoxY }`" preserveAspectRatio="none" @mousedown.prevent="onMousedown">
|
<svg :viewBox="`0 0 ${ viewBoxX } ${ viewBoxY }`" @mousedown.prevent="onMousedown">
|
||||||
<title>%i18n:@total%<br/>%i18n:@notes%<br/>%i18n:@replies%<br/>%i18n:@renotes%</title>
|
<title>%i18n:@total%<br/>%i18n:@notes%<br/>%i18n:@replies%<br/>%i18n:@renotes%</title>
|
||||||
<polyline
|
<polyline
|
||||||
:points="pointsNote"
|
:points="pointsNote"
|
||||||
@ -55,7 +55,6 @@ export default Vue.extend({
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.data.reverse();
|
|
||||||
this.data.forEach(d => d.total = d.notes + d.replies + d.renotes);
|
this.data.forEach(d => d.total = d.notes + d.replies + d.renotes);
|
||||||
this.render();
|
this.render();
|
||||||
},
|
},
|
||||||
@ -63,10 +62,11 @@ export default Vue.extend({
|
|||||||
render() {
|
render() {
|
||||||
const peak = Math.max.apply(null, this.data.map(d => d.total));
|
const peak = Math.max.apply(null, this.data.map(d => d.total));
|
||||||
if (peak != 0) {
|
if (peak != 0) {
|
||||||
this.pointsNote = this.data.map((d, i) => `${(i * this.zoom) + this.pos},${(1 - (d.notes / peak)) * this.viewBoxY}`).join(' ');
|
const data = this.data.slice().reverse();
|
||||||
this.pointsReply = this.data.map((d, i) => `${(i * this.zoom) + this.pos},${(1 - (d.replies / peak)) * this.viewBoxY}`).join(' ');
|
this.pointsNote = data.map((d, i) => `${(i * this.zoom) + this.pos},${(1 - (d.notes / peak)) * this.viewBoxY}`).join(' ');
|
||||||
this.pointsRenote = this.data.map((d, i) => `${(i * this.zoom) + this.pos},${(1 - (d.renotes / peak)) * this.viewBoxY}`).join(' ');
|
this.pointsReply = data.map((d, i) => `${(i * this.zoom) + this.pos},${(1 - (d.replies / peak)) * this.viewBoxY}`).join(' ');
|
||||||
this.pointsTotal = this.data.map((d, i) => `${(i * this.zoom) + this.pos},${(1 - (d.total / peak)) * this.viewBoxY}`).join(' ');
|
this.pointsRenote = data.map((d, i) => `${(i * this.zoom) + this.pos},${(1 - (d.renotes / peak)) * this.viewBoxY}`).join(' ');
|
||||||
|
this.pointsTotal = data.map((d, i) => `${(i * this.zoom) + this.pos},${(1 - (d.total / peak)) * this.viewBoxY}`).join(' ');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onMousedown(e) {
|
onMousedown(e) {
|
||||||
|
@ -206,7 +206,7 @@ root(isDark)
|
|||||||
margin 0
|
margin 0
|
||||||
padding 16px
|
padding 16px
|
||||||
overflow-wrap break-word
|
overflow-wrap break-word
|
||||||
font-size 12px
|
font-size 13px
|
||||||
border-bottom solid 1px isDark ? #1c2023 : rgba(#000, 0.05)
|
border-bottom solid 1px isDark ? #1c2023 : rgba(#000, 0.05)
|
||||||
|
|
||||||
&:last-child
|
&:last-child
|
||||||
|
@ -200,7 +200,7 @@ export default Vue.extend({
|
|||||||
@import '~const.styl'
|
@import '~const.styl'
|
||||||
|
|
||||||
root(isDark)
|
root(isDark)
|
||||||
font-size 12px
|
font-size 13px
|
||||||
border-bottom solid 1px isDark ? #1c2023 : #eaeaea
|
border-bottom solid 1px isDark ? #1c2023 : #eaeaea
|
||||||
|
|
||||||
&:last-of-type
|
&:last-of-type
|
||||||
|
@ -112,7 +112,7 @@ export default Vue.extend({
|
|||||||
root(isDark)
|
root(isDark)
|
||||||
> .notification
|
> .notification
|
||||||
padding 16px
|
padding 16px
|
||||||
font-size 12px
|
font-size 13px
|
||||||
overflow-wrap break-word
|
overflow-wrap break-word
|
||||||
|
|
||||||
&:after
|
&:after
|
||||||
|
@ -96,7 +96,7 @@ export default Vue.extend({
|
|||||||
fetchMoreNotifications() {
|
fetchMoreNotifications() {
|
||||||
this.fetchingMoreNotifications = true;
|
this.fetchingMoreNotifications = true;
|
||||||
|
|
||||||
const max = 30;
|
const max = 20;
|
||||||
|
|
||||||
(this as any).api('i/notifications', {
|
(this as any).api('i/notifications', {
|
||||||
limit: max + 1,
|
limit: max + 1,
|
||||||
|
@ -32,42 +32,30 @@ body > noscript {
|
|||||||
left: 0;
|
left: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
text-align: center;
|
|
||||||
background: #fff;
|
background: #fff;
|
||||||
cursor: wait;
|
cursor: wait;
|
||||||
}
|
}
|
||||||
#ini > p {
|
#ini > svg {
|
||||||
display: block;
|
position: absolute;
|
||||||
user-select: none;
|
top: 0;
|
||||||
margin: 32px;
|
right: 0;
|
||||||
font-size: 4em;
|
bottom: 0;
|
||||||
color: #555;
|
left: 0;
|
||||||
|
margin: auto;
|
||||||
|
width: 64px;
|
||||||
|
height: 64px;
|
||||||
|
animation: ini 0.6s infinite linear;
|
||||||
}
|
}
|
||||||
#ini > p > span {
|
|
||||||
animation: ini 1.4s infinite ease-in-out both;
|
|
||||||
}
|
|
||||||
#ini > p > span:nth-child(1) {
|
|
||||||
animation-delay: 0s;
|
|
||||||
}
|
|
||||||
#ini > p > span:nth-child(2) {
|
|
||||||
animation-delay: 0.16s;
|
|
||||||
}
|
|
||||||
#ini > p > span:nth-child(3) {
|
|
||||||
animation-delay: 0.32s;
|
|
||||||
}
|
|
||||||
|
|
||||||
html[data-darkmode] #ini {
|
html[data-darkmode] #ini {
|
||||||
background: #191b22;
|
background: #191b22;
|
||||||
}
|
}
|
||||||
html[data-darkmode] #ini > p {
|
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes ini {
|
@keyframes ini {
|
||||||
0%, 80%, 100% {
|
from {
|
||||||
opacity: 1;
|
transform: rotate(0deg);
|
||||||
}
|
}
|
||||||
40% {
|
to {
|
||||||
opacity: 0;
|
transform: rotate(360deg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,13 +1,15 @@
|
|||||||
import Note from './models/note';
|
import Note from './models/note';
|
||||||
|
|
||||||
|
const interval = 5000;
|
||||||
|
|
||||||
setInterval(async () => {
|
setInterval(async () => {
|
||||||
const [all, local] = await Promise.all([Note.count({
|
const [all, local] = await Promise.all([Note.count({
|
||||||
createdAt: {
|
createdAt: {
|
||||||
$gte: new Date(Date.now() - 3000)
|
$gte: new Date(Date.now() - interval)
|
||||||
}
|
}
|
||||||
}), Note.count({
|
}), Note.count({
|
||||||
createdAt: {
|
createdAt: {
|
||||||
$gte: new Date(Date.now() - 3000)
|
$gte: new Date(Date.now() - interval)
|
||||||
},
|
},
|
||||||
'_user.host': null
|
'_user.host': null
|
||||||
})]);
|
})]);
|
||||||
@ -17,4 +19,4 @@ setInterval(async () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
process.send(stats);
|
process.send(stats);
|
||||||
}, 3000);
|
}, interval);
|
||||||
|
Reference in New Issue
Block a user