LADXR icon indicating copy to clipboard operation
LADXR copied to clipboard

Website: Add option to lock settings in permalink

Open threeandthreee opened this issue 2 years ago • 5 comments
trafficstars

When people send around race seeds it can be a little confusing that it's fully editable. Ideally, people should be editing aesthetic options as they like and leaving the other options alone.

When reading the short string, if the race flag is on and a seed is provided, this disables the input/select element for any option not marked aesthetic. In addition, any category that only has disabled options is given an indicator and sent to the bottom for better clarity.

The options are infinite for how to indicate to the user which options should be left alone, I figured I'd just take a shot at one. If you'd like to see it done a different way I'm happy to play around with it however you like. I figured I'd try to take some work off your plate instead of just making a request. I really appreciate the work so far :)

Screenshot 2023-09-28 at 14-59-12 Screenshot

threeandthreee avatar Sep 28 '23 19:09 threeandthreee

I understand the concept, but I'm not sure if the "race check" is the right way to distinguish. Maybe there should just be a slightly different link you can share for "locked" seeds to share.

daid avatar Sep 29 '23 19:09 daid

Something like this?

image

Where it would add a 'locked' parameter to the short string.

If so:

  1. What key? These are in use: <ABCDEFGHILMOPQRSTVWXZabcfghjlmopqrstuw. 'K' for LOCK?
  2. Do we ever have it default to on?
  3. The lock is just a guidance since a knowledgeable user can just pull the parameter out of the short string. Should the locked page have a button to unlock?

threeandthreee avatar Sep 29 '23 20:09 threeandthreee

Could also pass it by query string if you wanted to keep short string to things that affect the rom generation.

threeandthreee avatar Sep 29 '23 20:09 threeandthreee

yeah, something like https://ladxr.daid.eu/latest/?locked#hsHITWRl would be nicer. The short string in the hash should be things that effect generation, not the page.

daid avatar Oct 02 '23 13:10 daid

This should do it? I wasn't able to test end to end though. Before, I just adjusted worker.js to pull from http://ladxr.daid.eu/latest/ladxr.tar.gz but that isn't working anymore, I'm guessing from the changes for the monthly? This is what I get:

Traceback (most recent call last):
  File "/home/pyodide/main.py", line 171, in main
    args = parser.parse_args(mainargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/lib/python311.zip/argparse.py", line 1865, in parse_args
    self.error(msg % ' '.join(argv))
  File "/lib/python311.zip/argparse.py", line 2621, in error
    self.exit(2, _('%(prog)s: error: %(message)s\n') % args)
  File "/lib/python311.zip/argparse.py", line 2608, in exit
    _sys.exit(status)
SystemExit: 2

and in the browser console: : error: unrecognized arguments: --short hsHTWRl pyodide.asm.js:9:119756

Anyways, I was able to test that ?locked works, and I was able to test that the checkbox toggles the locking of the share string, but I had to skip over seed generation.

threeandthreee avatar Oct 07 '23 11:10 threeandthreee