Skip to content

Add support for disabling few website features#1597

Merged
jhaals merged 3 commits intojhaals:masterfrom
Neverous:hide-parts
Mar 12, 2025
Merged

Add support for disabling few website features#1597
jhaals merged 3 commits intojhaals:masterfrom
Neverous:hide-parts

Conversation

@Neverous
Copy link
Copy Markdown
Contributor

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
Copy Markdown

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
Copy Markdown

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

Copy link
Copy Markdown
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 thread website/README.md Outdated
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
Copy Markdown
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

@Neverous
Copy link
Copy Markdown
Contributor 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
Copy Markdown
Owner

jhaals commented Oct 12, 2024

Thanks 👏

@jhaals
Copy link
Copy Markdown
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.

@michael-markevich
Copy link
Copy Markdown

@jhaals @Neverous this is really cool feature that many of us need. Can I help you to push it forward?

@gefloh
Copy link
Copy Markdown

gefloh commented Feb 14, 2025

@jhaals @Neverous Would also really love to see this feature, please push this forward. Thanks.

@Neverous
Copy link
Copy Markdown
Contributor Author

I don't think its waiting for anything from me, its ready to be merged @jhaals ?
But I rebased it just in case 🤔

@jhaals jhaals merged commit 976d7b2 into jhaals:master Mar 12, 2025
6 checks passed
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.

6 participants