diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index d29b96af1d..32a7fad398 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -1907,6 +1907,7 @@ deck/deck.user-column.vue: activity: "アクティビティ" timeline: "タイムライン" pinned-notes: "ピン留めされた投稿" + pinned-page: "ピン留めされたページ" docs: edit-this-page-on-github: "間違いや改善点を見つけましたか?" @@ -1946,6 +1947,8 @@ pages: are-you-sure-delete: "このページを削除しますか?" page-deleted: "ページを削除しました" edit-this-page: "このページを編集" + pin-this-page: "ピン留め" + unpin-this-page: "ピン留め解除" view-source: "ソースを表示" view-page: "ページを見る" like: "いいね" @@ -1964,6 +1967,7 @@ pages: url: "ページURL" summary: "ページの要約" align-center: "中央寄せ" + hide-title-when-pinned: "ピン留めされているときにタイトルを非表示" font: "フォント" fontSerif: "セリフ" fontSansSerif: "サンセリフ" diff --git a/migration/1562444565093-PinnedPage.ts b/migration/1562444565093-PinnedPage.ts new file mode 100644 index 0000000000..4bdee22748 --- /dev/null +++ b/migration/1562444565093-PinnedPage.ts @@ -0,0 +1,17 @@ +import {MigrationInterface, QueryRunner} from "typeorm"; + +export class PinnedPage1562444565093 implements MigrationInterface { + + public async up(queryRunner: QueryRunner): Promise { + await queryRunner.query(`ALTER TABLE "user_profile" ADD "pinnedPageId" character varying(32)`); + await queryRunner.query(`ALTER TABLE "user_profile" ADD CONSTRAINT "UQ_6dc44f1ceb65b1e72bacef2ca27" UNIQUE ("pinnedPageId")`); + await queryRunner.query(`ALTER TABLE "user_profile" ADD CONSTRAINT "FK_6dc44f1ceb65b1e72bacef2ca27" FOREIGN KEY ("pinnedPageId") REFERENCES "page"("id") ON DELETE SET NULL ON UPDATE NO ACTION`); + } + + public async down(queryRunner: QueryRunner): Promise { + await queryRunner.query(`ALTER TABLE "user_profile" DROP CONSTRAINT "FK_6dc44f1ceb65b1e72bacef2ca27"`); + await queryRunner.query(`ALTER TABLE "user_profile" DROP CONSTRAINT "UQ_6dc44f1ceb65b1e72bacef2ca27"`); + await queryRunner.query(`ALTER TABLE "user_profile" DROP COLUMN "pinnedPageId"`); + } + +} diff --git a/migration/1562448332510-PageTitleHideOption.ts b/migration/1562448332510-PageTitleHideOption.ts new file mode 100644 index 0000000000..acc9b7e26f --- /dev/null +++ b/migration/1562448332510-PageTitleHideOption.ts @@ -0,0 +1,13 @@ +import {MigrationInterface, QueryRunner} from "typeorm"; + +export class PageTitleHideOption1562448332510 implements MigrationInterface { + + public async up(queryRunner: QueryRunner): Promise { + await queryRunner.query(`ALTER TABLE "page" ADD "hideTitleWhenPinned" boolean NOT NULL DEFAULT false`); + } + + public async down(queryRunner: QueryRunner): Promise { + await queryRunner.query(`ALTER TABLE "page" DROP COLUMN "hideTitleWhenPinned"`); + } + +} diff --git a/src/client/app/common/views/pages/page/page.block.vue b/src/client/app/common/views/components/page/page.block.vue similarity index 100% rename from src/client/app/common/views/pages/page/page.block.vue rename to src/client/app/common/views/components/page/page.block.vue diff --git a/src/client/app/common/views/pages/page/page.button.vue b/src/client/app/common/views/components/page/page.button.vue similarity index 98% rename from src/client/app/common/views/pages/page/page.button.vue rename to src/client/app/common/views/components/page/page.button.vue index 4dc6570019..87112aca0d 100644 --- a/src/client/app/common/views/pages/page/page.button.vue +++ b/src/client/app/common/views/components/page/page.button.vue @@ -49,7 +49,7 @@ export default Vue.extend({ diff --git a/src/client/app/common/views/pages/page/page.counter.vue b/src/client/app/common/views/components/page/page.counter.vue similarity index 100% rename from src/client/app/common/views/pages/page/page.counter.vue rename to src/client/app/common/views/components/page/page.counter.vue diff --git a/src/client/app/common/views/pages/page/page.if.vue b/src/client/app/common/views/components/page/page.if.vue similarity index 100% rename from src/client/app/common/views/pages/page/page.if.vue rename to src/client/app/common/views/components/page/page.if.vue diff --git a/src/client/app/common/views/pages/page/page.image.vue b/src/client/app/common/views/components/page/page.image.vue similarity index 100% rename from src/client/app/common/views/pages/page/page.image.vue rename to src/client/app/common/views/components/page/page.image.vue diff --git a/src/client/app/common/views/pages/page/page.number-input.vue b/src/client/app/common/views/components/page/page.number-input.vue similarity index 100% rename from src/client/app/common/views/pages/page/page.number-input.vue rename to src/client/app/common/views/components/page/page.number-input.vue diff --git a/src/client/app/common/views/pages/page/page.post.vue b/src/client/app/common/views/components/page/page.post.vue similarity index 100% rename from src/client/app/common/views/pages/page/page.post.vue rename to src/client/app/common/views/components/page/page.post.vue diff --git a/src/client/app/common/views/pages/page/page.section.vue b/src/client/app/common/views/components/page/page.section.vue similarity index 100% rename from src/client/app/common/views/pages/page/page.section.vue rename to src/client/app/common/views/components/page/page.section.vue diff --git a/src/client/app/common/views/pages/page/page.switch.vue b/src/client/app/common/views/components/page/page.switch.vue similarity index 100% rename from src/client/app/common/views/pages/page/page.switch.vue rename to src/client/app/common/views/components/page/page.switch.vue diff --git a/src/client/app/common/views/pages/page/page.text-input.vue b/src/client/app/common/views/components/page/page.text-input.vue similarity index 100% rename from src/client/app/common/views/pages/page/page.text-input.vue rename to src/client/app/common/views/components/page/page.text-input.vue diff --git a/src/client/app/common/views/pages/page/page.text.vue b/src/client/app/common/views/components/page/page.text.vue similarity index 100% rename from src/client/app/common/views/pages/page/page.text.vue rename to src/client/app/common/views/components/page/page.text.vue diff --git a/src/client/app/common/views/pages/page/page.textarea-input.vue b/src/client/app/common/views/components/page/page.textarea-input.vue similarity index 100% rename from src/client/app/common/views/pages/page/page.textarea-input.vue rename to src/client/app/common/views/components/page/page.textarea-input.vue diff --git a/src/client/app/common/views/pages/page/page.textarea.vue b/src/client/app/common/views/components/page/page.textarea.vue similarity index 100% rename from src/client/app/common/views/pages/page/page.textarea.vue rename to src/client/app/common/views/components/page/page.textarea.vue diff --git a/src/client/app/common/views/pages/page/page.vue b/src/client/app/common/views/components/page/page.vue similarity index 72% rename from src/client/app/common/views/pages/page/page.vue rename to src/client/app/common/views/components/page/page.vue index a93d5316d5..99e627fd89 100644 --- a/src/client/app/common/views/pages/page/page.vue +++ b/src/client/app/common/views/components/page/page.vue @@ -1,6 +1,6 @@