Category watch state (#445)

* feat: pass data to client

* add state fix category new topics alert

* update watch tpl

* add UCP option for category watch state
main
Barış Soner Uşaklı 6 years ago committed by GitHub
parent 74e0ef3301
commit de1fffb22a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -159,6 +159,14 @@
<input type="checkbox" data-property="followTopicsOnReply" <!-- IF settings.followTopicsOnReply -->checked<!-- ENDIF settings.followTopicsOnReply -->/> <strong>[[user:follow_topics_you_reply_to]]</strong> <input type="checkbox" data-property="followTopicsOnReply" <!-- IF settings.followTopicsOnReply -->checked<!-- ENDIF settings.followTopicsOnReply -->/> <strong>[[user:follow_topics_you_reply_to]]</strong>
</label> </label>
</div> </div>
<div class="form-group">
<label>[[user:default-category-watch-state]]</label>
<select class="form-control" data-property="categoryWatchState">
<option value="watching" <!-- IF categoryWatchState.watching -->selected<!-- ENDIF categoryWatchState.watching -->>[[category:watching]]</option>
<option value="notwatching" <!-- IF categoryWatchState.notwatching -->selected<!-- ENDIF categoryWatchState.notwatching -->>[[category:not-watching]]</option>
<option value="ignoring" <!-- IF categoryWatchState.ignoring -->selected<!-- ENDIF categoryWatchState.ignoring -->>[[category:ignoring]]</option>
</select>
</div>
</div> </div>

@ -19,7 +19,7 @@
<!-- ENDIF !loggedIn --> <!-- ENDIF !loggedIn -->
<!-- ENDIF privileges.topics:create --> <!-- ENDIF privileges.topics:create -->
<a href="{url}"> <a href="{url}" class="inline-block">
<div class="alert alert-warning hide" id="new-topics-alert"></div> <div class="alert alert-warning hide" id="new-topics-alert"></div>
</a> </a>

@ -3,16 +3,21 @@
<button class="btn btn-default dropdown-toggle" data-toggle="dropdown" type="button"> <button class="btn btn-default dropdown-toggle" data-toggle="dropdown" type="button">
<span component="category/watching/menu" <!-- IF isIgnored -->class="hidden"<!-- ENDIF isIgnored --><!-- IF ../isIgnored -->class="hidden"<!-- ENDIF ../isIgnored -->><i class="fa fa-fw fa-eye"></i><span class="visible-sm-inline visible-md-inline visible-lg-inline">[[category:watching]]</span></span> <span component="category/watching/menu" <!-- IF !../isWatched -->class="hidden"<!-- ENDIF !../isWatched -->><i class="fa fa-fw fa-inbox"></i><span class="visible-sm-inline visible-md-inline visible-lg-inline">[[category:watching]]</span></span>
<span component="category/ignoring/menu" <!-- IF !../isIgnored --><!-- IF !isIgnored -->class="hidden"<!-- ENDIF !isIgnored --><!-- ENDIF !../isIgnored -->><i class="fa fa-fw fa-eye-slash"></i><span class="visible-sm-inline visible-md-inline visible-lg-inline">[[category:ignoring]]</span></span> <span component="category/notwatching/menu" <!-- IF !../isNotWatched -->class="hidden"<!-- ENDIF !../isNotWatched -->><i class="fa fa-fw fa-clock-o"></i><span class="visible-sm-inline visible-md-inline visible-lg-inline">[[category:not-watching]]</span></span>
<span component="category/ignoring/menu" <!-- IF !../isIgnored -->class="hidden"<!-- ENDIF !../isIgnored -->><i class="fa fa-fw fa-eye-slash"></i><span class="visible-sm-inline visible-md-inline visible-lg-inline">[[category:ignoring]]</span></span>
<span class="caret"></span> <span class="caret"></span>
</button> </button>
<ul class="dropdown-menu dropdown-menu-right"> <ul class="dropdown-menu dropdown-menu-right">
<li><a href="#" component="category/watching"><i component="category/watching/check" class="fa fa-fw <!-- IF !../isIgnored --><!-- IF !isIgnored -->fa-check<!-- ENDIF !isIgnored --><!-- ENDIF !../isIgnored -->"></i><i class="fa fa-fw fa-eye"></i> [[category:watching]]<p class="help-text"><small>[[category:watching.description]]</small></p></a></li> <li><a href="#" component="category/watching" data-state="watching"><i component="category/watching/check" class="fa fa-fw <!-- IF ../isWatched -->fa-check<!-- ENDIF ../isWatched -->"></i><i class="fa fa-fw fa-inbox"></i> [[category:watching]]<p class="help-text"><small>[[category:watching.description]]</small></p></a></li>
<li><a href="#" component="category/ignoring"><i component="category/ignoring/check" class="fa fa-fw <!-- IF isIgnored -->fa-check<!-- ENDIF isIgnored --><!-- IF ../isIgnored -->fa-check<!-- ENDIF ../isIgnored -->"></i><i class="fa fa-fw fa-eye-slash"></i> [[category:ignoring]]<p class="help-text"><small>[[category:ignoring.description]]</small></p></a></li>
<li><a href="#" component="category/notwatching" data-state="notwatching"><i component="category/notwatching/check" class="fa fa-fw <!-- IF ../isNotWatched -->fa-check<!-- ENDIF ../isNotWatched -->"></i><i class="fa fa-fw fa-clock-o"></i> [[category:not-watching]]<p class="help-text"><small>[[category:not-watching.description]]</small></p></a></li>
<li><a href="#" component="category/ignoring" data-state="ignoring"><i component="category/ignoring/check" class="fa fa-fw <!-- IF ../isIgnored -->fa-check<!-- ENDIF ../isIgnored -->"></i><i class="fa fa-fw fa-eye-slash"></i> [[category:ignoring]]<p class="help-text"><small>[[category:ignoring.description]]</small></p></a></li>
</ul> </ul>
</div> </div>
<!-- ENDIF config.loggedIn --> <!-- ENDIF config.loggedIn -->
Loading…
Cancel
Save