Node.js based forum software built for the modern web
move common dropdown tpls to core
Barış Soner Uşaklıecfdb3e0fa59
diff --git a/public/scss/global.scss b/public/scss/global.scssindex ab7d569242..02385fff75 100644--- a/public/scss/global.scss+++ b/public/scss/global.scss@@ -36,4 +36,11 @@ html[data-dir="rtl"] {h5 { font-size: 1.125rem; }h6 { font-size: 1rem; }}+}++.btn-link {+ &:hover, &.active {+ background-color: var(--btn-ghost-hover-color);+ text-decoration: none;+ }}\ No newline at end of filediff --git a/src/views/partials/category/filter-dropdown-content.tpl b/src/views/partials/category/filter-dropdown-content.tplnew file mode 100644index 0000000000..183f7d5713--- /dev/null+++ b/src/views/partials/category/filter-dropdown-content.tpl@@ -0,0 +1,41 @@+<button type="button" class="btn btn-ghost btn-sm d-flex align-items-center ff-secondary d-flex gap-2 dropdown-toggle" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">+ {{{ if selectedCategory }}}+ <span class="category-item d-inline-flex align-items-center gap-1">+ {buildCategoryIcon(selectedCategory, "18px", "rounded-circle")}+ <span class="d-none d-md-inline fw-semibold">{selectedCategory.name}</span>+ </span>+ {{{ else }}}+ <i class="fa fa-fw fa-list text-primary"></i>+ <span class="d-none d-md-inline fw-semibold">[[unread:all-categories]]</span>{{{ end }}}+</button>++<div component="category-selector-search" class="hidden position-absolute">+ <input type="text" class="form-control form-control-sm" placeholder="[[search:type-to-search]]" autocomplete="off">+</div>++<div class="dropdown-menu p-1">+ <ul component="category/list" class="list-unstyled mb-0 text-sm category-dropdown-menu ghost-scrollbar" role="menu">+ <li role="presentation" class="category" data-cid="all">+ <a class="dropdown-item rounded-1 d-flex align-items-center gap-2" role="menuitem" href="{{{ if allCategoriesUrl }}}{config.relative_path}/{allCategoriesUrl}{{{ else }}}#{{{ end }}}">+ <div class="flex-grow-1">[[unread:all-categories]]</div>+ <i component="category/select/icon" class="flex-shrink-0 fa fa-fw fa-check {{{if selectedCategory}}}invisible{{{end}}}"></i>+ </a>+ </li>+ {{{each categoryItems}}}+ <li role="presentation" class="category {{{ if ./disabledClass }}}disabled{{{ end }}}" data-cid="{./cid}" data-parent-cid="{./parentCid}" data-name="{./name}">+ <a class="dropdown-item rounded-1 d-flex align-items-center gap-2 {{{ if ./disabledClass }}}disabled{{{ end }}}" role="menuitem" href="#">+ {./level}+ <span component="category-markup" class="flex-grow-1" style="{{{ if ./match }}}font-weight: bold;{{{end}}}">+ <div class="category-item d-inline-flex align-items-center gap-1">+ {{{ if ./icon }}}+ {buildCategoryIcon(@value, "24px", "rounded-circle")}+ {{{ end }}}+ {./name}+ </div>+ </span>+ <i component="category/select/icon" class="flex-shrink-0 fa fa-fw fa-check {{{ if !./selected }}}invisible{{{ end }}}"></i>+ </a>+ </li>+ {{{end}}}+ </ul>+</div>\ No newline at end of filediff --git a/src/views/partials/category/selector-dropdown-content.tpl b/src/views/partials/category/selector-dropdown-content.tplnew file mode 100644index 0000000000..5409c4b674--- /dev/null+++ b/src/views/partials/category/selector-dropdown-content.tpl@@ -0,0 +1,39 @@+<button type="button" class="btn btn-ghost btn-sm ff-secondary d-flex align-items-center gap-2 dropdown-toggle" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">+ <span component="category-selector-selected">+ {{{ if (selectedCategory && !showCategorySelectLabel) }}}+ <span class="category-item d-inline-flex align-items-center gap-1">+ {buildCategoryIcon(selectedCategory, "24px", "rounded-circle")}+ <span class="fw-semibold">{selectedCategory.name}</span>+ </span>+ {{{ else }}}+ <i class="fa fa-fw {{{ if selectCategoryIcon }}}{selectCategoryIcon}{{{ else }}}fa-list{{{ end }}} text-primary"></i>+ <span class="visible-md-inline visible-lg-inline fw-semibold">{{{ if selectCategoryLabel }}}{selectCategoryLabel}{{{ else }}}[[topic:thread-tools.select-category]]{{{ end }}}</span>+ {{{ end }}}+ </span>+</button>++<div component="category-selector-search" class="hidden position-absolute">+ <input type="text" class="form-control form-control-sm" placeholder="[[search:type-to-search]]" autocomplete="off">+</div>++<div class="dropdown-menu p-1">+ <ul component="category/list" class="list-unstyled mb-0 text-sm category-dropdown-menu ghost-scrollbar" role="menu">+ <li component="category/no-matches" role="presentation" class="category hidden">+ <a class="dropdown-item rounded-1" role="menuitem">[[search:no-matches]]</a>+ </li>+ {{{ each categoryItems }}}+ <li role="presentation" class="category {{{ if ./disabledClass }}}disabled {{{ end }}}" data-cid="{./cid}" data-name="{./name}" data-parent-cid="{./parentCid}">+ <a class="dropdown-item rounded-1 {{{ if ./disabledClass }}}disabled{{{ end }}}" role="menuitem" href="#">{./level}+ <span component="category-markup" style="{{{ if ./match }}}font-weight: bold;{{{end}}}">+ <div class="category-item d-inline-flex align-items-center gap-1">+ {{{ if ./icon }}}+ {buildCategoryIcon(@value, "24px", "rounded-circle")}+ {{{ end }}}+ {./name}+ </div>+ </span>+ </a>+ </li>+ {{{ end }}}+ </ul>+</div>\ No newline at end of filediff --git a/src/views/partials/category/sort.tpl b/src/views/partials/category/sort.tplnew file mode 100644index 0000000000..77f9f5b354--- /dev/null+++ b/src/views/partials/category/sort.tpl@@ -0,0 +1,39 @@+<div class="btn-group bottom-sheet" component="thread/sort">+ <button class="btn btn-ghost btn-sm ff-secondary d-flex gap-2 align-items-center dropdown-toggle" data-bs-toggle="dropdown" type="button" aria-haspopup="true" aria-expanded="false" aria-label="[[aria:topic-sort-option, {sortOptionLabel}]]">+ <i class="fa fa-fw fa-arrow-down-wide-short text-primary"></i>+ <span class="d-none d-md-inline fw-semibold">{sortOptionLabel}</span>+ </button>++ <ul class="dropdown-menu p-1 text-sm" role="menu">+ <li>+ <a class="dropdown-item rounded-1 d-flex align-items-center gap-2" href="#" data-sort="recently_replied" role="menuitem">+ <span class="flex-grow-1">[[topic:recently-replied]]</span>+ <i class="flex-shrink-0 fa fa-fw text-secondary"></i>+ </a>+ </li>+ <li>+ <a class="dropdown-item rounded-1 d-flex align-items-center gap-2" href="#" data-sort="recently_created" role="menuitem">+ <span class="flex-grow-1">[[topic:recently-created]]</span>+ <i class="flex-shrink-0 fa fa-fw text-secondary"></i>+ </a>+ </li>+ <li>+ <a class="dropdown-item rounded-1 d-flex align-items-center gap-2" href="#" data-sort="most_posts" role="menuitem">+ <span class="flex-grow-1">[[topic:most-posts]]</span>+ <i class="flex-shrink-0 fa fa-fw text-secondary"></i>+ </a>+ </li>+ <li>+ <a class="dropdown-item rounded-1 d-flex align-items-center gap-2" href="#" data-sort="most_votes" role="menuitem">+ <span class="flex-grow-1">[[topic:most-votes]]</span>+ <i class="flex-shrink-0 fa fa-fw text-secondary"></i>+ </a>+ </li>+ <li>+ <a class="dropdown-item rounded-1 d-flex align-items-center gap-2" href="#" data-sort="most_views" role="menuitem">+ <span class="flex-grow-1">[[topic:most-views]]</span>+ <i class="flex-shrink-0 fa fa-fw text-secondary"></i>+ </a>+ </li>+ </ul>+</div>\ No newline at end of filediff --git a/src/views/partials/category/tools-dropdown-content.tpl b/src/views/partials/category/tools-dropdown-content.tplnew file mode 100644index 0000000000..01eb2a7557--- /dev/null+++ b/src/views/partials/category/tools-dropdown-content.tpl@@ -0,0 +1,85 @@+<button class="btn btn-ghost btn-sm ff-secondary d-flex gap-2 align-items-center dropdown-toggle" data-bs-toggle="dropdown" type="button" aria-haspopup="true" aria-expanded="false">+ <i class="fa fa-fw fa-gear text-primary"></i>+ <span class="visible-md-inline visible-lg-inline fw-semibold">[[topic:thread-tools.title]]</span>+ <span component="topic/selected/badge" class="badge rounded-pill bg-secondary"></span>+</button>+<ul class="dropdown-menu p-1 text-sm" role="menu">+ <li>+ <a component="topic/mark-unread-for-all" href="#" class="dropdown-item rounded-1 d-flex align-items-center gap-2" role="menuitem">+ <i class="fa fa-fw fa-inbox text-secondary"></i> [[topic:thread-tools.markAsUnreadForAll]]+ </a>+ </li>+ <li>+ <a component="topic/pin" href="#" class="dropdown-item rounded-1 d-flex align-items-center gap-2" role="menuitem">+ <i class="fa fa-fw fa-thumb-tack text-secondary"></i> [[topic:thread-tools.pin]]+ </a>+ </li>+ <li>+ <a component="topic/unpin" href="#" class="hidden dropdown-item rounded-1" role="menuitem">+ <i class="fa fa-fw fa-thumb-tack fa-rotate-90 text-secondary"></i> [[topic:thread-tools.unpin]]+ </a>+ </li>++ <li>+ <a component="topic/lock" href="#" class="dropdown-item rounded-1 d-flex align-items-center gap-2" role="menuitem">+ <i class="fa fa-fw fa-lock text-secondary"></i> [[topic:thread-tools.lock]]+ </a>+ </li>+ <li>+ <a component="topic/unlock" href="#" class="hidden dropdown-item rounded-1 d-flex align-items-center gap-2" role="menuitem">+ <i class="fa fa-fw fa-unlock text-secondary"></i> [[topic:thread-tools.unlock]]+ </a>+ </li>++ <li class="dropdown-divider"></li>++ <li>+ <a component="topic/move" href="#" class="dropdown-item rounded-1 d-flex align-items-center gap-2" role="menuitem">+ <i class="fa fa-fw fa-arrows text-secondary"></i> [[topic:thread-tools.move]]+ </a>+ </li>+ {{{if template.category}}}+ <li>+ <a component="topic/move-all" href="#" class="dropdown-item rounded-1 d-flex align-items-center gap-2" role="menuitem">+ <i class="fa fa-fw fa-arrows text-secondary"></i> [[topic:thread-tools.move-all]]+ </a>+ </li>+ {{{end}}}+ <li>+ <a component="topic/merge" href="#" class="dropdown-item rounded-1 d-flex align-items-center gap-2" role="menuitem">+ <i class="fa fa-fw fa-code-fork text-secondary"></i> [[topic:thread-tools.merge]]+ </a>+ </li>++ <li>+ <a component="topic/tag" href="#" class="dropdown-item rounded-1 d-flex align-items-center gap-2" role="menuitem">+ <i class="fa fa-fw fa-tag text-secondary"></i> [[topic:thread-tools.tag]]+ </a>+ </li>++ <li class="dropdown-divider"></li>++ <li>+ <a component="topic/delete" href="#" class="dropdown-item rounded-1 d-flex align-items-center gap-2" role="menuitem">+ <i class="fa fa-fw fa-trash-o text-secondary"></i> [[topic:thread-tools.delete]]+ </a>+ </li>+ <li>+ <a component="topic/restore" href="#" class="hidden dropdown-item rounded-1" role="menuitem">+ <i class="fa fa-fw fa-history text-secondary"></i> [[topic:thread-tools.restore]]+ </a>+ </li>+ <li>+ <a component="topic/purge" href="#" class="hidden dropdown-item rounded-1" role="menuitem">+ <i class="fa fa-fw fa-eraser text-secondary"></i> [[topic:thread-tools.purge]]+ </a>+ </li>++ {{{each thread_tools}}}+ <li>+ <a href="#" class="dropdown-item rounded-1 d-flex align-items-center gap-2 {thread_tools.class}" role="menuitem">+ <i class="fa fa-fw {thread_tools.icon} text-secondary"></i>+ {thread_tools.title}</a>+ </li>+ {{{end}}}+</ul>\ No newline at end of filediff --git a/src/views/partials/category/tools-dropdown-left.tpl b/src/views/partials/category/tools-dropdown-left.tplnew file mode 100644index 0000000000..b6917296c7--- /dev/null+++ b/src/views/partials/category/tools-dropdown-left.tpl@@ -0,0 +1,5 @@+{{{ if showTopicTools }}}+<div class="btn-group thread-tools dropdown-left bottom-sheet">+ <!-- IMPORT partials/category/tools-dropdown-content.tpl -->+</div>+{{{ end }}}\ No newline at end of filediff --git a/src/views/partials/category/tools-dropdown-right.tpl b/src/views/partials/category/tools-dropdown-right.tplnew file mode 100644index 0000000000..5a43f6d6c7--- /dev/null+++ b/src/views/partials/category/tools-dropdown-right.tpl@@ -0,0 +1,5 @@+{{{ if showTopicTools }}}+<div class="btn-group thread-tools dropdown-right bottom-sheet">+ <!-- IMPORT partials/category/tools-dropdown-content.tpl -->+</div>+{{{ end }}}\ No newline at end of filediff --git a/src/views/partials/category/watch.tpl b/src/views/partials/category/watch.tplnew file mode 100644index 0000000000..1719bba07d--- /dev/null+++ b/src/views/partials/category/watch.tpl@@ -0,0 +1,67 @@+{{{ if config.loggedIn }}}+<div class="btn-group bottom-sheet" component="topic/watch">+ <button class="btn btn-ghost btn-sm ff-secondary dropdown-toggle" data-bs-toggle="dropdown" type="button" aria-haspopup="true" aria-expanded="false">+ <span component="category/watching/menu" class="d-flex gap-2 align-items-center {{{ if !./isWatched }}} hidden{{{ end }}}"><i class="fa fa-fw fa-bell-o text-primary"></i><span class="visible-md-inline visible-lg-inline fw-semibold">[[category:watching]]</span></span>++ <span component="category/tracking/menu" class="d-flex gap-2 align-items-center {{{ if !./isTracked }}} hidden{{{ end }}}"><i class="fa fa-fw fa-inbox text-primary"></i><span class="visible-md-inline visible-lg-inline fw-semibold">[[category:tracking]]</span></span>++ <span component="category/notwatching/menu" class="d-flex gap-2 align-items-center {{{ if !./isNotWatched }}} hidden{{{ end }}}"><i class="fa fa-fw fa-clock-o text-primary"></i><span class="visible-md-inline visible-lg-inline fw-semibold">[[category:not-watching]]</span></span>++ <span component="category/ignoring/menu" class="d-flex gap-2 align-items-center {{{ if !./isIgnored }}} hidden{{{ end }}}"><i class="fa fa-fw fa-eye-slash text-primary"></i><span class="visible-md-inline visible-lg-inline fw-semibold">[[category:ignoring]]</span></span>+ </button>++ <ul class="dropdown-menu p-1 text-sm {{{ if template.account/categories }}}dropdown-menu-end{{{ end }}}" role="menu">+ <li>+ <a class="dropdown-item rounded-1 d-flex align-items-center gap-2 p-2" href="#" component="category/watching" data-state="watching" role="menuitem">+ <div class="flex-grow-1 d-flex flex-column">+ <span class="d-flex align-items-center gap-2">+ <i class="flex-shrink-0 fa fa-fw fa-bell-o text-secondary"></i>+ <span class="flex-grow-1 fw-semibold">[[category:watching]]</span>+ </span>+ <div class="help-text text-secondary text-xs">[[category:watching.description]]</div>+ </div>+ <span class="flex-shrink-0"><i component="category/watching/check" class="fa fa-fw {{{ if ./isWatched }}}fa-check{{{ end }}}"></i></span>+ </a>+ </li>++ <li>+ <a class="dropdown-item rounded-1 d-flex align-items-center gap-2 p-2" href="#" component="category/tracking" data-state="tracking" role="menuitem">+ <div class="flex-grow-1 d-flex flex-column">+ <span class="d-flex align-items-center gap-2">+ <i class="flex-shrink-0 fa fa-fw fa-inbox text-secondary"></i>+ <span class="flex-grow-1 fw-semibold">[[category:tracking]]</span>+ </span>+ <div class="help-text text-secondary text-xs">[[category:tracking.description]]</div>+ </div>+ <span class="flex-shrink-0"><i component="category/tracking/check" class="fa fa-fw {{{ if ./isTracked }}}fa-check{{{ end }}}"></i></span>+ </a>+ </li>++ <li>+ <a class="dropdown-item rounded-1 d-flex align-items-center gap-2 p-2" href="#" component="category/notwatching" data-state="notwatching" role="menuitem">+ <div class="flex-grow-1 d-flex flex-column">+ <span class="d-flex align-items-center gap-2">+ <i class="flex-shrink-0 fa fa-fw fa-clock-o text-secondary"></i>+ <span class="flex-grow-1 fw-semibold">[[category:not-watching]]</span>+ </span>+ <div class="help-text text-secondary text-xs">[[category:not-watching.description]]</div>+ </div>+ <span class="flex-shrink-0"><i component="category/notwatching/check" class="fa fa-fw {{{ if ./isNotWatched }}}fa-check{{{ end }}}"></i></span>+ </a>+ </li>++ <li>+ <a class="dropdown-item rounded-1 d-flex align-items-center gap-2 p-2" href="#" component="category/ignoring" data-state="ignoring" role="menuitem">+ <div class="flex-grow-1 d-flex flex-column">+ <span class="d-flex align-items-center gap-2">+ <i class="flex-shrink-0 fa fa-fw fa-eye-slash text-secondary"></i>+ <span class="flex-grow-1 fw-semibold">[[category:ignoring]]</span>+ </span>+ <div class="help-text text-secondary text-xs">[[category:ignoring.description]]</div>+ </div>+ <span class="flex-shrink-0"><i component="category/ignoring/check" class="fa fa-fw {{{ if ./isIgnored }}}fa-check{{{ end }}}"></i></span>+ </a>+ </li>+ </ul>+</div>+{{{ end }}}\ No newline at end of filediff --git a/src/views/partials/groups/filter-dropdown-content.tpl b/src/views/partials/groups/filter-dropdown-content.tplnew file mode 100644index 0000000000..1243bed751--- /dev/null+++ b/src/views/partials/groups/filter-dropdown-content.tpl@@ -0,0 +1,25 @@+<div class="dropdown bottom-sheet">+ <button type="button" class="btn btn-ghost btn-sm ff-secondary dropdown-toggle" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">+ {{{ if selectedGroup }}}+ <span class="fw-semibold">{selectedGroup.displayName}</span>+ {{{ else }}}+ <span class="fw-semibold">[[groups:all-groups]]</span>+ {{{ end }}} <span class="caret text-primary opacity-75"></span>+ </button>+ <ul class="dropdown-menu p-1 text-sm" role="menu">+ <li role="presentation" class="user {{{ if !selectedGroup}}}selected{{{end}}}">+ <a class="dropdown-item rounded-1 d-flex align-items-center gap-2" role="menuitem" href="{config.relative_path}/{allGroupsUrl}">+ <div class="flex-grow-1">[[groups:all-groups]]</div>+ <i class="flex-shrink-0 fa fa-fw {{{ if !selectedGroup }}}fa-check{{{ end }}}"></i>+ </a>+ </li>+ {{{ each groups }}}+ <li role="presentation" class="user {{{ if ./selected}}}selected{{{end}}}">+ <a class="dropdown-item rounded-1 d-flex align-items-center gap-2" role="menuitem" href="{config.relative_path}/{./url}">+ <div class="flex-grow-1 d-inline-flex gap-1 align-items-center">{./displayName}</div>+ <i class="flex-shrink-0 fa fa-fw {{{ if ./selected }}}fa-check{{{ end }}}"></i>+ </a>+ </li>+ {{{end}}}+ </ul>+</div>\ No newline at end of filediff --git a/src/views/partials/tags/filter-dropdown-content.tpl b/src/views/partials/tags/filter-dropdown-content.tplnew file mode 100644index 0000000000..6d78eddf27--- /dev/null+++ b/src/views/partials/tags/filter-dropdown-content.tpl@@ -0,0 +1,38 @@+<button type="button" class="btn btn-ghost btn-sm d-flex align-items-center ff-secondary d-flex gap-2 dropdown-toggle" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">+ {{{ if selectedTag }}}+ <span class="d-inline-flex align-items-center gap-1">+ <i class="fa fa-fw fa-tags text-primary"></i>+ <span class="visible-md-inline visible-lg-inline fw-semibold">{selectedTag.label}</span>+ </span>+ {{{ else }}}+ <i class="fa fa-fw fa-tags text-primary"></i>+ <span class="visible-md-inline visible-lg-inline fw-semibold">[[tags:all-tags]]</span>+ {{{ end }}}+</button>++<div component="tag/filter/search" class="hidden position-absolute top-0">+ <input type="text" class="form-control form-control-sm" placeholder="[[search:type-to-search]]" autocomplete="off">+</div>++<div class="dropdown-menu p-1">+ <ul component="tag/filter/list" class="list-unstyled mb-0 text-sm overflow-auto ghost-scrollbar" role="menu" style="max-height: 500px;" role="menu">+ <li role="presentation" data-tag="">+ <a class="dropdown-item rounded-1 d-flex align-items-center gap-2" role="menuitem" href="#">+ <span class="flex-grow-1">[[tags:all-tags]]</span>+ <i component="tag/select/icon" class="flex-shrink-0 fa fa-fw fa-check {{{if selectedTag }}}invisible{{{ end }}}"></i>+ </a>+ </li>+ {{{ each tagItems }}}+ <li role="presentation" data-tag="{./valueEscaped}">+ <a class="dropdown-item rounded-1 d-flex align-items-center gap-2" role="menuitem" href="#">+ <span component="tag-markup" class="flex-grow-1">+ <div class="d-inline-flex align-items-center gap-1">+ {./valueEscaped}+ </div>+ </span>+ <i component="tag/select/icon" class="flex-shrink-0 fa fa-fw fa-check {{{ if !./selected }}}invisible{{{ end }}}"></i>+ </a>+ </li>+ {{{ end }}}+ </ul>+</div>\ No newline at end of filediff --git a/src/views/partials/tags/filter-dropdown-right.tpl b/src/views/partials/tags/filter-dropdown-right.tplindex daed15f46c..0d30e0e2b6 100644--- a/src/views/partials/tags/filter-dropdown-right.tpl+++ b/src/views/partials/tags/filter-dropdown-right.tpl@@ -1,3 +1,3 @@-<div component="tag/filter" class="dropdown dropdown-right bottom-sheet">+<div component="tag/filter" class="btn-group dropdown dropdown-right bottom-sheet"><!-- IMPORT partials/tags/filter-dropdown-content.tpl --></div>diff --git a/src/views/partials/tags/watch.tpl b/src/views/partials/tags/watch.tplnew file mode 100644index 0000000000..91610e1cfb--- /dev/null+++ b/src/views/partials/tags/watch.tpl@@ -0,0 +1,42 @@+{{{ if config.loggedIn }}}+<div class="btn-group bottom-sheet" component="tag/watch">+ <button class="btn btn-ghost btn-sm ff-secondary d-flex gap-2 align-items-center dropdown-toggle" data-bs-toggle="dropdown" type="button" aria-haspopup="true" aria-expanded="false">+ <span component="tag/following/menu" class="d-flex gap-2 align-items-center{{{ if !isFollowing }}} hidden{{{ end }}}">+ <i class="flex-shrink-0 fa fa-fw fa-bell-o text-primary"></i>+ <span class="d-none d-md-inline fw-semibold">[[tags:watching]]</span>+ </span>++ <span component="tag/not-following/menu" class="d-flex gap-2 align-items-center{{{ if isFollowing}}} hidden{{{ end }}}">+ <i class="flex-shrink-0 fa fa-fw fa-bell-slash-o text-primary"></i>+ <span class="d-none d-md-inline fw-semibold">[[tags:not-watching]]</span>+ </span>+ </button>+ <ul class="dropdown-menu p-1 text-sm" role="menu">+ <li>+ <a class="dropdown-item rounded-1 d-flex align-items-center gap-2 p-2" href="#" component="tag/following" role="menuitem">+ <div class="flex-grow-1 d-flex flex-column">+ <span class="d-flex align-items-center gap-2">+ <i class="flex-shrink-0 fa fa-fw fa-bell-o"></i>+ <span class="flex-grow-1 fw-semibold">[[tags:watching]]</span>+ </span>+ <div class="help-text text-muted text-xs">[[tags:watching.description]]</div>+ </div>+ <span class="flex-shrink-0"><i component="tag/following/check" class="fa fa-fw {{{ if isFollowing }}}fa-check{{{ end }}}"></i></span>+ </a>+ </li>++ <li>+ <a class="dropdown-item rounded-1 d-flex align-items-center gap-2 p-2" href="#" component="tag/not-following" role="menuitem">+ <div class="flex-grow-1 d-flex flex-column">+ <span class="d-flex align-items-center gap-2">+ <i class="flex-shrink-0 fa fa-fw fa-bell-slash-o"></i>+ <span class="flex-grow-1 fw-semibold">[[tags:not-watching]]</span>+ </span>+ <div class="help-text text-muted text-xs">[[tags:not-watching.description]]</div>+ </div>+ <span class="flex-shrink-0"><i component="tag/not-following/check" class="fa fa-fw {{{ if !isFollowing }}}fa-check{{{ end }}}"></i></span>+ </a>+ </li>+ </ul>+</div>+{{{ end }}}\ No newline at end of filediff --git a/src/views/partials/topic/tools-right.tpl b/src/views/partials/topic/tools-right.tplnew file mode 100644index 0000000000..e69de29bb2diff --git a/src/views/partials/users/filter-dropdown-content.tpl b/src/views/partials/users/filter-dropdown-content.tplnew file mode 100644index 0000000000..e3ab5116d4--- /dev/null+++ b/src/views/partials/users/filter-dropdown-content.tpl@@ -0,0 +1,23 @@+<button type="button" class="btn btn-ghost btn-sm d-flex align-items-center gap-2 ff-secondary dropdown-toggle" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">+ {{{ if selectedUser }}}+ <span class="fw-semibold">{buildAvatar(selectedUser, "20px", true, "not-responsive")} {selectedUser.username}</span>+ {{{ else }}}+ <span class="fw-semibold">[[users:all-users]]</span>+ {{{ end }}} <span class="caret text-primary opacity-75"></span>+</button>+<ul class="dropdown-menu p-1 text-sm" role="menu">+ <li role="presentation" class="user {{{ if !selectedUser}}}selected{{{end}}}">+ <a class="dropdown-item rounded-1 d-flex align-items-center gap-2" role="menuitem" href="{config.relative_path}/{allUsersUrl}">+ <div class="flex-grow-1">[[users:all-users]]</div>+ <i class="flex-shrink-0 fa fa-fw {{{ if !selectedUser }}}fa-check{{{ end }}}"></i>+ </a>+ </li>+ {{{ each users }}}+ <li role="presentation" class="user {{{ if ./selected}}}selected{{{end}}}">+ <a class="dropdown-item rounded-1 d-flex align-items-center gap-2" role="menuitem" href="{config.relative_path}/{./url}">+ <div class="flex-grow-1 d-inline-flex gap-1 align-items-center">{buildAvatar(@value, "24px", true, "not-responsive")} {./username}</div>+ <i class="flex-shrink-0 fa fa-fw {{{ if ./selected }}}fa-check{{{ end }}}"></i>+ </a>+ </li>+ {{{end}}}+</ul>