Make bidirectional support a preference

Fixes #270
このコミットが含まれているのは:
Zed 2020-11-08 00:41:12 +01:00
コミット 82fe5d8b78
3個のファイルの変更13行の追加1行の削除

ファイルの表示

@ -88,6 +88,9 @@ genPrefs:
stickyProfile(checkbox, true):
"Make profile sidebar stick to top"
bidiSupport(checkbox, false):
"Support bidirectional text (makes clicking on tweets harder)"
hideTweetStats(checkbox, false):
"Hide tweet stats (replies, retweets, likes)"

ファイルの表示

@ -20,6 +20,11 @@
font-family: $font_3;
line-height: 1.4em;
pointer-events: all;
display: inline;
}
.tweet-bidi {
display: block !important;
}
.tweet-header {

ファイルの表示

@ -299,7 +299,11 @@ proc renderTweet*(tweet: Tweet; prefs: Prefs; path: string; class=""; index=0;
(tweet.reply.len > 1 or tweet.reply[0] != tweet.profile.username):
renderReply(tweet)
tdiv(class="tweet-content media-body", dir="auto"):
var tweetClass = "tweet-content media-body"
if prefs.bidiSupport:
tweetClass &= " tweet-bidi"
tdiv(class=tweetClass, dir="auto"):
verbatim replaceUrl(tweet.text, prefs) & renderLocation(tweet)
if tweet.attribution.isSome: