Stirling-Tools / Stirling-PDF

#1 Locally hosted web application that allows you to perform various operations on PDF files
https://stirlingpdf.com
MIT License
46.51k stars 3.79k forks source link

[Bug]: Indication of the absence of favorites #2225

Open Ludy87 opened 1 week ago

Ludy87 commented 1 week ago

Installation Method

None

The Problem

The index page will show if there are no favorites.

image


The note will not be displayed on any other page.

image

Version of Stirling-PDF

0.32.0

Last Working Version of Stirling-PDF

idk

Page Where the Problem Occurred

No response

Docker Configuration

No response

Relevant Log Output

No response

Additional Information

No response

Browsers Affected

Firefox, Chrome

No Duplicate of the Issue

dosubot[bot] commented 1 week ago

The issue you're experiencing is related to the display of the "no favorites" message, which appears on the index page but not on other pages. This behavior is due to the specific JavaScript code that handles the display of favorites on the index page. The updateFavoritesSection function is responsible for managing the display of favorite items on the index page. It updates the favorites section by checking which cards are marked as favorites in localStorage and then displays them. If no favorites are found, it hides the favorites section [1].

On other pages, the absence of a similar mechanism might be why the "no favorites" message is not displayed. The updateFavoritesDropdown function is used to populate the favorites dropdown menu across different pages, and it displays a default message if no favorites are found [2]. However, this function might not be directly linked to the page content outside the dropdown, which could explain the inconsistency.

To address this, you might consider implementing a similar logic to the updateFavoritesSection function on other pages to ensure the "no favorites" message is consistently displayed.

To continue talking to Dosu, mention @dosu.

Frooodle commented 1 week ago

I don't know how I never noticed his 😂

Ludy87 commented 1 week ago

It's all just coincidences 😂

DimK10 commented 1 week ago

Is the homecard script used in all pages of just the home page?

Frooodle commented 1 week ago

Just homepage :(

DimK10 commented 1 week ago

ahh i guess i'll check this one too.