-
Notifications
You must be signed in to change notification settings - Fork 2
Desktop web app with vue.js #83
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
Conversation
622c66f to
4f93bc9
Compare
ivan-diachenko-td
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And let's add line breaks at the end of the files.
vlad-lubenskyi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@andrii-kulminskyi as discussed last week, let's avoid copy-pasting the Java backend and re-use it from the existing React application.
desktop-web-app-vue/src/main/java/com/teamdev/jxbrowser/examples/App.java
Outdated
Show resolved
Hide resolved
desktop-web-app-vue/src/main/java/com/teamdev/jxbrowser/examples/AppDetails.java
Outdated
Show resolved
Hide resolved
…ock floating dependency versions
desktop-web-app/src/main/java/com/teamdev/jxbrowser/examples/App.java
Outdated
Show resolved
Hide resolved
desktop-web-app/web-app-vue/src/components/navigation/PreferencesRouter.vue
Outdated
Show resolved
Hide resolved
desktop-web-app/web-app-vue/src/components/navigation/PreferencesRouter.vue
Show resolved
Hide resolved
e8a6eb2 to
0ab4a2b
Compare
desktop-web-app/web-app-vue/src/components/account/EditableAvatar.vue
Outdated
Show resolved
Hide resolved
desktop-web-app/web-app-vue/src/components/appearance/Appearance.vue
Outdated
Show resolved
Hide resolved
desktop-web-app/web-app-vue/src/components/navigation/NavigationItem.vue
Show resolved
Hide resolved
03e52ff to
6739191
Compare
6739191 to
836dfe1
Compare
vlad-lubenskyi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're almost there. Let's finish this one today.
ivan-diachenko-td
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with some minor comments
desktop-web-app/web-app-react/src/components/appearance/appearance.tsx
Outdated
Show resolved
Hide resolved
desktop-web-app/web-app-react/src/components/appearance/font-size-provider.tsx
Outdated
Show resolved
Hide resolved
| @@ -0,0 +1,19 @@ | |||
| Copyright (c) 2025 TeamDev | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need this file?
As a part of https://github.com/TeamDev-IP/Marketing/issues/803.
In this changeset, we added a demo desktop app with web-based UI on vue.js. This demo is part of the "Java desktop app with Shadcn UI" blog post. The app shows a dialog for preferences and saves them to the file system, so they are preserved after restarting. Here’s what it looks like:
The web app is located in the
web-appdirectory. To set up communication between the web app and Java, we configured the Armeria gRPC server to run on localhost. The client (web app) connects to the server through gRPC web transport:Loading web UI
The way we load the web UI depends on whether it's a development or production environment.
Dev mode
To load the web UI in dev mode, you should first start the dev server. In the root directory, run:
After that, run the application itself:
Prod mode
In the production mode, we used an approach based on custom schemes and the URL request interceptor. This way, all web resource requests are handled inside the app, so no one can intercept them and access the resources, which is essential for desktop apps.
At the same time, using a custom scheme ensures that regular HTTPS XHR requests, such as authentication, API calls, can come through.