diff --git a/app/js/tl/parse.js b/app/js/tl/parse.js index 5e86bb62..95f54603 100644 --- a/app/js/tl/parse.js +++ b/app/js/tl/parse.js @@ -1361,10 +1361,14 @@ function pollParse(poll, acct_id) { var refresh = ` ${lang.lang_manager_refresh} ` - if (poll.voted) { + if (poll.voted && poll.own_votes.length) { var myvote = lang.lang_parse_voted if (poll.expired) myvote = myvote + '/' + lang.lang_parse_endedvote var result_hide = '' + } else if (poll.voted && !poll.own_votes.length) { + var myvote = lang.lang_parse_myvote + if (poll.expired) myvote = myvote + '/' + lang.lang_parse_endedvote + var result_hide = '' } else if (poll.expired) { var myvote = lang.lang_parse_endedvote var result_hide = '' @@ -1381,7 +1385,7 @@ function pollParse(poll, acct_id) { } var ended = date(poll.expires_at, datetype) var pollHtml = '' - if (choices[0].votes_count) { + if (choices[0].votes_count === 0 || choices[0].votes_count >0) { var max = _.maxBy(choices, 'votes_count').votes_count } else { var max = 0 @@ -1393,14 +1397,14 @@ function pollParse(poll, acct_id) { for (var i = 0; i < minechoice.length; i++) { var me = minechoice[i] if (me == keyc) { - var voteit = '' + var voteit = '' break } } if (!poll.voted && !poll.expired) { var votesel = "voteSelMastodon('" + acct_id + "','" + poll.id + "'," + keyc + ',' + poll.multiple + ')' - var voteclass = 'pointer waves-effect waves-light' + var voteclass = 'pointer' } else { var votesel = '' var voteclass = '' @@ -1421,7 +1425,7 @@ function pollParse(poll, acct_id) { pollHtml = pollHtml + `
- + ${escapeHTML(choice.title)}${voteit} ${openData} diff --git a/app/view/make/language/en/main.json b/app/view/make/language/en/main.json index ce1f4440..c1ec7cb1 100644 --- a/app/view/make/language/en/main.json +++ b/app/view/make/language/en/main.json @@ -199,7 +199,8 @@ "lang_parse_clientemp": "emphasized(/not emphasized)", "lang_parse_clientmute": "muted", "lang_parse_mute": " will be muted. You can remove on preferences.", - "lang_parse_voted": "(Voted or mine poll)", + "lang_parse_voted": "(Voted)", + "lang_parse_myvote": "(My own poll)", "lang_parse_vote": "Vote", "lang_parse_unvoted": "Show the result without voting", "lang_parse_endedvote": "Expired", diff --git a/app/view/make/language/ja/main.json b/app/view/make/language/ja/main.json index fb0968e6..43e2b59f 100644 --- a/app/view/make/language/ja/main.json +++ b/app/view/make/language/ja/main.json @@ -199,7 +199,8 @@ "lang_parse_clientemp": "強調表示/解除", "lang_parse_clientmute": "ミュート", "lang_parse_mute": "ミュートします。設定から解除できます。", - "lang_parse_voted": "(投票済みもしくは自分)", + "lang_parse_voted": "(投票済み)", + "lang_parse_myvote": "(自分)", "lang_parse_vote": "投票", "lang_parse_unvoted": "結果だけ見る", "lang_parse_endedvote": "終了済み",