Skip to content

Fix sharelink#630

Open
Lokowitz wants to merge 6 commits into
mainfrom
fix-sharelink
Open

Fix sharelink#630
Lokowitz wants to merge 6 commits into
mainfrom
fix-sharelink

Conversation

@Lokowitz

Copy link
Copy Markdown
Owner

Community Contribution License Agreement

By creating this pull request, I grant the project maintainers an unlimited,
perpetual license to use, modify, and redistribute these contributions under any terms they
choose, including both the AGPLv3 and the Fossorial Commercial license terms. I
represent that I have the right to grant this license for all contributed content.

Description

How to test?

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a -crowdsec command-line flag to the installer to toggle the CrowdSec installation prompt and updates the dev:setup script in package.json to use generic database commands. A critical issue was identified in CreateShareLinkForm.tsx where the logic for the 'Create Link' button's disabled state was incorrectly inverted, which would prevent users from initiating link creation.

Comment thread src/components/CreateShareLinkForm.tsx Outdated
onClick={form.handleSubmit(onSubmit)}
loading={loading}
disabled={link !== null || loading}
disabled={link === null || loading}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

The logic for the disabled prop on the "Create Link" button is inverted. By changing the condition to link === null, the button will be disabled by default when the form is first opened (since link is initialized to null at line 82), preventing users from ever creating a link. The original logic link !== null was correct as it ensures the button is enabled for the initial creation and disabled once a link has already been generated or while the request is loading.

Suggested change
disabled={link === null || loading}
disabled={link !== null || loading}

@github-actions

Copy link
Copy Markdown

Warning

This image may contain unchecked and breaking changes. Only use on own risk.

👋 Thanks for your PR!
Dev images for this PR are now available on docker hub:

SQLITE Image:

lokowitz75/pangolin:dev-pr630

Postgresql Image:

lokowitz75/pangolin:postgresql-dev-pr630

@github-actions

Copy link
Copy Markdown

Warning

This image may contain unchecked and breaking changes. Only use on own risk.

👋 Thanks for your PR!
Dev images for this PR are now available on docker hub:

SQLITE Image:

lokowitz75/pangolin:dev-pr630

Postgresql Image:

lokowitz75/pangolin:postgresql-dev-pr630

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants