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

Customization using CSS (or modification to the pug files) #314

Open
adit-s opened this issue Aug 2, 2024 · 3 comments
Open

Customization using CSS (or modification to the pug files) #314

adit-s opened this issue Aug 2, 2024 · 3 comments

Comments

@adit-s
Copy link

adit-s commented Aug 2, 2024

Hello. I was looking for a tool to allow others to upload files for me and psitransfer is really good! Thanks for writing and maintaining it.

I'd like to hide the Settings box on the upload page so the default settings are applied and users don't have the option to change the Retention period or Password setting when they visit the site.
I went through the open and closed issues and understand the concepts of customizing the css, but I can't figure out how to do it with the Settings box on the upload page.
I was trying to find a unique div ID (for the Settings block) to apply the custom css rule with display:none applied, but I can't find it or figure out how to do it.

I generally understand HTML and CSS but am not a web developer and have never used PUG before.
I'd appreciate it if someone could give me a hand and layout the steps to hide the Settings block on the upload page.
It looks like CSS is the recommended or cleaner option, but I'm open to using PUG if that is the preferred approach.

Thanks in advance.
Adit S

@jcormier
Copy link

jcormier commented Aug 2, 2024

Not the dev but I would try to clear the contents of https://github.com/psi-4ward/psitransfer/blob/5491b501f855edd3fec2a8e9beb9861512013303/app/src/Upload/Settings.vue or perhaps everything inside its tag and see what happens.

@adit-s
Copy link
Author

adit-s commented Aug 2, 2024

Thanks for the suggestion. I'm running it in a Docker container and not sure where the corresponding app/src/Upload/Settings.vue is located. I can shell into the container (docker exec -it psitransfer /bin/sh), but can't find the app/src/Upload/Settings.vue file. Any suggestions?

In the container, there is:

/app/public/pug $ ls
admin.pug        download.pug     error.pug        partials         upload.pug

Reading through the hub.docker.com page, is it possible the modification needs to be made to the /app/public/pug/upload.pug file? If so, how would one do that?

@Maytrok
Copy link

Maytrok commented Sep 28, 2024

i found no simple way to archieve this in a docker container, since no markupfiles ".vue" are present in the prebuild container. One simple way is to predefine only one retention time. If you do this, all users can only "choose" that one option.

Your can do this simply with an enviroment variable. Simply add this to the docker run command
-e PSITRANSFER_RETENTIONS='{"604800": "1 Week"}'

Note: 1 Week is the default time

an alternative is to build your own custom container or image. You can simply change or remove the file like @jcormier mentioned. if you are familiar with docker and html that should be not problem

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

No branches or pull requests

3 participants