-
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat!: Implementing OS-specific download buttons (#2581)
<!-- ☝️ PR title should follow conventional commits (https://conventionalcommits.org). In particular, the title should start with one of the following types: - docs: 📖 Documentation (updates to the documentation or readme) - fix: 🐞 Bug fix (a non-breaking change that fixes an issue) - feat: ✨ New feature/enhancement (a non-breaking change that adds functionality or improves existing one) - feat!/fix!:⚠️ Breaking change (fix or feature that would cause existing functionality to change) - chore: 🧹 Chore (updates to the build process or auxiliary tools and libraries) --> ### 🔗 Linked issue <!-- If it resolves an open issue, please link the issue here. For example "Resolves #123" --> Partially fixes #2176 Fixes #2586 ### 📚 Description <!-- Describe your changes in detail --> 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 (both `arm64` and `x86_64`), `.dmg` and `.pkg`. Consequently, changes in the `/download/[[os]]` path was necessary to implement redirection (expansion from just `['win', 'mac', 'linux']` <!-- Why is this change required? What problem does it solve? --> 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 ![image](https://github.com/user-attachments/assets/0ec1638d-8194-4911-956a-0a0e71b3cf4c) #### New Implementation for Windows ![image](https://github.com/user-attachments/assets/e3f83769-c731-429c-b7cd-326b74ccbca2) #### New Implementation for Mac ![image](https://github.com/user-attachments/assets/7750f0d4-56c1-435f-bb93-95f4faf9d66e) #### New Implementation for Linux ![image](https://github.com/user-attachments/assets/709e4ed7-a926-487f-b297-7b6c93436ccd)
- Loading branch information
1 parent
615b870
commit 52834e8
Showing
7 changed files
with
117 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<template> | ||
<n-button | ||
type="primary" | ||
size="large" | ||
style="height: 3.2em" | ||
> | ||
<template #icon> | ||
<n-icon> | ||
<Icon name="material-symbols:download" /> | ||
</n-icon> | ||
</template> | ||
<a | ||
class="text-2xl" | ||
:href | ||
>{{ text }}</a | ||
> | ||
</n-button> | ||
</template> | ||
<script setup lang="ts"> | ||
defineProps({ | ||
text: { | ||
type: String, | ||
default: '', | ||
}, | ||
href: { | ||
type: String, | ||
default: '', | ||
}, | ||
}) | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters