Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Sharkey
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Essem
Sharkey
Commits
527a13b7
Commit
527a13b7
authored
1 year ago
by
syuilo
Browse files
Options
Downloads
Patches
Plain Diff
enhance(frontend): リアクションの取り消し/変更時に確認ダイアログを出すように
parent
a3423bad
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CHANGELOG.md
+1
-0
1 addition, 0 deletions
CHANGELOG.md
locales/ja-JP.yml
+2
-0
2 additions, 0 deletions
locales/ja-JP.yml
packages/frontend/src/components/MkReactionsViewer.reaction.vue
+12
-5
12 additions, 5 deletions
...es/frontend/src/components/MkReactionsViewer.reaction.vue
with
15 additions
and
5 deletions
CHANGELOG.md
+
1
−
0
View file @
527a13b7
...
...
@@ -21,6 +21,7 @@
-
今後はAPI呼び出し時およびストリーミング接続時に設定するようになります
### Client
-
リアクションの取り消し/変更時に確認ダイアログを出すように
-
開発者モードを追加
-
AiScriptを0.13.3に更新
-
Fix: URLプレビューで情報が取得できなかった際の挙動を修正
...
...
This diff is collapsed.
Click to expand it.
locales/ja-JP.yml
+
2
−
0
View file @
527a13b7
...
...
@@ -1053,6 +1053,8 @@ update: "更新"
rolesThatCanBeUsedThisEmojiAsReaction
:
"
リアクションとして使えるロール"
rolesThatCanBeUsedThisEmojiAsReactionEmptyDescription
:
"
ロールの指定が一つもない場合、誰でもリアクションとして使えます。"
rolesThatCanBeUsedThisEmojiAsReactionPublicRoleWarn
:
"
ロールは公開ロールである必要があります。"
cancelReactionConfirm
:
"
リアクションを取り消しますか?"
changeReactionConfirm
:
"
リアクションを変更しますか?"
_initialAccountSetting
:
accountCreated
:
"
アカウントの作成が完了しました!"
...
...
This diff is collapsed.
Click to expand it.
packages/frontend/src/components/MkReactionsViewer.reaction.vue
+
12
−
5
View file @
527a13b7
...
...
@@ -6,7 +6,7 @@
:class=
"[$style.root,
{ [$style.reacted]: note.myReaction == reaction, [$style.canToggle]: canToggle, [$style.large]: defaultStore.state.largeNoteReactions }]"
@click="toggleReaction()"
>
<MkReactionIcon
:class=
"$style.icon"
:reaction=
"reaction"
:emoji
-u
rl=
"note.reactionEmojis[reaction.substr(1, reaction.length - 2)]"
/>
<MkReactionIcon
:class=
"$style.icon"
:reaction=
"reaction"
:emoji
U
rl=
"note.reactionEmojis[reaction.substr(1, reaction.length - 2)]"
/>
<span
:class=
"$style.count"
>
{{
count
}}
</span>
</button>
</
template
>
...
...
@@ -22,6 +22,7 @@ import { $i } from '@/account';
import
MkReactionEffect
from
'
@/components/MkReactionEffect.vue
'
;
import
{
claimAchievement
}
from
'
@/scripts/achievements
'
;
import
{
defaultStore
}
from
'
@/store
'
;
import
{
i18n
}
from
'
@/i18n
'
;
const
props
=
defineProps
<
{
reaction
:
string
;
...
...
@@ -34,11 +35,17 @@ const buttonEl = shallowRef<HTMLElement>();
const
canToggle
=
computed
(()
=>
!
props
.
reaction
.
match
(
/@
\w
/
)
&&
$i
);
const
toggleReaction
=
()
=>
{
async
function
toggleReaction
()
{
if
(
!
canToggle
.
value
)
return
;
const
oldReaction
=
props
.
note
.
myReaction
;
if
(
oldReaction
)
{
const
confirm
=
await
os
.
confirm
({
type
:
'
warning
'
,
text
:
oldReaction
!==
props
.
reaction
?
i18n
.
ts
.
changeReactionConfirm
:
i18n
.
ts
.
cancelReactionConfirm
,
});
if
(
confirm
.
canceled
)
return
;
os
.
api
(
'
notes/reactions/delete
'
,
{
noteId
:
props
.
note
.
id
,
}).
then
(()
=>
{
...
...
@@ -58,9 +65,9 @@ const toggleReaction = () => {
claimAchievement
(
'
reactWithoutRead
'
);
}
}
}
;
}
const
anime
=
()
=>
{
function
anime
()
{
if
(
document
.
hidden
)
return
;
if
(
!
defaultStore
.
state
.
animation
)
return
;
...
...
@@ -68,7 +75,7 @@ const anime = () => {
const
x
=
rect
.
left
+
16
;
const
y
=
rect
.
top
+
(
buttonEl
.
value
.
offsetHeight
/
2
);
os
.
popup
(
MkReactionEffect
,
{
reaction
:
props
.
reaction
,
x
,
y
},
{},
'
end
'
);
}
;
}
watch
(()
=>
props
.
count
,
(
newCount
,
oldCount
)
=>
{
if
(
oldCount
<
newCount
)
anime
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment