0
0
Fork 0
This commit is contained in:
Xeltica 2021-01-06 22:47:18 +09:00
parent 3077e8cc0f
commit 033c4bb12c
7 changed files with 62 additions and 44 deletions

View file

@ -1,16 +1,16 @@
import {MigrationInterface, QueryRunner} from 'typeorm'; import {MigrationInterface, QueryRunner} from 'typeorm';
export class Init1596513280623 implements MigrationInterface { export class Init1596513280623 implements MigrationInterface {
name = 'Init1596513280623' name = 'Init1596513280623'
public async up(queryRunner: QueryRunner): Promise<void> { public async up(queryRunner: QueryRunner): Promise<void> {
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 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") '); await queryRunner.query('CREATE UNIQUE INDEX "IDX_6269eebacdb25de8569298a52a" ON "user" ("username", "host") ');
} }
public async down(queryRunner: QueryRunner): Promise<void> { public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query('DROP INDEX "IDX_6269eebacdb25de8569298a52a"'); await queryRunner.query('DROP INDEX "IDX_6269eebacdb25de8569298a52a"');
await queryRunner.query('DROP TABLE "user"'); await queryRunner.query('DROP TABLE "user"');
} }
} }

View file

@ -1,18 +1,18 @@
import {MigrationInterface, QueryRunner} from 'typeorm'; import {MigrationInterface, QueryRunner} from 'typeorm';
export class Init21596514165166 implements MigrationInterface { export class Init21596514165166 implements MigrationInterface {
name = 'Init21596514165166' name = 'Init21596514165166'
public async up(queryRunner: QueryRunner): Promise<void> { public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query('ALTER TABLE "user" ALTER COLUMN "prevNotesCount" SET DEFAULT 0'); 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 "prevFollowingCount" SET DEFAULT 0');
await queryRunner.query('ALTER TABLE "user" ALTER COLUMN "prevFollowersCount" SET DEFAULT 0'); await queryRunner.query('ALTER TABLE "user" ALTER COLUMN "prevFollowersCount" SET DEFAULT 0');
} }
public async down(queryRunner: QueryRunner): Promise<void> { public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query('ALTER TABLE "user" ALTER COLUMN "prevFollowersCount" DROP DEFAULT'); 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 "prevFollowingCount" DROP DEFAULT');
await queryRunner.query('ALTER TABLE "user" ALTER COLUMN "prevNotesCount" DROP DEFAULT'); await queryRunner.query('ALTER TABLE "user" ALTER COLUMN "prevNotesCount" DROP DEFAULT');
} }
} }

View file

@ -1,18 +1,18 @@
import {MigrationInterface, QueryRunner} from 'typeorm'; import {MigrationInterface, QueryRunner} from 'typeorm';
export class mypage1599570288522 implements MigrationInterface { export class mypage1599570288522 implements MigrationInterface {
name = 'mypage1599570288522' name = 'mypage1599570288522'
public async up(queryRunner: QueryRunner): Promise<void> { public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query('CREATE TABLE "used_token" ("token" character varying NOT NULL, CONSTRAINT "PK_7f2db4c33c33cd6b38e63393fe5" PRIMARY KEY ("token"))'); 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('CREATE UNIQUE INDEX "IDX_7f2db4c33c33cd6b38e63393fe" ON "used_token" ("token") ');
await queryRunner.query('ALTER TABLE "user" ADD "misshaiToken" character varying NOT NULL DEFAULT \'\''); await queryRunner.query('ALTER TABLE "user" ADD "misshaiToken" character varying NOT NULL DEFAULT \'\'');
} }
public async down(queryRunner: QueryRunner): Promise<void> { public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query('ALTER TABLE "user" DROP COLUMN "misshaiToken"'); await queryRunner.query('ALTER TABLE "user" DROP COLUMN "misshaiToken"');
await queryRunner.query('DROP INDEX "IDX_7f2db4c33c33cd6b38e63393fe"'); await queryRunner.query('DROP INDEX "IDX_7f2db4c33c33cd6b38e63393fe"');
await queryRunner.query('DROP TABLE "used_token"'); await queryRunner.query('DROP TABLE "used_token"');
} }
} }

View file

@ -1,16 +1,16 @@
import {MigrationInterface, QueryRunner} from 'typeorm'; import {MigrationInterface, QueryRunner} from 'typeorm';
export class mode1599577510614 implements MigrationInterface { export class mode1599577510614 implements MigrationInterface {
name = 'mode1599577510614' name = 'mode1599577510614'
public async up(queryRunner: QueryRunner): Promise<void> { public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query('CREATE TYPE "user_alertmode_enum" AS ENUM(\'note\', \'notification\', \'nothing\')'); 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\''); await queryRunner.query('ALTER TABLE "user" ADD "alertMode" "user_alertmode_enum" NOT NULL DEFAULT \'note\'');
} }
public async down(queryRunner: QueryRunner): Promise<void> { public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query('ALTER TABLE "user" DROP COLUMN "alertMode"'); await queryRunner.query('ALTER TABLE "user" DROP COLUMN "alertMode"');
await queryRunner.query('DROP TYPE "user_alertmode_enum"'); await queryRunner.query('DROP TYPE "user_alertmode_enum"');
} }
} }

View file

@ -24,7 +24,7 @@ const welcomeMessage = [
'今日、何ノート書いた?', '今日、何ノート書いた?',
'10000 ノートは初心者、そう思っていませんか?', '10000 ノートは初心者、そう思っていませんか?',
'息するように Misskey、そんなあなたへ。', '息するように Misskey、そんなあなたへ。',
'あなたは真の Misskey 廃人ですか?' 'あなたは真の Misskey 廃人ですか?',
]; ];
const login = async (ctx: Context, user: Record<string, unknown>, host: string, token: string) => { const login = async (ctx: Context, user: Record<string, unknown>, host: string, token: string) => {

View file

@ -31,3 +31,5 @@ html
a(href="/about") version #{version} a(href="/about") version #{version}
block footer block footer
block script block script
script(defer src='https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.14.0/js/all.min.js')

View file

@ -130,7 +130,7 @@ button, .xd-button {
text-decoration: none; text-decoration: none;
cursor: pointer; cursor: pointer;
&:hover { &:hover, &:focus {
background: var(--bg-pale-1); background: var(--bg-pale-1);
} }
&:active { &:active {
@ -141,7 +141,7 @@ button, .xd-button {
background: var(--primary); background: var(--primary);
color: var(--primary-fg); color: var(--primary-fg);
border-color: var(--primary-dark); border-color: var(--primary-dark);
&:hover { &:hover, &:focus {
background: var(--primary-light); background: var(--primary-light);
} }
&:active { &:active {
@ -153,7 +153,7 @@ button, .xd-button {
background: var(--bg-danger); background: var(--bg-danger);
color: white; color: white;
border-color: var(--divider-danger); border-color: var(--divider-danger);
&:hover { &:hover, &:focus {
background: var(--bg-danger-lighten); background: var(--bg-danger-lighten);
} }
&:active { &: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 {
// > ul, > ol { // > ul, > ol {
// margin-bottom: 0; // margin-bottom: 0;