Skip to content

Commit

Permalink
Change resolve button (#34)
Browse files Browse the repository at this point in the history
* Change the UI for topic list

* flip button when unresolved

* change button to square checkbox

* change button to circle checkbox

---------

Authored-by: ruiminggu <[email protected]>
  • Loading branch information
zhijinwuu authored and gonzalezjo committed Oct 12, 2023
1 parent fca4391 commit 3d54097
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/topics/tools.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ const utils = require('../utils');
module.exports = function (Topics) {
const topicTools = {};
Topics.tools = topicTools;
let unresolve = false;

topicTools.delete = async function (tid, uid, markResolved = false) {
if (!markResolved) {
Expand All @@ -29,6 +28,7 @@ module.exports = function (Topics) {

async function toggleDelete(tid, uid, isDelete, markResolved = false) {
let events;
let unresolve;
const topicData = await Topics.getTopicData(tid);

if (!topicData) {
Expand Down
10 changes: 10 additions & 0 deletions themes/nodebb-theme-persona/templates/partials/post_bar.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@
</span>

<!-- IF loggedIn -->
<!-- IF hasResolution -->
<button component="topic/toggle-resolve" class="btn btn-sm btn-default"]">
<i class="fa fa-fw fa-check-circle-o"></i><span class="visible-sm-inline visible-md-inline visible-lg-inline"></span>
</button>
<!-- ENDIF hasResolution -->
<!-- IF !hasResolution -->
<button component="topic/toggle-resolve" class="btn btn-sm btn-default"]">
<i class="fa fa-fw fa-circle-o"></i><span class="visible-sm-inline visible-md-inline visible-lg-inline"></span>
</button>
<!-- ENDIF !hasResolution -->
<button component="topic/mark-unread" class="btn btn-sm btn-default" title="[[topic:mark_unread]]">
<i class="fa fa-fw fa-inbox"></i><span class="visible-sm-inline visible-md-inline visible-lg-inline"></span>
</button>
Expand Down

0 comments on commit 3d54097

Please sign in to comment.