Skip to content

Comments

feat: jan on web - experimental#4325

Closed
louis-jan wants to merge 2 commits intodevfrom
feat/jan-on-web
Closed

feat: jan on web - experimental#4325
louis-jan wants to merge 2 commits intodevfrom
feat/jan-on-web

Conversation

@louis-jan
Copy link
Contributor

@louis-jan louis-jan commented Dec 23, 2024

Describe Your Changes

This PR is to enable the standalone web deployment with Jan frontend to run with a running cortex.cpp server.

Caution:
This is just an experimental PR

CleanShot 2024-12-23 at 16 47 13

To run this:

  1. Build core, joi and extensions as usual
  2. Run yarn dev:web:standalone
  3. Voila - Access localhost:3000 on safari or chrome browser (there is a known issue with Arc, WIP)

Changes made

This pull request includes several changes to enhance the functionality and compatibility of the JanHQ application, particularly focusing on handling web and electron environments, improving theme management, and updating extension handling. The most important changes include modifications to the ExtensionManager class, the addition of a new theme, and updates to the build and development scripts.

Enhancements to Extension Handling:

  • web/extension/ExtensionManager.ts: Added logic to handle extensions differently based on the environment (electron or web). This includes using WebExtensions for web environments and modifying the activateExtension method to simplify the URL handling for extensions. [1] [2] [3] [4]
  • web/extensions.json: Added a JSON file that lists all available extensions with their metadata, which will be used in web environments.

Theme Management Improvements:

  • web/hooks/useLoadTheme.ts: Added logic to load a default theme (DefaultTheme) when the application is running in a web environment. [1] [2]
  • web/theme.json: Introduced a new theme configuration file to define the "Joi Light" theme, including various UI element styles.

Build and Development Script Updates:

  • package.json: Added a new script dev:web:standalone for running the web application in standalone mode and updated the build:web script to fix a syntax issue.

Code Simplification:

Compatibility Enhancements:

@github-actions
Copy link
Contributor

github-actions bot commented Dec 24, 2024

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.

1 participant