aboutsummaryrefslogtreecommitdiffstats
path: root/view
diff options
context:
space:
mode:
Diffstat (limited to 'view')
-rw-r--r--view/css/widgets.css5
-rw-r--r--view/js/main.js9
-rwxr-xr-xview/tpl/contact_template.tpl2
-rwxr-xr-xview/tpl/conv_item.tpl2
-rw-r--r--view/tpl/micropro_card.tpl2
-rwxr-xr-xview/tpl/micropro_img.tpl2
-rw-r--r--view/tpl/notifications_widget.tpl18
7 files changed, 26 insertions, 14 deletions
diff --git a/view/css/widgets.css b/view/css/widgets.css
index ca7267189..30e7e6972 100644
--- a/view/css/widgets.css
+++ b/view/css/widgets.css
@@ -225,6 +225,11 @@ a.wikilist {
margin-bottom: 1rem;
}
+.tt-filter-active,
+.cn-filter-active {
+ display: none !important;
+}
+
/* contact block */
.contact-block-div .oneway-overlay {
font-size: 20px;
diff --git a/view/js/main.js b/view/js/main.js
index 94fd940b2..49c0bed97 100644
--- a/view/js/main.js
+++ b/view/js/main.js
@@ -88,7 +88,8 @@ $(document).ready(function() {
wordSeparator : aStr['t16'],
numbers : aStr['t17'],
};
-
+
+ jQuery.timeago.settings.allowFuture = true;
if(typeof(window.SharedWorker) === 'undefined') {
// notifications with multiple tabs open will not work very well in this scenario
@@ -1806,7 +1807,7 @@ function sse_handleNotificationsItems(notifyType, data, replace, followup) {
$("#nav-" + notifyType + "-menu .notifications-autotime").timeago();
if($('#tt-' + notifyType + '-only').hasClass('active'))
- $('#nav-' + notifyType + '-menu [data-thread_top=false]').addClass('d-none');
+ $('#nav-' + notifyType + '-menu [data-thread_top=false]').addClass('tt-filter-active');
if($('#cn-' + notifyType + '-input').length) {
var filter = $('#cn-' + notifyType + '-input').val().toString().toLowerCase();
@@ -1817,9 +1818,9 @@ function sse_handleNotificationsItems(notifyType, data, replace, followup) {
var cn = $(el).data('contact_name').toString().toLowerCase();
var ca = $(el).data('contact_addr').toString().toLowerCase();
if(cn.indexOf(filter) === -1 && ca.indexOf(filter) === -1)
- $(el).addClass('d-none');
+ $(el).addClass('cn-filter-active');
else
- $(el).removeClass('d-none');
+ $(el).removeClass('cn-filter-active');
});
}
}
diff --git a/view/tpl/contact_template.tpl b/view/tpl/contact_template.tpl
index 40495b789..73fa5adde 100755
--- a/view/tpl/contact_template.tpl
+++ b/view/tpl/contact_template.tpl
@@ -1,7 +1,7 @@
<div class="contact-entry-wrapper" id="contact-entry-wrapper-{{$contact.id}}" >
<div class="contact-entry-photo-wrapper" >
<a href="{{$contact.link}}" title="{{$contact.img_hover}}" ><img class="contact-block-img" src="{{$contact.thumb}}" alt="{{$contact.name}}" /></a>
- {{include "connstatus.tpl" perminfo=$contact.perminfo}}
+ {{if $contact.perminfo}}{{include "connstatus.tpl" perminfo=$contact.perminfo}}{{/if}}
</div>
<div class="contact-entry-photo-end" ></div>
<div class="contact-entry-name" id="contact-entry-name-{{$contact.id}}" >{{$contact.name}}</div>
diff --git a/view/tpl/conv_item.tpl b/view/tpl/conv_item.tpl
index 340807d02..f48e88006 100755
--- a/view/tpl/conv_item.tpl
+++ b/view/tpl/conv_item.tpl
@@ -57,7 +57,7 @@
<a href="{{$item.profile_url}}" title="{{$item.linktitle}}" class="wall-item-name-link u-url"><span class="wall-item-name{{$item.sparkle}}" id="wall-item-name-{{$item.id}}" ><bdi>{{$item.name}}</bdi></span></a>{{if $item.owner_url}}&nbsp;{{$item.via}}&nbsp;<a href="{{$item.owner_url}}" title="{{$item.olinktitle}}" class="wall-item-name-link"><span class="wall-item-name{{$item.osparkle}}" id="wall-item-ownername-{{$item.id}}"><bdi>{{$item.owner_name}}</bdi></span></a>{{/if}}
</div>
<div class="wall-item-ago" id="wall-item-ago-{{$item.id}}">
- {{if $item.verified}}<i class="fa fa-check item-verified" title="{{$item.verified}}"></i>&nbsp;{{elseif $item.forged}}<i class="fa fa-exclamation item-forged" title="{{$item.forged}}"></i>&nbsp;{{/if}}{{if $item.location}}<span class="wall-item-location p-location" id="wall-item-location-{{$item.id}}">{{$item.location}},&nbsp;</span>{{/if}}<span class="autotime" title="{{$item.isotime}}"><time class="dt-published" datetime="{{$item.isotime}}">{{$item.localtime}}</time>{{if $item.editedtime}}&nbsp;{{$item.editedtime}}{{/if}}{{if $item.expiretime}}&nbsp;{{$item.expiretime}}{{/if}}</span>{{if $item.editedtime}}&nbsp;<i class="fa fa-pencil"></i>{{/if}}&nbsp;{{if $item.app}}<span class="item.app">{{$item.str_app}}</span>{{/if}}
+ {{if $item.verified}}<i class="fa fa-check item-verified" title="{{$item.verified}}"></i>&nbsp;{{elseif $item.forged}}<i class="fa fa-exclamation item-forged" title="{{$item.forged}}"></i>&nbsp;{{/if}}{{if $item.location}}<span class="wall-item-location p-location" id="wall-item-location-{{$item.id}}">{{$item.location}},&nbsp;</span>{{/if}}<span class="autotime" title="{{$item.isotime}}"><time class="dt-published" datetime="{{$item.isotime}}">{{$item.localtime}}</time>{{if $item.editedtime}}&nbsp;{{$item.editedtime}}{{/if}}{{if $item.expiretime}}&nbsp;{{$item.expiretime}}{{/if}}</span>&nbsp;{{if $item.delayed}}<i class="fa fa-clock-o"></i>{{/if}}{{if $item.editedtime}}&nbsp;<i class="fa fa-pencil"></i>{{/if}}&nbsp;{{if $item.app}}<span class="item.app">{{$item.str_app}}</span>{{/if}}
</div>
</div>
{{if $item.divider}}
diff --git a/view/tpl/micropro_card.tpl b/view/tpl/micropro_card.tpl
index 1bdf92da1..058bfc14c 100644
--- a/view/tpl/micropro_card.tpl
+++ b/view/tpl/micropro_card.tpl
@@ -1,5 +1,5 @@
<a class="list-group-item{{if $class}} {{$class}}{{/if}} fakelink" href="{{if $click}}#{{else}}{{$url}}{{/if}}" {{if $click}}onclick="{{$click}}"{{/if}}>
- <img class="menu-img-3" src="{{$photo}}" title="{{$title}}" alt="" />{{include "connstatus.tpl"}}
+ <img class="menu-img-3" src="{{$photo}}" title="{{$title}}" alt="" />{{if $perminfo}}{{include "connstatus.tpl"}}{{/if}}
<span class="contactname">{{$name}}</span>
<span class="dropdown-sub-text">{{$addr}}<br>{{$network}}</span>
</a>
diff --git a/view/tpl/micropro_img.tpl b/view/tpl/micropro_img.tpl
index f023a2d00..98f33d119 100755
--- a/view/tpl/micropro_img.tpl
+++ b/view/tpl/micropro_img.tpl
@@ -1 +1 @@
-<div class="contact-block-div{{if $class}} {{$class}}{{/if}}"><a class="contact-block-link{{if $class}} {{$class}}{{/if}}{{if $click}} fakelink{{/if}}" href="{{if $click}}#{{else}}{{$url}}{{/if}}" {{if $click}}onclick="{{$click}}"{{/if}}><img class="contact-block-img{{if $class}} {{$class}}{{/if}}" src="{{$photo}}" title="{{$title}}" alt="" />{{include "connstatus.tpl"}}</a></div>
+<div class="contact-block-div{{if $class}} {{$class}}{{/if}}"><a class="contact-block-link{{if $class}} {{$class}}{{/if}}{{if $click}} fakelink{{/if}}" href="{{if $click}}#{{else}}{{$url}}{{/if}}" {{if $click}}onclick="{{$click}}"{{/if}}><img class="contact-block-img{{if $class}} {{$class}}{{/if}}" src="{{$photo}}" title="{{$title}}" alt="" />{{if $perminfo}}{{include "connstatus.tpl"}}{{/if}}</a></div>
diff --git a/view/tpl/notifications_widget.tpl b/view/tpl/notifications_widget.tpl
index 146c510f1..001a202af 100644
--- a/view/tpl/notifications_widget.tpl
+++ b/view/tpl/notifications_widget.tpl
@@ -81,14 +81,20 @@
{{foreach $notifications as $notification}}
{{if $notification.filter}}
$(document).on('click', '#tt-{{$notification.type}}-only', function(e) {
- e.preventDefault();
- $('#nav-{{$notification.type}}-menu [data-thread_top=false]').toggleClass('d-none');
- $(this).toggleClass('active sticky-top');
+ if($(this).hasClass('active sticky-top')) {
+ $('#nav-{{$notification.type}}-menu .notification[data-thread_top=false]').removeClass('tt-filter-active');
+ $(this).removeClass('active sticky-top');
+ }
+ else {
+ $('#nav-{{$notification.type}}-menu .notification[data-thread_top=false]').addClass('tt-filter-active');
+ $(this).addClass('active sticky-top');
+ }
+
});
$(document).on('click', '#cn-{{$notification.type}}-input-clear', function(e) {
$('#cn-{{$notification.type}}-input').val('');
$('#cn-{{$notification.type}}-only').removeClass('active sticky-top');
- $("#nav-{{$notification.type}}-menu .notification").removeClass('d-none');
+ $("#nav-{{$notification.type}}-menu .notification").removeClass('cn-filter-active');
$('#cn-{{$notification.type}}-input-clear').addClass('d-none');
});
$(document).on('input', '#cn-{{$notification.type}}-input', function(e) {
@@ -108,9 +114,9 @@
var ca = $(el).data('contact_addr').toString().toLowerCase();
if(cn.indexOf(val) === -1 && ca.indexOf(val) === -1)
- $(this).addClass('d-none');
+ $(this).addClass('cn-filter-active');
else
- $(this).removeClass('d-none');
+ $(this).removeClass('cn-filter-active');
});
});
{{/if}}