-
Notifications
You must be signed in to change notification settings - Fork 297
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Keep private links number … private. #2109
base: master
Are you sure you want to change the base?
Conversation
I think it should be integrated for milestone |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is still easy to determine the number of private shaares by substracting the number of visible shaares, from the total shaares counter
$this->assignView('linkcount', $this->container->bookmarkService->count(BookmarkFilter::$ALL));
$this->assignView('privateLinkcount', $this->container->bookmarkService->count(BookmarkFilter::$PRIVATE));
A better approach would be displaying only the count of public shaares.
Anyway this doesn't hurt, so approving
Oh you’re totally right, I didn’t notice this issue.
Please don’t merge until I (or anybody) fix this for only those public shaares number. |
987ece6
to
14aecaa
Compare
@nodiscc Done. I allowed myself to display the number of links, whether total, private & public, even if 0, instead of masking the information. |
530e58e
to
58fe58c
Compare
I noticed there is translation feature, no idea if it was required and how to actually update, so my modifications are flawed as I copied them (without the |
I had the same idea in September and patched the default theme to a custom one: --- p/tpl/default/linklist.html Sat Mar 18 13:45:18 2023
+++ p/tpl/robert/linklist.html Sun Sep 29 19:37:39 2024
@@ -9,7 +9,7 @@
<div class="linkcount pure-u-0 pure-u-lg-visible">
{if="!empty($linkcount)"}
<span class="strong">{$linkcount}</span> {function="t('shaare', 'shaares', $linkcount)"}
- {if="$privateLinkcount>0"}
+ {if="$is_logged_in && $privateLinkcount>0"}
<br><span class="strong">{$privateLinkcount}</span> {function="t('private link', 'private links', $privateLinkcount)"}
{/if}
{/if}
@@ -58,7 +58,7 @@
<div class="linkcount pure-u-lg-0 center">
{if="!empty($linkcount)"}
<span class="strong">{$linkcount}</span> {function="t('shaare', 'shaares', $linkcount)"}
- {if="$privateLinkcount>0"}
+ {if="$is_logged_in && $privateLinkcount>0"}
· <span class="strong">{$privateLinkcount}</span> {function="t('private link', 'private links', $privateLinkcount)"}
{/if}
{/if} |
58fe58c
to
e27156f
Compare
In your example, people can still determine the number of private links because the main number contains both public and private links from the number of pages of links. |
Ah, now I see, what you mean. I just checked a fresh installation. Shaarli shows a number of 3 shaares at the top right, but only 1 shaare is shown in the list. So, there are 2 private links. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would revert the translation and wording change (shaare(s)
-> total share(s)
) as ti still works and makes sense without this change, and will make this easier to review.
I don't remember how the translation system works right now.
e27156f
to
fe4504a
Compare
Done. |
Signed-off-by: Thibaud CANALE <[email protected]>
fe4504a
to
e461548
Compare
I guess the title is self explanatory.
IMHO, this value should not be seen for public, unless this is an open instance and therefore, no logged is kind of already logged in.