Compare commits

..

16 Commits
9.4.1 ... 9.4.3

Author SHA1 Message Date
Mario Vavti
69109a558b version 9.4.3 2024-10-10 12:16:33 +02:00
Mario
4aff6d19d6 changelog
(cherry picked from commit a5c1b669b4)

Co-authored-by: Mario Vavti <mario@mariovavti.com>
2024-10-10 10:11:31 +00:00
Mario
3cb5d14037 also discard Add/Remove at the AP side
(cherry picked from commit 2aee659cbd)

Co-authored-by: Mario Vavti <mario@mariovavti.com>
2024-10-10 10:04:17 +00:00
Mario
5f685bcf63 also dismiss add/remove collection activities in fetch_conversation()
(cherry picked from commit 44232677c8)

Co-authored-by: Mario <mario@mariovavti.com>
2024-10-10 10:03:51 +00:00
Mario
cb44f7e360 dismiss add/remove collection activities until we support themÃ
(cherry picked from commit 16603ca854)

Co-authored-by: Mario <mario@mariovavti.com>
2024-10-10 10:03:32 +00:00
Mario
8f74ee67e3 css fixes
(cherry picked from commit 2693e9e990)

Co-authored-by: Mario <mario@mariovavti.com>
2024-10-04 11:27:56 +00:00
Mario
b0a11537de remove bogus icon id
(cherry picked from commit 04741c761a)

Co-authored-by: Mario <mario@mariovavti.com>
2024-10-04 11:27:40 +00:00
Mario
4de9cb1142 more fa2bi fixes
(cherry picked from commit 8f890fb6fa)

Co-authored-by: Mario <mario@mariovavti.com>
2024-10-04 11:07:50 +00:00
Mario
158ddfb009 changelog
(cherry picked from commit 1afb2a4ce8)

Co-authored-by: Mario <mario@mariovavti.com>
2024-10-04 07:09:21 +00:00
Mario
2b4f344181 Version 9.4.2 2024-10-04 07:07:31 +00:00
Mario
2e5f922561 due to popular demand: indicate reacted state via icon color
(cherry picked from commit afbeb58c16)

Co-authored-by: Mario <mario@mariovavti.com>
2024-10-04 06:59:50 +00:00
Mario
a6498a0cfc Reflect change to btn-link in js template
(cherry picked from commit 8ffab25f5d)

Co-authored-by: Mario <mario@mariovavti.com>
2024-10-04 06:59:16 +00:00
Mario
1073392398 Fix modal backdrop not removed when like/unlike from the modal
(cherry picked from commit 7d41deebce)

Co-authored-by: Mario <mario@mariovavti.com>
2024-10-04 06:51:15 +00:00
Mario
76064dbb33 Fix missing handle icon in mod pdledit_gui
(cherry picked from commit 7e48caae6b)

Co-authored-by: Mario <mario@mariovavti.com>
2024-10-04 06:27:37 +00:00
Mario
1ab4f36a1b Merge branch 'master' of https://framagit.org/hubzilla/core 2024-10-03 04:52:40 +00:00
Mario
cea9c88b9e version 9.4.1 2024-10-03 04:52:18 +00:00
12 changed files with 88 additions and 43 deletions

View File

@@ -1,3 +1,15 @@
Hubzilla 9.4.3 (2024-10-10)
- Discard Add/Remove activities (Hubzilla 10 and (streams) compatibility)
- Fix HQ channel activities icons
- Fix saved search icons
Hubzilla 9.4.2 (2024-10-04)
- Indicate reacted state via icon color (community wish)
- Fix modal backdrop not removed when reacting from the modal
- Fix missing handle icon in mod pdledit_gui
Hubzilla 9.4.1 (2024-10-02)
- Various fixes for the help module
- Update smarty library via composer

View File

@@ -3054,13 +3054,6 @@ class Activity {
}
$a = new ActivityStreams($n);
if ($a->type === 'Announce' && is_array($a->obj)
&& array_key_exists('object', $a->obj) && array_key_exists('actor', $a->obj)) {
// This is a relayed/forwarded Activity (as opposed to a shared/boosted object)
// Reparse the encapsulated Activity and use that instead
logger('relayed activity', LOGGER_DEBUG);
$a = new ActivityStreams($a->obj);
}
logger($a->debug(), LOGGER_DATA);
@@ -3069,6 +3062,24 @@ class Activity {
break;
}
if (in_array($a->type, ['Add', 'Remove'])
&& is_array($a->obj)
&& array_key_exists('object', $a->obj)
&& array_key_exists('actor', $a->obj)
&& !empty($a->tgt)) {
logger('unsupported collection operation', LOGGER_DEBUG);
return;
}
if ($a->type === 'Announce' && is_array($a->obj)
&& array_key_exists('object', $a->obj) && array_key_exists('actor', $a->obj)) {
// This is a relayed/forwarded Activity (as opposed to a shared/boosted object)
// Reparse the encapsulated Activity and use that instead
logger('relayed activity', LOGGER_DEBUG);
$a = new ActivityStreams($a->obj);
}
$item = Activity::decode_note($a);
if (!$item) {

View File

@@ -1148,6 +1148,17 @@ class Libzot {
logger('Activity rejected: ' . print_r($data, true));
return;
}
if (in_array($AS->type, ['Add', 'Remove'])
&& is_array($AS->obj)
&& array_key_exists('object', $AS->obj)
&& array_key_exists('actor', $AS->obj)
&& !empty($AS->tgt)) {
logger('unsupported collection operation', LOGGER_DEBUG);
return;
}
if (is_array($AS->obj)) {
$item = Activity::decode_note($AS);
if (!$item) {
@@ -1158,6 +1169,7 @@ class Libzot {
else {
$item = [];
}
logger($AS->debug(), LOGGER_DATA);
}
@@ -2006,7 +2018,13 @@ class Libzot {
foreach ($items as $activity) {
$AS = new ActivityStreams($activity);
if ($AS->is_valid() && $AS->type === 'Announce' && is_array($AS->obj)
if (!$AS->is_valid()) {
logger('Fetched activity rejected: ' . print_r($activity, true));
continue;
}
if ($AS->type === 'Announce' && is_array($AS->obj)
&& array_key_exists('object', $AS->obj) && array_key_exists('actor', $AS->obj)) {
// This is a relayed/forwarded Activity (as opposed to a shared/boosted object)
// Reparse the encapsulated Activity and use that instead
@@ -2014,9 +2032,14 @@ class Libzot {
$AS = new ActivityStreams($AS->obj);
}
if (!$AS->is_valid()) {
logger('Fetched activity rejected: ' . print_r($activity, true));
continue;
if (in_array($AS->type, ['Add', 'Remove'])
&& is_array($AS->obj)
&& array_key_exists('object', $AS->obj)
&& array_key_exists('actor', $AS->obj)
&& !empty($AS->tgt)) {
logger('unsupported collection operation', LOGGER_DEBUG);
return;
}
// logger($AS->debug());

View File

@@ -91,7 +91,7 @@ class Channel_activities {
self::$activities['photos'] = [
'label' => t('Photos'),
'icon' => 'photo',
'icon' => 'image',
'url' => z_root() . '/photos/' . self::$channel['channel_address'],
'date' => $r[0]['edited'],
'items' => $i,
@@ -123,7 +123,7 @@ class Channel_activities {
self::$activities['files'] = [
'label' => t('Files'),
'icon' => 'folder-open',
'icon' => 'folder',
'url' => z_root() . '/cloud/' . self::$channel['channel_address'],
'date' => $r[0]['edited'],
'items' => $i,
@@ -166,7 +166,7 @@ class Channel_activities {
self::$activities['webpages'] = [
'label' => t('Webpages'),
'icon' => 'newspaper-o',
'icon' => 'layout-text-sidebar',
'url' => z_root() . '/webpages/' . self::$channel['channel_address'],
'date' => $r[0]['edited'],
'items' => $i,
@@ -237,7 +237,7 @@ class Channel_activities {
self::$activities['channels'] = [
'label' => t('Channels'),
'icon' => 'home',
'icon' => 'house',
'url' => z_root() . '/manage',
'date' => datetime_convert(),
'items' => $i,

View File

@@ -66,7 +66,7 @@ require_once('include/security.php');
define('PLATFORM_NAME', 'hubzilla');
define('STD_VERSION', '9.4');
define('STD_VERSION', '9.4.3');
define('ZOT_REVISION', '6.0');
define('DB_UPDATE_VERSION', 1263);

View File

@@ -1209,9 +1209,12 @@ function dolike(ident, verb) {
else {
$('#thread-wrapper-' + data.orig_id).replaceWith(data.html);
}
$('#wall-item-ago-' + data.id + ' .autotime').timeago();
collapseHeight();
liking = 0;
// remove modal backdrop in case the update was triggered from a modal
$('.modal-backdrop').remove();
}
});
liking = 1;
@@ -1363,7 +1366,7 @@ function dostar(ident) {
$('#starred-' + ident).removeClass('bi-star');
$('#star-' + ident).addClass('hidden');
$('#unstar-' + ident).removeClass('hidden');
var btn_tpl = '<div class="" id="star-button-' + ident + '"><button type="button" class="btn btn-outline-secondary border-0 wall-item-star" onclick="dostar(' + ident + ');"><i class="bi bi-star"></i></button></div>'
var btn_tpl = '<div class="" id="star-button-' + ident + '"><button type="button" class="btn btn-sm btn-link link-secondary wall-item-star" onclick="dostar(' + ident + ');"><i class="bi bi-star generic-icons"></i></button></div>'
$('#wall-item-tools-right-' + ident).prepend(btn_tpl);
}
else {

View File

@@ -106,8 +106,8 @@
{{foreach $item.responses as $verb=>$response}}
{{if $item.reactions_allowed || (!$item.reactions_allowed && $response.count)}}
<div class="">
<button type="button" title="{{$response.count}} {{$response.button.label}}" class="btn btn-sm btn-outline-secondary border-0 wall-item-{{$response.button.class}}"{{if $response.modal}} data-bs-toggle="modal" data-bs-target="#{{$verb}}Modal-{{$item.id}}"{{else if $response.count}} data-bs-toggle="dropdown"{{elseif $item.reactions_allowed}} onclick="{{$response.button.onclick}}({{$item.id}},'{{$verb}}'); return false;"{{/if}} id="wall-item-{{$verb}}-{{$item.id}}">
<i class="bi bi-{{$response.button.icon}} generic-icons"></i>{{if $response.count}}<span style="display: inline-block; margin-top: -.25rem;" class="align-top{{if $item.my_responses.$verb}} text-decoration-underline{{/if}}">{{$response.count}}</span>{{/if}}
<button type="button" title="{{$response.count}} {{$response.button.label}}" class="btn btn-sm btn-link{{if !$item.my_responses.$verb}} link-secondary{{/if}} wall-item-{{$response.button.class}}"{{if $response.modal}} data-bs-toggle="modal" data-bs-target="#{{$verb}}Modal-{{$item.id}}"{{else if $response.count}} data-bs-toggle="dropdown"{{elseif $item.reactions_allowed}} onclick="{{$response.button.onclick}}({{$item.id}},'{{$verb}}'); return false;"{{/if}} id="wall-item-{{$verb}}-{{$item.id}}">
<i class="bi bi-{{$response.button.icon}} generic-icons"></i>{{if $response.count}}<span style="display: inline-block; margin-top: -.25rem;" class="align-top">{{$response.count}}</span>{{/if}}
</button>
{{if $response.modal}}
<div class="modal" id="{{$verb}}Modal-{{$item.id}}">
@@ -151,7 +151,7 @@
{{/foreach}}
{{if $item.toplevel && $item.emojis && $item.reactions}}
<div class="">
<button type="button" class="btn btn-sm btn-outline-secondary border-0" data-bs-toggle="dropdown" id="wall-item-react-{{$item.id}}">
<button type="button" class="btn btn-sm btn-link link-secondary" data-bs-toggle="dropdown" id="wall-item-react-{{$item.id}}">
<i class="bi bi-emoji-smile generic-icons"></i>
</button>
<div class="dropdown-menu dropdown-menu-start container text-center w-25">
@@ -178,22 +178,22 @@
{{else}}
{{if $item.star && $item.star.isstarred}}
<div class="" id="star-button-{{$item.id}}">
<button type="button" class="btn btn-sm btn-outline-secondary border-0 wall-item-star" onclick="dostar({{$item.id}});"><i class="bi bi-star generic-icons"></i></button>
<button type="button" class="btn btn-sm btn-link link-secondary wall-item-star" onclick="dostar({{$item.id}});"><i class="bi bi-star generic-icons"></i></button>
</div>
{{/if}}
{{if $item.attachments}}
<div class="">
<button type="button" class="btn btn-sm btn-outline-secondary border-0 wall-item-attach" data-bs-toggle="dropdown" id="attachment-menu-{{$item.id}}"><i class="bi bi-paperclip generic-icons"></i></button>
<button type="button" class="btn btn-sm btn-link link-secondary wall-item-attach" data-bs-toggle="dropdown" id="attachment-menu-{{$item.id}}"><i class="bi bi-paperclip generic-icons"></i></button>
<div class="dropdown-menu dropdown-menu-end">{{$item.attachments}}</div>
</div>
{{/if}}
{{if $item.reply_to}}
<button type="button" title="{{$item.reply_to.0}}" class="btn btn-sm btn-outline-secondary border-0" onclick="doreply({{$item.parent}}, {{$item.id}}, '{{$item.author_id}}', '{{$item.reply_to.2}} {{$item.name|escape:javascript}}');">
<button type="button" title="{{$item.reply_to.0}}" class="btn btn-sm btn-link link-secondary" onclick="doreply({{$item.parent}}, {{$item.id}}, '{{$item.author_id}}', '{{$item.reply_to.2}} {{$item.name|escape:javascript}}');">
<i class="bi bi-arrow-90deg-left generic-icons" ></i>
</button>
{{/if}}
<div class="">
<button type="button" class="btn btn-sm btn-outline-secondary border-0" data-bs-toggle="dropdown" id="wall-item-menu-{{$item.id}}">
<button type="button" class="btn btn-sm btn-link link-secondary" data-bs-toggle="dropdown" id="wall-item-menu-{{$item.id}}">
<i class="bi bi-three-dots-vertical generic-icons"></i>
</button>
<div class="dropdown-menu dropdown-menu-end" role="menu" aria-labelledby="wall-item-menu-{{$item.id}}">

View File

@@ -95,7 +95,7 @@
<div class="p-2 wall-item-tools d-flex justify-content-between">
<div class="wall-item-tools-left hstack gap-1" id="wall-item-tools-left-{{$item.id}}">
<div class="wall-item-list-comments btn-group">
<a class="btn btn-sm btn-outline-secondary border-0 wall-item-comments" href="{{$item.viewthread}}" title="{{$item.comment_count_txt.label}}{{if $item.list_unseen_txt}}, {{$item.list_unseen_txt.label}}{{/if}}">
<a class="btn btn-sm btn-link link-secondary wall-item-comments" href="{{$item.viewthread}}" title="{{$item.comment_count_txt.label}}{{if $item.list_unseen_txt}}, {{$item.list_unseen_txt.label}}{{/if}}">
<i class="bi bi-chat generic-icons"></i>{{if $item.comment_count_txt.count}}<span style="display: inline-block; margin-top: -.25rem;" class="align-top">{{$item.comment_count_txt.count}}</span>{{/if}}{{if $item.unseen_comments}}, <i class="bi bi-eye-slash generic-icons"></i><span class="unseen-wall-indicator-{{$item.id}} align-top" style="display: inline-block; margin-top: -.25rem;">{{$item.list_unseen_txt.count}}</span>{{/if}}
</a>
</div>
@@ -109,9 +109,10 @@
{{foreach $item.responses as $verb=>$response}}
{{if $item.reactions_allowed || (!$item.reactions_allowed && $response.count)}}
<div class="">
<button type="button" title="{{$response.count}} {{$response.button.label}}" class="btn btn-sm btn-outline-secondary border-0 wall-item-{{$response.button.class}}"{{if $response.modal}} data-bs-toggle="modal" data-bs-target="#{{$verb}}Modal-{{$item.id}}"{{else if $response.count}} data-bs-toggle="dropdown"{{elseif $item.reactions_allowed}} onclick="{{$response.button.onclick}}({{$item.id}},'{{$verb}}'); return false;"{{/if}} id="wall-item-{{$verb}}-{{$item.id}}">
<i class="bi bi-{{$response.button.icon}} generic-icons"></i>{{if $response.count}}<span style="display: inline-block; margin-top: -.25rem;" class="align-top{{if $item.my_responses.$verb}} text-decoration-underline{{/if}}">{{$response.count}}</span>{{/if}}
</button> {{if $response.modal}}
<button type="button" title="{{$response.count}} {{$response.button.label}}" class="btn btn-sm btn-link{{if !$item.my_responses.$verb}} link-secondary{{/if}} wall-item-{{$response.button.class}}"{{if $response.modal}} data-bs-toggle="modal" data-bs-target="#{{$verb}}Modal-{{$item.id}}"{{else if $response.count}} data-bs-toggle="dropdown"{{elseif $item.reactions_allowed}} onclick="{{$response.button.onclick}}({{$item.id}},'{{$verb}}'); return false;"{{/if}} id="wall-item-{{$verb}}-{{$item.id}}">
<i class="bi bi-{{$response.button.icon}} generic-icons"></i>{{if $response.count}}<span style="display: inline-block; margin-top: -.25rem;" class="align-top">{{$response.count}}</span>{{/if}}
</button>
{{if $response.modal}}
<div class="modal" id="{{$verb}}Modal-{{$item.id}}">
<div class="modal-dialog">
<div class="modal-content">
@@ -153,7 +154,7 @@
{{/foreach}}
{{if $item.toplevel && $item.emojis && $item.reactions}}
<div class="">
<button type="button" class="btn btn-sm btn-outline-secondary border-0" data-bs-toggle="dropdown" id="wall-item-react-{{$item.id}}">
<button type="button" class="btn btn-sm btn-link link-secondary" data-bs-toggle="dropdown" id="wall-item-react-{{$item.id}}">
<i class="bi bi-emoji-smile generic-icons"></i>
</button>
<div class="dropdown-menu dropdown-menu-start container text-center w-25">
@@ -180,17 +181,17 @@
{{else}}
{{if $item.star && $item.star.isstarred}}
<div class="" id="star-button-{{$item.id}}">
<button type="button" class="btn btn-sm btn-outline-secondary border-0 wall-item-star" onclick="dostar({{$item.id}});"><i class="bi bi-star generic-icons"></i></button>
<button type="button" class="btn btn-sm btn-link link-secondary wall-item-star" onclick="dostar({{$item.id}});"><i class="bi bi-star generic-icons"></i></button>
</div>
{{/if}}
{{if $item.attachments}}
<div class="">
<button type="button" class="btn btn-sm btn-outline-secondary border-0 wall-item-attach" data-bs-toggle="dropdown" id="attachment-menu-{{$item.id}}"><i class="bi bi-paperclip generic-icons"></i></button>
<button type="button" class="btn btn-sm btn-link link-secondary wall-item-attach" data-bs-toggle="dropdown" id="attachment-menu-{{$item.id}}"><i class="bi bi-paperclip generic-icons"></i></button>
<div class="dropdown-menu dropdown-menu-end">{{$item.attachments}}</div>
</div>
{{/if}}
<div class="">
<button type="button" class="btn btn-sm btn-outline-secondary border-0" data-bs-toggle="dropdown" id="wall-item-menu-{{$item.id}}">
<button type="button" class="btn btn-sm btn-link link-secondary" data-bs-toggle="dropdown" id="wall-item-menu-{{$item.id}}">
<i class="bi bi-three-dots-vertical generic-icons"></i>
</button>
<div class="dropdown-menu dropdown-menu-end" role="menu" aria-labelledby="wall-item-menu-{{$item.id}}">

View File

@@ -12,7 +12,7 @@
{{if $entry.type !== 'content'}}
<button type="button" class="btn btn-sm btn-outline-primary pdledit_gui_item_src{{if $disable_controls}} disabled{{/if}}">Edit</button>
<button type="button" class="btn btn-sm btn-outline-danger pdledit_gui_item_remove{{if $disable_controls}} disabled{{/if}}">Remove</button>
<i class="bi fa-arrows-alt m-2 float-end cursor-pointer pdledit_gui_item_handle"></i>
<i class="bi bi-arrows-move m-2 float-end cursor-pointer pdledit_gui_item_handle"></i>
{{/if}}
</div>
</div>

View File

@@ -4,7 +4,7 @@
<ul id="saved-search-list" class="nav nav-pills flex-column">
{{foreach $saved as $search}}
<li class="nav-item nav-item-hack" id="search-term-{{$search.id}}">
<a class="nav-link widget-nav-pills-icons" title="{{$search.delete}}" onclick="return confirmDelete();" id="drop-saved-search-term-{{$search.id}}" href="{{$search.dellink}}"><i id="dropfa-floppy-od-search-term-{{$search.id}}" class="bi bi-trash drop-icons" ></i></a>
<a class="nav-link widget-nav-pills-icons{{if $search.selected}} active{{/if}}" title="{{$search.delete}}" onclick="return confirmDelete();" id="drop-saved-search-term-{{$search.id}}" href="{{$search.dellink}}"><i class="bi bi-trash"></i></a>
<a id="saved-search-term-{{$search.id}}" class="nav-link{{if $search.selected}} active{{/if}}" href="{{$search.srchlink}}">{{$search.displayterm}}</a>
</li>
{{/foreach}}

View File

@@ -105,22 +105,17 @@
{{else}}
{{if $item.star && $item.star.isstarred}}
<div class="" id="star-button-{{$item.id}}">
<button type="button" class="btn btn-sm btn-outline-secondary border-0 wall-item-star" onclick="dostar({{$item.id}});"><i class="bi bi-star generic-icons"></i></button>
<button type="button" class="btn btn-sm btn-link link-secondary wall-item-star" onclick="dostar({{$item.id}});"><i class="bi bi-star generic-icons"></i></button>
</div>
{{/if}}
{{if $item.attachments}}
<div class="">
<button type="button" class="btn btn-sm btn-outline-secondary border-0 wall-item-attach" data-bs-toggle="dropdown" id="attachment-menu-{{$item.id}}"><i class="bi bi-paperclip generic-icons"></i></button>
<button type="button" class="btn btn-sm btn-link link-secondary wall-item-attach" data-bs-toggle="dropdown" id="attachment-menu-{{$item.id}}"><i class="bi bi-paperclip generic-icons"></i></button>
<div class="dropdown-menu dropdown-menu-end">{{$item.attachments}}</div>
</div>
{{/if}}
{{if $item.reply_to}}
<button type="button" title="{{$item.reply_to.0}}" class="btn btn-sm btn-outline-secondary border-0" onclick="doreply({{$item.parent}}, {{$item.id}}, '{{$item.author_id}}', '{{$item.reply_to.2}} {{$item.name|escape:javascript}}');">
<i class="bi bi-arrow-90deg-left generic-icons" ></i>
</button>
{{/if}}
<div class="">
<button type="button" class="btn btn-sm btn-outline-secondary border-0" data-bs-toggle="dropdown" id="wall-item-menu-{{$item.id}}">
<button type="button" class="btn btn-sm btn-link link-secondary" data-bs-toggle="dropdown" id="wall-item-menu-{{$item.id}}">
<i class="bi bi-three-dots-vertical generic-icons"></i>
</button>
<div class="dropdown-menu dropdown-menu-end" role="menu" aria-labelledby="wall-item-menu-{{$item.id}}">

View File

@@ -4,7 +4,7 @@
<input class="form-control" type="text" name="search" id="search-text" value="{{$s}}" onclick="this.submit();" />
<button type="submit" name="submit" class="btn btn-outline-secondary" id="search-submit" value="{{$search_label}}"><i class="bi bi-search"></i></button>
{{if $savedsearch}}
<button type="submit" name="searchsave" class="btn btn-outline-secondary" id="search-save" value="{{$save_label}}"><i class="bi fa-floppy-o"></i></button>
<button type="submit" name="searchsave" class="btn btn-outline-secondary" id="search-save" value="{{$save_label}}"><i class="bi bi-save"></i></button>
{{/if}}
</div>
</form>