From b60f9fbc0089ade0b9dce3902489917ca8a57d42 Mon Sep 17 00:00:00 2001 From: syuilo Date: Fri, 7 May 2021 14:22:13 +0900 Subject: [PATCH] Improve ad --- locales/ja-JP.yml | 1 + migration/1620364649428-ad2.ts | 14 +++++++ src/client/components/global/ad.vue | 45 +++++++++++++-------- src/client/instance.ts | 8 +++- src/client/pages/instance/ads.vue | 6 +++ src/models/entities/ad.ts | 6 +++ src/server/api/endpoints/admin/ad/create.ts | 4 ++ src/server/api/endpoints/admin/ad/update.ts | 4 ++ src/server/api/endpoints/meta.ts | 2 +- 9 files changed, 72 insertions(+), 18 deletions(-) create mode 100644 migration/1620364649428-ad2.ts diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 0f786a6b14..31b02821bf 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -756,6 +756,7 @@ high: "高" middle: "中" low: "低" emailNotConfiguredWarning: "メールアドレスの設定がされていません。" +ratio: "比率" _forgotPassword: enterEmail: "アカウントに登録したメールアドレスを入力してください。そのアドレス宛てに、パスワードリセット用のリンクが送信されます。" diff --git a/migration/1620364649428-ad2.ts b/migration/1620364649428-ad2.ts new file mode 100644 index 0000000000..a2d7f563c2 --- /dev/null +++ b/migration/1620364649428-ad2.ts @@ -0,0 +1,14 @@ +import {MigrationInterface, QueryRunner} from "typeorm"; + +export class ad21620364649428 implements MigrationInterface { + name = 'ad21620364649428' + + public async up(queryRunner: QueryRunner): Promise { + await queryRunner.query(`ALTER TABLE "ad" ADD "ratio" integer NOT NULL DEFAULT '1'`); + } + + public async down(queryRunner: QueryRunner): Promise { + await queryRunner.query(`ALTER TABLE "ad" DROP COLUMN "ratio"`); + } + +} diff --git a/src/client/components/global/ad.vue b/src/client/components/global/ad.vue index f88a1d2026..e340f846ee 100644 --- a/src/client/components/global/ad.vue +++ b/src/client/components/global/ad.vue @@ -19,7 +19,7 @@