forked from rDrama/rDrama
restore "notify followers" checkbox
parent
34aaed8045
commit
c1aae95d16
|
@ -57,6 +57,7 @@ class Submission(Base):
|
||||||
ban_reason = Column(String)
|
ban_reason = Column(String)
|
||||||
embed_url = Column(String)
|
embed_url = Column(String)
|
||||||
new = Column(Boolean)
|
new = Column(Boolean)
|
||||||
|
notify = Column(Boolean)
|
||||||
|
|
||||||
author = relationship("User", primaryjoin="Submission.author_id==User.id")
|
author = relationship("User", primaryjoin="Submission.author_id==User.id")
|
||||||
oauth_app = relationship("OauthApp")
|
oauth_app = relationship("OauthApp")
|
||||||
|
|
|
@ -586,6 +586,7 @@ class User(Base):
|
||||||
Submission.deleted_utc == 0,
|
Submission.deleted_utc == 0,
|
||||||
Submission.is_banned == False,
|
Submission.is_banned == False,
|
||||||
Submission.private == False,
|
Submission.private == False,
|
||||||
|
Submission.notify == True,
|
||||||
Submission.author_id != self.id,
|
Submission.author_id != self.id,
|
||||||
Submission.ghost == False,
|
Submission.ghost == False,
|
||||||
Submission.author_id.notin_(self.userblocks)
|
Submission.author_id.notin_(self.userblocks)
|
||||||
|
|
|
@ -137,6 +137,7 @@ def notifications_posts(v):
|
||||||
Submission.deleted_utc == 0,
|
Submission.deleted_utc == 0,
|
||||||
Submission.is_banned == False,
|
Submission.is_banned == False,
|
||||||
Submission.private == False,
|
Submission.private == False,
|
||||||
|
Submission.notify == True,
|
||||||
Submission.author_id != v.id,
|
Submission.author_id != v.id,
|
||||||
Submission.ghost == False,
|
Submission.ghost == False,
|
||||||
Submission.author_id.notin_(v.userblocks)
|
Submission.author_id.notin_(v.userblocks)
|
||||||
|
|
|
@ -919,6 +919,7 @@ def submit_post(v, sub=None):
|
||||||
|
|
||||||
post = Submission(
|
post = Submission(
|
||||||
private=bool(request.values.get("private","")),
|
private=bool(request.values.get("private","")),
|
||||||
|
notify=bool(request.values.get("notify","")),
|
||||||
club=club,
|
club=club,
|
||||||
author_id=v.id,
|
author_id=v.id,
|
||||||
over_18=bool(request.values.get("over_18","")),
|
over_18=bool(request.values.get("over_18","")),
|
||||||
|
|
|
@ -164,6 +164,11 @@
|
||||||
<div class="form-text text-small"><a href="/formatting" {% if v and v.newtab and not g.webview %}target="_blank"{% endif %}>Formatting help</a></div>
|
<div class="form-text text-small"><a href="/formatting" {% if v and v.newtab and not g.webview %}target="_blank"{% endif %}>Formatting help</a></div>
|
||||||
<pre></pre>
|
<pre></pre>
|
||||||
|
|
||||||
|
<div class="custom-control custom-checkbox">
|
||||||
|
<input autocomplete="off" type="checkbox" class="custom-control-input" id="post-notify" name="notify" onchange="savetext()" checked>
|
||||||
|
<label class="custom-control-label" for="post-notify">Notify followers</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="custom-control custom-checkbox">
|
<div class="custom-control custom-checkbox">
|
||||||
<input autocomplete="off" type="checkbox" class="custom-control-input" id="post-new" name="new" onchange="savetext()">
|
<input autocomplete="off" type="checkbox" class="custom-control-input" id="post-new" name="new" onchange="savetext()">
|
||||||
<label class="custom-control-label" for="post-new">Make the default comment sorting "new"</label>
|
<label class="custom-control-label" for="post-new">Make the default comment sorting "new"</label>
|
||||||
|
@ -187,7 +192,7 @@
|
||||||
|
|
||||||
<div class="custom-control custom-checkbox">
|
<div class="custom-control custom-checkbox">
|
||||||
<input onchange='draft(this);' autocomplete="off" type="checkbox" class="custom-control-input" id="post-ghost" name="ghost" {% if v.coins < 100 %}disabled{% endif %}>
|
<input onchange='draft(this);' autocomplete="off" type="checkbox" class="custom-control-input" id="post-ghost" name="ghost" {% if v.coins < 100 %}disabled{% endif %}>
|
||||||
<label class="custom-control-label" for="post-ghost">Ghost Thread (cost: 100 coins)</label>
|
<label class="custom-control-label" for="post-ghost">Ghost thread (cost: 100 coins)</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
alter table submissions add column notify bool not null default true;
|
||||||
|
alter table submissions alter column notify drop default;
|
Loading…
Reference in New Issue