diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index f1cfec046..14b8daad4 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -338,6 +338,7 @@ auth/views/index.vue: sign-in: "サインインしてください" common/views/pages/explore.vue: + pinned-users: "ピン留めされたユーザー" popular-users: "人気のユーザー" recently-updated-users: "最近投稿したユーザー" recently-registered-users: "新規ユーザー" @@ -1262,7 +1263,7 @@ admin/views/instance.vue: invite: "招待" save: "保存" saved: "保存しました" - user-recommendation-config: "おすすめユーザー" + pinned-users: "ピン留めユーザー" email-config: "メールサーバーの設定" email-config-info: "メールアドレス確認やパスワードリセットの際に使われます。" enable-email: "メール配信を有効にする" diff --git a/migration/1557476068003-PinnedUsers.ts b/migration/1557476068003-PinnedUsers.ts new file mode 100644 index 000000000..4e7222aaf --- /dev/null +++ b/migration/1557476068003-PinnedUsers.ts @@ -0,0 +1,13 @@ +import {MigrationInterface, QueryRunner} from "typeorm"; + +export class PinnedUsers1557476068003 implements MigrationInterface { + + public async up(queryRunner: QueryRunner): Promise { + await queryRunner.query(`ALTER TABLE "meta" ADD "pinnedUsers" character varying(256) array NOT NULL DEFAULT '{}'::varchar[]`); + } + + public async down(queryRunner: QueryRunner): Promise { + await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "pinnedUsers"`); + } + +} diff --git a/src/client/app/admin/views/instance.vue b/src/client/app/admin/views/instance.vue index cca4e5f66..d81edc8fe 100644 --- a/src/client/app/admin/views/instance.vue +++ b/src/client/app/admin/views/instance.vue @@ -82,6 +82,14 @@ + + +
+ + {{ $t('save') }} +
+
+
@@ -190,6 +198,7 @@ export default Vue.extend({ enableServiceWorker: false, swPublicKey: null, swPrivateKey: null, + pinnedUsers: [], faHeadset, faShieldAlt, faGhost, faUserPlus, farEnvelope, faBolt }; }, @@ -239,6 +248,7 @@ export default Vue.extend({ this.enableServiceWorker = meta.enableServiceWorker; this.swPublicKey = meta.swPublickey; this.swPrivateKey = meta.swPrivateKey; + this.pinnedUsers = meta.pinnedUsers.join('\n'); }); }, @@ -297,7 +307,8 @@ export default Vue.extend({ smtpPass: this.smtpAuth ? this.smtpPass : '', enableServiceWorker: this.enableServiceWorker, swPublicKey: this.swPublicKey, - swPrivateKey: this.swPrivateKey + swPrivateKey: this.swPrivateKey, + pinnedUsers: this.pinnedUsers.split('\n') }).then(() => { this.$root.dialog({ type: 'success', diff --git a/src/client/app/common/views/pages/explore.vue b/src/client/app/common/views/pages/explore.vue index 107603d69..d0e98035f 100644 --- a/src/client/app/common/views/pages/explore.vue +++ b/src/client/app/common/views/pages/explore.vue @@ -26,6 +26,9 @@