Skip to content

Commit

Permalink
fix(client): correctly expose web frontend host constant to renderer/web
Browse files Browse the repository at this point in the history
  • Loading branch information
neopostmodern committed Dec 8, 2024
1 parent 90cc520 commit c6f1606
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions client/src/globals.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
declare const __VERSION__: string;
declare const __BACKEND_URL__: string;
declare const __WEB_FRONTEND_HOST__: string;
declare const __DEBUG_PROD__: string;
declare const __BUILD_TARGET__: 'web' | 'electron_renderer';

Expand Down
2 changes: 1 addition & 1 deletion client/src/renderer/containers/UserSettingsSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ const UserSettingsSection: FC = () => {
<StructureTextField
type="text"
inputProps={{ readOnly: true }}
value={`javascript:void(open('${WEB_FRONTEND_HOST}/notes/add?url='+encodeURIComponent(location.href)+'&autoSubmit'))`}
value={`javascript:void(open('${__WEB_FRONTEND_HOST__}/notes/add?url='+encodeURIComponent(location.href)+'&autoSubmit'))`}
/>
</SettingsEntry>
<Credentials
Expand Down
1 change: 1 addition & 0 deletions client/vite.renderer.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export default defineConfig({
__BUILD_TARGET__: '"electron_renderer"',
// config
__BACKEND_URL__: JSON.stringify(config.BACKEND_URL),
__WEB_FRONTEND_HOST__: JSON.stringify(config.WEB_FRONTEND_HOST),
// package.json
__VERSION__: JSON.stringify(packageJson.version),
},
Expand Down

0 comments on commit c6f1606

Please sign in to comment.