mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-10 01:43:09 +02:00
This commit is contained in:
parent
f1bbbcfedf
commit
51bafe8259
5 changed files with 54 additions and 1 deletions
23
cli/mark-admin.js
Normal file
23
cli/mark-admin.js
Normal file
|
@ -0,0 +1,23 @@
|
|||
const mongo = require('mongodb');
|
||||
const User = require('../built/models/user').default;
|
||||
|
||||
const args = process.argv.slice(2);
|
||||
|
||||
const user = args[0];
|
||||
|
||||
const q = user.startsWith('@') ? {
|
||||
username: user.split('@')[1],
|
||||
host: user.split('@')[2] || null
|
||||
} : { _id: new mongo.ObjectID(user) };
|
||||
|
||||
console.log(`Mark as admin ${user}...`);
|
||||
|
||||
User.update(q, {
|
||||
$set: {
|
||||
isAdmin: true
|
||||
}
|
||||
}).then(() => {
|
||||
console.log(`Done ${user}`);
|
||||
}, e => {
|
||||
console.error(e);
|
||||
});
|
23
cli/mark-verified.js
Normal file
23
cli/mark-verified.js
Normal file
|
@ -0,0 +1,23 @@
|
|||
const mongo = require('mongodb');
|
||||
const User = require('../built/models/user').default;
|
||||
|
||||
const args = process.argv.slice(2);
|
||||
|
||||
const user = args[0];
|
||||
|
||||
const q = user.startsWith('@') ? {
|
||||
username: user.split('@')[1],
|
||||
host: user.split('@')[2] || null
|
||||
} : { _id: new mongo.ObjectID(user) };
|
||||
|
||||
console.log(`Mark as verfied ${user}...`);
|
||||
|
||||
User.update(q, {
|
||||
$set: {
|
||||
isVerified: true
|
||||
}
|
||||
}).then(() => {
|
||||
console.log(`Done ${user}`);
|
||||
}, e => {
|
||||
console.error(e);
|
||||
});
|
|
@ -56,6 +56,7 @@ common:
|
|||
my-token-regenerated: "あなたのトークンが更新されたのでサインアウトします。"
|
||||
i-like-sushi: "私は(プリンよりむしろ)寿司が好き"
|
||||
show-reversi-board-labels: "リバーシのボードの行と列のラベルを表示"
|
||||
verified-user: "認証済みのユーザー"
|
||||
|
||||
reversi:
|
||||
drawn: "引き分け"
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
<header class="bvonvjxbwzaiskogyhbwgyxvcgserpmu">
|
||||
<mk-avatar class="avatar" :user="note.user" v-if="$store.state.device.postStyle == 'smart'"/>
|
||||
<router-link class="name" :to="note.user | userPage" v-user-preview="note.user.id">{{ note.user | userName }}</router-link>
|
||||
<span class="is-verified" v-if="note.user.isVerified" title="%i18n:common.verified-user%">%fa:bookmark%</span>
|
||||
<span class="is-admin" v-if="note.user.isAdmin">admin</span>
|
||||
<span class="is-bot" v-if="note.user.isBot">bot</span>
|
||||
<span class="is-cat" v-if="note.user.isCat">cat</span>
|
||||
|
@ -69,6 +70,10 @@ root(isDark)
|
|||
&:hover
|
||||
text-decoration underline
|
||||
|
||||
> .is-verified
|
||||
margin-right 8px
|
||||
color #4dabf7
|
||||
|
||||
> .is-admin
|
||||
> .is-bot
|
||||
> .is-cat
|
||||
|
|
|
@ -95,7 +95,8 @@ export interface ILocalUser extends IUserBase {
|
|||
lastUsedAt: Date;
|
||||
isBot: boolean;
|
||||
isCat: boolean;
|
||||
isPro: boolean;
|
||||
isAdmin?: boolean;
|
||||
isVerified?: boolean;
|
||||
twoFactorSecret: string;
|
||||
twoFactorEnabled: boolean;
|
||||
twoFactorTempSecret?: string;
|
||||
|
|
Loading…
Reference in a new issue