-
-
Notifications
You must be signed in to change notification settings - Fork 12
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
feat!: Implementing OS-specific download buttons #2581
base: main
Are you sure you want to change the base?
feat!: Implementing OS-specific download buttons #2581
Conversation
Sorry for the delay, looks good from my side!° |
@tobiasdiez What is the status here? This PR seems to be a good preparation for a download-button for JabRef 6.0-alpha. |
@plvzfq-rit I couldn't test. Can one download a macOS version on Windows? I didn't see an overview page on the screenshots. |
pages/download/[[os]].vue
Outdated
@@ -22,15 +22,21 @@ definePageMeta({ | |||
middleware: async (to) => { | |||
let downloadUrl = 'https://www.fosshub.com/JabRef.html' | |||
const os = to.params.os as string | undefined | |||
if (os && ['win', 'mac', 'linux'].includes(os)) { | |||
if (os && ['win_msi', 'win_zip', 'mac_arm64_dmg', 'mac_arm64_pkg', 'mac_x86_64_dmg', 'mac_x86_64_pkg', 'linux_deb', 'linux_rpm', 'linux_tar_gz'].includes(os)) { | |||
const { data } = await useFetch('/api/getLatestRelease') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are in the process of phasing out fosshub, can you change it to github release?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll see what I could do+
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @Siedlerchr, just finished migrating the links from Fosshub to GitHub Release. There have been troubles on my end though with the useFetch
function for some reason that I'm not sure of; this hinders me from fully checking if the implementation's good or not. Using it at the moment in my branch yields an undefined value. I checked the response attained by the function and it said that I had bad credentials. Investigating further led me to see that I do not have a GITHUB_REPO_TOKEN
attribute in my .env file. Should I perhaps put a personal GitHub token in the .env file for testing purposes?
For now though, I'll try to work on the overview page. Much thanks!
@koppor, unfortunately, as far as I have implemented it, there would not be a way for a Windows user to download a macOS package, aside from downloading it directly from the fosshub page upon redirect (will be changing it to the GitHub in the coming days). I was planning on adding that functionality more explicitly in a later pull request (creating an overview page / a page listing download links for the latest version of each OS/architecture), as I had discussed with @tobiasdiez . Should I perhaps include it within this pull request or continue to have it be in a different one? |
…ithub.com/plvzfq-rit/JabRefOnline into implementing-os-specific-download-buttons
Just found a bug which affected the href's in the buttons. Should be fixed now though. Apologies for the inconvenience;;; |
🔗 Linked issue
Partially fixes #2176
📚 Description
This pull request changes the download interface of the website. To detail, the old
Download JabRef
button is now changes based on the OS of the system (e.g.,Windows
,Mac
,Linux
). Windows should have buttons for.msi
and.zip
. For Linux,.deb
,.rpm
, and.tar.gz
. For Mac (botharm64
andx86_64
),.dmg
and.pkg
. Consequently, changes in the/download/[[os]]
path was necessary to implement redirection (expansion from just['win', 'mac', 'linux']
This pull request solves a user problem in which the web site automatically downloads a file which might not be apt for their package manager and or system architecture.
Original Implementation for Windows
New Implementation for Windows
New Implementation for Mac
New Implementation for Linux