gethomepage / homepage

A highly customizable homepage (or startpage / application dashboard) with Docker and service API integrations.
https://gethomepage.dev
GNU General Public License v3.0
18.73k stars 1.1k forks source link

Feature: Linkwarden widget #3832

Closed PyrokineticDarkElf closed 1 month ago

PyrokineticDarkElf commented 1 month ago

Proposed change

Closes #2980

This service adds support to:

Documentation had been included on how to use the new widget.

Screenshots:

Multiple configs available for different data displays image image image image image

Relevant API responses:

/api/v1/collections:

{
    "response": [
        {
            "id": 8,
            "name": "Homelab",
            "description": "",
            "color": "#ff0000",
            "parentId": null,
            "isPublic": false,
            "ownerId": 1,
            "createdAt": "2024-04-18T21:45:13.843Z",
            "updatedAt": "2024-04-18T21:45:13.843Z",
            "parent": null,
            "members": [],
            "_count": {
                "links": 24
            }
        }
    ]
}

/api/v1/tags:

{
    "response": [
        {
            "id": 118,
            "name": "HTML",
            "ownerId": 1,
            "createdAt": "2024-04-19T09:20:56.287Z",
            "updatedAt": "2024-04-19T09:20:56.287Z",
            "_count": {
                "links": 1
            }
        }
    ]
}

/api/v1/links:

{
    "response": [
        {
            "id": 840,
            "name": "Habitica - Gamify Your Life",
            "type": "url",
            "description": "Habitica - Gamify Your Life",
            "collectionId": 14,
            "url": "https://habitica.com/static/home",
            "textContent": null,
            "preview": "unavailable",
            "image": "unavailable",
            "pdf": "unavailable",
            "readable": "unavailable",
            "monolith": "unavailable",
            "lastPreserved": "2024-08-05T09:48:27.214Z",
            "importDate": null,
            "createdAt": "2024-08-05T09:48:14.848Z",
            "updatedAt": "2024-08-05T09:48:27.216Z",
            "tags": [],
            "collection": {
                "id": 14,
                "name": "Unorganized",
                "description": "",
                "color": "#ffffff",
                "parentId": null,
                "isPublic": false,
                "ownerId": 1,
                "createdAt": "2024-04-18T22:47:08.959Z",
                "updatedAt": "2024-04-18T22:47:54.325Z"
            },
            "pinnedBy": []
        }
    ]
}

Notes:

I had to disable no-underscore-dangle in ESLint using comments due to API constraints.

/* eslint-disable no-underscore-dangle */
Some code
/* eslint-enable no-underscore-dangle */

Type of change

Checklist:

shamoon commented 1 month ago

I will find some time to look at this more but honestly it’s probably not going to be accepted like this. It doesn’t follow our standards. We really don’t allow widgets to be make up their own layouts because we try very hard to keep homepage consistent

PyrokineticDarkElf commented 1 month ago

I understand the need for uniformity.

Do you think any form of list could be added in the future? I was thinking while making this how surprising it is there's no list component yet.

I can easily edit this to display stats only. It would be a bit of a shame though. What suggestions do you have that may work, if any?

Perhaps a module that follows the same styling as the manual bookmarks? image

shamoon commented 1 month ago

There are a couple of widgets that use a list format, it is much simpler and should be limited to X items. For example Frigate or the custom API.

Overall though, Im sorry to say this needs to be simplified to be accepted. We're not open to making homepage a kind of display frontend for bookmark services, it's a 'can of worms' kinda thing, sorry.

An alternative, perhaps, would be a tool (completely separate from homepage) that pulls from link warden and synchronizes to the bookmarks yaml. Just a thought.

Let us know how you'd like to proceed with this. I'll mark it as a draft for now. Thanks for your interest in the project

erlenddahl commented 1 month ago

As a prospective user of this widget, I just wanted to say that I'm more than happy with the widget shown in the first screenshot (showing just the number of links, collections and tags).

(And I would really like that, so I hope it will be published in that minimal version if the other variants are too complex.)

alprojects1 commented 1 month ago

is there any we can add Twingate ? to homepage sorry if this is not the correct area I am new.

github-actions[bot] commented 3 weeks ago

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new discussion for related concerns. See our contributing guidelines for more details.