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

Add settings menu #5

Open
3 tasks
forgottosave opened this issue Jul 27, 2023 · 0 comments
Open
3 tasks

Add settings menu #5

forgottosave opened this issue Jul 27, 2023 · 0 comments
Assignees
Labels
feature Feature request
Milestone

Comments

@forgottosave
Copy link
Owner

Description

A small settings menu would be nice to have. This settings menu could be inserted directly into the Lichess menu (example on the right).

Implementation would require:

  • create settings tab
  • inserting the settings button into html (possible javascript insertion with webview.loadUrl("javascript:...") and javascript-code below)
    var element = document.getElementById("topnav");
    var lwaSection = '<section><a href="/analysis">Lichess Web App</a><div role="group"><a href="settings:">Settings</a><a href="https://github.com/forgottosave/LichessWebApp/issues">Report Bug</a></div></section>'
    var githubSection = '<section><a href="/analysis">Github</a><div role="group"><a href="https://github.com/lichess-org">Lichess</a><a href="https://github.com/forgottosave/LichessWebApp">Lichess Web App</a></div></section>'
    element.insertAdjacentHTML( 'beforeend', lwaSection );
    element.insertAdjacentHTML( 'beforeend', githubSection );
    
  • connect the button with the settings tab

Alternatives

There are two alternative options:

  1. One could argue, that settings aren't that necessary and maybe not needed for such a simple app.
  2. The Menu Button could be added elsewhere as a sort of overlay and not directly into the html
@forgottosave forgottosave added the feature Feature request label Jul 27, 2023
@forgottosave forgottosave added this to the v1.0.0 milestone Jul 27, 2023
@forgottosave forgottosave self-assigned this Jul 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Feature request
Projects
None yet
Development

No branches or pull requests

1 participant