oss-slu / rerum-playground

A web-based set of tools for interacting with the objects that may exist in RERUM and all over the Internet.
0 stars 1 forks source link

Add functionality to display most recently used tools at the top of tool list #12

Open alar12 opened 4 days ago

alar12 commented 4 days ago

Description: We need to implement a functionality where, when a tool is clicked or used, it is moved to the top of the tools list. Additionally, the first three most recently used tools should have a "Recently Used" label. This order and the "Recently Used" status should persist even after refreshing the page by storing the data as a JSON object token.

Acceptance Criteria: When a tool is clicked or used, it moves to the top of the tools list. The first three tools in the list should display a "Recently Used" label. The tools list should automatically reorder after a tool is used, with the most recently used tool appearing first. The state should be stored as a JSON object token to ensure that the recently used tools persist across page refreshes. The order of the tools and the "Recently Used" labels should remain consistent during the session and after refreshing the page. This feature should be implemented for all tools on the tools page.

image

cubap commented 3 days ago

https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage