Skip to content

Commit

Permalink
rename env variables
Browse files Browse the repository at this point in the history
  • Loading branch information
Neverous committed Oct 11, 2024
1 parent da9425f commit 9b19785
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions website/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,5 @@ PUBLIC_URL='https://my-domain.com' REACT_APP_BACKEND_URL='http://api.my-domain.c

## Additional options

- `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
2 changes: 1 addition & 1 deletion website/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const App = () => {
});
}

const features = process.env.REACT_APP_DISABLE_FEATURES_CARDS !== '1';
const features = process.env.YOPASS_DISABLE_FEATURES_CARDS !== '1';
return (
<StyledEngineProvider injectFirst>
<ThemeProvider theme={theme}>
Expand Down
2 changes: 1 addition & 1 deletion website/src/Routing.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import DisplaySecret from './displaySecret/DisplaySecret';
import Upload from './createSecret/Upload';

export const Routing = () => {
const oneClickLink = process.env.REACT_APP_DISABLE_ONE_CLICK_LINK !== '1';
const oneClickLink = process.env.YOPASS_DISABLE_ONE_CLICK_LINK !== '1';
return (
<Routes>
<Route path="/" element={<CreateSecret />} />
Expand Down
2 changes: 1 addition & 1 deletion website/src/displaySecret/Result.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const Result = ({ uuid, password, prefix, customPassword }: ResultProps) => {
`${window.location.protocol}//${window.location.host}`) + `/#/${prefix}`;
const short = `${base}/${uuid}`;
const full = `${short}/${password}`;
const oneClickLink = process.env.REACT_APP_DISABLE_ONE_CLICK_LINK !== '1';
const oneClickLink = process.env.YOPASS_DISABLE_ONE_CLICK_LINK !== '1';
const { t } = useTranslation();

return (
Expand Down
2 changes: 2 additions & 0 deletions website/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ export default defineConfig(() => {
REACT_APP_FALLBACK_LANGUAGE: process.env.REACT_APP_FALLBACK_LANGUAGE,
START_SERVER_AND_TEST_INSECURE:
process.env.START_SERVER_AND_TEST_INSECURE,
YOPASS_DISABLE_FEATURES_CARDS: process.env.YOPASS_DISABLE_FEATURES_CARDS,
YOPASS_DISABLE_ONE_CLICK_LINK: process.env.YOPASS_DISABLE_ONE_CLICK_LINK,
},
},
server: {
Expand Down

0 comments on commit 9b19785

Please sign in to comment.