From 8b6f88f7aa064a9584b81dcb90ead459bd717095 Mon Sep 17 00:00:00 2001 From: freeplay Date: Sat, 23 Dec 2023 06:23:17 +0900 Subject: [PATCH] feat: RTL Layout Support --- README.md | 2 + packages/backend/src/server/web/bios.css | 4 +- packages/backend/src/server/web/cli.css | 2 +- packages/backend/src/server/web/style.css | 16 +++---- packages/backend/src/services/send-email.ts | 2 +- .../client/src/components/MkAbuseReport.vue | 6 +-- .../src/components/MkAbuseReportWindow.vue | 2 +- packages/client/src/components/MkButton.vue | 6 +-- .../src/components/MkChannelFollowButton.vue | 6 +-- .../src/components/MkChannelPreview.vue | 10 ++--- packages/client/src/components/MkChart.vue | 2 +- .../client/src/components/MkChartTooltip.vue | 2 +- .../client/src/components/MkContainer.vue | 8 ++-- .../client/src/components/MkCropperDialog.vue | 2 +- packages/client/src/components/MkCwButton.vue | 4 +- .../src/components/MkDateSeparatedList.vue | 8 ++-- .../client/src/components/MkDrive.file.vue | 10 ++--- .../client/src/components/MkDrive.folder.vue | 12 +++--- .../src/components/MkDrive.navFolder.vue | 2 +- packages/client/src/components/MkDrive.vue | 4 +- .../src/components/MkDriveFileThumbnail.vue | 2 +- .../src/components/MkDriveSelectDialog.vue | 2 +- .../client/src/components/MkEmojiPicker.vue | 4 +- .../src/components/MkFileListForAdmin.vue | 10 +++-- packages/client/src/components/MkFolder.vue | 2 +- .../client/src/components/MkFollowButton.vue | 6 +-- .../src/components/MkGalleryPostPreview.vue | 4 +- packages/client/src/components/MkGoogle.vue | 2 +- .../client/src/components/MkImageViewer.vue | 6 +-- packages/client/src/components/MkInfo.vue | 4 +- .../src/components/MkInstanceCardMini.vue | 4 +- .../src/components/MkInstanceSelectDialog.vue | 2 +- .../client/src/components/MkInstanceStats.vue | 2 +- .../src/components/MkInstanceTicker.vue | 2 +- packages/client/src/components/MkKeyValue.vue | 2 +- .../client/src/components/MkLaunchPad.vue | 6 +-- packages/client/src/components/MkLink.vue | 2 +- packages/client/src/components/MkMedia.vue | 4 +- .../client/src/components/MkMediaBanner.vue | 2 +- .../client/src/components/MkMediaCaption.vue | 10 ++--- .../client/src/components/MkMediaList.vue | 2 +- packages/client/src/components/MkMenu.vue | 16 +++---- packages/client/src/components/MkModal.vue | 10 ++--- .../src/components/MkModalPageWindow.vue | 4 +- .../client/src/components/MkModalWindow.vue | 6 +-- packages/client/src/components/MkMoved.vue | 7 +++- packages/client/src/components/MkNote.vue | 36 ++++++++-------- .../client/src/components/MkNoteDetailed.vue | 10 ++--- .../client/src/components/MkNoteHeader.vue | 8 ++-- .../client/src/components/MkNotePreview.vue | 2 +- packages/client/src/components/MkNoteSub.vue | 42 +++++++++---------- .../client/src/components/MkNotification.vue | 10 ++--- .../src/components/MkNotificationToast.vue | 2 +- .../src/components/MkObjectView.value.vue | 6 +-- .../client/src/components/MkPagePreview.vue | 6 +-- .../client/src/components/MkPageWindow.vue | 2 +- .../client/src/components/MkPagination.vue | 4 +- packages/client/src/components/MkPoll.vue | 6 +-- .../client/src/components/MkPollEditor.vue | 2 +- packages/client/src/components/MkPostForm.vue | 10 +++-- .../src/components/MkPostFormAttaches.vue | 6 +-- .../client/src/components/MkQuoteButton.vue | 2 +- .../client/src/components/MkReactedUsers.vue | 2 +- .../components/MkReactionsViewer.details.vue | 12 +++--- .../client/src/components/MkRemoteCaution.vue | 2 +- .../src/components/MkShowMoreButton.vue | 2 +- packages/client/src/components/MkSparkle.vue | 2 +- .../src/components/MkSubNoteContent.vue | 16 +++---- .../client/src/components/MkSuperMenu.vue | 12 +++--- packages/client/src/components/MkTab.vue | 10 ++--- packages/client/src/components/MkTagCloud.vue | 2 +- packages/client/src/components/MkTimeline.vue | 6 +-- packages/client/src/components/MkToast.vue | 4 +- .../src/components/MkTutorialDialog.vue | 6 +-- .../client/src/components/MkUrlPreview.vue | 2 +- .../client/src/components/MkUserCardMini.vue | 6 +-- .../client/src/components/MkUsersTooltip.vue | 4 +- .../client/src/components/MkVisibility.vue | 2 +- .../src/components/MkVisibilityPicker.vue | 6 +-- packages/client/src/components/MkWidgets.vue | 4 +- packages/client/src/components/MkWindow.vue | 20 ++++----- .../client/src/components/form/checkbox.vue | 2 +- .../client/src/components/form/folder.vue | 10 ++--- packages/client/src/components/form/input.vue | 8 ++-- packages/client/src/components/form/link.vue | 10 ++--- packages/client/src/components/form/radio.vue | 8 ++-- .../client/src/components/form/select.vue | 8 ++-- .../client/src/components/form/switch.vue | 6 +-- .../client/src/components/global/MkAd.vue | 2 +- .../client/src/components/global/MkAvatar.vue | 6 +-- .../src/components/global/MkLoading.vue | 2 +- .../global/MkMisskeyFlavoredMarkdown.vue | 4 +- .../src/components/global/MkPageHeader.vue | 36 ++++++++-------- .../client/src/components/global/MkUrl.vue | 2 +- .../src/components/page/page.switch.vue | 2 +- packages/client/src/init.ts | 4 +- packages/client/src/pages/about-firefish.vue | 6 +-- packages/client/src/pages/admin/_header_.vue | 21 ++++++---- packages/client/src/pages/admin/emojis.vue | 4 +- packages/client/src/pages/admin/index.vue | 2 +- .../src/pages/admin/overview.federation.vue | 6 +-- .../src/pages/admin/overview.metrics.vue | 4 +- .../client/src/pages/admin/overview.stats.vue | 12 +++--- .../client/src/pages/admin/overview.user.vue | 4 +- .../client/src/pages/admin/promotions.vue | 2 +- .../client/src/pages/admin/queue.chart.vue | 2 +- packages/client/src/pages/admin/relays.vue | 2 +- packages/client/src/pages/admin/users.vue | 4 +- packages/client/src/pages/channel.vue | 16 +++---- packages/client/src/pages/emojis.emoji.vue | 2 +- packages/client/src/pages/explore.users.vue | 20 ++++----- packages/client/src/pages/follow-requests.vue | 6 +-- packages/client/src/pages/gallery/edit.vue | 4 +- packages/client/src/pages/gallery/post.vue | 6 +-- .../pages/messaging/messaging-room.form.vue | 4 +- .../messaging/messaging-room.message.vue | 38 +++++++++-------- .../src/pages/messaging/messaging-room.vue | 4 +- packages/client/src/pages/miauth.vue | 4 +- .../client/src/pages/my-antennas/index.vue | 4 +- .../page-editor/page-editor.container.vue | 4 +- .../src/pages/page-editor/page-editor.vue | 4 +- packages/client/src/pages/page.vue | 12 +++--- packages/client/src/pages/settings/2fa.vue | 13 +++--- .../src/pages/settings/import-export.vue | 2 +- packages/client/src/pages/settings/index.vue | 2 +- .../client/src/pages/settings/migration.vue | 2 +- packages/client/src/pages/settings/navbar.vue | 4 +- packages/client/src/pages/settings/plugin.vue | 2 +- .../client/src/pages/settings/profile.vue | 4 +- .../client/src/pages/settings/security.vue | 6 +-- packages/client/src/pages/settings/theme.vue | 28 ++++++------- packages/client/src/pages/theme-editor.vue | 4 +- packages/client/src/pages/user-info.vue | 4 +- packages/client/src/pages/user/home.vue | 36 ++++++++-------- .../client/src/pages/user/index.photos.vue | 4 +- packages/client/src/pages/user/reactions.vue | 4 +- .../client/src/pages/welcome.entrance.a.vue | 28 ++++++------- .../client/src/pages/welcome.entrance.b.vue | 14 +++---- .../client/src/pages/welcome.entrance.c.vue | 22 +++++----- packages/client/src/scripts/langmap.ts | 13 ++++++ packages/client/src/style.scss | 16 +++---- packages/client/src/ui/_common_/common.vue | 4 +- .../src/ui/_common_/navbar-for-mobile.vue | 30 ++++++------- packages/client/src/ui/_common_/navbar.vue | 14 +++---- .../src/ui/_common_/statusbar-federation.vue | 6 +-- .../src/ui/_common_/statusbar-user-list.vue | 2 +- .../src/ui/_common_/stream-indicator.vue | 2 +- packages/client/src/ui/_common_/upload.vue | 4 +- packages/client/src/ui/deck.vue | 27 ++++++------ .../client/src/ui/deck/antenna-column.vue | 2 +- .../client/src/ui/deck/channel-column.vue | 2 +- packages/client/src/ui/deck/column.vue | 10 ++--- packages/client/src/ui/deck/direct-column.vue | 2 +- packages/client/src/ui/deck/list-column.vue | 2 +- .../client/src/ui/deck/mentions-column.vue | 2 +- .../src/ui/deck/notifications-column.vue | 2 +- packages/client/src/ui/deck/tl-column.vue | 2 +- .../client/src/ui/deck/widgets-column.vue | 2 +- packages/client/src/ui/universal.vue | 30 ++++++------- packages/client/src/ui/visitor/a.vue | 4 +- packages/client/src/ui/visitor/b.vue | 8 ++-- packages/client/src/ui/visitor/header.vue | 18 ++++---- packages/client/src/ui/visitor/kanban.vue | 4 +- packages/client/src/widgets/aiscript.vue | 2 +- packages/client/src/widgets/calendar.vue | 2 +- packages/client/src/widgets/clock.vue | 8 ++-- packages/client/src/widgets/federation.vue | 4 +- packages/client/src/widgets/job-queue.vue | 2 +- packages/client/src/widgets/memo.vue | 2 +- .../src/widgets/server-metric/cpu-mem.vue | 4 +- .../client/src/widgets/server-metric/cpu.vue | 4 +- .../client/src/widgets/server-metric/disk.vue | 4 +- .../src/widgets/server-metric/meilisearch.vue | 4 +- .../client/src/widgets/server-metric/mem.vue | 4 +- .../client/src/widgets/server-metric/net.vue | 4 +- packages/client/src/widgets/slideshow.vue | 2 +- packages/client/src/widgets/timeline.vue | 4 +- 177 files changed, 642 insertions(+), 609 deletions(-) diff --git a/README.md b/README.md index 0939c3712..1ac4ff602 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,8 @@ ## 細かい変更点 +- マージされていない本家版へのプルリクエストを独断でマージ + - RTL Layout Support ([!10452](https://git.joinfirefish.org/firefish/firefish/-/merge_requests/10452)) - `emojis` の API エンドポイント(Misskey v13- 互換)を追加([firefish-mkdir](https://git.mkdir.uk/hiira/firefish-mkdir) から取り込み) - Docker のベースイメージに Node v21 を使用 - HTML のコードに入るコメントアートを削除 diff --git a/packages/backend/src/server/web/bios.css b/packages/backend/src/server/web/bios.css index d6a1285e9..719ac90bf 100644 --- a/packages/backend/src/server/web/bios.css +++ b/packages/backend/src/server/web/bios.css @@ -83,8 +83,8 @@ button { color: rgb(156, 207, 216); font-size: 16px; padding: 0 20px; - margin-right: 5px; - margin-left: 5px; + margin-inline-end: 5px; + margin-inline-start: 5px; } button:hover { background: #555; diff --git a/packages/backend/src/server/web/cli.css b/packages/backend/src/server/web/cli.css index 740a2aa1a..cfbe047ff 100644 --- a/packages/backend/src/server/web/cli.css +++ b/packages/backend/src/server/web/cli.css @@ -19,7 +19,7 @@ main { img { border-radius: 10px; - margin-right: 10px; + margin-inline-end: 10px; } #form { diff --git a/packages/backend/src/server/web/style.css b/packages/backend/src/server/web/style.css index cb99a160d..8a16ca842 100644 --- a/packages/backend/src/server/web/style.css +++ b/packages/backend/src/server/web/style.css @@ -13,7 +13,7 @@ html { position: fixed; z-index: 10000; top: 0; - left: 0; + inset-inline-start: 0; width: 100vw; height: 100vh; cursor: wait; @@ -25,9 +25,9 @@ html { #splashIcon { position: absolute; top: 0; - right: 0; + inset-inline-end: 0; bottom: 0; - left: 0; + inset-inline-start: 0; margin: auto; width: 64px; height: 64px; @@ -37,9 +37,9 @@ html { #splashSpinner { position: absolute; top: 0; - right: 0; + inset-inline-end: 0; bottom: 0; - left: 0; + inset-inline-start: 0; margin: auto; display: inline-block; width: 28px; @@ -51,7 +51,7 @@ html { #splashSpinner > .spinner { position: absolute; top: 0; - left: 0; + inset-inline-start: 0; width: 28px; height: 28px; fill-rule: evenodd; @@ -113,9 +113,9 @@ html { #splashText { position: absolute; top: 0; - right: 0; + inset-inline-end: 0; bottom: 0; - left: 0; + inset-inline-start: 0; margin: auto; display: inline-block; width: 70%; diff --git a/packages/backend/src/services/send-email.ts b/packages/backend/src/services/send-email.ts index ccc6b365d..fd8f7328b 100644 --- a/packages/backend/src/services/send-email.ts +++ b/packages/backend/src/services/send-email.ts @@ -47,7 +47,7 @@ export async function sendEmail(
- +

${meta.name}

diff --git a/packages/client/src/components/MkAbuseReport.vue b/packages/client/src/components/MkAbuseReport.vue index 553652394..24067e6a7 100644 --- a/packages/client/src/components/MkAbuseReport.vue +++ b/packages/client/src/components/MkAbuseReport.vue @@ -100,9 +100,9 @@ function resolve() { > .target { width: 35%; box-sizing: border-box; - text-align: left; + text-align: initial; padding: 24px; - border-right: solid 1px var(--divider); + border-inline-end: solid 1px var(--divider); > .info { display: flex; @@ -129,7 +129,7 @@ function resolve() { } > .names { - margin-left: 0.3em; + margin-inline-start: 0.3em; padding: 0 8px; flex: 1; diff --git a/packages/client/src/components/MkAbuseReportWindow.vue b/packages/client/src/components/MkAbuseReportWindow.vue index 8d5675868..c6fc768a6 100644 --- a/packages/client/src/components/MkAbuseReportWindow.vue +++ b/packages/client/src/components/MkAbuseReportWindow.vue @@ -9,7 +9,7 @@