From 24acb37cf1b00a60f3e727f4b37ce17115798b8e Mon Sep 17 00:00:00 2001 From: yflory Date: Fri, 20 Jun 2025 16:56:52 +0200 Subject: [PATCH] Add missing share button to profile --- www/profile/inner.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/www/profile/inner.js b/www/profile/inner.js index 73f68a05a..5eb31f3dd 100644 --- a/www/profile/inner.js +++ b/www/profile/inner.js @@ -103,13 +103,14 @@ define([ var sFrameChan; var addViewButton = function ($container) { - if (APP.readOnly) { + if (!APP.isOwnProfile) { return; } var hash = common.getMetadataMgr().getPrivateData().hashes.viewHash; var url = APP.origin + '/profile/#' + hash; + /* var $blockView = $('
', {class: PROFILE_SECTION}).appendTo($container); var button = h('button.btn.' + VIEW_PROFILE_BUTTON, { 'aria-labelledby': 'cp-profile-view-button' @@ -119,7 +120,7 @@ define([ $(button).click(function () { window.open(url, '_blank'); }).appendTo($blockView); - + */ var $blockShare = $('
', {class: PROFILE_SECTION}).appendTo($container); var buttonS = h('button.btn.btn-primary.' + VIEW_PROFILE_BUTTON, { 'aria-labelledby': 'cp-profile-share-button' @@ -731,6 +732,7 @@ define([ onEvent: onEvent }); if (privateData.isOwnProfile) { + APP.isOwnProfile = true; APP.module = common.makeUniversal('profile', { onEvent: onEvent });