mirror of
https://github.com/mastodon/mastodon.git
synced 2025-07-17 17:58:14 +00:00
Compare commits
11 Commits
cd7becd05f
...
e574a91d93
Author | SHA1 | Date | |
---|---|---|---|
![]() |
e574a91d93 | ||
![]() |
74fc4dbacf | ||
![]() |
036eefcc94 | ||
![]() |
06af2d2bc3 | ||
![]() |
491686db20 | ||
![]() |
f5e6722627 | ||
![]() |
0e66f139c8 | ||
![]() |
aa6a77fa1b | ||
![]() |
553642b43f | ||
![]() |
9b9e3dd453 | ||
![]() |
1761ae6ab0 |
|
@ -109,3 +109,9 @@ FETCH_REPLIES_MAX_SINGLE=500
|
|||
|
||||
# Max number of replies Collection pages to fetch - total
|
||||
FETCH_REPLIES_MAX_PAGES=500
|
||||
|
||||
# Maximum allowed poll options
|
||||
MAX_POLL_OPTIONS=4
|
||||
|
||||
# Maximum allowed poll option characters
|
||||
MAX_POLL_OPTION_CHARS=50
|
||||
|
|
|
@ -2848,7 +2848,6 @@ a.account__display-name {
|
|||
&__pane {
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
pointer-events: none;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
min-width: 285px;
|
||||
|
@ -2860,7 +2859,6 @@ a.account__display-name {
|
|||
&__inner {
|
||||
position: fixed;
|
||||
width: 285px;
|
||||
pointer-events: auto;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class PollOptionsValidator < ActiveModel::Validator
|
||||
MAX_OPTIONS = 4
|
||||
MAX_OPTION_CHARS = 50
|
||||
MAX_OPTIONS = (ENV['MAX_POLL_OPTIONS'] || 4).to_i
|
||||
MAX_OPTION_CHARS = (ENV['MAX_POLL_OPTION_CHARS'] || 50).to_i
|
||||
|
||||
def validate(poll)
|
||||
poll.errors.add(:options, I18n.t('polls.errors.too_few_options')) unless poll.options.size > 1
|
||||
|
|
Loading…
Reference in New Issue
Block a user