Closed lisandi closed 3 years ago
apologies for closing. do docs help? if not will need to modify uri generation logic
You can easily replace the /p/ with a ./ and it will take the current directory which is always the same no matter if located in a sub path or in a root path.
in ep_aa_file_menu_toolbar/static/js/index.js Line 13
change
$('#newPad').attr('href', `/p/${randomPadName()}`);
to
$('#newPad').attr('href', `./${randomPadName()}`);
problem solved! as a reference for writing code in node.js - docs did not help at all as they pointed actually in the wrong direction. https://flaviocopes.com/node-get-current-folder/
do you want to send a pull request with this change please?
btw nodejs docs wont help because afaik this code is running on the client
When clicking on "New Page" the complete subpath for the new page is missing when the installation proxied to a subfolder.
https://my.domain/pad/
when clicking "New Page" it opens up
https://my.domain/p/1234567 instead correct would be https://my.domain/pad/p/1234567
Even better (in General would be) being able to strip away that "p" when the installation is a proxied subfolder installation. as in that case "pad" already fulfills the function of a unique path segment and "admin" could be excluded (being a name already taken and therefore can't be chosen a second time)
https://my.domain/pad/1234567 would be the result.