diff --git a/locales/en-US.yml b/locales/en-US.yml index e8e3497f87..3bb8739f19 100644 --- a/locales/en-US.yml +++ b/locales/en-US.yml @@ -507,6 +507,7 @@ createAccount: "Create account" existingAccount: "Existing account" regenerate: "Regenerate" fontSize: "Font size" +cornerRadius: "Corner roundness" mediaListWithOneImageAppearance: "Height of media lists with one image only" limitTo: "Limit to {x}" noFollowRequests: "You don't have any pending follow requests" diff --git a/locales/index.d.ts b/locales/index.d.ts index 1c1105cb84..b2dec3e58b 100644 --- a/locales/index.d.ts +++ b/locales/index.d.ts @@ -510,6 +510,7 @@ export interface Locale { "existingAccount": string; "regenerate": string; "fontSize": string; + "cornerRadius": string; "mediaListWithOneImageAppearance": string; "limitTo": string; "noFollowRequests": string; diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 68a6ca2daf..c49de02b1a 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -507,6 +507,7 @@ createAccount: "アカウントを作成" existingAccount: "既存のアカウント" regenerate: "再生成" fontSize: "フォントサイズ" +cornerRadius: "コーナーの丸み" mediaListWithOneImageAppearance: "画像が1枚のみのメディアリストの高さ" limitTo: "{x}を上限に" noFollowRequests: "フォロー申請はありません" diff --git a/packages/backend/src/server/web/boot.js b/packages/backend/src/server/web/boot.js index 570b15da03..cb0c3d310d 100644 --- a/packages/backend/src/server/web/boot.js +++ b/packages/backend/src/server/web/boot.js @@ -132,6 +132,11 @@ document.documentElement.classList.add('f-' + fontSize); } + const cornerRadius = localStorage.getItem('cornerRadius'); + if (cornerRadius) { + document.documentElement.classList.add(`radius-${cornerRadius}`); + } + const useSystemFont = localStorage.getItem('useSystemFont'); if (useSystemFont) { document.documentElement.classList.add('useSystemFont'); @@ -228,7 +233,7 @@ } button { - border-radius: 4px; + border-radius: 999px; padding: 0px 12px 0px 12px; border: none; cursor: pointer; @@ -296,7 +301,7 @@ margin-bottom: 2rem; padding: 0.5rem 1rem; width: 40rem; - border-radius: 5px; + border-radius: 10px; justify-content: center; margin: auto; } diff --git a/packages/backend/src/server/web/error.css b/packages/backend/src/server/web/error.css index 8bad3d843e..ea3056bdaf 100644 --- a/packages/backend/src/server/web/error.css +++ b/packages/backend/src/server/web/error.css @@ -24,7 +24,7 @@ html { } button { - border-radius: 4px; + border-radius: 999px; padding: 0px 12px 0px 12px; border: none; cursor: pointer; @@ -93,7 +93,7 @@ code { background: #333; padding: 0.5rem 1rem; max-width: 40rem; - border-radius: 5px; + border-radius: 10px; justify-content: center; margin: auto; white-space: pre-wrap; diff --git a/packages/frontend/src/components/MkAbuseReport.vue b/packages/frontend/src/components/MkAbuseReport.vue index 1ef8a205e2..14247f4bf5 100644 --- a/packages/frontend/src/components/MkAbuseReport.vue +++ b/packages/frontend/src/components/MkAbuseReport.vue @@ -84,7 +84,7 @@ function resolve() { box-sizing: border-box; align-items: center; padding: 14px; - border-radius: 5px; + border-radius: var(--radius-sm); --c: rgb(255 196 0 / 15%); background-image: linear-gradient(45deg, var(--c) 16.67%, transparent 16.67%, transparent 50%, var(--c) 50%, var(--c) 66.67%, transparent 66.67%, transparent 100%); background-size: 16px 16px; diff --git a/packages/frontend/src/components/MkAchievements.vue b/packages/frontend/src/components/MkAchievements.vue index bea0ed26d8..aac7f508a1 100644 --- a/packages/frontend/src/components/MkAchievements.vue +++ b/packages/frontend/src/components/MkAchievements.vue @@ -123,7 +123,7 @@ onMounted(() => { width: 58px; height: 58px; padding: 6px; - border-radius: 100%; + border-radius: var(--radius-full); box-sizing: border-box; pointer-events: none; user-select: none; @@ -190,7 +190,7 @@ onMounted(() => { position: relative; width: 100%; height: 100%; - border-radius: 100%; + border-radius: var(--radius-full); box-shadow: 0 1px 0px #ffffff88 inset; } diff --git a/packages/frontend/src/components/MkAsUi.vue b/packages/frontend/src/components/MkAsUi.vue index 3eb020c50e..9596ce6077 100644 --- a/packages/frontend/src/components/MkAsUi.vue +++ b/packages/frontend/src/components/MkAsUi.vue @@ -125,6 +125,6 @@ function openPostForm() { .postForm { background: var(--bg); - border-radius: 5px; + border-radius: var(--radius-sm); } diff --git a/packages/frontend/src/components/MkAutocomplete.vue b/packages/frontend/src/components/MkAutocomplete.vue index 7c4f910559..b047405fac 100644 --- a/packages/frontend/src/components/MkAutocomplete.vue +++ b/packages/frontend/src/components/MkAutocomplete.vue @@ -433,7 +433,7 @@ onBeforeUnmount(() => { max-width: 28px; max-height: 28px; margin: 0 8px 0 0; - border-radius: 100%; + border-radius: var(--radius-full); } .userName { diff --git a/packages/frontend/src/components/MkButton.vue b/packages/frontend/src/components/MkButton.vue index 3801d6b5d4..2fdc2bbe07 100644 --- a/packages/frontend/src/components/MkButton.vue +++ b/packages/frontend/src/components/MkButton.vue @@ -126,7 +126,7 @@ function onMousedown(evt: MouseEvent): void { box-shadow: none; text-decoration: none; background: var(--buttonBg); - border-radius: 5px; + border-radius: var(--radius-xs); overflow: clip; box-sizing: border-box; transition: background 0.1s ease; @@ -154,7 +154,7 @@ function onMousedown(evt: MouseEvent): void { } &.rounded { - border-radius: 4px; + border-radius: var(--radius-ellipse); } &.primary { @@ -264,7 +264,7 @@ function onMousedown(evt: MouseEvent): void { left: 0; width: 100%; height: 100%; - border-radius: 5px; + border-radius: var(--radius-sm); overflow: clip; pointer-events: none; } @@ -273,7 +273,7 @@ function onMousedown(evt: MouseEvent): void { position: absolute; width: 2px; height: 2px; - border-radius: 100%; + border-radius: var(--radius-full); background: rgba(0, 0, 0, 0.1); opacity: 1; transform: scale(1); diff --git a/packages/frontend/src/components/MkChannelFollowButton.vue b/packages/frontend/src/components/MkChannelFollowButton.vue index 00a1d41321..4a58204b5b 100644 --- a/packages/frontend/src/components/MkChannelFollowButton.vue +++ b/packages/frontend/src/components/MkChannelFollowButton.vue @@ -73,7 +73,7 @@ async function onClick() { padding: 0; height: 31px; font-size: 16px; - border-radius: 5px; + border-radius: var(--radius-xl); background: #fff; &.full { @@ -95,7 +95,7 @@ async function onClick() { bottom: -5px; left: -5px; border: 2px solid var(--focus); - border-radius: 5px; + border-radius: var(--radius-xl); } } diff --git a/packages/frontend/src/components/MkChannelPreview.vue b/packages/frontend/src/components/MkChannelPreview.vue index 6429258f4a..9c6e2f00bd 100644 --- a/packages/frontend/src/components/MkChannelPreview.vue +++ b/packages/frontend/src/components/MkChannelPreview.vue @@ -100,7 +100,7 @@ const bannerStyle = computed(() => { padding: 8px 12px; font-size: 80%; background: rgba(0, 0, 0, 0.7); - border-radius: 5px; + border-radius: var(--radius-sm); color: #fff; } @@ -111,7 +111,7 @@ const bannerStyle = computed(() => { left: 16px; background: rgba(0, 0, 0, 0.7); color: var(--warn); - border-radius: 5px; + border-radius: var(--radius-sm); font-weight: bold; font-size: 1em; padding: 4px 7px; diff --git a/packages/frontend/src/components/MkChartLegend.vue b/packages/frontend/src/components/MkChartLegend.vue index 2e83d59b59..546bc0b4b1 100644 --- a/packages/frontend/src/components/MkChartLegend.vue +++ b/packages/frontend/src/components/MkChartLegend.vue @@ -55,7 +55,7 @@ defineExpose({ font-size: 85%; padding: 4px 12px 4px 8px; border: solid 1px var(--divider); - border-radius: 4px; + border-radius: var(--radius-ellipse); &:hover { border-color: var(--inputBorderHover); @@ -70,7 +70,7 @@ defineExpose({ display: inline-block; width: 12px; height: 12px; - border-radius: 100%; + border-radius: var(--radius-full); vertical-align: -10%; } } diff --git a/packages/frontend/src/components/MkCode.core.vue b/packages/frontend/src/components/MkCode.core.vue index 4ec3540419..21684b462a 100644 --- a/packages/frontend/src/components/MkCode.core.vue +++ b/packages/frontend/src/components/MkCode.core.vue @@ -77,7 +77,7 @@ watch(() => props.lang, (to) => { & :deep(.shiki) { padding: 12px; margin: 0; - border-radius: 6px; + border-radius: var(--radius-sm); min-height: 130px; pointer-events: none; min-width: calc(100% - 24px); diff --git a/packages/frontend/src/components/MkCodeEditor.vue b/packages/frontend/src/components/MkCodeEditor.vue index 2d56a61963..5434042684 100644 --- a/packages/frontend/src/components/MkCodeEditor.vue +++ b/packages/frontend/src/components/MkCodeEditor.vue @@ -129,7 +129,7 @@ watch(v, () => { .focused.codeEditorRoot { border-color: var(--accent) !important; - border-radius: 6px; + border-radius: var(--radius-sm); } .codeEditorScroller { diff --git a/packages/frontend/src/components/MkColorInput.vue b/packages/frontend/src/components/MkColorInput.vue index 4ebfec5b51..79b1949640 100644 --- a/packages/frontend/src/components/MkColorInput.vue +++ b/packages/frontend/src/components/MkColorInput.vue @@ -102,7 +102,7 @@ const onInput = (ev: KeyboardEvent) => { color: var(--fg); background: var(--panel); border: solid 1px var(--panel); - border-radius: 5px; + border-radius: var(--radius-sm); outline: none; box-shadow: none; box-sizing: border-box; diff --git a/packages/frontend/src/components/MkContainer.vue b/packages/frontend/src/components/MkContainer.vue index 3195377d60..42c6cc1075 100644 --- a/packages/frontend/src/components/MkContainer.vue +++ b/packages/frontend/src/components/MkContainer.vue @@ -223,7 +223,7 @@ onUnmounted(() => { background: var(--panel); padding: 6px 10px; font-size: 0.8em; - border-radius: 4px; + border-radius: var(--radius-ellipse); box-shadow: 0 2px 6px rgb(0 0 0 / 20%); } diff --git a/packages/frontend/src/components/MkDialog.vue b/packages/frontend/src/components/MkDialog.vue index b62f4324eb..e0692eb383 100644 --- a/packages/frontend/src/components/MkDialog.vue +++ b/packages/frontend/src/components/MkDialog.vue @@ -197,7 +197,7 @@ onBeforeUnmount(() => { box-sizing: border-box; text-align: center; background: var(--panel); - border-radius: 4px; + border-radius: var(--radius-md); } .icon { diff --git a/packages/frontend/src/components/MkDrive.file.vue b/packages/frontend/src/components/MkDrive.file.vue index c8f23286fd..2c08ac754e 100644 --- a/packages/frontend/src/components/MkDrive.file.vue +++ b/packages/frontend/src/components/MkDrive.file.vue @@ -107,7 +107,7 @@ function onDragend() { position: relative; padding: 8px 0 0 0; min-height: 180px; - border-radius: 5px; + border-radius: var(--radius-sm); cursor: pointer; &:hover { diff --git a/packages/frontend/src/components/MkDrive.folder.vue b/packages/frontend/src/components/MkDrive.folder.vue index f352e655ba..9f79a44d4c 100644 --- a/packages/frontend/src/components/MkDrive.folder.vue +++ b/packages/frontend/src/components/MkDrive.folder.vue @@ -289,7 +289,7 @@ function onContextmenu(ev: MouseEvent) { padding: 8px; height: 64px; background: var(--driveFolderBg); - border-radius: 4px; + border-radius: var(--radius-xs); cursor: pointer; &.draghover { @@ -302,7 +302,7 @@ function onContextmenu(ev: MouseEvent) { bottom: -4px; left: -4px; border: 2px dashed var(--focus); - border-radius: 4px; + border-radius: var(--radius-xs); } } } diff --git a/packages/frontend/src/components/MkDriveFileThumbnail.vue b/packages/frontend/src/components/MkDriveFileThumbnail.vue index 66807cf42c..3063523791 100644 --- a/packages/frontend/src/components/MkDriveFileThumbnail.vue +++ b/packages/frontend/src/components/MkDriveFileThumbnail.vue @@ -63,7 +63,7 @@ const isThumbnailAvailable = computed(() => { position: relative; display: flex; background: var(--panel); - border-radius: 5px; + border-radius: var(--radius-sm); overflow: clip; } diff --git a/packages/frontend/src/components/MkEmojiPicker.vue b/packages/frontend/src/components/MkEmojiPicker.vue index 2af7a76a37..50ed8048bb 100644 --- a/packages/frontend/src/components/MkEmojiPicker.vue +++ b/packages/frontend/src/components/MkEmojiPicker.vue @@ -594,7 +594,7 @@ defineExpose({ width: var(--eachSize); height: var(--eachSize); contain: strict; - border-radius: 4px; + border-radius: var(--radius-xs); font-size: 24px; &:focus-visible { diff --git a/packages/frontend/src/components/MkEmojiPickerDialog.vue b/packages/frontend/src/components/MkEmojiPickerDialog.vue index 9d3132c540..581d815d66 100644 --- a/packages/frontend/src/components/MkEmojiPickerDialog.vue +++ b/packages/frontend/src/components/MkEmojiPickerDialog.vue @@ -74,7 +74,7 @@ function opening() { diff --git a/packages/frontend/src/components/MkMediaImage.vue b/packages/frontend/src/components/MkMediaImage.vue index 016a4b020f..1fa42c1e48 100644 --- a/packages/frontend/src/components/MkMediaImage.vue +++ b/packages/frontend/src/components/MkMediaImage.vue @@ -127,7 +127,7 @@ function showMenu(ev: MouseEvent) { .sensitive { position: relative; - + &::after { content: ""; position: absolute; @@ -157,7 +157,7 @@ function showMenu(ev: MouseEvent) { .hide { display: block; position: absolute; - border-radius: 5px; + border-radius: var(--radius-sm); background-color: black; color: var(--accentLighten); font-size: 12px; @@ -187,7 +187,7 @@ function showMenu(ev: MouseEvent) { .menu { display: block; position: absolute; - border-radius: 4px; + border-radius: var(--radius-ellipse); background-color: rgba(0, 0, 0, 0.3); -webkit-backdrop-filter: var(--blur, blur(15px)); backdrop-filter: var(--blur, blur(15px)); @@ -223,7 +223,7 @@ function showMenu(ev: MouseEvent) { .indicator { /* Hardcode to black because either --bg or --fg makes it hard to read in dark/light mode */ background-color: black; - border-radius: 5px; + border-radius: var(--radius-sm); color: var(--accentLighten); display: inline-block; font-weight: bold; diff --git a/packages/frontend/src/components/MkMediaList.vue b/packages/frontend/src/components/MkMediaList.vue index c9f02dd452..5e534db948 100644 --- a/packages/frontend/src/components/MkMediaList.vue +++ b/packages/frontend/src/components/MkMediaList.vue @@ -341,7 +341,7 @@ const previewable = (file: Misskey.entities.DriveFile): boolean => { .media { overflow: hidden; // clipにするとバグる - border-radius: 5px; + border-radius: var(--radius-sm); } :global(.pswp) { diff --git a/packages/frontend/src/components/MkMediaVideo.vue b/packages/frontend/src/components/MkMediaVideo.vue index e1f7b735f0..33a9b0fbf9 100644 --- a/packages/frontend/src/components/MkMediaVideo.vue +++ b/packages/frontend/src/components/MkMediaVideo.vue @@ -77,7 +77,7 @@ watch(videoEl, () => { .hide { display: block; position: absolute; - border-radius: 5px; + border-radius: var(--radius-sm); background-color: black; color: var(--accentLighten); font-size: 14px; @@ -127,7 +127,7 @@ watch(videoEl, () => { .indicator { /* Hardcode to black because either --bg or --fg makes it hard to read in dark/light mode */ background-color: black; - border-radius: 5px; + border-radius: var(--radius-sm); color: var(--accentLighten); display: inline-block; font-weight: bold; diff --git a/packages/frontend/src/components/MkMention.vue b/packages/frontend/src/components/MkMention.vue index 2e8f9e26d3..4d42053657 100644 --- a/packages/frontend/src/components/MkMention.vue +++ b/packages/frontend/src/components/MkMention.vue @@ -49,7 +49,7 @@ const avatarUrl = computed(() => defaultStore.state.disableShowingAnimatedImages .root { display: inline-block; padding: 4px 8px 4px 4px; - border-radius: 4px; + border-radius: var(--radius-ellipse); color: var(--mention); &.isMe { @@ -63,7 +63,7 @@ const avatarUrl = computed(() => defaultStore.state.disableShowingAnimatedImages object-fit: cover; margin: 0 0.2em 0 0; vertical-align: bottom; - border-radius: 100%; + border-radius: var(--radius-full); } .host { diff --git a/packages/frontend/src/components/MkMenu.vue b/packages/frontend/src/components/MkMenu.vue index 1588f924c4..83f56dc1a2 100644 --- a/packages/frontend/src/components/MkMenu.vue +++ b/packages/frontend/src/components/MkMenu.vue @@ -241,7 +241,7 @@ onBeforeUnmount(() => { &.asDrawer { padding: 12px 0 max(env(safe-area-inset-bottom, 0px), 12px) 0; width: 100%; - border-radius: 24px; + border-radius: var(--radius-lg); border-bottom-right-radius: 0; border-bottom-left-radius: 0; @@ -251,7 +251,7 @@ onBeforeUnmount(() => { &:before { width: calc(100% - 24px); - border-radius: 12px; + border-radius: var(--radius); } > .icon { @@ -290,7 +290,7 @@ onBeforeUnmount(() => { margin: auto; width: calc(100% - 16px); height: 100%; - border-radius: 5px; + border-radius: var(--radius-sm); } &:not(:disabled):hover { diff --git a/packages/frontend/src/components/MkNote.vue b/packages/frontend/src/components/MkNote.vue index cba561b812..2f9ed5ce2c 100644 --- a/packages/frontend/src/components/MkNote.vue +++ b/packages/frontend/src/components/MkNote.vue @@ -699,7 +699,7 @@ function readPromo() { padding: 0 4px; margin-bottom: 0 !important; background: var(--popup); - border-radius: 5px; + border-radius: var(--radius-sm); box-shadow: 0px 4px 32px var(--shadow); } @@ -831,7 +831,7 @@ function readPromo() { left: 8px; width: 5px; height: calc(100% - 16px); - border-radius: 4px; + border-radius: var(--radius-ellipse); pointer-events: none; } @@ -871,7 +871,7 @@ function readPromo() { background: var(--popup); padding: 6px 10px; font-size: 0.8em; - border-radius: 4px; + border-radius: var(--radius-ellipse); box-shadow: 0 2px 6px rgb(0 0 0 / 20%); } @@ -901,7 +901,7 @@ function readPromo() { background: var(--panel); padding: 6px 10px; font-size: 0.8em; - border-radius: 4px; + border-radius: var(--radius-ellipse); box-shadow: 0 2px 6px rgb(0 0 0 / 20%); } @@ -937,7 +937,7 @@ function readPromo() { .quoteNote { padding: 16px; border: dashed 1px var(--renote); - border-radius: 5px; + border-radius: var(--radius-sm); overflow: clip; } diff --git a/packages/frontend/src/components/MkNoteDetailed.vue b/packages/frontend/src/components/MkNoteDetailed.vue index 376d4fd55d..d1989ad3e7 100644 --- a/packages/frontend/src/components/MkNoteDetailed.vue +++ b/packages/frontend/src/components/MkNoteDetailed.vue @@ -739,7 +739,7 @@ if (appearNote.reply && appearNote.reply.replyId && defaultStore.state.autoloadC width: 28px; height: 28px; margin: 0 8px 0 0; - border-radius: 5px; + border-radius: var(--radius-sm); } .renoteText { @@ -813,7 +813,7 @@ if (appearNote.reply && appearNote.reply.replyId && defaultStore.state.autoloadC font-size: 80%; line-height: 1; border: solid 0.5px var(--divider); - border-radius: 4px; + border-radius: var(--radius-xs); } .noteHeaderInfo { @@ -869,7 +869,7 @@ if (appearNote.reply && appearNote.reply.replyId && defaultStore.state.autoloadC .quoteNote { padding: 16px; border: dashed 1px var(--renote); - border-radius: 5px; + border-radius: var(--radius-sm); overflow: clip; } @@ -947,7 +947,7 @@ if (appearNote.reply && appearNote.reply.replyId && defaultStore.state.autoloadC .reactionTab { padding: 4px 6px; border: solid 1px var(--divider); - border-radius: 5px; + border-radius: var(--radius-sm); } .reactionTabActive { diff --git a/packages/frontend/src/components/MkNoteHeader.vue b/packages/frontend/src/components/MkNoteHeader.vue index ed15b43d0a..f258b2a1b6 100644 --- a/packages/frontend/src/components/MkNoteHeader.vue +++ b/packages/frontend/src/components/MkNoteHeader.vue @@ -81,7 +81,7 @@ async function menuVersions(viaKeyboard = false): Promise { padding: 1px 6px; font-size: 80%; border: solid 0.5px var(--divider); - border-radius: 3px; + border-radius: var(--radius-xs); } .username { diff --git a/packages/frontend/src/components/MkNotePreview.vue b/packages/frontend/src/components/MkNotePreview.vue index 79ce60baff..81ea36c2a5 100644 --- a/packages/frontend/src/components/MkNotePreview.vue +++ b/packages/frontend/src/components/MkNotePreview.vue @@ -44,7 +44,7 @@ const props = defineProps<{ margin: 0 10px 0 0 !important; width: 40px !important; height: 40px !important; - border-radius: 8px !important; + border-radius: var(--radius-sm) !important; pointer-events: none !important; } diff --git a/packages/frontend/src/components/MkNoteSimple.vue b/packages/frontend/src/components/MkNoteSimple.vue index b22e9e016a..b0e91e523e 100644 --- a/packages/frontend/src/components/MkNoteSimple.vue +++ b/packages/frontend/src/components/MkNoteSimple.vue @@ -56,7 +56,7 @@ watch(() => props.expandAllCws, (expandAllCws) => { margin: 0 10px 0 0; width: 34px; height: 34px; - border-radius: 5px; + border-radius: var(--radius-sm); position: sticky !important; top: calc(16px + var(--stickyTop, 0px)); left: 0; diff --git a/packages/frontend/src/components/MkNoteSub.vue b/packages/frontend/src/components/MkNoteSub.vue index 3c8ba00121..fa113ae2f8 100644 --- a/packages/frontend/src/components/MkNoteSub.vue +++ b/packages/frontend/src/components/MkNoteSub.vue @@ -418,7 +418,7 @@ if (props.detail) { left: 8px; width: 5px; height: calc(100% - 8px); - border-radius: 4px; + border-radius: var(--radius-ellipse); pointer-events: none; } @@ -428,7 +428,7 @@ if (props.detail) { margin: 0 8px 0 0; width: 38px; height: 38px; - border-radius: 5px; + border-radius: var(--radius-sm); } .body { @@ -514,6 +514,6 @@ if (props.detail) { padding: 8px !important; border: 1px solid var(--divider); margin: 8px 8px 0 8px; - border-radius: 5px; + border-radius: var(--radius-sm); } diff --git a/packages/frontend/src/components/MkNotification.vue b/packages/frontend/src/components/MkNotification.vue index 379dfe806d..5d86eee71c 100644 --- a/packages/frontend/src/components/MkNotification.vue +++ b/packages/frontend/src/components/MkNotification.vue @@ -181,7 +181,7 @@ useTooltip(reactionRef, (showing) => { display: block; width: 100%; height: 100%; - border-radius: 5px; + border-radius: var(--radius-sm); } .subIcon { @@ -192,7 +192,7 @@ useTooltip(reactionRef, (showing) => { width: 20px; height: 20px; box-sizing: border-box; - border-radius: 100%; + border-radius: var(--radius-full); background: var(--panel); box-shadow: 0 0 0 3px var(--panel); font-size: 11px; diff --git a/packages/frontend/src/components/MkOmit.vue b/packages/frontend/src/components/MkOmit.vue index d353e4d8e6..ac957d93dc 100644 --- a/packages/frontend/src/components/MkOmit.vue +++ b/packages/frontend/src/components/MkOmit.vue @@ -69,7 +69,7 @@ onUnmounted(() => { background: var(--panel); padding: 6px 10px; font-size: 0.8em; - border-radius: 4px; + border-radius: var(--radius-ellipse); box-shadow: 0 2px 6px rgb(0 0 0 / 20%); } diff --git a/packages/frontend/src/components/MkPoll.vue b/packages/frontend/src/components/MkPoll.vue index efa8170027..2becabb41e 100644 --- a/packages/frontend/src/components/MkPoll.vue +++ b/packages/frontend/src/components/MkPoll.vue @@ -116,7 +116,7 @@ async function refresh() { padding: 4px; //border: solid 0.5px var(--divider); background: var(--accentedBg); - border-radius: 4px; + border-radius: var(--radius-xs); overflow: clip; cursor: pointer; } @@ -136,7 +136,7 @@ async function refresh() { display: inline-block; padding: 3px 5px; background: var(--panel); - border-radius: 3px; + border-radius: var(--radius-xs); } .info { diff --git a/packages/frontend/src/components/MkPopupMenu.vue b/packages/frontend/src/components/MkPopupMenu.vue index ee7dbecf05..146b9d7ccf 100644 --- a/packages/frontend/src/components/MkPopupMenu.vue +++ b/packages/frontend/src/components/MkPopupMenu.vue @@ -73,7 +73,7 @@ function close() { diff --git a/packages/frontend/src/components/MkSignupDialog.rules.vue b/packages/frontend/src/components/MkSignupDialog.rules.vue index 96072a19c6..3dc95ad0a0 100644 --- a/packages/frontend/src/components/MkSignupDialog.rules.vue +++ b/packages/frontend/src/components/MkSignupDialog.rules.vue @@ -182,7 +182,7 @@ async function updateAgreeNote(v: boolean) { font-weight: bold; align-items: center; justify-content: center; - border-radius: 4px; + border-radius: var(--radius-ellipse); } } diff --git a/packages/frontend/src/components/MkSubNoteContent.vue b/packages/frontend/src/components/MkSubNoteContent.vue index 8f6dc6aee3..c8c48d1623 100644 --- a/packages/frontend/src/components/MkSubNoteContent.vue +++ b/packages/frontend/src/components/MkSubNoteContent.vue @@ -88,7 +88,7 @@ const collapsed = $ref(isLong); background: var(--panel); padding: 6px 10px; font-size: 0.8em; - border-radius: 4px; + border-radius: var(--radius-ellipse); box-shadow: 0 2px 6px rgb(0 0 0 / 20%); } @@ -131,7 +131,7 @@ const collapsed = $ref(isLong); background: var(--popup); padding: 6px 10px; font-size: 0.8em; - border-radius: 4px; + border-radius: var(--radius-ellipse); box-shadow: 0 2px 6px rgb(0 0 0 / 20%); } diff --git a/packages/frontend/src/components/MkSuperMenu.vue b/packages/frontend/src/components/MkSuperMenu.vue index 50bfd64fc8..93296dd9d5 100644 --- a/packages/frontend/src/components/MkSuperMenu.vue +++ b/packages/frontend/src/components/MkSuperMenu.vue @@ -59,7 +59,7 @@ defineProps<{ width: 100%; box-sizing: border-box; padding: 9px 16px 9px 8px; - border-radius: 5px; + border-radius: var(--radius-sm); font-size: 0.9em; &:hover { @@ -141,7 +141,7 @@ defineProps<{ height: 60px; aspect-ratio: 1; background: var(--panel); - border-radius: 5px; + border-radius: var(--radius-full); } > .text { diff --git a/packages/frontend/src/components/MkSwitch.button.vue b/packages/frontend/src/components/MkSwitch.button.vue index 9d20103364..b82f36cdd3 100644 --- a/packages/frontend/src/components/MkSwitch.button.vue +++ b/packages/frontend/src/components/MkSwitch.button.vue @@ -52,7 +52,7 @@ const toggle = () => { background: var(--switchOffBg); background-clip: content-box; border: solid 1px var(--switchOffBg); - border-radius: 4px; + border-radius: var(--radius-ellipse); cursor: pointer; transition: inherit; user-select: none; @@ -72,7 +72,7 @@ const toggle = () => { top: 3px; width: 15px; height: 15px; - border-radius: 4px; + border-radius: var(--radius-ellipse); transition: all 0.2s ease; &:not(.knobChecked) { diff --git a/packages/frontend/src/components/MkTab.vue b/packages/frontend/src/components/MkTab.vue index 2b93d2eb4f..2b56b946d2 100644 --- a/packages/frontend/src/components/MkTab.vue +++ b/packages/frontend/src/components/MkTab.vue @@ -39,7 +39,7 @@ export default defineComponent({ > button { flex: 1; padding: 10px 8px; - border-radius: 4px; + border-radius: var(--radius-ellipse); &:disabled { opacity: 1 !important; diff --git a/packages/frontend/src/components/MkTextarea.vue b/packages/frontend/src/components/MkTextarea.vue index 036ad3b9e7..3ace738f1b 100644 --- a/packages/frontend/src/components/MkTextarea.vue +++ b/packages/frontend/src/components/MkTextarea.vue @@ -153,7 +153,7 @@ onMounted(() => { color: var(--fg); background: var(--panel); border: solid 1px var(--panel); - border-radius: 5px; + border-radius: var(--radius-sm); outline: none; box-shadow: none; box-sizing: border-box; diff --git a/packages/frontend/src/components/MkToast.vue b/packages/frontend/src/components/MkToast.vue index 78eccd0618..3b26b50a0b 100644 --- a/packages/frontend/src/components/MkToast.vue +++ b/packages/frontend/src/components/MkToast.vue @@ -66,7 +66,7 @@ onMounted(() => { max-width: calc(100% - 32px); width: min-content; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3); - border-radius: 5px; + border-radius: var(--radius-sm); overflow: clip; text-align: center; pointer-events: none; diff --git a/packages/frontend/src/components/MkTooltip.vue b/packages/frontend/src/components/MkTooltip.vue index d21c6317aa..eeb9325a29 100644 --- a/packages/frontend/src/components/MkTooltip.vue +++ b/packages/frontend/src/components/MkTooltip.vue @@ -106,7 +106,7 @@ onUnmounted(() => { padding: 8px 12px; box-sizing: border-box; text-align: center; - border-radius: 4px; + border-radius: var(--radius-xs); border: solid 0.5px var(--divider); pointer-events: none; transform-origin: center center; diff --git a/packages/frontend/src/components/MkUrlPreview.vue b/packages/frontend/src/components/MkUrlPreview.vue index 9cec4009c8..7093283d45 100644 --- a/packages/frontend/src/components/MkUrlPreview.vue +++ b/packages/frontend/src/components/MkUrlPreview.vue @@ -231,7 +231,7 @@ onUnmounted(() => { display: block; font-size: 14px; box-shadow: 0 0 0 1px var(--divider); - border-radius: 5px; + border-radius: var(--radius-sm); overflow: clip; &:hover { diff --git a/packages/frontend/src/components/MkUserCardMini.vue b/packages/frontend/src/components/MkUserCardMini.vue index 70c2a37b53..978c5005c8 100644 --- a/packages/frontend/src/components/MkUserCardMini.vue +++ b/packages/frontend/src/components/MkUserCardMini.vue @@ -50,7 +50,7 @@ onMounted(() => { align-items: center; padding: 16px; background: var(--panel); - border-radius: 5px; + border-radius: var(--radius-sm); > :global(.avatar) { display: block; diff --git a/packages/frontend/src/components/MkUserInfo.vue b/packages/frontend/src/components/MkUserInfo.vue index 6bb2fc8957..6219aa717b 100644 --- a/packages/frontend/src/components/MkUserInfo.vue +++ b/packages/frontend/src/components/MkUserInfo.vue @@ -100,7 +100,7 @@ defineProps<{ color: #fff; background: rgba(0, 0, 0, 0.7); font-size: 0.7em; - border-radius: 5px; + border-radius: var(--radius-sm); } .description { diff --git a/packages/frontend/src/components/MkUserOnlineIndicator.vue b/packages/frontend/src/components/MkUserOnlineIndicator.vue index 8b792fe496..ac50d73cda 100644 --- a/packages/frontend/src/components/MkUserOnlineIndicator.vue +++ b/packages/frontend/src/components/MkUserOnlineIndicator.vue @@ -37,7 +37,10 @@ const text = $computed(() => { diff --git a/packages/frontend/src/components/global/MkPageHeader.tabs.vue b/packages/frontend/src/components/global/MkPageHeader.tabs.vue index b98750da44..320ece4efd 100644 --- a/packages/frontend/src/components/global/MkPageHeader.tabs.vue +++ b/packages/frontend/src/components/global/MkPageHeader.tabs.vue @@ -245,7 +245,7 @@ onUnmounted(() => { bottom: 0; height: 3px; background: var(--accent); - border-radius: 4px; + border-radius: var(--radius-ellipse); transition: none; pointer-events: none; diff --git a/packages/frontend/src/components/global/MkPageHeader.vue b/packages/frontend/src/components/global/MkPageHeader.vue index 5b0e7be0e0..2134e9fad3 100644 --- a/packages/frontend/src/components/global/MkPageHeader.vue +++ b/packages/frontend/src/components/global/MkPageHeader.vue @@ -227,7 +227,7 @@ onUnmounted(() => { width: calc(var(--height) - (var(--margin))); box-sizing: border-box; position: relative; - border-radius: 5px; + border-radius: var(--radius-xs); &:hover { background: rgba(0, 0, 0, 0.05); diff --git a/packages/frontend/src/local-storage.ts b/packages/frontend/src/local-storage.ts index 0d73885b68..3023471b14 100644 --- a/packages/frontend/src/local-storage.ts +++ b/packages/frontend/src/local-storage.ts @@ -21,6 +21,7 @@ type Keys = 'colorScheme' | 'useSystemFont' | 'fontSize' | + 'cornerRadius' | 'ui' | 'ui_temp' | 'locale' | diff --git a/packages/frontend/src/pages/_error_.vue b/packages/frontend/src/pages/_error_.vue index 037d6c94a8..fe27206937 100644 --- a/packages/frontend/src/pages/_error_.vue +++ b/packages/frontend/src/pages/_error_.vue @@ -82,6 +82,6 @@ definePageMetadata({ vertical-align: bottom; height: 128px; margin-bottom: 24px; - border-radius: 4px; + border-radius: var(--radius-md); } diff --git a/packages/frontend/src/pages/about-sharkey.vue b/packages/frontend/src/pages/about-sharkey.vue index 1e235bf70e..2054783695 100644 --- a/packages/frontend/src/pages/about-sharkey.vue +++ b/packages/frontend/src/pages/about-sharkey.vue @@ -220,7 +220,7 @@ definePageMetadata({ display: block; width: 80px; margin: 0 auto; - border-radius: 4px; + border-radius: var(--radius-md); position: relative; z-index: 1; transform: translateX(-10%); @@ -271,7 +271,7 @@ definePageMetadata({ align-items: center; padding: 12px; background: var(--buttonBg); - border-radius: 5px; + border-radius: var(--radius-sm); &:hover { text-decoration: none; @@ -286,7 +286,7 @@ definePageMetadata({ .contributorAvatar { width: 30px; - border-radius: 100%; + border-radius: var(--radius-full); } .contributorUsername { @@ -304,12 +304,12 @@ definePageMetadata({ align-items: center; padding: 12px; background: var(--buttonBg); - border-radius: 5px; + border-radius: var(--radius-sm); } .patronIcon { width: 24px; - border-radius: 100%; + border-radius: var(--radius-full); } .patronName { diff --git a/packages/frontend/src/pages/about.vue b/packages/frontend/src/pages/about.vue index 7b1975807b..9028515975 100644 --- a/packages/frontend/src/pages/about.vue +++ b/packages/frontend/src/pages/about.vue @@ -168,7 +168,7 @@ definePageMetadata(computed(() => ({ diff --git a/packages/frontend/src/pages/admin/_header_.vue b/packages/frontend/src/pages/admin/_header_.vue index 6b619249da..43bfbeb870 100644 --- a/packages/frontend/src/pages/admin/_header_.vue +++ b/packages/frontend/src/pages/admin/_header_.vue @@ -181,7 +181,7 @@ onUnmounted(() => { width: calc(var(--height) - (var(--margin) * 2)); box-sizing: border-box; position: relative; - border-radius: 5px; + border-radius: var(--radius-xs); &:hover { background: rgba(0, 0, 0, 0.05); @@ -286,7 +286,7 @@ onUnmounted(() => { bottom: 0; height: 3px; background: var(--accent); - border-radius: 4px; + border-radius: var(--radius-ellipse); transition: all 0.2s ease; pointer-events: none; } diff --git a/packages/frontend/src/pages/admin/index.vue b/packages/frontend/src/pages/admin/index.vue index 42c2281971..a42e9809ed 100644 --- a/packages/frontend/src/pages/admin/index.vue +++ b/packages/frontend/src/pages/admin/index.vue @@ -369,7 +369,7 @@ defineExpose({ display: block; margin: auto; height: 42px; - border-radius: 5px; + border-radius: var(--radius-sm); } } } diff --git a/packages/frontend/src/pages/admin/modlog.ModLog.vue b/packages/frontend/src/pages/admin/modlog.ModLog.vue index d41834836c..a6612f17d1 100644 --- a/packages/frontend/src/pages/admin/modlog.ModLog.vue +++ b/packages/frontend/src/pages/admin/modlog.ModLog.vue @@ -149,7 +149,7 @@ const props = defineProps<{ .diff { background: #fff; color: #000; - border-radius: 5px; + border-radius: var(--radius-sm); overflow: clip; } diff --git a/packages/frontend/src/pages/admin/overview.federation.vue b/packages/frontend/src/pages/admin/overview.federation.vue index 16bf6985ea..33dbbd0d84 100644 --- a/packages/frontend/src/pages/admin/overview.federation.vue +++ b/packages/frontend/src/pages/admin/overview.federation.vue @@ -146,7 +146,7 @@ onMounted(async () => { margin-right: 12px; background: var(--accentedBg); color: var(--accent); - border-radius: 5px; + border-radius: var(--radius); } &.sub { diff --git a/packages/frontend/src/pages/admin/overview.stats.vue b/packages/frontend/src/pages/admin/overview.stats.vue index 580bfb780b..563d8988a8 100644 --- a/packages/frontend/src/pages/admin/overview.stats.vue +++ b/packages/frontend/src/pages/admin/overview.stats.vue @@ -115,7 +115,7 @@ onMounted(async () => { margin-right: 12px; background: var(--accentedBg); color: var(--accent); - border-radius: 5px; + border-radius: var(--radius); } &.users { diff --git a/packages/frontend/src/pages/admin/server-rules.vue b/packages/frontend/src/pages/admin/server-rules.vue index af1caa87c1..4302bde91d 100644 --- a/packages/frontend/src/pages/admin/server-rules.vue +++ b/packages/frontend/src/pages/admin/server-rules.vue @@ -104,7 +104,7 @@ definePageMetadata({ height: 28px; align-items: center; justify-content: center; - border-radius: 4px; + border-radius: var(--radius-ellipse); margin-right: 8px; } @@ -119,7 +119,7 @@ definePageMetadata({ height: 40px; color: var(--error); margin-left: auto; - border-radius: 5px; + border-radius: var(--radius-sm); &:hover { background: var(--X5); diff --git a/packages/frontend/src/pages/antenna-timeline.vue b/packages/frontend/src/pages/antenna-timeline.vue index c84d35c7d0..97a85d4345 100644 --- a/packages/frontend/src/pages/antenna-timeline.vue +++ b/packages/frontend/src/pages/antenna-timeline.vue @@ -112,7 +112,7 @@ definePageMetadata(computed(() => antenna ? { display: block; margin: var(--margin) auto 0 auto; padding: 8px 16px; - border-radius: 5px; + border-radius: var(--radius-xl); } .tl { diff --git a/packages/frontend/src/pages/channel.vue b/packages/frontend/src/pages/channel.vue index 89127bd010..440c9c8da4 100644 --- a/packages/frontend/src/pages/channel.vue +++ b/packages/frontend/src/pages/channel.vue @@ -267,7 +267,7 @@ definePageMetadata(computed(() => channel ? { padding: 8px 12px; font-size: 80%; background: rgba(0, 0, 0, 0.7); - border-radius: 5px; + border-radius: var(--radius-sm); color: #fff; } @@ -282,7 +282,7 @@ definePageMetadata(computed(() => channel ? { left: 16px; background: rgba(0, 0, 0, 0.7); color: var(--warn); - border-radius: 5px; + border-radius: var(--radius-sm); font-weight: bold; font-size: 1em; padding: 4px 7px; diff --git a/packages/frontend/src/pages/drive.file.info.vue b/packages/frontend/src/pages/drive.file.info.vue index 83c61f74e1..2fcf35f36e 100644 --- a/packages/frontend/src/pages/drive.file.info.vue +++ b/packages/frontend/src/pages/drive.file.info.vue @@ -221,7 +221,7 @@ onMounted(async () => { .fileQuickActionsOthersButton { padding: .5rem; - border-radius: 99rem; + border-radius: var(--radius-ellipse); &:hover, &:focus-visible { diff --git a/packages/frontend/src/pages/emoji-edit-dialog.vue b/packages/frontend/src/pages/emoji-edit-dialog.vue index abba31f1ff..b4ae855d5d 100644 --- a/packages/frontend/src/pages/emoji-edit-dialog.vue +++ b/packages/frontend/src/pages/emoji-edit-dialog.vue @@ -206,7 +206,7 @@ async function del() { .imgContainer { padding: 8px; - border-radius: 5px; + border-radius: var(--radius-sm); } .img { diff --git a/packages/frontend/src/pages/emojis.emoji.vue b/packages/frontend/src/pages/emojis.emoji.vue index 210a0fcf8f..f787b12097 100644 --- a/packages/frontend/src/pages/emojis.emoji.vue +++ b/packages/frontend/src/pages/emojis.emoji.vue @@ -61,7 +61,7 @@ function menu(ev) { padding: 12px; text-align: left; background: var(--panel); - border-radius: 5px; + border-radius: var(--radius-sm); &:hover { border-color: var(--accent); diff --git a/packages/frontend/src/pages/follow-requests.vue b/packages/frontend/src/pages/follow-requests.vue index 1686718f2c..7546804a7b 100644 --- a/packages/frontend/src/pages/follow-requests.vue +++ b/packages/frontend/src/pages/follow-requests.vue @@ -87,7 +87,7 @@ definePageMetadata(computed(() => ({ margin: 0 12px 0 0; width: 42px; height: 42px; - border-radius: 5px; + border-radius: var(--radius-sm); } > .body { diff --git a/packages/frontend/src/pages/instance-info.vue b/packages/frontend/src/pages/instance-info.vue index a3276dba6e..69f97a50c3 100644 --- a/packages/frontend/src/pages/instance-info.vue +++ b/packages/frontend/src/pages/instance-info.vue @@ -254,7 +254,7 @@ definePageMetadata({ display: block; margin: 0 16px 0 0; height: 64px; - border-radius: 5px; + border-radius: var(--radius-sm); } > .name { diff --git a/packages/frontend/src/pages/invite.vue b/packages/frontend/src/pages/invite.vue index 2c0ed41450..a5bdc29dbb 100644 --- a/packages/frontend/src/pages/invite.vue +++ b/packages/frontend/src/pages/invite.vue @@ -114,6 +114,6 @@ definePageMetadata({ width: 128px; height: 128px; margin-bottom: 16px; - border-radius: 4px; + border-radius: var(--radius-md); } diff --git a/packages/frontend/src/pages/list.vue b/packages/frontend/src/pages/list.vue index 9309ebc08f..cf69e6a71d 100644 --- a/packages/frontend/src/pages/list.vue +++ b/packages/frontend/src/pages/list.vue @@ -141,7 +141,7 @@ definePageMetadata(computed(() => list ? { width: 128px; height: 128px; margin-bottom: 16px; - border-radius: 4px; + border-radius: var(--radius-md); } .button { diff --git a/packages/frontend/src/pages/my-antennas/index.vue b/packages/frontend/src/pages/my-antennas/index.vue index b1d92e42e8..eb91823234 100644 --- a/packages/frontend/src/pages/my-antennas/index.vue +++ b/packages/frontend/src/pages/my-antennas/index.vue @@ -74,7 +74,7 @@ onActivated(() => { display: block; padding: 16px; border: solid 1px var(--divider); - border-radius: 5px; + border-radius: var(--radius-sm); &:hover { border: solid 1px var(--accent); diff --git a/packages/frontend/src/pages/my-lists/index.vue b/packages/frontend/src/pages/my-lists/index.vue index 01cd0d8aa9..b14b605db9 100644 --- a/packages/frontend/src/pages/my-lists/index.vue +++ b/packages/frontend/src/pages/my-lists/index.vue @@ -84,7 +84,7 @@ onActivated(() => { display: block; padding: 16px; border: solid 1px var(--divider); - border-radius: 5px; + border-radius: var(--radius-sm); margin-bottom: 8px; &:hover { diff --git a/packages/frontend/src/pages/note.vue b/packages/frontend/src/pages/note.vue index 7880e3361b..c43b5f900f 100644 --- a/packages/frontend/src/pages/note.vue +++ b/packages/frontend/src/pages/note.vue @@ -148,7 +148,7 @@ definePageMetadata(computed(() => note ? { .loadPrev { min-width: 0; margin: 0 auto; - border-radius: 4px; + border-radius: var(--radius-ellipse); } .loadNext { diff --git a/packages/frontend/src/pages/page-editor/page-editor.container.vue b/packages/frontend/src/pages/page-editor/page-editor.container.vue index cb0af1d548..10effdda1e 100644 --- a/packages/frontend/src/pages/page-editor/page-editor.container.vue +++ b/packages/frontend/src/pages/page-editor/page-editor.container.vue @@ -63,7 +63,7 @@ function remove() { overflow: hidden; background: var(--panel); border: solid 2px var(--X12); - border-radius: 5px; + border-radius: var(--radius-sm); &:hover { border: solid 2px var(--X13); diff --git a/packages/frontend/src/pages/role.vue b/packages/frontend/src/pages/role.vue index ec58203879..c62ad25882 100644 --- a/packages/frontend/src/pages/role.vue +++ b/packages/frontend/src/pages/role.vue @@ -104,7 +104,7 @@ definePageMetadata(computed(() => ({ width: 128px; height: 128px; margin-bottom: 16px; - border-radius: 4px; + border-radius: var(--radius-md); } diff --git a/packages/frontend/src/pages/settings/apps.vue b/packages/frontend/src/pages/settings/apps.vue index c06db27245..db8dcd82f5 100644 --- a/packages/frontend/src/pages/settings/apps.vue +++ b/packages/frontend/src/pages/settings/apps.vue @@ -93,7 +93,7 @@ definePageMetadata({ margin: 0 12px 0 0; width: 50px; height: 50px; - border-radius: 5px; + border-radius: var(--radius-sm); } .appBody { diff --git a/packages/frontend/src/pages/settings/drive-cleaner.vue b/packages/frontend/src/pages/settings/drive-cleaner.vue index 791d76d1b4..553cad7b6a 100644 --- a/packages/frontend/src/pages/settings/drive-cleaner.vue +++ b/packages/frontend/src/pages/settings/drive-cleaner.vue @@ -152,7 +152,7 @@ definePageMetadata({ height: 12px; background: rgba(0, 0, 0, 0.1); overflow: clip; - border-radius: 4px; + border-radius: var(--radius-ellipse); } .meterValue { diff --git a/packages/frontend/src/pages/settings/drive.vue b/packages/frontend/src/pages/settings/drive.vue index 0c6effbaa2..4d390de259 100644 --- a/packages/frontend/src/pages/settings/drive.vue +++ b/packages/frontend/src/pages/settings/drive.vue @@ -148,12 +148,12 @@ definePageMetadata({ .meter { height: 10px; background: rgba(0, 0, 0, 0.1); - border-radius: 4px; + border-radius: var(--radius-ellipse); overflow: clip; } .meterValue { height: 100%; - border-radius: 4px; + border-radius: var(--radius-ellipse); } diff --git a/packages/frontend/src/pages/settings/general.vue b/packages/frontend/src/pages/settings/general.vue index 05ff430915..22c24bec1c 100644 --- a/packages/frontend/src/pages/settings/general.vue +++ b/packages/frontend/src/pages/settings/general.vue @@ -142,6 +142,12 @@ SPDX-License-Identifier: AGPL-3.0-only Aa Aa + + + {{ i18n.ts.cornerRadius }} + Sharkey + Misskey + @@ -212,6 +218,7 @@ import { claimAchievement } from '@/scripts/achievements.js'; const lang = ref(miLocalStorage.getItem('lang')); const fontSize = ref(miLocalStorage.getItem('fontSize')); +const cornerRadius = ref(miLocalStorage.getItem('cornerRadius')); const useSystemFont = ref(miLocalStorage.getItem('useSystemFont') != null); async function reloadAsk() { @@ -277,6 +284,14 @@ watch(fontSize, () => { } }); +watch(cornerRadius, () => { + if (cornerRadius.value == null) { + miLocalStorage.removeItem('cornerRadius'); + } else { + miLocalStorage.setItem('cornerRadius', cornerRadius.value); + } +}); + watch(useSystemFont, () => { if (useSystemFont.value) { miLocalStorage.setItem('useSystemFont', 't'); @@ -288,6 +303,7 @@ watch(useSystemFont, () => { watch([ lang, fontSize, + cornerRadius, useSystemFont, enableInfiniteScroll, squareAvatars, diff --git a/packages/frontend/src/pages/settings/preferences-backups.vue b/packages/frontend/src/pages/settings/preferences-backups.vue index b347d9555e..ecb7c68f73 100644 --- a/packages/frontend/src/pages/settings/preferences-backups.vue +++ b/packages/frontend/src/pages/settings/preferences-backups.vue @@ -114,6 +114,7 @@ type Profile = { hot: Record; cold: Record; fontSize: string | null; + cornerRadius: string | null; useSystemFont: 't' | null; wallpaper: string | null; }; @@ -171,6 +172,7 @@ function getSettings(): Profile['settings'] { hot, cold, fontSize: miLocalStorage.getItem('fontSize'), + cornerRadius: miLocalStorage.getItem('cornerRadius'), useSystemFont: miLocalStorage.getItem('useSystemFont') as 't' | null, wallpaper: miLocalStorage.getItem('wallpaper'), }; @@ -284,6 +286,13 @@ async function applyProfile(id: string): Promise { miLocalStorage.removeItem('fontSize'); } + // cornerRadius + if (settings.cornerRadius) { + miLocalStorage.setItem('cornerRadius', settings.cornerRadius); + } else { + miLocalStorage.removeItem('cornerRadius'); + } + // useSystemFont if (settings.useSystemFont) { miLocalStorage.setItem('useSystemFont', settings.useSystemFont); diff --git a/packages/frontend/src/pages/settings/profile.vue b/packages/frontend/src/pages/settings/profile.vue index c79e99cda7..22b3d7a529 100644 --- a/packages/frontend/src/pages/settings/profile.vue +++ b/packages/frontend/src/pages/settings/profile.vue @@ -340,7 +340,7 @@ definePageMetadata({ background-size: cover; background-position: center; border: solid 1px var(--divider); - border-radius: 5px; + border-radius: var(--radius); overflow: clip; } @@ -428,7 +428,7 @@ definePageMetadata({ cursor: pointer; padding: 16px 16px 28px 16px; border: solid 2px var(--divider); - border-radius: 8px; + border-radius: var(--radius-sm); text-align: center; font-size: 90%; overflow: clip; diff --git a/packages/frontend/src/pages/settings/reaction.vue b/packages/frontend/src/pages/settings/reaction.vue index 12d37c9da2..183d2bfb47 100644 --- a/packages/frontend/src/pages/settings/reaction.vue +++ b/packages/frontend/src/pages/settings/reaction.vue @@ -7,7 +7,7 @@ SPDX-License-Identifier: AGPL-3.0-only {{ i18n.ts.reactionSettingDescription }} - + diff --git a/packages/frontend/src/pages/settings/theme.vue b/packages/frontend/src/pages/settings/theme.vue index 1f67d37855..eb69912609 100644 --- a/packages/frontend/src/pages/settings/theme.vue +++ b/packages/frontend/src/pages/settings/theme.vue @@ -172,7 +172,7 @@ definePageMetadata({ diff --git a/packages/frontend/src/pages/welcome.timeline.vue b/packages/frontend/src/pages/welcome.timeline.vue index 823f713d39..af12532d34 100644 --- a/packages/frontend/src/pages/welcome.timeline.vue +++ b/packages/frontend/src/pages/welcome.timeline.vue @@ -88,7 +88,7 @@ onUpdated(() => { padding: 16px; margin: 0 0 0 auto; max-width: max-content; - border-radius: 4px; + border-radius: var(--radius-md); } .richcontent { diff --git a/packages/frontend/src/style.scss b/packages/frontend/src/style.scss index 4d0b3a8beb..39c0a4c56b 100644 --- a/packages/frontend/src/style.scss +++ b/packages/frontend/src/style.scss @@ -15,7 +15,15 @@ */ :root { + --radius-xs: 5px; + --radius-sm: 5px; --radius: 5px; + --radius-md: 5px; + --radius-lg: 5px; + --radius-xl: 5px; + --radius-ellipse: 5px; + --radius-full: 5px; + --marginFull: 16px; --marginHalf: 10px; @@ -32,6 +40,17 @@ //--ad: rgb(255 169 0 / 10%); } +html.radius-misskey { + --radius-xs: 4px; + --radius-sm: 8px; + --radius: 12px; + --radius-md: 16px; + --radius-lg: 24px; + --radius-xl: 32px; + --radius-ellipse: 999px; + --radius-full: 100%; +} + ::selection { color: var(--fgOnAccent); background-color: var(--accent); @@ -159,7 +178,7 @@ hr { display: inline-block; width: 1em; height: 1em; - border-radius: 100%; + border-radius: var(--radius-full); background: currentColor; } @@ -364,7 +383,7 @@ hr { padding: 2px 3px; color: var(--accent); border: solid 1px var(--accent); - border-radius: 4px; + border-radius: var(--radius-xs); vertical-align: top; } @@ -404,7 +423,7 @@ hr { vertical-align: bottom; height: 128px; margin-bottom: 16px; - border-radius: 4px; + border-radius: var(--radius-md); } } diff --git a/packages/frontend/src/ui/_common_/navbar-for-mobile.vue b/packages/frontend/src/ui/_common_/navbar-for-mobile.vue index 9ad3cf8b2c..4c46fd794f 100644 --- a/packages/frontend/src/ui/_common_/navbar-for-mobile.vue +++ b/packages/frontend/src/ui/_common_/navbar-for-mobile.vue @@ -149,7 +149,7 @@ function more() { left: 0; right: 0; bottom: 0; - border-radius: 4px; + border-radius: var(--radius-ellipse); background: linear-gradient(90deg, var(--buttonGradateA), var(--buttonGradateB)); } @@ -236,7 +236,7 @@ function more() { left: 0; right: 0; bottom: 0; - border-radius: 4px; + border-radius: var(--radius-ellipse); background: var(--accentedBg); } } diff --git a/packages/frontend/src/ui/_common_/navbar.vue b/packages/frontend/src/ui/_common_/navbar.vue index 33c91f12df..dbad5c32a1 100644 --- a/packages/frontend/src/ui/_common_/navbar.vue +++ b/packages/frontend/src/ui/_common_/navbar.vue @@ -202,7 +202,7 @@ function more(ev: MouseEvent) { left: 0; right: 0; bottom: 0; - border-radius: 4px; + border-radius: var(--radius-ellipse); background: linear-gradient(90deg, var(--buttonGradateA), var(--buttonGradateB)); } @@ -296,7 +296,7 @@ function more(ev: MouseEvent) { left: 0; right: 0; bottom: 0; - border-radius: 4px; + border-radius: var(--radius-ellipse); background: var(--accentedBg); } } @@ -388,7 +388,7 @@ function more(ev: MouseEvent) { margin: auto; width: 52px; aspect-ratio: 1/1; - border-radius: 100%; + border-radius: var(--radius-full); background: linear-gradient(90deg, var(--buttonGradateA), var(--buttonGradateB)); } @@ -457,7 +457,7 @@ function more(ev: MouseEvent) { left: 0; right: 0; bottom: 0; - border-radius: 4px; + border-radius: var(--radius-ellipse); background: var(--accentedBg); } diff --git a/packages/frontend/src/ui/_common_/notification.vue b/packages/frontend/src/ui/_common_/notification.vue index 4ca900ff12..dc1a9a1b24 100644 --- a/packages/frontend/src/ui/_common_/notification.vue +++ b/packages/frontend/src/ui/_common_/notification.vue @@ -22,7 +22,7 @@ defineProps<{