Skip to content
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

Add support for disabling few website features #1597

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Neverous
Copy link

This adds build time toggles for disabling:

  • Features cards - seems mostly like an ad, not really useful in custom deployments and can be confusing to users (great on the official one though to learn what this project is 👍)
  • "One-click link" - disabling it makes for easier enforcement of using multiple communication channels when sharing secrets

@DracoBlue
Copy link

Hey @jhaals!

What do you think about those changes?

For our deployment we need to be able to disable the "one-click" link - thus this PR would also fix me use case :).

Best regards

@donserdal
Copy link

Hey @jhaals!
Would love to see this in the official release!

Copy link
Owner

@jhaals jhaals left a comment

Choose a reason for hiding this comment

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

Thanks for the PR and sorry for the delay, I have been away on parental leave so these things have been put on hold. I think this make sense, would you or someone else interested in this feature be so kind and change the name of the environment variables to start with YOPASS_ instead of REACT_APP(I should update the other too but that will be breaking).

Comment on lines 48 to 49
- `REACT_APP_DISABLE_FEATURES_CARDS=1` - Allows disabling Features cards
- `REACT_APP_DISABLE_ONE_CLICK_LINK=1` - Allows disabling "One-click link" support
Copy link
Owner

Choose a reason for hiding this comment

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

Suggested change
- `REACT_APP_DISABLE_FEATURES_CARDS=1` - Allows disabling Features cards
- `REACT_APP_DISABLE_ONE_CLICK_LINK=1` - Allows disabling "One-click link" support
- `YOPASS_DISABLE_FEATURES_CARDS=1` - Allows disabling Features cards
- `YOPASS_DISABLE_ONE_CLICK_LINK=1` - Allows disabling "One-click link" support

- Toggle for Features cards
- Toggle for "One-click link"
@Neverous
Copy link
Author

Neverous commented Oct 11, 2024

Tried doing that but I think the REACT_APP_ prefix is the requirement of the framework used? Because it doesn't work without it. I'm not that familiar with it to figure out what else needs changing but just renaming the envs I added to YOPASS_* stops them from working 😞
nvm, found a way.

@jhaals
Copy link
Owner

jhaals commented Oct 12, 2024

Thanks 👏

@jhaals
Copy link
Owner

jhaals commented Oct 12, 2024

@Neverous just a small think left to fix.

[warn] src/Routing.tsx
[warn] vite.config.ts
[warn] Code style issues found in 2 files. Run Prettier with --write to fix.

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.

4 participants