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

cmd/tclipd: handle untitled pastes better #37

Merged
merged 1 commit into from Sep 20, 2023
Merged

Conversation

Xe
Copy link
Member

@Xe Xe commented Sep 20, 2023

Previously when you submitted a paste without a filename, it would create an unclickable link. This no longer happens.

Fixes #29

Fixes #29

Signed-off-by: Xe Iaso <xe@tailscale.com>
@Xe Xe self-assigned this Sep 20, 2023
@icio
Copy link

icio commented Sep 20, 2023

LGTM. You could also fix the links for already-created pastes by adding some fallback text for {{.Filename}} to the template:

<li><a class="font-semibold underline text-gray-900 hover:text-gray-500" href="/paste/{{.ID}}">{{.Filename}}</a> - {{.CreatedAt}} - {{.PasterDisplayName}}</li>

@Xe
Copy link
Member Author

Xe commented Sep 20, 2023

LGTM. You could also fix the links for already-created pastes by adding some fallback text for {{.Filename}} to the template:

<li><a class="font-semibold underline text-gray-900 hover:text-gray-500" href="/paste/{{.ID}}">{{.Filename}}</a> - {{.CreatedAt}} - {{.PasterDisplayName}}</li>

This is fixed at the layer above template rendering.

@Xe Xe merged commit 692e7ac into main Sep 20, 2023
1 check passed
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.

clip without filename
3 participants