diff options
author | Mario <mario@mariovavti.com> | 2023-05-17 13:28:23 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2023-05-17 13:28:23 +0000 |
commit | 65d98af24c3c7b784f7e2c95998df65901011ce3 (patch) | |
tree | d7d6a60698d7a0c3704ea55cb71c543285186b17 /view/tpl | |
parent | a57739c462a7991bf2130e8eca0c383eb276f0cd (diff) | |
parent | 62d35627f35537d0056482047e74a27ad837c3cf (diff) | |
download | volse-hubzilla-65d98af24c3c7b784f7e2c95998df65901011ce3.tar.gz volse-hubzilla-65d98af24c3c7b784f7e2c95998df65901011ce3.tar.bz2 volse-hubzilla-65d98af24c3c7b784f7e2c95998df65901011ce3.zip |
Merge branch '8.4RC'8.4
Diffstat (limited to 'view/tpl')
-rw-r--r-- | view/tpl/admin_security.tpl | 5 | ||||
-rw-r--r-- | view/tpl/cropcover.tpl | 4 | ||||
-rw-r--r-- | view/tpl/directory_header.tpl | 63 | ||||
-rw-r--r-- | view/tpl/direntry.tpl | 17 | ||||
-rw-r--r-- | view/tpl/navbar_default.tpl | 2 | ||||
-rw-r--r-- | view/tpl/profile_vcard.tpl | 74 |
6 files changed, 116 insertions, 49 deletions
diff --git a/view/tpl/admin_security.tpl b/view/tpl/admin_security.tpl index 3cc23f5b2..29c6bcb34 100644 --- a/view/tpl/admin_security.tpl +++ b/view/tpl/admin_security.tpl @@ -17,7 +17,7 @@ {{include file="field_checkbox.tpl" field=$inline_pdf}} {{include file="field_textarea.tpl" field=$allowed_email}} - {{include file="field_textarea.tpl" field=$not_allowed_email}} + {{include file="field_textarea.tpl" field=$not_allowed_email}} {{include file="field_textarea.tpl" field=$whitelisted_sites}} {{include file="field_textarea.tpl" field=$blacklisted_sites}} @@ -27,6 +27,9 @@ {{include file="field_textarea.tpl" field=$embed_allow}} {{include file="field_textarea.tpl" field=$embed_deny}} + {{if $trusted_directory_servers}} + {{include file="field_textarea.tpl" field=$trusted_directory_servers}} + {{/if}} <div class="admin-submit-wrapper"> diff --git a/view/tpl/cropcover.tpl b/view/tpl/cropcover.tpl index ba91a2cce..eda6a7ba8 100644 --- a/view/tpl/cropcover.tpl +++ b/view/tpl/cropcover.tpl @@ -15,8 +15,8 @@ var image = document.getElementById('croppa'); var cropper = new Cropper(image, { aspectRatio: 2.75 / 1, viewMode: 1, - preview: '.crop-preview', - crop: function(e) { + preview: '#cover-photo-wrapper, .crop-preview', + crop: function(e) { $( '#x1' ).val(e.detail.x); $( '#y1' ).val(e.detail.y); $( '#x2' ).val(e.detail.x + e.detail.width); diff --git a/view/tpl/directory_header.tpl b/view/tpl/directory_header.tpl index f5ce7ce0a..a261762ac 100644 --- a/view/tpl/directory_header.tpl +++ b/view/tpl/directory_header.tpl @@ -19,7 +19,68 @@ {{** make sure this element is at the bottom - we rely on that in endless scroll **}} <div id="page-end" class="float-start w-100"></div> </div> -<script>$(document).ready(function() { loadingPage = false;});</script> <div id="page-spinner" class="spinner-wrapper"> <div class="spinner m"></div> </div> +<script> + $(document).ready(function() { + loadingPage = false; + {{if $directory_admin}} + $(document).on('click', '.directory-censor', function (e) { + e.preventDefault(); + + let that = this; + let url; + let path; + let severity; + let parent = this.closest('.directory-actions'); + let el; + + url = new URL(that.href) + + severity = url.searchParams.get('severity'); + path = url.pathname; + + console.log(url.searchParams.get('severity')); + + $.get( + path, + { + aj: 1, + severity : severity + }, + function(data) { + console.log(data) + if (data.success) { + + if (that.classList.contains('directory-censor-unsafe')) { + severity = data.flag ? 0 : 1; + el = parent.getElementsByClassName('directory-censor-hide')[0]; + if (el.classList.contains('active')) { + el.classList.toggle('active'); + url.searchParams.set('severity', 2); + el.href = url.toString(); + } + } + + if (that.classList.contains('directory-censor-hide')) { + severity = data.flag ? 0 : 2; + el = parent.getElementsByClassName('directory-censor-unsafe')[0]; + if (el.classList.contains('active')) { + el.classList.toggle('active'); + url.searchParams.set('severity', 1); + el.href = url.toString(); + } + } + + url.searchParams.set('severity', severity); + that.href = url.toString(); + that.classList.toggle('active'); + + } + } + ); + }); + {{/if}} + }); +</script> diff --git a/view/tpl/direntry.tpl b/view/tpl/direntry.tpl index 5a8e19d12..16df987f4 100644 --- a/view/tpl/direntry.tpl +++ b/view/tpl/direntry.tpl @@ -1,21 +1,18 @@ <div class="directory-item{{if $entry.safe}} safe{{/if}}" id="directory-item-{{$entry.hash}}" > <div class="section-subtitle-wrapper clearfix"> - <div class="float-end"> - {{if $entry.viewrate}} - {{if $entry.total_ratings}}<a href="ratings/{{$entry.hash}}" id="dir-rating-{{$entry.hash}}" class="btn btn-outline-secondary btn-sm">{{$entry.total_ratings}}</a>{{/if}} - {{/if}} - {{if $entry.ignlink}} - <a class="directory-ignore btn btn-warning btn-sm" href="{{$entry.ignlink}}"> {{$entry.ignore_label}}</a> + <div class="directory-actions float-end"> + {{if $entry.censor_2}} + <a class="directory-censor directory-censor-hide btn btn-outline-danger btn-sm {{$entry.censor_2_class}}" href="{{$entry.censor_2}}"> {{$entry.censor_2_label}}</a> {{/if}} {{if $entry.censor}} - <a class="directory-censor btn btn-danger btn-sm" href="{{$entry.censor}}"> {{$entry.censor_label}}</a> + <a class="directory-censor directory-censor-unsafe btn btn-outline-warning btn-sm {{$entry.censor_class}}" href="{{$entry.censor}}"> {{$entry.censor_label}}</a> + {{/if}} + {{if $entry.ignlink}} + <a class="directory-ignore btn btn-info btn-sm" href="{{$entry.ignlink}}"> {{$entry.ignore_label}}</a> {{/if}} {{if $entry.connect}} <a class="btn btn-success btn-sm" href="{{$entry.connect}}"><i class="fa fa-plus connect-icon"></i> {{$entry.conn_label}}</a> {{/if}} - {{if $entry.viewrate}} - {{if $entry.canrate}}<button class="btn btn-outline-secondary btn-sm" onclick="doRatings('{{$entry.hash}}'); return false;" ><i class="fa fa-pencil"></i><span id="edited-{{$entry.hash}}" class="required" id="edited-{{$entry.hash}}" style="display: none;" > *</span></button>{{/if}} - {{/if}} </div> <h3>{{if $entry.public_forum}}<i class="fa fa-comments-o" title="{{$entry.forum_label}} @{{$entry.nickname}}+"></i> {{/if}}<a href='{{$entry.profile_link}}' >{{$entry.name}}</a>{{if $entry.online}} <i class="fa fa-asterisk online-now" title="{{$entry.online}}"></i>{{/if}}</h3> </div> diff --git a/view/tpl/navbar_default.tpl b/view/tpl/navbar_default.tpl index ca61bcb8e..c0bcd02c2 100644 --- a/view/tpl/navbar_default.tpl +++ b/view/tpl/navbar_default.tpl @@ -183,7 +183,7 @@ </div> <div class="nav d-lg-flex w-100"></div> {{else}} - <div class="lh-sm w-100" id="app-bin-label"> + <div class="lh-sm w-75" id="app-bin-label"> {{if $name}} <img src="{{$thumb}}" class="menu-img-3"> <div class="p-1"> diff --git a/view/tpl/profile_vcard.tpl b/view/tpl/profile_vcard.tpl index beec6b3a0..6cf40bf79 100644 --- a/view/tpl/profile_vcard.tpl +++ b/view/tpl/profile_vcard.tpl @@ -1,49 +1,55 @@ <div class="rounded mb-3 vcard-card h-card"> <div class="card mb-2"> - <div class="row"> - <div class="col-4" style="width: fit-content;"> - <div id="profile-photo-wrapper"> - <img class="rounded-start u-photo" src="{{$profile.photo}}?rev={{$profile.picdate}}" alt="{{$profile.fullname}}" style="width: 6rem; height:6rem;"> - </div> + <div class="position-relative"> + <div id="cover-photo-wrapper" class="overflow-hidden w-100 rounded-top"> + <img class="img-fluid rounded-top" src="{{$cover.url}}" alt="" style=""> </div> - <div class="col-7 m-1 p-0"> - {{if $editmenu.multi}} - <div class="dropdown float-end"> - <a class="profile-edit-side-link float-end" data-bs-toggle="dropdown" href="#" ><i class="fa fa-pencil" title="{{$editmenu.edit.1}}"></i></a> - <div class="dropdown-menu dropdown-menu-end" role="menu"> - {{foreach $editmenu.menu.entries as $e}} - <a href="profiles/{{$e.id}}" class="dropdown-item"><img class="menu-img-1" src='{{$e.photo}}'> {{$e.profile_name}}</a> - {{/foreach}} - {{if $editmenu.menu.cr_new}} - <a href="profiles/new" id="profile-listing-new-link" class="dropdown-item">{{$editmenu.menu.cr_new}}</a> - {{/if}} - </div> - </div> - {{elseif $editmenu}} - <a class="profile-edit-side-link float-end" href="{{$editmenu.edit.0}}" ><i class="fa fa-pencil" title="{{$editmenu.edit.1}}"></i></a> - {{/if}} - - <div class="text-truncate lh-sm"> - <strong class="fn p-name">{{$profile.fullname}}{{if $profile.online}}<i class="fa fa-fw fa-asterisk text-danger ps-2" title="{{$profile.online}}"></i>{{/if}}</strong> + {{if $connect}} + <a href="{{$connect_url}}" class="btn btn-success btn-sm m-2 position-absolute top-0 end-0" rel="nofollow"> + <i class="fa fa-plus"></i> {{$connect}} + </a> + {{/if}} + <div id="profile-cover-text" class="p-2 position-absolute bottom-0 w-100"> + <div class="text-truncate h3 mb-0 lh-sm"> + <strong class="text-white fn p-name">{{$profile.fullname}}{{if $profile.online}}<i class="fa fa-fw fa-circle text-success ps-2" title="{{$profile.online}}"></i>{{/if}}</strong> </div> <div class="text-truncate"> - <span class="text-muted p-adr">{{$profile.reddress}}</span> + <span class="text-white p-adr">{{$profile.reddress}}</span> </div> - {{if $connect}} - <div class="mt-2"> - <a href="{{$connect_url}}" class="btn btn-success btn-sm" rel="nofollow"> - <i class="fa fa-plus"></i> {{$connect}} - </a> + </div> + {{if $editmenu.multi}} + <div class="dropdown position-absolute bottom-0 end-0 m-2"> + <a class="profile-edit-side-link text-white" data-bs-toggle="dropdown" href="#" ><i class="fa fa-pencil" title="{{$editmenu.edit.1}}"></i></a> + <div class="dropdown-menu dropdown-menu-end" role="menu"> + {{foreach $editmenu.menu.entries as $e}} + <a href="profiles/{{$e.id}}" class="dropdown-item"><img class="menu-img-1" src='{{$e.photo}}'> {{$e.profile_name}}</a> + {{/foreach}} + {{if $editmenu.menu.cr_new}} + <a href="profiles/new" id="profile-listing-new-link" class="dropdown-item">{{$editmenu.menu.cr_new}}</a> + {{/if}} </div> - {{/if}} </div> + {{elseif $editmenu}} + <div class="position-absolute bottom-0 end-0 m-2"> + <a class="profile-edit-side-link text-white" href="{{$editmenu.edit.0}}" ><i class="fa fa-pencil" title="{{$editmenu.edit.1}}"></i></a> + </div> + {{/if}} + </div> + <div class="d-flex"> + <div id="profile-photo-wrapper" class="bg-body-secondary rounded rounded-end-0 rounded-top-0 overflow-hidden" style="min-width: 5rem; min-height: 5rem;"> + <img class="u-photo" src="{{$profile.thumb}}?rev={{$profile.picdate}}" alt="{{$profile.fullname}}" style="width: 5rem; height: 5rem;"> + </div> + {{if $profile.pdesc}} + <div class="m-2 small text-break">{{$profile.pdesc}}</div> + {{else}} + <div class="m-2 small"> + <span class="opacity-50">{{$no_pdesc}}</span> + </div> + {{/if}} </div> </div> {{if $details}} <div class="vcard ps-2 pe-2"> - {{if $profile.pdesc}} - <div class="mb-2">{{$profile.pdesc}}</div> - {{/if}} {{if $location}} <dl class="mb-0 pb-1"> <dt class="location-label">{{$location}}</dt> |