いろいろ
This commit is contained in:
parent
116bade1c9
commit
f0604043a8
9 changed files with 7 additions and 333 deletions
12
README.md
12
README.md
|
@ -1,10 +1,12 @@
|
||||||
# みす廃あらーと
|
# Misskey Tools (aka みす廃あらーと)
|
||||||
|
|
||||||
みす廃あらーとは、Misskeyでのノート、フォロー、フォロワーの数および前日比を毎日0時にノートするサービスです。
|
Misskey Toolsは、Misskeyのために設計された、様々な機能を取り揃えたアカウント管理ツールです。
|
||||||
|
|
||||||
|
以前は「みす廃あらーと」という、Misskeyでのノート、フォロー、フォロワーの数および前日比を毎日0時にノートするサービスとして開発されていましたが、現在様々な機能に対応したオールインワンツールとして開発中です。
|
||||||
|
|
||||||
## 対応
|
## 対応
|
||||||
|
|
||||||
Misskey v10 以降および互換性のあるサーバー
|
Misskey v10 以降およびGroundpolis, MeisskeyなどのMisskeyと互換性のあるサーバー
|
||||||
|
|
||||||
## ビルド
|
## ビルド
|
||||||
|
|
||||||
|
@ -19,9 +21,9 @@ yarn build
|
||||||
yarn start
|
yarn start
|
||||||
|
|
||||||
# デバッグ用に起動
|
# デバッグ用に起動
|
||||||
yarn watch
|
yarn dev
|
||||||
```
|
```
|
||||||
|
|
||||||
## LICENSE
|
## LICENSE
|
||||||
|
|
||||||
[AGPL 3.0](LICENSE)
|
[AGPL 3.0](LICENSE)
|
||||||
|
|
|
@ -1,34 +0,0 @@
|
||||||
include _components
|
|
||||||
doctype html
|
|
||||||
html
|
|
||||||
head
|
|
||||||
meta(charset="UTF-8")
|
|
||||||
link(href='https://unpkg.com/sanitize.css' rel='stylesheet')
|
|
||||||
meta(name="viewport", content="width=device-width, initial-scale=1.0")
|
|
||||||
block meta
|
|
||||||
- const title = 'みす廃アラート'
|
|
||||||
- const desc = '✨Misskey での1日のノート数、フォロー数、フォロワー数をカウントし、深夜0時にお知らせする便利サービスです。';
|
|
||||||
title= title
|
|
||||||
meta(name='description' content=desc)
|
|
||||||
meta(property='og:title' content=title)
|
|
||||||
meta(property='og:description' content=desc)
|
|
||||||
meta(property='og:type' content='website')
|
|
||||||
meta(name='twitter:card' content='summary')
|
|
||||||
meta(name='twitter:site' content='@Xeltica')
|
|
||||||
meta(name='twitter:creator' content='@Xeltica')
|
|
||||||
link(rel='stylesheet' href='/assets/style.css')
|
|
||||||
block style
|
|
||||||
body
|
|
||||||
.background
|
|
||||||
.xd-container.xd-vstack
|
|
||||||
block content
|
|
||||||
footer
|
|
||||||
.xd-card
|
|
||||||
a(href="/terms") 利用規約
|
|
||||||
| ・
|
|
||||||
+exta(href="https://github.com/Xeltica/misshaialert") リポジトリ
|
|
||||||
p (C)2020-2021 Xeltica -
|
|
||||||
a(href="/about") version #{version}
|
|
||||||
block footer
|
|
||||||
block script
|
|
||||||
script(defer src='https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.14.0/js/all.min.js')
|
|
|
@ -1,40 +0,0 @@
|
||||||
mixin exta()
|
|
||||||
a(href=attributes.href target="_blank" rel="noopener noreferrer")
|
|
||||||
block
|
|
||||||
|
|
||||||
mixin ranking()
|
|
||||||
.xd-card
|
|
||||||
.header
|
|
||||||
h1.title みす廃ランキング
|
|
||||||
.body
|
|
||||||
p
|
|
||||||
i.fas.fa-users
|
|
||||||
strong 登録者数: !{usersCount}人
|
|
||||||
if state && state.nowCalculating
|
|
||||||
p 現在計算中です。後ほどご確認ください
|
|
||||||
else
|
|
||||||
+rankingTable()
|
|
||||||
p: a(href="/ranking") 全員分見る
|
|
||||||
|
|
||||||
mixin rankingTable()
|
|
||||||
table
|
|
||||||
thead: tr
|
|
||||||
th 順位
|
|
||||||
th ユーザー
|
|
||||||
th レート
|
|
||||||
tbody
|
|
||||||
-
|
|
||||||
let rank = 1;
|
|
||||||
let lastRating = '';
|
|
||||||
each rec in ranking
|
|
||||||
- const rating = rec.rating.toFixed(2);
|
|
||||||
tr
|
|
||||||
td=rank
|
|
||||||
td: +exta(href="https://" + rec.host + "/@" + rec.username) @!{rec.username}<wbr/>@!{rec.host}
|
|
||||||
td=rating
|
|
||||||
-
|
|
||||||
if (lastRating !== rating) {
|
|
||||||
rank++;
|
|
||||||
}
|
|
||||||
lastRating = rating
|
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
extends _base
|
|
||||||
|
|
||||||
block content
|
|
||||||
.xd-card
|
|
||||||
h1: a(href="/") みす廃あらーと
|
|
||||||
section
|
|
||||||
h2 バージョン !{version}
|
|
||||||
ul
|
|
||||||
each log in changelog
|
|
||||||
li= log
|
|
|
@ -1,7 +0,0 @@
|
||||||
extends _base
|
|
||||||
|
|
||||||
block content
|
|
||||||
h1: a(href="/") みす廃あらーと
|
|
||||||
section.xd-card
|
|
||||||
h2 エラー
|
|
||||||
p= error
|
|
|
@ -1,162 +0,0 @@
|
||||||
extends _base
|
|
||||||
|
|
||||||
block content
|
|
||||||
.xd-card
|
|
||||||
h1: a(href="/") みす廃あらーと
|
|
||||||
h2 マイページ
|
|
||||||
p おかえりなさい、@!{ user.username }@!{ user.host } さん。
|
|
||||||
|
|
||||||
case from
|
|
||||||
when "updateSettings"
|
|
||||||
.xd-alert.my-2
|
|
||||||
i.icon.fas.fa-thumbs-up
|
|
||||||
strong 設定を変更しました。
|
|
||||||
when "send"
|
|
||||||
.xd-alert.my-2
|
|
||||||
i.icon.fas.fa-thumbs-up
|
|
||||||
strong テスト送信しました。
|
|
||||||
|
|
||||||
if isGroundpolis
|
|
||||||
.xd-alert.my-2
|
|
||||||
i.icon.fas.fa-meteor
|
|
||||||
strong Groundpolis アカウントでログインしています。専用機能が有効化されました。
|
|
||||||
|
|
||||||
section#scores.xd-vstack
|
|
||||||
.xd-hstack
|
|
||||||
+ranking()
|
|
||||||
.xd-card
|
|
||||||
.header
|
|
||||||
h1.title みす廃データ
|
|
||||||
.body
|
|
||||||
table
|
|
||||||
thead
|
|
||||||
tr
|
|
||||||
th 内容
|
|
||||||
th スコア
|
|
||||||
th 前日比
|
|
||||||
tbody
|
|
||||||
tr
|
|
||||||
td ノート
|
|
||||||
td !{score.notesCount}
|
|
||||||
td !{score.notesDelta}
|
|
||||||
tr
|
|
||||||
td フォロー
|
|
||||||
td !{score.followingCount}
|
|
||||||
td !{score.followingDelta}
|
|
||||||
tr
|
|
||||||
td フォロワー
|
|
||||||
td !{score.followersCount}
|
|
||||||
td !{score.followersDelta}
|
|
||||||
tr
|
|
||||||
td フォロワー
|
|
||||||
td !{score.followersCount}
|
|
||||||
td !{score.followersDelta}
|
|
||||||
p みす廃レート: !{user.rating}
|
|
||||||
|
|
||||||
section.xd-card#settings
|
|
||||||
-
|
|
||||||
const visibilities = [
|
|
||||||
[ 'public', 'パブリック'],
|
|
||||||
[ 'home', isGroundpolis ? '未収載' : 'ホーム'],
|
|
||||||
[ 'followers', 'フォロワー'],
|
|
||||||
];
|
|
||||||
if (isGroundpolis) visibilities.push(['users', 'ログインユーザー']);
|
|
||||||
const alertModes = [
|
|
||||||
[ 'note', '自動的にノートを投稿' ],
|
|
||||||
[ 'notification', 'Misskeyに通知(標準)' ],
|
|
||||||
[ 'nothing', '通知しない' ],
|
|
||||||
];
|
|
||||||
const currentAlertModeLabel = alertModes.find(a => a[0] === user.alertMode)[1];
|
|
||||||
.header
|
|
||||||
h1.title 設定
|
|
||||||
.body
|
|
||||||
.xd-alert.danger.mb-2
|
|
||||||
i.icon.fas.fa-exclamation-circle
|
|
||||||
| スコア通知方法に「Misskey に通知」を選んでいる場合、Groundpolis v3 および Misskey v12 の最新版以外では動作しません。めいすきーや古いバージョンをお使いの方は、「自動的にノートを投稿」をお使いください。
|
|
||||||
form(method="post", action="/update-settings")
|
|
||||||
p: label スコア通知方法:
|
|
||||||
select#alertModeSelector(name="alertMode")
|
|
||||||
each set in alertModes
|
|
||||||
option(value=set[0], selected=(user.alertMode === set[0]))= set[1]
|
|
||||||
#hideWhenAlertModeNotNote
|
|
||||||
p: label 公開範囲:
|
|
||||||
select(name="visibility")
|
|
||||||
each set in visibilities
|
|
||||||
option(value=set[0], selected=(user.visibility === set[0]))= set[1]
|
|
||||||
p
|
|
||||||
| フラグ <br />
|
|
||||||
label
|
|
||||||
input(type="radio", name="flag", value="none", checked=!user.localOnly && !user.remoteFollowersOnly)
|
|
||||||
| なし(標準)<br />
|
|
||||||
label
|
|
||||||
input(type="radio", name="flag", value="localOnly", checked=user.localOnly)
|
|
||||||
| ローカルのみ<br />
|
|
||||||
if isGroundpolis
|
|
||||||
label
|
|
||||||
input(type="radio", name="flag", value="remoteFollowersOnly", checked=user.remoteFollowersOnly)
|
|
||||||
| リモートフォロワーとローカル<br />
|
|
||||||
#hideWhenAlertModeNothing
|
|
||||||
div
|
|
||||||
label 投稿テンプレート<br/>
|
|
||||||
textarea#template(name="template", maxlength=280, placeholder=defaultTemplate)=user.template || defaultTemplate
|
|
||||||
details()
|
|
||||||
summary ヘルプ
|
|
||||||
ul
|
|
||||||
li テンプレートに使える文字数は280文字です。
|
|
||||||
li 空欄にすると、デフォルト値にリセットされます。
|
|
||||||
li ハッシュタグ #misshaialert は、テンプレートに関わらず自動付与されます。
|
|
||||||
li
|
|
||||||
code {notesCount}
|
|
||||||
| といった形式のテキストは変数として扱われ、これを含めると投稿時に自動的に値が埋め込まれます。
|
|
||||||
|
|
||||||
p 変数の表を以下に示します。変数をクリックすると自動挿入されます。
|
|
||||||
table
|
|
||||||
thead: tr
|
|
||||||
th 変数
|
|
||||||
th 説明
|
|
||||||
tbody
|
|
||||||
each val, key in templateVariables
|
|
||||||
tr
|
|
||||||
td(onclick=`insert('{${key}}')`, style="cursor: pointer")=key
|
|
||||||
td=val.description
|
|
||||||
button.primary(type="submit") 保存
|
|
||||||
|
|
||||||
|
|
||||||
section.xd-card#settings
|
|
||||||
.header
|
|
||||||
h1.title 操作
|
|
||||||
.body
|
|
||||||
form.mb-2(action="/send", method="post"): button#send(style="display: inline-block") アラートをテスト送信
|
|
||||||
form.mb-2(action="/logout", method="post"): button#logout(style="display: inline-block") ログアウト
|
|
||||||
form.mb-2(action="/optout", method="post"): button.danger#optout(style="display: inline-block") アカウント連携を解除する
|
|
||||||
|
|
||||||
block script
|
|
||||||
script.
|
|
||||||
history.replaceState(null, null, '/');
|
|
||||||
document.getElementById('send').addEventListener('click', (e) => {
|
|
||||||
if (!confirm('現在の設定「!{currentAlertModeLabel}」に基づいてアラートを送信しますか?'))
|
|
||||||
e.preventDefault();
|
|
||||||
});
|
|
||||||
document.getElementById('optout').addEventListener('click', (e) => {
|
|
||||||
if (!confirm('連携を解除すると、統計情報などのデータが削除されてしまい、以後アラート機能をご利用いただけなくなります。この操作は変更できません。\n\nそれでもなお、連携を解除しますか?'))
|
|
||||||
e.preventDefault();
|
|
||||||
});
|
|
||||||
document.getElementById('logout').addEventListener('click', (e) => {
|
|
||||||
if (!confirm('ログアウトしますか?'))
|
|
||||||
e.preventDefault();
|
|
||||||
});
|
|
||||||
const hideWhenAlertModeNotNote = document.getElementById('hideWhenAlertModeNotNote');
|
|
||||||
const hideWhenAlertModeNothing = document.getElementById('hideWhenAlertModeNothing');
|
|
||||||
const alertModeSelector = document.getElementById('alertModeSelector');
|
|
||||||
const updateView = () => {
|
|
||||||
const value = alertModeSelector.value;
|
|
||||||
hideWhenAlertModeNotNote.style.display = value !== 'note' ? 'none' : 'block';
|
|
||||||
hideWhenAlertModeNothing.style.display = value === 'nothing' ? 'none' : 'block';
|
|
||||||
};
|
|
||||||
alertModeSelector.addEventListener('change', updateView);
|
|
||||||
updateView();
|
|
||||||
|
|
||||||
const template = document.getElementById('template');
|
|
||||||
function insert(text) {
|
|
||||||
template.value += text;
|
|
||||||
}
|
|
|
@ -1,15 +0,0 @@
|
||||||
extends _base
|
|
||||||
|
|
||||||
block content
|
|
||||||
.xd-card
|
|
||||||
h1: a(href="/") みす廃あらーと
|
|
||||||
section
|
|
||||||
h2 みす廃ランキング
|
|
||||||
details
|
|
||||||
summary これは何?
|
|
||||||
p みす廃ランキングは、独自に算出された「<strong>みす廃レート</strong>」の高い順ランキングです。毎日みす廃あらーとが発行される度に更新されます。
|
|
||||||
p みす廃レートは、登録日からの経過日数およびノート数から算出されます。
|
|
||||||
if state.nowCalculating
|
|
||||||
p 現在計算中です。後ほどご確認ください
|
|
||||||
else
|
|
||||||
+rankingTable
|
|
|
@ -1,15 +0,0 @@
|
||||||
extends _base
|
|
||||||
|
|
||||||
block content
|
|
||||||
.xd-card
|
|
||||||
h1: a(href="/") みす廃あらーと
|
|
||||||
section
|
|
||||||
h2 利用規約
|
|
||||||
ul
|
|
||||||
li 本サービスは「現状のまま」「無保証」で提供されます。本サービスを利用したことによる損害などについて、管理人は一切責任を負わないものとします。
|
|
||||||
li 本サービスは、Misskey プロジェクトとは一切関係がございません。
|
|
||||||
li ユーザーはインスタンスの諸規約に従った上で本サービスを使うものとします。インスタンスの規約により、自動投稿が禁止されている場合は本サービスを使用しないでください。
|
|
||||||
li 本サービスでは、接続先のアカウントが存在しない、トークンが失効してしまったなどの場合に、自動的にユーザーアカウントを削除します。
|
|
||||||
li 本サービスの仕様は、事前の予告無しに変更される可能性があります。
|
|
||||||
li 本サービスは、事前の予告無しに突然閉鎖される可能性があります。
|
|
||||||
li 本規約は、事前の予告無しに変更される可能性があります。
|
|
|
@ -1,45 +0,0 @@
|
||||||
extends _base
|
|
||||||
|
|
||||||
block content
|
|
||||||
case from
|
|
||||||
when 'logout'
|
|
||||||
.xd-alert.danger: strong ログアウトしました。
|
|
||||||
when 'optout'
|
|
||||||
.xd-alert.danger: strong 連携を解除しました。
|
|
||||||
.xd-card
|
|
||||||
h1
|
|
||||||
a(href="/") みす廃あらーと
|
|
||||||
small: a(href="/about") #{version}
|
|
||||||
h2= welcomeMessage
|
|
||||||
section.xd-card
|
|
||||||
p Misskey は楽しいものです。気がついたら1日中入り浸っていることも多いでしょう。
|
|
||||||
p さあ、今すぐみす廃アラートをインストールして、今日のあなたの Misskey 活動を把握しよう。
|
|
||||||
p 始める前に、
|
|
||||||
a(href="/terms") 利用規約
|
|
||||||
| を読んでください。
|
|
||||||
form(action="/login", method="get")
|
|
||||||
.xd-inputs
|
|
||||||
input.xd-input(type="text" placeholder="ホスト名(例: misskey.io)" name="host" required)
|
|
||||||
input.xd-button.primary(type="submit", value="ログイン")
|
|
||||||
+ranking()
|
|
||||||
section.xd-hstack
|
|
||||||
.xd-card
|
|
||||||
.header
|
|
||||||
h1.title 開発者
|
|
||||||
.body
|
|
||||||
p 何か困ったことがあったら、以下のアカウントにメッセージを送ってください。
|
|
||||||
ul
|
|
||||||
li: +exta(href="https://misskey.io/@ebi") @ebi@misskey.io
|
|
||||||
li: +exta(href="https://groundpolis.app/@X") @X@groundpolis.app
|
|
||||||
li: +exta(href="https://twitter.com/Xeltica") @Xeltica@twitter.com
|
|
||||||
li: +exta(href="mailto:xeltica@gmail.com") xeltica@gmail.com
|
|
||||||
.xd-card
|
|
||||||
.header
|
|
||||||
h1.title タイムライン
|
|
||||||
.body
|
|
||||||
p 近いうちに、ここで #misshaialert タグのタイムラインを表示します。まだ工事中です
|
|
||||||
<a href="https://github.com/xeltica/misshaialert" class="github-corner" aria-label="View source on GitHub"><svg width="80" height="80" viewBox="0 0 250 250" style="fill:#151513; color:#fff; position: absolute; top: 0; border: 0; right: 0;" aria-hidden="true"><path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path><path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"></path></svg></a><style>.github-corner:hover .octo-arm{animation:octocat-wave 560ms ease-in-out}@keyframes octocat-wave{0%,100%{transform:rotate(0)}20%,60%{transform:rotate(-25deg)}40%,80%{transform:rotate(10deg)}}@media (max-width:500px){.github-corner:hover .octo-arm{animation:none}.github-corner .octo-arm{animation:octocat-wave 560ms ease-in-out}}</style>
|
|
||||||
|
|
||||||
block script
|
|
||||||
script.
|
|
||||||
history.replaceState(null, null, '/');
|
|
Loading…
Add table
Add a link
Reference in a new issue