From 033c4bb12cbf3a337997f39080cbd65019abde24 Mon Sep 17 00:00:00 2001 From: Xeltica Date: Wed, 6 Jan 2021 22:47:18 +0900 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- migration/1596513280623-Init.ts | 18 +++++++++--------- migration/1596514165166-Init2.ts | 22 +++++++++++----------- migration/1599570288522-mypage.ts | 22 +++++++++++----------- migration/1599577510614-mode.ts | 18 +++++++++--------- src/server/router.ts | 2 +- src/views/_base.pug | 2 ++ styles/_xeltica-design.scss | 22 +++++++++++++++++++--- 7 files changed, 62 insertions(+), 44 deletions(-) diff --git a/migration/1596513280623-Init.ts b/migration/1596513280623-Init.ts index 8d3508c..8ac2f34 100644 --- a/migration/1596513280623-Init.ts +++ b/migration/1596513280623-Init.ts @@ -1,16 +1,16 @@ import {MigrationInterface, QueryRunner} from 'typeorm'; export class Init1596513280623 implements MigrationInterface { - name = 'Init1596513280623' + name = 'Init1596513280623' - public async up(queryRunner: QueryRunner): Promise { - await queryRunner.query('CREATE TABLE "user" ("id" SERIAL NOT NULL, "username" character varying NOT NULL, "host" character varying NOT NULL, "token" character varying NOT NULL, "prevNotesCount" integer NOT NULL, "prevFollowingCount" integer NOT NULL, "prevFollowersCount" integer NOT NULL, CONSTRAINT "PK_cace4a159ff9f2512dd42373760" PRIMARY KEY ("id"))'); - await queryRunner.query('CREATE UNIQUE INDEX "IDX_6269eebacdb25de8569298a52a" ON "user" ("username", "host") '); - } + public async up(queryRunner: QueryRunner): Promise { + await queryRunner.query('CREATE TABLE "user" ("id" SERIAL NOT NULL, "username" character varying NOT NULL, "host" character varying NOT NULL, "token" character varying NOT NULL, "prevNotesCount" integer NOT NULL, "prevFollowingCount" integer NOT NULL, "prevFollowersCount" integer NOT NULL, CONSTRAINT "PK_cace4a159ff9f2512dd42373760" PRIMARY KEY ("id"))'); + await queryRunner.query('CREATE UNIQUE INDEX "IDX_6269eebacdb25de8569298a52a" ON "user" ("username", "host") '); + } - public async down(queryRunner: QueryRunner): Promise { - await queryRunner.query('DROP INDEX "IDX_6269eebacdb25de8569298a52a"'); - await queryRunner.query('DROP TABLE "user"'); - } + public async down(queryRunner: QueryRunner): Promise { + await queryRunner.query('DROP INDEX "IDX_6269eebacdb25de8569298a52a"'); + await queryRunner.query('DROP TABLE "user"'); + } } diff --git a/migration/1596514165166-Init2.ts b/migration/1596514165166-Init2.ts index 32e9f51..76e3873 100644 --- a/migration/1596514165166-Init2.ts +++ b/migration/1596514165166-Init2.ts @@ -1,18 +1,18 @@ import {MigrationInterface, QueryRunner} from 'typeorm'; export class Init21596514165166 implements MigrationInterface { - name = 'Init21596514165166' + name = 'Init21596514165166' - public async up(queryRunner: QueryRunner): Promise { - await queryRunner.query('ALTER TABLE "user" ALTER COLUMN "prevNotesCount" SET DEFAULT 0'); - await queryRunner.query('ALTER TABLE "user" ALTER COLUMN "prevFollowingCount" SET DEFAULT 0'); - await queryRunner.query('ALTER TABLE "user" ALTER COLUMN "prevFollowersCount" SET DEFAULT 0'); - } + public async up(queryRunner: QueryRunner): Promise { + await queryRunner.query('ALTER TABLE "user" ALTER COLUMN "prevNotesCount" SET DEFAULT 0'); + await queryRunner.query('ALTER TABLE "user" ALTER COLUMN "prevFollowingCount" SET DEFAULT 0'); + await queryRunner.query('ALTER TABLE "user" ALTER COLUMN "prevFollowersCount" SET DEFAULT 0'); + } - public async down(queryRunner: QueryRunner): Promise { - await queryRunner.query('ALTER TABLE "user" ALTER COLUMN "prevFollowersCount" DROP DEFAULT'); - await queryRunner.query('ALTER TABLE "user" ALTER COLUMN "prevFollowingCount" DROP DEFAULT'); - await queryRunner.query('ALTER TABLE "user" ALTER COLUMN "prevNotesCount" DROP DEFAULT'); - } + public async down(queryRunner: QueryRunner): Promise { + await queryRunner.query('ALTER TABLE "user" ALTER COLUMN "prevFollowersCount" DROP DEFAULT'); + await queryRunner.query('ALTER TABLE "user" ALTER COLUMN "prevFollowingCount" DROP DEFAULT'); + await queryRunner.query('ALTER TABLE "user" ALTER COLUMN "prevNotesCount" DROP DEFAULT'); + } } diff --git a/migration/1599570288522-mypage.ts b/migration/1599570288522-mypage.ts index b0ce493..9d58963 100644 --- a/migration/1599570288522-mypage.ts +++ b/migration/1599570288522-mypage.ts @@ -1,18 +1,18 @@ import {MigrationInterface, QueryRunner} from 'typeorm'; export class mypage1599570288522 implements MigrationInterface { - name = 'mypage1599570288522' + name = 'mypage1599570288522' - public async up(queryRunner: QueryRunner): Promise { - await queryRunner.query('CREATE TABLE "used_token" ("token" character varying NOT NULL, CONSTRAINT "PK_7f2db4c33c33cd6b38e63393fe5" PRIMARY KEY ("token"))'); - await queryRunner.query('CREATE UNIQUE INDEX "IDX_7f2db4c33c33cd6b38e63393fe" ON "used_token" ("token") '); - await queryRunner.query('ALTER TABLE "user" ADD "misshaiToken" character varying NOT NULL DEFAULT \'\''); - } + public async up(queryRunner: QueryRunner): Promise { + await queryRunner.query('CREATE TABLE "used_token" ("token" character varying NOT NULL, CONSTRAINT "PK_7f2db4c33c33cd6b38e63393fe5" PRIMARY KEY ("token"))'); + await queryRunner.query('CREATE UNIQUE INDEX "IDX_7f2db4c33c33cd6b38e63393fe" ON "used_token" ("token") '); + await queryRunner.query('ALTER TABLE "user" ADD "misshaiToken" character varying NOT NULL DEFAULT \'\''); + } - public async down(queryRunner: QueryRunner): Promise { - await queryRunner.query('ALTER TABLE "user" DROP COLUMN "misshaiToken"'); - await queryRunner.query('DROP INDEX "IDX_7f2db4c33c33cd6b38e63393fe"'); - await queryRunner.query('DROP TABLE "used_token"'); - } + public async down(queryRunner: QueryRunner): Promise { + await queryRunner.query('ALTER TABLE "user" DROP COLUMN "misshaiToken"'); + await queryRunner.query('DROP INDEX "IDX_7f2db4c33c33cd6b38e63393fe"'); + await queryRunner.query('DROP TABLE "used_token"'); + } } diff --git a/migration/1599577510614-mode.ts b/migration/1599577510614-mode.ts index 9b1e3dc..29e2dfc 100644 --- a/migration/1599577510614-mode.ts +++ b/migration/1599577510614-mode.ts @@ -1,16 +1,16 @@ import {MigrationInterface, QueryRunner} from 'typeorm'; export class mode1599577510614 implements MigrationInterface { - name = 'mode1599577510614' + name = 'mode1599577510614' - public async up(queryRunner: QueryRunner): Promise { - await queryRunner.query('CREATE TYPE "user_alertmode_enum" AS ENUM(\'note\', \'notification\', \'nothing\')'); - await queryRunner.query('ALTER TABLE "user" ADD "alertMode" "user_alertmode_enum" NOT NULL DEFAULT \'note\''); - } + public async up(queryRunner: QueryRunner): Promise { + await queryRunner.query('CREATE TYPE "user_alertmode_enum" AS ENUM(\'note\', \'notification\', \'nothing\')'); + await queryRunner.query('ALTER TABLE "user" ADD "alertMode" "user_alertmode_enum" NOT NULL DEFAULT \'note\''); + } - public async down(queryRunner: QueryRunner): Promise { - await queryRunner.query('ALTER TABLE "user" DROP COLUMN "alertMode"'); - await queryRunner.query('DROP TYPE "user_alertmode_enum"'); - } + public async down(queryRunner: QueryRunner): Promise { + await queryRunner.query('ALTER TABLE "user" DROP COLUMN "alertMode"'); + await queryRunner.query('DROP TYPE "user_alertmode_enum"'); + } } diff --git a/src/server/router.ts b/src/server/router.ts index 33a029c..64f137e 100644 --- a/src/server/router.ts +++ b/src/server/router.ts @@ -24,7 +24,7 @@ const welcomeMessage = [ '今日、何ノート書いた?', '10000 ノートは初心者、そう思っていませんか?', '息するように Misskey、そんなあなたへ。', - 'あなたは真の Misskey 廃人ですか?' + 'あなたは真の Misskey 廃人ですか?', ]; const login = async (ctx: Context, user: Record, host: string, token: string) => { diff --git a/src/views/_base.pug b/src/views/_base.pug index 5a34509..7f33a6f 100644 --- a/src/views/_base.pug +++ b/src/views/_base.pug @@ -31,3 +31,5 @@ html 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') + \ No newline at end of file diff --git a/styles/_xeltica-design.scss b/styles/_xeltica-design.scss index 9cdea71..120e8bd 100644 --- a/styles/_xeltica-design.scss +++ b/styles/_xeltica-design.scss @@ -130,7 +130,7 @@ button, .xd-button { text-decoration: none; cursor: pointer; - &:hover { + &:hover, &:focus { background: var(--bg-pale-1); } &:active { @@ -141,7 +141,7 @@ button, .xd-button { background: var(--primary); color: var(--primary-fg); border-color: var(--primary-dark); - &:hover { + &:hover, &:focus { background: var(--primary-light); } &:active { @@ -153,7 +153,7 @@ button, .xd-button { background: var(--bg-danger); color: white; border-color: var(--divider-danger); - &:hover { + &:hover, &:focus { background: var(--bg-danger-lighten); } &:active { @@ -162,6 +162,22 @@ button, .xd-button { } } +textarea { + width: 100%; + font-size: 1rem; + padding: 16px; + border-radius: var(--radius); + background: var(--overlay); + border: none; + outline: none; + height: 8rem; + line-height: 1; + &:focus { + border: 1px solid var(--primary); + color: var(--fg); + } +} + // ul, ol { // > ul, > ol { // margin-bottom: 0;