diff options
| author | misskey-release-bot[bot] <157398866+misskey-release-bot[bot]@users.noreply.github.com> | 2025-11-28 10:04:09 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-11-28 10:04:09 +0000 |
| commit | 994fc062cf3c60559d5730e9897f6c47b296f254 (patch) | |
| tree | ce75fcbd2f55ffbd9a83e81af6117fd94eb24321 /packages/frontend/src/components | |
| parent | Merge pull request #16759 from misskey-dev/develop (diff) | |
| parent | Release: 2025.11.1 (diff) | |
| download | misskey-994fc062cf3c60559d5730e9897f6c47b296f254.tar.gz misskey-994fc062cf3c60559d5730e9897f6c47b296f254.tar.bz2 misskey-994fc062cf3c60559d5730e9897f6c47b296f254.zip | |
Merge pull request #16840 from misskey-dev/develop
Release: 2025.11.1
Diffstat (limited to 'packages/frontend/src/components')
| -rw-r--r-- | packages/frontend/src/components/MkFollowButton.vue | 72 | ||||
| -rw-r--r-- | packages/frontend/src/components/MkPostForm.vue | 29 | ||||
| -rw-r--r-- | packages/frontend/src/components/MkRadios.vue | 4 | ||||
| -rw-r--r-- | packages/frontend/src/components/MkSpot.vue | 6 | ||||
| -rw-r--r-- | packages/frontend/src/components/global/MkSystemIcon.vue | 38 |
5 files changed, 91 insertions, 58 deletions
diff --git a/packages/frontend/src/components/MkFollowButton.vue b/packages/frontend/src/components/MkFollowButton.vue index c7361a19c6..ba21fe82e4 100644 --- a/packages/frontend/src/components/MkFollowButton.vue +++ b/packages/frontend/src/components/MkFollowButton.vue @@ -102,6 +102,21 @@ async function onClick() { await misskeyApi('following/delete', { userId: props.user.id, }); + } else if (hasPendingFollowRequestFromYou.value) { + const { canceled } = await os.confirm({ + type: 'question', + text: i18n.tsx.cancelFollowRequestConfirm({ name: props.user.name || props.user.username }), + }); + + if (canceled) { + wait.value = false; + return; + } + + await misskeyApi('following/requests/cancel', { + userId: props.user.id, + }); + hasPendingFollowRequestFromYou.value = false; } else { if (prefer.s.alwaysConfirmFollow) { const { canceled } = await os.confirm({ @@ -115,41 +130,34 @@ async function onClick() { } } - if (hasPendingFollowRequestFromYou.value) { - await misskeyApi('following/requests/cancel', { - userId: props.user.id, - }); - hasPendingFollowRequestFromYou.value = false; - } else { - await misskeyApi('following/create', { - userId: props.user.id, - withReplies: prefer.s.defaultFollowWithReplies, - }); - emit('update:user', { - ...props.user, - withReplies: prefer.s.defaultFollowWithReplies, - }); - hasPendingFollowRequestFromYou.value = true; + await misskeyApi('following/create', { + userId: props.user.id, + withReplies: prefer.s.defaultFollowWithReplies, + }); + emit('update:user', { + ...props.user, + withReplies: prefer.s.defaultFollowWithReplies, + }); + hasPendingFollowRequestFromYou.value = true; - if ($i == null) { - wait.value = false; - return; - } + if ($i == null) { + wait.value = false; + return; + } - claimAchievement('following1'); + claimAchievement('following1'); - if ($i.followingCount >= 10) { - claimAchievement('following10'); - } - if ($i.followingCount >= 50) { - claimAchievement('following50'); - } - if ($i.followingCount >= 100) { - claimAchievement('following100'); - } - if ($i.followingCount >= 300) { - claimAchievement('following300'); - } + if ($i.followingCount >= 10) { + claimAchievement('following10'); + } + if ($i.followingCount >= 50) { + claimAchievement('following50'); + } + if ($i.followingCount >= 100) { + claimAchievement('following100'); + } + if ($i.followingCount >= 300) { + claimAchievement('following300'); } } } catch (err) { diff --git a/packages/frontend/src/components/MkPostForm.vue b/packages/frontend/src/components/MkPostForm.vue index 50340b21c2..86557b12df 100644 --- a/packages/frontend/src/components/MkPostForm.vue +++ b/packages/frontend/src/components/MkPostForm.vue @@ -608,11 +608,30 @@ async function toggleReactionAcceptance() { //#region その他の設定メニューpopup function showOtherSettings() { let reactionAcceptanceIcon = 'ti ti-icons'; + let reactionAcceptanceCaption = ''; - if (reactionAcceptance.value === 'likeOnly') { - reactionAcceptanceIcon = 'ti ti-heart _love'; - } else if (reactionAcceptance.value === 'likeOnlyForRemote') { - reactionAcceptanceIcon = 'ti ti-heart-plus'; + switch (reactionAcceptance.value) { + case 'likeOnly': + reactionAcceptanceIcon = 'ti ti-heart _love'; + reactionAcceptanceCaption = i18n.ts.likeOnly; + break; + + case 'likeOnlyForRemote': + reactionAcceptanceIcon = 'ti ti-heart-plus'; + reactionAcceptanceCaption = i18n.ts.likeOnlyForRemote; + break; + + case 'nonSensitiveOnly': + reactionAcceptanceCaption = i18n.ts.nonSensitiveOnly; + break; + + case 'nonSensitiveOnlyForLocalLikeOnlyForRemote': + reactionAcceptanceCaption = i18n.ts.nonSensitiveOnlyForLocalLikeOnlyForRemote; + break; + + default: + reactionAcceptanceCaption = i18n.ts.all; + break; } const menuItems = [{ @@ -624,6 +643,7 @@ function showOtherSettings() { }, { type: 'divider' }, { icon: reactionAcceptanceIcon, text: i18n.ts.reactionAcceptance, + caption: reactionAcceptanceCaption, action: () => { toggleReactionAcceptance(); }, @@ -692,6 +712,7 @@ function removeVisibleUser(user) { function clear() { text.value = ''; + cw.value = null; files.value = []; poll.value = null; quoteId.value = null; diff --git a/packages/frontend/src/components/MkRadios.vue b/packages/frontend/src/components/MkRadios.vue index 8b641d0f93..426a1d2c2b 100644 --- a/packages/frontend/src/components/MkRadios.vue +++ b/packages/frontend/src/components/MkRadios.vue @@ -4,7 +4,7 @@ SPDX-License-Identifier: AGPL-3.0-only --> <script lang="ts"> -import { defineComponent, h, ref, watch } from 'vue'; +import { Comment, defineComponent, h, ref, watch } from 'vue'; import MkRadio from './MkRadio.vue'; import type { VNode } from 'vue'; @@ -35,7 +35,7 @@ export default defineComponent({ if (options.length === 1 && options[0].props == null) options = options[0].children as VNode[]; // vnodeのうちv-if=falseなものを除外する(trueになるものはoptionなど他typeになる) - options = options.filter(vnode => !(typeof vnode.type === 'symbol' && vnode.type.description === 'v-cmt' && vnode.children === 'v-if')); + options = options.filter(vnode => vnode.type !== Comment); return () => h('div', { class: [ diff --git a/packages/frontend/src/components/MkSpot.vue b/packages/frontend/src/components/MkSpot.vue index 07699644aa..4a8ebb5f94 100644 --- a/packages/frontend/src/components/MkSpot.vue +++ b/packages/frontend/src/components/MkSpot.vue @@ -110,7 +110,11 @@ onUnmounted(() => { <style lang="scss" module> .root { - position: absolute; + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; } .bg { diff --git a/packages/frontend/src/components/global/MkSystemIcon.vue b/packages/frontend/src/components/global/MkSystemIcon.vue index d2ef0fb2d8..971c13478e 100644 --- a/packages/frontend/src/components/global/MkSystemIcon.vue +++ b/packages/frontend/src/components/global/MkSystemIcon.vue @@ -5,31 +5,31 @@ SPDX-License-Identifier: AGPL-3.0-only <template> <svg v-if="type === 'info'" :class="[$style.icon, $style.info]" viewBox="0 0 160 160"> - <path d="M80,108L80,72" style="--l:37;" :class="[$style.line, $style.animLine]"/> + <path d="M80,108L80,72" pathLength="1" :class="[$style.line, $style.animLine]"/> <path d="M80,52L80,52" :class="[$style.line, $style.animFade]"/> - <circle cx="80" cy="80" r="56" style="--l:350;" :class="[$style.line, $style.animCircle]"/> + <circle cx="80" cy="80" r="56" pathLength="1" :class="[$style.line, $style.animCircle]"/> </svg> <svg v-else-if="type === 'question'" :class="[$style.icon, $style.question]" viewBox="0 0 160 160"> - <path d="M80,92L79.991,84C88.799,83.98 96,76.962 96,68C96,59.038 88.953,52 79.991,52C71.03,52 64,59.038 64,68" style="--l:85;" :class="[$style.line, $style.animLine]"/> + <path d="M80,92L79.991,84C88.799,83.98 96,76.962 96,68C96,59.038 88.953,52 79.991,52C71.03,52 64,59.038 64,68" pathLength="1" :class="[$style.line, $style.animLine]"/> <path d="M80,108L80,108" :class="[$style.line, $style.animFade]"/> - <circle cx="80" cy="80" r="56" style="--l:350;" :class="[$style.line, $style.animCircle]"/> + <circle cx="80" cy="80" r="56" pathLength="1" :class="[$style.line, $style.animCircle]"/> </svg> <svg v-else-if="type === 'success'" :class="[$style.icon, $style.success]" viewBox="0 0 160 160"> - <path d="M62,80L74,92L98,68" style="--l:50;" :class="[$style.line, $style.animLine]"/> - <circle cx="80" cy="80" r="56" style="--l:350;" :class="[$style.line, $style.animCircle]"/> + <path d="M62,80L74,92L98,68" pathLength="1" :class="[$style.line, $style.animLine]"/> + <circle cx="80" cy="80" r="56" pathLength="1" :class="[$style.line, $style.animCircle]"/> </svg> <svg v-else-if="type === 'warn'" :class="[$style.icon, $style.warn]" viewBox="0 0 160 160"> - <path d="M80,64L80,88" style="--l:27;" :class="[$style.line, $style.animLine]"/> + <path d="M80,64L80,88" pathLength="1" :class="[$style.line, $style.animLine]"/> <path d="M80,108L80,108" :class="[$style.line, $style.animFade]"/> - <path d="M92,28L144,116C148.709,124.65 144.083,135.82 136,136L24,136C15.917,135.82 11.291,124.65 16,116L68,28C73.498,19.945 86.771,19.945 92,28Z" style="--l:395;" :class="[$style.line, $style.animLine]"/> + <path d="M92,28L144,116C148.709,124.65 144.083,135.82 136,136L24,136C15.917,135.82 11.291,124.65 16,116L68,28C73.498,19.945 86.771,19.945 92,28Z" pathLength="1" :class="[$style.line, $style.animLine]"/> </svg> <svg v-else-if="type === 'error'" :class="[$style.icon, $style.error]" viewBox="0 0 160 160"> - <path d="M63,63L96,96" style="--l:47;--duration:0.3s;" :class="[$style.line, $style.animLine]"/> - <path d="M96,63L63,96" style="--l:47;--duration:0.3s;--delay:0.2s;" :class="[$style.line, $style.animLine]"/> - <circle cx="80" cy="80" r="56" style="--l:350;" :class="[$style.line, $style.animCircle]"/> + <path d="M63,63L96,96" pathLength="1" style="--duration:0.3s;" :class="[$style.line, $style.animLine]"/> + <path d="M96,63L63,96" pathLength="1" style="--duration:0.3s;--delay:0.2s;" :class="[$style.line, $style.animLine]"/> + <circle cx="80" cy="80" r="56" pathLength="1" :class="[$style.line, $style.animCircle]"/> </svg> <svg v-else-if="type === 'waiting'" :class="[$style.icon, $style.waiting]" viewBox="0 0 160 160"> - <circle cx="80" cy="80" r="56" style="--l:350;" :class="[$style.line, $style.animCircleWaiting]"/> + <circle cx="80" cy="80" r="56" pathLength="1" :class="[$style.line, $style.animCircleWaiting]"/> <circle cx="80" cy="80" r="56" style="opacity: 0.25;" :class="[$style.line]"/> </svg> </template> @@ -80,15 +80,15 @@ const props = defineProps<{ } .animLine { - stroke-dasharray: var(--l); - stroke-dashoffset: var(--l); + stroke-dasharray: 1; + stroke-dashoffset: 1; animation: line var(--duration, 0.5s) cubic-bezier(0,0,.25,1) 1 forwards; animation-delay: var(--delay, 0s); } .animCircle { - stroke-dasharray: var(--l); - stroke-dashoffset: var(--l); + stroke-dasharray: 1; + stroke-dashoffset: 1; animation: line var(--duration, 0.5s) cubic-bezier(0,0,.25,1) 1 forwards; animation-delay: var(--delay, 0s); transform-origin: center; @@ -96,8 +96,8 @@ const props = defineProps<{ } .animCircleWaiting { - stroke-dasharray: var(--l); - stroke-dashoffset: calc(var(--l) / 1.5); + stroke-dasharray: 1; + stroke-dashoffset: calc(1 / 1.5); animation: waiting 0.75s linear infinite; transform-origin: center; } @@ -110,7 +110,7 @@ const props = defineProps<{ @keyframes line { 0% { - stroke-dashoffset: var(--l); + stroke-dashoffset: 1; opacity: 0; } 100% { |