Skip to content

feat: custom sharePath setting #1781

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

Draft
wants to merge 31 commits into
base: develop
Choose a base branch
from
Draft

feat: custom sharePath setting #1781

wants to merge 31 commits into from

Conversation

pano9000
Copy link
Member

@pano9000 pano9000 commented Apr 25, 2025

Hi all,

this is a continuation/rework of @maphew's PR #1288
thanks for his initial work!

I did remove anything "cleanUrl" related from this PR for now, to make first feature work
We can look into working on adding the "cleanUrl" approach again, after this PR, as

Feel free to test — note: in order for the path change to take effect, you need to restart the server, not only the frontend.
This is something that can potentially be improved in the future.

also note: this is still in draft due to:

  • I did some basic manual testing locally and it was working, but I did not extensively do tests, e.g. for weird edge cases (other than e.g. using paths like "/" or "/path/with/multple/").
  • I am aware of the current repo restructuring, so I am happy to leave this one unmerged until the new repo structure is here
  • latest changes in develop have not been merged yet due to that either
  • some refactoring might still be needed

so the PR is only here so that people can already test this, if they want to. Ideally -> don't merge yet :-)
please note: I will be OOO till May 5th, so don't expect any answers to any questions before then :-)

maphew and others added 30 commits February 25, 2025 14:51
1st time using Meld. I'm not sure if the conflict resolve is clean
commented out for now, to make sure we get back to it – not sure if it was suppossed to have any special other reason to exist
caused by having other several save operation inside the save() method (which doesn't even make sense to begin with, as far as I can tell)

moving it to inside the "change" event handler allows us to set and store a custom share path again
there's no need to execute PUT requests for *all* Share Settings, when any option changes

moved the code to inside the "change" event handlers
…rectBareDomain change

→ that is what the shareRootCheck button is there for
* add rudimental error handling
* add handling of special case, where one has multiple shared notes with a #shareRoot label
* refactor styling into auxiliary setCheckShareRootStyle function
* add normalization helper to ensure string does not start with multiple trailing slashes or ends with a trailing slash
* fall back to default "/share" when empty string is entered
it currently fails trying to import the class though
a "manual" importing of the function did pass all checks though

-> will need to investigate why importing the class does not work like that
that should be part of a later PR
normalization is happening in the share settings options widget in the meantime, making it more obvious to the user
that should be part of a later PR
needs to currently mention, that a server restart is required
…working

this will be handled by cleanUrl PR later on
that should be part of a later PR
Copy link

Folder/File Previous size New size Difference
/upload/TriliumNextNotes-Server-1781-merge-linux-x64.tar.xz 85.28MB +85.28MB (+100.00%)
TOTAL +85.28MB

Copy link

Folder/File Previous size New size Difference
/upload/TriliumNextNotes-1781-merge-linux-x64.deb 137.97MB +137.97MB (+100.00%)
/upload/TriliumNextNotes-1781-merge-linux-x64.flatpak 131.01MB +131.01MB (+100.00%)
/upload/TriliumNextNotes-1781-merge-linux-x64.rpm 145.94MB +145.94MB (+100.00%)
/upload/TriliumNextNotes-1781-merge-linux-x64.zip 176.86MB +176.86MB (+100.00%)
TOTAL +591.79MB

@pano9000
Copy link
Member Author

pano9000 commented May 8, 2025

update: I will hopefully be able to spend some time this weekend to fix merge conflicts and do some final testing here

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.

3 participants