diff --git a/locales/en-US.yml b/locales/en-US.yml index e8e3497f8..3bb8739f1 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 1c1105cb8..b2dec3e58 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 68a6ca2da..c49de02b1 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 570b15da0..cb0c3d310 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 8bad3d843..ea3056bda 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 1ef8a205e..14247f4bf 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 bea0ed26d..aac7f508a 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 3eb020c50..9596ce607 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 7c4f91055..b047405fa 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 3801d6b5d..2fdc2bbe0 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 00a1d4132..4a58204b5 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 6429258f4..9c6e2f00b 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 2e83d59b5..546bc0b4b 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 4ec354041..21684b462 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 2d56a6196..543404268 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 4ebfec5b5..79b194964 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 3195377d6..42c6cc107 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 b62f4324e..e0692eb38 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 c8f23286f..2c08ac754 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 f352e655b..9f79a44d4 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 66807cf42..306352379 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 2af7a76a3..50ed8048b 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 9d3132c54..581d815d6 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 016a4b020..1fa42c1e4 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 c9f02dd45..5e534db94 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 e1f7b735f..33a9b0fbf 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 2e8f9e26d..4d4205365 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 1588f924c..83f56dc1a 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 cba561b81..2f9ed5ce2 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 376d4fd55..d1989ad3e 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 ed15b43d0..f258b2a1b 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 79ce60baf..81ea36c2a 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 b22e9e016..b0e91e523 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 3c8ba0012..fa113ae2f 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 379dfe806..5d86eee71 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 d353e4d8e..ac957d93d 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 efa817002..2becabb41 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 ee7dbecf0..146b9d7cc 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 96072a19c..3dc95ad0a 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 8f6dc6aee..c8c48d162 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 50bfd64fc..93296dd9d 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 9d2010336..b82f36cdd 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 2b93d2eb4..2b56b946d 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 036ad3b9e..3ace738f1 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 78eccd061..3b26b50a0 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 d21c6317a..eeb9325a2 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 9cec4009c..7093283d4 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 70c2a37b5..978c5005c 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 6bb2fc895..6219aa717 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 8b792fe49..ac50d73cd 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 b98750da4..320ece4ef 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 5b0e7be0e..2134e9fad 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 0d73885b6..3023471b1 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 037d6c94a..fe2720693 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 1e235bf70..205478369 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 7b1975807..902851597 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 6b619249d..43bfbeb87 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 42c228197..a42e9809e 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 d41834836..a6612f17d 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 16bf6985e..33dbbd0d8 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 580bfb780..563d8988a 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 af1caa87c..4302bde91 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 c84d35c7d..97a85d434 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 89127bd01..440c9c8da 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 83c61f74e..2fcf35f36 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 abba31f1f..b4ae855d5 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 210a0fcf8..f787b1209 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 1686718f2..7546804a7 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 a3276dba6..69f97a50c 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 2c0ed4145..a5bdc29db 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 9309ebc08..cf69e6a71 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 b1d92e42e..eb9182323 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 01cd0d8aa..b14b605db 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 7880e3361..c43b5f900 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 cb0af1d54..10effdda1 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 ec5820387..c62ad2588 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 c06db2724..db8dcd82f 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 791d76d1b..553cad7b6 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 0c6effbaa..4d390de25 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 05ff43091..22c24bec1 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 + + + + + + @@ -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 b347d9555..ecb7c68f7 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 c79e99cda..22b3d7a52 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 12d37c9da..183d2bfb4 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
-
+