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

Refactor main.js, enable custom screensize #1627

Closed
wants to merge 175 commits into from

Conversation

pciavald
Copy link
Contributor

@pciavald pciavald commented Mar 29, 2021

This is based off a merged #1610 as it was already modifying how the url is handled in main.js. Probably easier to look directly at main.js and helper/electron.js, this is where most of the change is.

I've extracted most of the electron-related logic into electron.js and grouped together behaviors that were a bit scattered in main.js. The logic is more state based and with the default values for BrowserWindow and state overrides, it was easy to implement custom window properties from the user config. As for the previous PR i've set everything to default to null so nothing gets overridden by default, but user can choose a different behavior.

As an example, we use it with these settings:

{
	"config": {
		"octodash": {
			"window": {
				"width": 800,
				"height": 454,
				"y": 26,
				"fullscreen": false
			}
		}
	}
}

x is also exposed but we don't need it.

If you prefer that these are written by default in the config file, i can do it based on what's currently happening. Feel free to close if you don't want it in upstream.

The files diff will get much clearer when i18n is merged.

Fixes #1586

dependabot bot and others added 26 commits May 12, 2021 11:47
* Update install.sh

Enable CORS by default

* Update install.sh

Moved CORS before OctoDash install.

* Update install.sh

Changed to if statement to verify if it is enabled first, if not, then enable it.

* Update install.sh

Changed to use installer script variables

* Update install.sh

Updated as requested.

* Update install.sh

Added red text color to CORS message.

* Update scripts/install.sh

Co-authored-by: Timon G. <[email protected]>

* Update scripts/install.sh

Co-authored-by: Timon G. <[email protected]>

* Update install.sh

Added color and attempted bold. It turns from red, to pink..

Co-authored-by: Timon G. <[email protected]>
* add typos, replace html logo by svg

* fix css
@pciavald pciavald closed this May 12, 2021
@pciavald pciavald deleted the custom-screensize branch May 12, 2021 09:57
@pciavald pciavald restored the custom-screensize branch May 12, 2021 09:57
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.

Configure window size and position
4 participants