Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
Rosekey
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
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
freelynetwork
Rosekey
Commits
561b0fc1
Commit
561b0fc1
authored
3 years ago
by
syuilo
Browse files
Options
Downloads
Patches
Plain Diff
feat(client): show confirm dialog when vote
parent
b8f42fca
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
+1
-0
1 addition, 0 deletions
locales/ja-JP.yml
packages/client/src/components/poll.vue
+10
-4
10 additions, 4 deletions
packages/client/src/components/poll.vue
with
12 additions
and
4 deletions
CHANGELOG.md
+
1
−
0
View file @
561b0fc1
...
...
@@ -11,6 +11,7 @@
### Improvements
-
API: /antennas/notes API で日付による絞り込みができるように
-
クライアント: アンケートに投票する際に確認ダイアログを出すように
### Bugfixes
-
クライアント: ログインにおいてパスワードが誤っている際のエラーメッセージが正しく表示されない問題を修正
...
...
This diff is collapsed.
Click to expand it.
locales/ja-JP.yml
+
1
−
0
View file @
561b0fc1
...
...
@@ -809,6 +809,7 @@ ffVisibilityDescription: "自分のフォロー/フォロワー情報の公開
continueThread
:
"
さらにスレッドを見る"
deleteAccountConfirm
:
"
アカウントが削除されます。よろしいですか?"
incorrectPassword
:
"
パスワードが間違っています。"
voteConfirm
:
"
「{choice}」に投票しますか?"
_emailUnavailable
:
used
:
"
既に使用されています"
...
...
This diff is collapsed.
Click to expand it.
packages/client/src/components/poll.vue
+
10
−
4
View file @
561b0fc1
...
...
@@ -87,14 +87,20 @@ export default defineComponent({
toggleShowResult
()
{
this
.
showResult
=
!
this
.
showResult
;
},
vote
(
id
)
{
async
vote
(
id
)
{
if
(
this
.
readOnly
||
this
.
closed
||
!
this
.
poll
.
multiple
&&
this
.
poll
.
choices
.
some
(
c
=>
c
.
isVoted
))
return
;
os
.
api
(
'
notes/polls/vote
'
,
{
const
{
canceled
}
=
await
os
.
confirm
({
type
:
'
question
'
,
text
:
this
.
$t
(
'
voteConfirm
'
,
{
choice
:
this
.
poll
.
choices
[
id
].
text
}),
});
if
(
canceled
)
return
;
await
os
.
api
(
'
notes/polls/vote
'
,
{
noteId
:
this
.
note
.
id
,
choice
:
id
}).
then
(()
=>
{
if
(
!
this
.
showResult
)
this
.
showResult
=
!
this
.
poll
.
multiple
;
});
if
(
!
this
.
showResult
)
this
.
showResult
=
!
this
.
poll
.
multiple
;
}
}
});
...
...
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