Skip to content
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

Server addition #34

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

Quantorio
Copy link

This fork / pullrequest adds polyfills and capabilities to make this application usable via the browser and therefore also mobile devices.

All major bugs and exceptions have been fixed, but maintenance may be required for any new electron module or similar modules used in the preload scripts.

Currently the quasar server on port 9300 is used indirectly. Therefore, this server must also be present in the bundled application by activating it or implementing an alternative server.
Its core consists of the websocket on port 9301, which is used to emulate ipc communication, the polyfill in the web part of the application, which activates all rewritten preload scripts in the browser and establishes communication with the server, and the build script to rewrite all preload scripts to use the polyfills.

This fork still contains some fragments of the first version. These are still functional as such and use an alternative principle in which they copy the contents of the electron window without any scripts to send them to the browser and send back the interactions to electron to be emulated in the main window.
The only advantages of this solution are that no polyfills are required and therefore the preload scripts do not have to be rewritten and that the server is currently the only one of the two approaches that can be switched on and off independently.

Known files with fragments:

  • src-electron/mainScripts/appManagement.ts
  • src/layouts/MainLayout.vue
  • src/components/AppServerControl/AppServerControl.vue
  • src-electron/electron-preload.ts

The following button is a fragment and toggles the server for the old solution:
grafik

It could may help resolve the following issues: #30 and/or #26

PS: I can of course explain more about the changes if the code or something similar is not immediately understandable.

@vishiri
Copy link
Owner

vishiri commented Oct 17, 2024

@Quantorio, I really wish you would have written me or came to FA's discord server to discuss this PR, because this is A LOT of work done here... but I am not sure if it will have any real purpose, because FA 2.0 is moving towards SQLite format of project saving/loading, so running this on a web server doesn't really many sense anymore like this; unless you can think of some way to make this work using a webserver too.

@Quantorio
Copy link
Author

Quantorio commented Oct 19, 2024

@Elvanos
Will it still be based on electron in version 2?

If so, where is the SQL processed?
If it is loaded in the preload or renderer there are no problems, I might have to write a polyfill for reading files if it is read directly from the file system and not through an input tag in Chromium.
If it is loaded in the main process, you would have to transfer the path or file via ipc polyfill/websocket. This also means hardly any more work.
Basically, this fork is compatible with Sqlite, as it only performs enhancements to provide the interface functions/renderer and preload functions in the browser.

Without electron, this fork would lose its purpose.

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.

None yet

2 participants