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

Add download attribute to download links #407

Merged
merged 1 commit into from
Jun 2, 2023
Merged

Add download attribute to download links #407

merged 1 commit into from
Jun 2, 2023

Conversation

kaikreuzer
Copy link
Member

@kaikreuzer kaikreuzer commented May 25, 2023

Reference #405

</div>
</div>
<div v-if="selectedVersion === 'snapshot'">
<div class="download-button-container">
<a class="download-button" style="margin-bottom: 0" :href="`https://ci.openhab.org/job/openHAB-Distribution/lastSuccessfulBuild/artifact/distributions/openhab-addons/target/openhab-addons-4.0.0-SNAPSHOT.kar`">Download openHAB {{$page.frontmatter.currentSnapshotVersion}} Add-ons</a>
<a class="download-button" style="margin-bottom: 0" :href="`https://ci.openhab.org/job/openHAB-Distribution/lastSuccessfulBuild/artifact/distributions/openhab-addons/target/openhab-addons-4.0.0-SNAPSHOT.kar`" download>Download openHAB {{$page.frontmatter.currentSnapshotVersion}} Add-ons</a>
Copy link

@spacemanspiff2007 spacemanspiff2007 May 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

download="openhab-addons.kar">

That value should then be used as a suggestion for the browser. See attribute at the very bottom

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would make it loose the version number in the name. The filename attribute is optional.
Can you confirm that the current version still does not work for you?

Copy link

@spacemanspiff2007 spacemanspiff2007 May 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't mind if you add the version number again, but I think the attribute needs to be filled so download has any effect at all.
In #405 I posted a screenshot which shows the issue is still there

Maybe like this?

download="openhab-addons-4.0.0-SNAPSHOT.kar">

</div>
</div>
<div v-if="selectedVersion === 'snapshot'">
<div class="download-button-container">
<a class="download-button" style="margin-bottom: 0" :href="`https://ci.openhab.org/job/openHAB-Distribution/lastSuccessfulBuild/artifact/distributions/openhab-addons/target/openhab-addons-4.0.0-SNAPSHOT.kar`">Download openHAB {{$page.frontmatter.currentSnapshotVersion}} Add-ons</a>
<a class="download-button" style="margin-bottom: 0" :href="`https://ci.openhab.org/job/openHAB-Distribution/lastSuccessfulBuild/artifact/distributions/openhab-addons/target/openhab-addons-4.0.0-SNAPSHOT.kar`" download>Download openHAB {{$page.frontmatter.currentSnapshotVersion}} Add-ons</a>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<a class="download-button" style="margin-bottom: 0" :href="`https://ci.openhab.org/job/openHAB-Distribution/lastSuccessfulBuild/artifact/distributions/openhab-addons/target/openhab-addons-4.0.0-SNAPSHOT.kar`" download>Download openHAB {{$page.frontmatter.currentSnapshotVersion}} Add-ons</a>
<a class="download-button" style="margin-bottom: 0" :href="`https://ci.openhab.org/job/openHAB-Distribution/lastSuccessfulBuild/artifact/distributions/openhab-addons/target/openhab-addons-4.0.0-SNAPSHOT.kar`" download="openhab-addons-{{$page.frontmatter.currentSnapshotVersion}}.kar">Download openHAB {{$page.frontmatter.currentSnapshotVersion}} Add-ons</a>

We could add the version dynamically too, so attribute would be used completely and the version still would be included.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That works for the snapshot link, but the stable/milestone links are inserted dynamically - this would a bit more scripting to get it right...

Copy link
Contributor

@Confectrician Confectrician Jun 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then we should directly add additional methods for the different download file names right away.

Please leave the naming part out for now and merge it without the optional filename in the attribute..
I will take care of setting up proper names and assign me to the issue.

@kaikreuzer kaikreuzer merged commit 978af5a into main Jun 2, 2023
@kaikreuzer kaikreuzer deleted the dllink branch June 2, 2023 11:18
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