diff --git a/locales/fr-FR.yml b/locales/fr-FR.yml index 080026afc..6fa81d865 100644 --- a/locales/fr-FR.yml +++ b/locales/fr-FR.yml @@ -192,7 +192,7 @@ newPassword: "Nouveau mot de passe" newPasswordRetype: "Nouveau mot de passe (répéter)" attachFile: "Joindre un fichier" more: "Plus !" -featured: "Surlignage" +featured: "Tendances" usernameOrUserId: "Nom d'utilisateur ou ID utilisateur" noSuchUser: "Utilisateur non trouvé" lookup: "Recherche" @@ -214,7 +214,7 @@ explore: "Découvrir" games: "Jeux de Misskey" messageRead: "Lus" noMoreHistory: "Plus d'histoire passée" -startMessaging: "Commencer à écrire un discutez" +startMessaging: "Commencer à discuter" nUsersRead: "{n} personnes ont lu" agreeTo: "D'accord {0}" tos: "Conditions d'utilisation" @@ -524,7 +524,7 @@ _tutorial: step7_3: "Alors, profitez de Misskey 🚀" _2fa: alreadyRegistered: "Cette étape à déjà été complétée" - registerDevice: "S’inscrire l'appareil" + registerDevice: "Ajouter un appareil" registerKey: "S’inscrire la clé" step1: "Tout d'abord, installez une application d'authentification, telle que {a} ou {b}, sur votre appareil." step2: "Ensuite, scannez le code QR affiché avec l'application." diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 40772f9b1..a77991ccc 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -468,6 +468,10 @@ unableToProcess: "操作を完了できません" recentUsed: "最近使用" install: "インストール" uninstall: "アンインストール" +installedApps: "インストールされたアプリ" +nothing: "ありません" +installedDate: "インストール日時" +lastUsedDate: "最終使用日時" _theme: explore: "テーマを探す" @@ -568,7 +572,11 @@ _permissions: _auth: shareAccess: "「{name}」がアカウントにアクセスすることを許可しますか?" + shareAccessAsk: "アカウントへのアクセスを許可しますか?" permissionAsk: "このアプリは次の権限を要求しています" + pleaseGoBack: "アプリケーションに戻ってやっていってください" + callback: "アプリケーションに戻っています" + denied: "アクセスを拒否しました" _antennaSources: all: "全てのノート" diff --git a/migration/1585361548360-miauth.ts b/migration/1585361548360-miauth.ts new file mode 100644 index 000000000..22d6c207f --- /dev/null +++ b/migration/1585361548360-miauth.ts @@ -0,0 +1,36 @@ +import {MigrationInterface, QueryRunner} from "typeorm"; + +export class miauth1585361548360 implements MigrationInterface { + name = 'miauth1585361548360' + + public async up(queryRunner: QueryRunner): Promise { + await queryRunner.query(`ALTER TABLE "access_token" ADD "lastUsedAt" TIMESTAMP WITH TIME ZONE DEFAULT null`, undefined); + await queryRunner.query(`ALTER TABLE "access_token" ADD "session" character varying(128) DEFAULT null`, undefined); + await queryRunner.query(`ALTER TABLE "access_token" ADD "name" character varying(128) DEFAULT null`, undefined); + await queryRunner.query(`ALTER TABLE "access_token" ADD "description" character varying(512) DEFAULT null`, undefined); + await queryRunner.query(`ALTER TABLE "access_token" ADD "iconUrl" character varying(512) DEFAULT null`, undefined); + await queryRunner.query(`ALTER TABLE "access_token" ADD "permission" character varying(64) array NOT NULL DEFAULT '{}'::varchar[]`, undefined); + await queryRunner.query(`ALTER TABLE "access_token" ADD "fetched" boolean NOT NULL DEFAULT false`, undefined); + await queryRunner.query(`ALTER TABLE "access_token" DROP CONSTRAINT "FK_a3ff16c90cc87a82a0b5959e560"`, undefined); + await queryRunner.query(`ALTER TABLE "access_token" ALTER COLUMN "appId" DROP NOT NULL`, undefined); + await queryRunner.query(`ALTER TABLE "access_token" ALTER COLUMN "appId" SET DEFAULT null`, undefined); + await queryRunner.query(`CREATE INDEX "IDX_bf3a053c07d9fb5d87317c56ee" ON "access_token" ("session") `, undefined); + await queryRunner.query(`ALTER TABLE "access_token" ADD CONSTRAINT "FK_a3ff16c90cc87a82a0b5959e560" FOREIGN KEY ("appId") REFERENCES "app"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, undefined); + } + + public async down(queryRunner: QueryRunner): Promise { + await queryRunner.query(`ALTER TABLE "access_token" DROP CONSTRAINT "FK_a3ff16c90cc87a82a0b5959e560"`, undefined); + await queryRunner.query(`DROP INDEX "IDX_bf3a053c07d9fb5d87317c56ee"`, undefined); + await queryRunner.query(`ALTER TABLE "access_token" ALTER COLUMN "appId" DROP DEFAULT`, undefined); + await queryRunner.query(`ALTER TABLE "access_token" ALTER COLUMN "appId" SET NOT NULL`, undefined); + await queryRunner.query(`ALTER TABLE "access_token" ADD CONSTRAINT "FK_a3ff16c90cc87a82a0b5959e560" FOREIGN KEY ("appId") REFERENCES "app"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, undefined); + await queryRunner.query(`ALTER TABLE "access_token" DROP COLUMN "fetched"`, undefined); + await queryRunner.query(`ALTER TABLE "access_token" DROP COLUMN "permission"`, undefined); + await queryRunner.query(`ALTER TABLE "access_token" DROP COLUMN "iconUrl"`, undefined); + await queryRunner.query(`ALTER TABLE "access_token" DROP COLUMN "description"`, undefined); + await queryRunner.query(`ALTER TABLE "access_token" DROP COLUMN "name"`, undefined); + await queryRunner.query(`ALTER TABLE "access_token" DROP COLUMN "session"`, undefined); + await queryRunner.query(`ALTER TABLE "access_token" DROP COLUMN "lastUsedAt"`, undefined); + } + +} diff --git a/migration/1585385921215-custom-notification.ts b/migration/1585385921215-custom-notification.ts new file mode 100644 index 000000000..24c29d53e --- /dev/null +++ b/migration/1585385921215-custom-notification.ts @@ -0,0 +1,48 @@ +import {MigrationInterface, QueryRunner} from "typeorm"; + +export class customNotification1585385921215 implements MigrationInterface { + name = 'customNotification1585385921215' + + public async up(queryRunner: QueryRunner): Promise { + await queryRunner.query(`ALTER TABLE "notification" ADD "customBody" character varying(2048)`, undefined); + await queryRunner.query(`ALTER TABLE "notification" ADD "customHeader" character varying(256)`, undefined); + await queryRunner.query(`ALTER TABLE "notification" ADD "customIcon" character varying(1024)`, undefined); + await queryRunner.query(`ALTER TABLE "notification" ADD "appAccessTokenId" character varying(32)`, undefined); + await queryRunner.query(`ALTER TABLE "notification" DROP CONSTRAINT "FK_3b4e96eec8d36a8bbb9d02aa710"`, undefined); + await queryRunner.query(`ALTER TABLE "notification" ALTER COLUMN "notifierId" DROP NOT NULL`, undefined); + await queryRunner.query(`COMMENT ON COLUMN "notification"."notifierId" IS 'The ID of sender user of the Notification.'`, undefined); + await queryRunner.query(`ALTER TYPE "public"."notification_type_enum" RENAME TO "notification_type_enum_old"`, undefined); + await queryRunner.query(`CREATE TYPE "notification_type_enum" AS ENUM('follow', 'mention', 'reply', 'renote', 'quote', 'reaction', 'pollVote', 'receiveFollowRequest', 'followRequestAccepted', 'groupInvited', 'app')`, undefined); + await queryRunner.query(`ALTER TABLE "notification" ALTER COLUMN "type" TYPE "notification_type_enum" USING "type"::"text"::"notification_type_enum"`, undefined); + await queryRunner.query(`DROP TYPE "notification_type_enum_old"`, undefined); + await queryRunner.query(`COMMENT ON COLUMN "notification"."type" IS 'The type of the Notification.'`, undefined); + await queryRunner.query(`CREATE INDEX "IDX_3b4e96eec8d36a8bbb9d02aa71" ON "notification" ("notifierId") `, undefined); + await queryRunner.query(`CREATE INDEX "IDX_33f33cc8ef29d805a97ff4628b" ON "notification" ("type") `, undefined); + await queryRunner.query(`CREATE INDEX "IDX_080ab397c379af09b9d2169e5b" ON "notification" ("isRead") `, undefined); + await queryRunner.query(`CREATE INDEX "IDX_e22bf6bda77b6adc1fd9e75c8c" ON "notification" ("appAccessTokenId") `, undefined); + await queryRunner.query(`ALTER TABLE "notification" ADD CONSTRAINT "FK_3b4e96eec8d36a8bbb9d02aa710" FOREIGN KEY ("notifierId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, undefined); + await queryRunner.query(`ALTER TABLE "notification" ADD CONSTRAINT "FK_e22bf6bda77b6adc1fd9e75c8c9" FOREIGN KEY ("appAccessTokenId") REFERENCES "access_token"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, undefined); + } + + public async down(queryRunner: QueryRunner): Promise { + await queryRunner.query(`ALTER TABLE "notification" DROP CONSTRAINT "FK_e22bf6bda77b6adc1fd9e75c8c9"`, undefined); + await queryRunner.query(`ALTER TABLE "notification" DROP CONSTRAINT "FK_3b4e96eec8d36a8bbb9d02aa710"`, undefined); + await queryRunner.query(`DROP INDEX "IDX_e22bf6bda77b6adc1fd9e75c8c"`, undefined); + await queryRunner.query(`DROP INDEX "IDX_080ab397c379af09b9d2169e5b"`, undefined); + await queryRunner.query(`DROP INDEX "IDX_33f33cc8ef29d805a97ff4628b"`, undefined); + await queryRunner.query(`DROP INDEX "IDX_3b4e96eec8d36a8bbb9d02aa71"`, undefined); + await queryRunner.query(`COMMENT ON COLUMN "notification"."type" IS ''`, undefined); + await queryRunner.query(`CREATE TYPE "notification_type_enum_old" AS ENUM('follow', 'mention', 'reply', 'renote', 'quote', 'reaction', 'pollVote', 'receiveFollowRequest', 'followRequestAccepted', 'groupInvited')`, undefined); + await queryRunner.query(`ALTER TABLE "notification" ALTER COLUMN "type" TYPE "notification_type_enum_old" USING "type"::"text"::"notification_type_enum_old"`, undefined); + await queryRunner.query(`DROP TYPE "notification_type_enum"`, undefined); + await queryRunner.query(`ALTER TYPE "notification_type_enum_old" RENAME TO "notification_type_enum"`, undefined); + await queryRunner.query(`COMMENT ON COLUMN "notification"."notifierId" IS ''`, undefined); + await queryRunner.query(`ALTER TABLE "notification" ALTER COLUMN "notifierId" SET NOT NULL`, undefined); + await queryRunner.query(`ALTER TABLE "notification" ADD CONSTRAINT "FK_3b4e96eec8d36a8bbb9d02aa710" FOREIGN KEY ("notifierId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, undefined); + await queryRunner.query(`ALTER TABLE "notification" DROP COLUMN "appAccessTokenId"`, undefined); + await queryRunner.query(`ALTER TABLE "notification" DROP COLUMN "customIcon"`, undefined); + await queryRunner.query(`ALTER TABLE "notification" DROP COLUMN "customHeader"`, undefined); + await queryRunner.query(`ALTER TABLE "notification" DROP COLUMN "customBody"`, undefined); + } + +} diff --git a/package.json b/package.json index fb61e000f..857881c24 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "misskey", "author": "syuilo ", - "version": "12.26.0", + "version": "12.27.0", "codename": "indigo", "repository": { "type": "git", @@ -169,6 +169,7 @@ "lolex": "5.1.2", "lookup-dns-cache": "2.1.0", "markdown-it": "10.0.0", + "markdown-it-anchor": "5.2.5", "mocha": "7.0.1", "moji": "0.5.1", "ms": "2.1.2", diff --git a/src/client/components/notes.vue b/src/client/components/notes.vue index 65dda1757..0cf4dee2d 100644 --- a/src/client/components/notes.vue +++ b/src/client/components/notes.vue @@ -1,6 +1,6 @@ diff --git a/src/client/pages/doc.vue b/src/client/pages/doc.vue index e0db5a374..7c4f7ebcc 100644 --- a/src/client/pages/doc.vue +++ b/src/client/pages/doc.vue @@ -18,6 +18,7 @@ import Vue from 'vue'; import { faFileAlt } from '@fortawesome/free-solid-svg-icons' import MarkdownIt from 'markdown-it'; +import MarkdownItAnchor from 'markdown-it-anchor'; import i18n from '../i18n'; import { url, lang } from '../config'; import MkLink from '../components/link.vue'; @@ -26,6 +27,10 @@ const markdown = MarkdownIt({ html: true }); +markdown.use(MarkdownItAnchor, { + slugify: (s) => encodeURIComponent(String(s).trim().replace(/\s+/g, '-')) +}); + export default Vue.extend({ i18n, @@ -72,6 +77,9 @@ export default Vue.extend({ }, parse(md: string) { + // 変数置換 + md = md.replace(/\{_URL_\}/g, url); + // markdown の全容をパースする const parsed = markdown.parse(md, {}); if (parsed.length === 0) return; @@ -115,6 +123,23 @@ export default Vue.extend({ margin-bottom: 0; } + ::v-deep a { + color: var(--link); + } + + ::v-deep blockquote { + display: block; + margin: 8px; + padding: 6px 0 6px 12px; + color: var(--fg); + border-left: solid 3px var(--fg); + opacity: 0.7; + + p { + margin: 0; + } + } + ::v-deep h2 { font-size: 1.25em; padding: 0 0 0.5em 0; diff --git a/src/client/pages/follow-requests.vue b/src/client/pages/follow-requests.vue index a900bf735..b310d9f58 100644 --- a/src/client/pages/follow-requests.vue +++ b/src/client/pages/follow-requests.vue @@ -5,7 +5,7 @@ diff --git a/src/client/pages/preferences/theme.vue b/src/client/pages/preferences/theme.vue index fcea45739..f35b5d6ed 100644 --- a/src/client/pages/preferences/theme.vue +++ b/src/client/pages/preferences/theme.vue @@ -57,7 +57,8 @@ {{ $t('_theme.code') }} - {{ $t('install') }} + {{ $t('install') }} + {{ $t('preview') }}
@@ -79,7 +80,7 @@