diff options
author | Harald Eilertsen <haraldei@anduin.net> | 2024-10-23 14:56:41 +0200 |
---|---|---|
committer | Harald Eilertsen <haraldei@anduin.net> | 2024-10-23 14:56:41 +0200 |
commit | 8f4c3a2f88d3770e6cfebaa61671f54fa17a34e1 (patch) | |
tree | 2f95124f88bcd7d568f86d53f420190ae56e2178 /view/tpl | |
parent | e2ae8f0c4d83060b2606f03b1c86d040c3161f18 (diff) | |
parent | e530476e6c5d2319f3a0a09dfe73ec181e923325 (diff) | |
download | volse-hubzilla-8f4c3a2f88d3770e6cfebaa61671f54fa17a34e1.tar.gz volse-hubzilla-8f4c3a2f88d3770e6cfebaa61671f54fa17a34e1.tar.bz2 volse-hubzilla-8f4c3a2f88d3770e6cfebaa61671f54fa17a34e1.zip |
Merge branch 'dev' into make-db-upgrade-static-method
Diffstat (limited to 'view/tpl')
-rw-r--r-- | view/tpl/messages_widget.tpl | 55 | ||||
-rw-r--r-- | view/tpl/page_display.tpl | 2 | ||||
-rw-r--r-- | view/tpl/page_display_empty.tpl | 2 |
3 files changed, 52 insertions, 7 deletions
diff --git a/view/tpl/messages_widget.tpl b/view/tpl/messages_widget.tpl index 52a9b96f4..df91a05ef 100644 --- a/view/tpl/messages_widget.tpl +++ b/view/tpl/messages_widget.tpl @@ -16,6 +16,13 @@ </a> </li> {{/if}} + {{if $feature_file}} + <li class="nav-item"> + <a class="nav-link messages-type" href="#" title="{{$strings.filed_messages_title}}" data-messages_type="filed"> + <i class="bi bi-folder generic-icons"></i> + </a> + </li> + {{/if}} <li class="nav-item"> <a class="nav-link messages-type" href="#" title="{{$strings.notice_messages_title}}" data-messages_type="notification"> <i class="bi bi-exclamation-circle generic-icons"></i> @@ -53,6 +60,18 @@ <input id="messages-author" type="text" class="form-control form-control-sm" placeholder="{{$strings.filter}}"> <div id="messages-author-input-clear" class="text-muted notifications-textinput-clear d-none"><i class="bi bi-x-lg"></i></div> </div> + {{if $feature_file}} + <div id="messages-file-container" class="list-group-item notifications-textinput d-none"> + <div class="text-muted notifications-textinput-filter"><i class="bi bi-filter"></i></div> + <input id="messages-file" type="text" list="data_filetags" class="form-control form-control-sm" placeholder="{{$strings.file_filter}}"> + <datalist id="data_filetags"> + {{foreach $file_tags as $opt=>$val}} + <option value="{{$val}}"> + {{/foreach}} + </datalist> + <div id="messages-file-input-clear" class="text-muted notifications-textinput-clear d-none"><i class="bi bi-x-lg"></i></div> + </div> + {{/if}} {{foreach $entries as $e}} <a href="{{$e.href}}" class="list-group-item list-group-item-action message" data-b64mid="{{$e.b64mid}}"> <div class="mb-2 align-middle"> @@ -75,7 +94,7 @@ </div> <small class="opacity-75">{{$e.info}}</small> {{if $e.unseen_count}} - <span class="badge bg-transparent border border-{{$e.unseen_class}} text-{{$e.unseen_class}} rounded-pill position-absolute bottom-0 end-0 m-2" title="{{$strings.unseen_count}}">{{$e.unseen_count}}</span> + <span class="badge bg-transparent border border-{{$e.unseen_class}} text-{{$e.unseen_class}} rounded-pill position-absolute bottom-0 end-0 m-2 unseen_count" title="{{$strings.unseen_count}}">{{$e.unseen_count}}</span> {{/if}} </a> {{/foreach}} @@ -94,6 +113,7 @@ let author_hash; let author_url; let author; + let file; $(document).ready(function () { $('.messages-timeago').timeago(); @@ -109,6 +129,7 @@ $('#messages-container .message').remove(); $('#messages-author-container').addClass('active sticky-top'); $('#messages-author-input-clear').removeClass('d-none'); + author_hash = data.xid; author_url = data.url; author = messages_type === 'notification' ? author_url : author_hash; @@ -116,14 +137,27 @@ get_messages_page(); }); - $(document).on('click', '#messages-author-input-clear', function() { - $('#messages-author').val(''); + $("#messages-file").on('change', function(data) { + file = $("#messages-file").val(); + + $('#messages-container .message').remove(); + $('#messages-file-container').addClass('active sticky-top'); + $('#messages-file-input-clear').removeClass('d-none'); + + messages_offset = 0; + get_messages_page(); + }); + + $(document).on('click', '#messages-author-input-clear, #messages-file-input-clear', function() { + $('#messages-author, #messages-file').val(''); $("#messages-author").attr('placeholder', '{{$strings.filter}}'); + $("#messages-file").attr('placeholder', '{{$strings.file_filter}}'); $('#messages-author-container').removeClass('active sticky-top'); $('#messages-author-input-clear').addClass('d-none'); $('#messages-container .message').remove(); author = ''; + file = ''; author_hash = ''; author_url = ''; messages_offset = 0; @@ -145,6 +179,16 @@ messages_offset = 0; messages_type = $(this).data('messages_type'); author = messages_type === 'notification' ? author_url : author_hash; + + if (messages_type === 'filed') { + $('#messages-author-container').addClass('d-none'); + $('#messages-file-container').removeClass('d-none'); + } + else { + $('#messages-author-container').removeClass('d-none'); + $('#messages-file-container').addClass('d-none'); + } + $('#messages-container .message').remove(); get_messages_page(); }); @@ -167,7 +211,8 @@ data: { offset: messages_offset, type: messages_type, - author: author + author: author, + file: file } }).done(function(obj) { get_messages_page_active = false; @@ -185,7 +230,7 @@ e.author_addr, e.href, e.icon, - e.unseen_count ? '<span class="badge bg-transparent border border-' + e.unseen_class + ' text-' + e.unseen_class + ' rounded-pill position-absolute bottom-0 end-0 m-2" title="{{$strings.unseen_count}}">' + e.unseen_count + '</span>' : '', + e.unseen_count ? '<span class="badge bg-transparent border border-' + e.unseen_class + ' text-' + e.unseen_class + ' rounded-pill position-absolute bottom-0 end-0 m-2 unseen_count" title="{{$strings.unseen_count}}">' + e.unseen_count + '</span>' : '', e.author_img ); $('#messages-loading').before(html); diff --git a/view/tpl/page_display.tpl b/view/tpl/page_display.tpl index e8c9c0e27..2e87c68e3 100644 --- a/view/tpl/page_display.tpl +++ b/view/tpl/page_display.tpl @@ -10,7 +10,7 @@ <div class="page-date">{{$date}}</div> <div class="page-body">{{$body}}</div> {{if $edit_link}} - <div class="position-fixed bottom-0 end-0 m-3"> + <div class="position-fixed bottom-0 end-0 m-3 z-1"> <a href="{{$edit_link}}" class="btn btn-lg btn-primary rounded-circle"><i class="bi bi-pencil"></i></a> </div> {{/if}} diff --git a/view/tpl/page_display_empty.tpl b/view/tpl/page_display_empty.tpl index 44baec361..c24fe08e5 100644 --- a/view/tpl/page_display_empty.tpl +++ b/view/tpl/page_display_empty.tpl @@ -1,6 +1,6 @@ {{$body}} {{if $edit_link}} <div class="position-fixed bottom-0 end-0 m-3"> - <a href="{{$edit_link}}" class="btn btn-lg btn-primary rounded-circle"><i class="bi bi-pencil"></i></a> + <a href="{{$edit_link}}" class="btn btn-lg btn-primary rounded-circle z-1"><i class="bi bi-pencil"></i></a> </div> {{/if}} |