From ca39ab3c41b211b2d714b499dee4b4f927e21a35 Mon Sep 17 00:00:00 2001 From: plvzfq-rit Date: Tue, 12 Nov 2024 21:31:23 +0800 Subject: [PATCH 01/18] chore: add .idea folder to .gitignore --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 97be2857d..67add13a5 100644 --- a/.gitignore +++ b/.gitignore @@ -143,6 +143,9 @@ storybook-static/ # End of https://www.toptal.com/developers/gitignore/api/vscode,nuxtjs,node +# webstorm +.idea/* + # Automatically generated files apollo/gql.ts apollo/graphql.ts From e83fe3b52902a5a69c370c1aa19cbd9ec3e3bd4d Mon Sep 17 00:00:00 2001 From: plvzfq-rit Date: Tue, 12 Nov 2024 21:42:23 +0800 Subject: [PATCH 02/18] feat: change link of masthead button to go to download section --- pages/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/index.vue b/pages/index.vue index 751c64160..19606b06f 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -77,7 +77,7 @@ Download JabRef From 920801c6e4db05e3be5af8990629fe485f90ccf6 Mon Sep 17 00:00:00 2001 From: plvzfq-rit Date: Tue, 12 Nov 2024 21:43:30 +0800 Subject: [PATCH 03/18] feat: add slash to link of masthead button --- pages/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/index.vue b/pages/index.vue index 19606b06f..642a5276f 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -77,7 +77,7 @@ Download JabRef From 5bba7995d248f7d98ed329f50f62d67f7210a1fb Mon Sep 17 00:00:00 2001 From: plvzfq-rit Date: Tue, 12 Nov 2024 22:04:22 +0800 Subject: [PATCH 04/18] feat!: add other packages to [[os]].vue --- composables/downloads.ts | 6 +++--- pages/download/[[os]].vue | 14 ++++++++++---- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/composables/downloads.ts b/composables/downloads.ts index af281a1f9..692e4a946 100644 --- a/composables/downloads.ts +++ b/composables/downloads.ts @@ -4,9 +4,9 @@ export function constructDownloadUrl(): string { if (os) { osSuffix = { - windows: 'win', - mac: 'mac', - linux: 'linux', + windows: 'win_msi', + mac: 'mac_arm64_dmg', + linux: 'linux_deb', }[os] || '' } return `/download/${osSuffix}` diff --git a/pages/download/[[os]].vue b/pages/download/[[os]].vue index 91abf387b..09b887602 100644 --- a/pages/download/[[os]].vue +++ b/pages/download/[[os]].vue @@ -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') const latestRelease = data.value?.version if (latestRelease) { downloadUrl += { - win: `?dwl=JabRef-${latestRelease}.msi`, - mac: `?dwl=JabRef-${latestRelease}.pkg`, - linux: `?dwl=jabref_${latestRelease}_amd64.deb`, + win_msi: `?dwl=JabRef-${latestRelease}.msi`, + win_zip: `?dwl=JabRef-${latestRelease}-portable_windows.zip`, + mac_arm64_dmg: `?dwl=JabRef-${latestRelease}-arm64.dmg`, + mac_arm64_pkg: `?dwl=JabRef-${latestRelease}-arm64.pkg`, + mac_x86_64_dmg: `?dwl=JabRef-${latestRelease}.dmg`, + mac_x86_64_pkg: `?dwl=JabRef-${latestRelease}.pkg`, + linux_deb: `?dwl=jabref_${latestRelease}_amd64.deb`, + linux_rpm: `?dwl=jabref_${latestRelease}.x86_64.rpm`, + linux_tar_gz: `?dwl=JabRef-${latestRelease}-portable_linux.tar.gz`, }[os] ?? '' } } From dc4b088fa4d78597bd3fb064b3ed169aae809301 Mon Sep 17 00:00:00 2001 From: plvzfq-rit Date: Tue, 12 Nov 2024 22:19:53 +0800 Subject: [PATCH 05/18] feat: add Windows buttons --- components/LandingPageDownload.client.vue | 37 ++++++++++++++++------- 1 file changed, 26 insertions(+), 11 deletions(-) diff --git a/components/LandingPageDownload.client.vue b/components/LandingPageDownload.client.vue index 6482c898d..a292bb812 100644 --- a/components/LandingPageDownload.client.vue +++ b/components/LandingPageDownload.client.vue @@ -10,17 +10,32 @@ JabRef is free and works across all your devices.
- - Download JabRef - + + + + Download .msi + + + Download .zip + + +
From 15f2540c9bc94ba42f7c4611901a9a0eeef501e9 Mon Sep 17 00:00:00 2001 From: plvzfq-rit Date: Tue, 12 Nov 2024 22:21:34 +0800 Subject: [PATCH 06/18] feat: add Linux specific buttons --- components/LandingPageDownload.client.vue | 37 +++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/components/LandingPageDownload.client.vue b/components/LandingPageDownload.client.vue index a292bb812..38a0bc128 100644 --- a/components/LandingPageDownload.client.vue +++ b/components/LandingPageDownload.client.vue @@ -36,6 +36,43 @@ + + + + Download .deb + + + Download .rpm + + + Download .tar.gz + + +
From 66d774a67dac4e847bfff3d3960da93858153ac9 Mon Sep 17 00:00:00 2001 From: plvzfq-rit Date: Tue, 12 Nov 2024 22:26:24 +0800 Subject: [PATCH 07/18] feat: add Mac-specific buttons --- components/LandingPageDownload.client.vue | 48 +++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/components/LandingPageDownload.client.vue b/components/LandingPageDownload.client.vue index 38a0bc128..29d433e77 100644 --- a/components/LandingPageDownload.client.vue +++ b/components/LandingPageDownload.client.vue @@ -73,6 +73,54 @@ + + + + Download for arm64 dmg + + + Download for arm64 pkg + + + Download for x86_64 dmg + + + Download for x86_64 pkg + + +
From bd7151a5c912001063cc296e920ea92cd48ba7a0 Mon Sep 17 00:00:00 2001 From: plvzfq-rit Date: Tue, 12 Nov 2024 23:02:23 +0800 Subject: [PATCH 08/18] feat: upgrade Windows button group to n-flex from n-grid --- components/LandingPageDownload.client.vue | 40 +++++++++++++---------- 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/components/LandingPageDownload.client.vue b/components/LandingPageDownload.client.vue index 29d433e77..51af6f9c4 100644 --- a/components/LandingPageDownload.client.vue +++ b/components/LandingPageDownload.client.vue @@ -10,32 +10,36 @@ JabRef is free and works across all your devices.
- - - + + - Download .msi - + + .msi + - Download .zip - - + .zip + + + Date: Tue, 12 Nov 2024 23:13:02 +0800 Subject: [PATCH 09/18] feat: add button icons to Windows buttons --- components/LandingPageDownload.client.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/components/LandingPageDownload.client.vue b/components/LandingPageDownload.client.vue index 51af6f9c4..a2d2b781e 100644 --- a/components/LandingPageDownload.client.vue +++ b/components/LandingPageDownload.client.vue @@ -18,7 +18,7 @@ style="height: 3.2em" > + Date: Tue, 12 Nov 2024 23:14:27 +0800 Subject: [PATCH 10/18] feat: have Linux button group use n-flow --- components/LandingPageDownload.client.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/LandingPageDownload.client.vue b/components/LandingPageDownload.client.vue index a2d2b781e..cf421ef8c 100644 --- a/components/LandingPageDownload.client.vue +++ b/components/LandingPageDownload.client.vue @@ -44,7 +44,7 @@ - + Download .tar.gz - + From ac0c12a6a5b29b6ad86123f7ea0375bc56ff22f9 Mon Sep 17 00:00:00 2001 From: plvzfq-rit Date: Tue, 12 Nov 2024 23:17:27 +0800 Subject: [PATCH 11/18] feat: update Linux button group to have same style as Windows button group --- components/LandingPageDownload.client.vue | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/components/LandingPageDownload.client.vue b/components/LandingPageDownload.client.vue index cf421ef8c..bce2793e0 100644 --- a/components/LandingPageDownload.client.vue +++ b/components/LandingPageDownload.client.vue @@ -46,36 +46,45 @@ + Download .deb.deb + Download .rpm.rpm + Download .tar.gz.tar.gz From 327e74eb39eeb5d08e5382f694763781b8c97f93 Mon Sep 17 00:00:00 2001 From: plvzfq-rit Date: Tue, 12 Nov 2024 23:18:09 +0800 Subject: [PATCH 12/18] feat: remove unnecessary class to span of Windows button group --- components/LandingPageDownload.client.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/LandingPageDownload.client.vue b/components/LandingPageDownload.client.vue index bce2793e0..6247674be 100644 --- a/components/LandingPageDownload.client.vue +++ b/components/LandingPageDownload.client.vue @@ -10,7 +10,7 @@ JabRef is free and works across all your devices.
- + Date: Tue, 12 Nov 2024 23:19:51 +0800 Subject: [PATCH 13/18] feat: update Mac buttons to have same style as Windows buttons --- components/LandingPageDownload.client.vue | 24 +++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/components/LandingPageDownload.client.vue b/components/LandingPageDownload.client.vue index 6247674be..48f370f03 100644 --- a/components/LandingPageDownload.client.vue +++ b/components/LandingPageDownload.client.vue @@ -90,16 +90,19 @@ - + + Download for arm64 dmgarm64 dmg + Download for arm64 pkgarm64 pkg + Download for x86_64 dmgx86_64 dmg + Download for x86_64 pkgx86_64 pkg - +
From b9832963928b6c482227adbae4b3cb4c643cf103 Mon Sep 17 00:00:00 2001 From: plvzfq-rit Date: Tue, 12 Nov 2024 23:26:15 +0800 Subject: [PATCH 14/18] fix: update colors of Mac buttons from default to primary --- components/LandingPageDownload.client.vue | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/components/LandingPageDownload.client.vue b/components/LandingPageDownload.client.vue index 48f370f03..242786a6f 100644 --- a/components/LandingPageDownload.client.vue +++ b/components/LandingPageDownload.client.vue @@ -43,7 +43,7 @@
- + @@ -106,7 +106,7 @@ > @@ -120,7 +120,7 @@ > @@ -134,7 +134,7 @@ > From 52185002aca7494fa21024d321d69e8307ef825a Mon Sep 17 00:00:00 2001 From: plvzfq-rit Date: Tue, 12 Nov 2024 23:28:01 +0800 Subject: [PATCH 15/18] fix: add periods to Mac button extensions --- components/LandingPageDownload.client.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/components/LandingPageDownload.client.vue b/components/LandingPageDownload.client.vue index 242786a6f..988abe6d6 100644 --- a/components/LandingPageDownload.client.vue +++ b/components/LandingPageDownload.client.vue @@ -102,7 +102,7 @@ arm64 dmgarm64 .dmg arm64 pkgarm64 .pkg x86_64 dmgx86_64 .dmg x86_64 pkgx86_64 .pkg From 4e41c338f59221769161059c650ed9b1128d48f7 Mon Sep 17 00:00:00 2001 From: plvzfq-rit Date: Tue, 12 Nov 2024 23:30:24 +0800 Subject: [PATCH 16/18] fix: add parentheses to isLinux function call --- components/LandingPageDownload.client.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/LandingPageDownload.client.vue b/components/LandingPageDownload.client.vue index 988abe6d6..d592fef97 100644 --- a/components/LandingPageDownload.client.vue +++ b/components/LandingPageDownload.client.vue @@ -43,7 +43,7 @@ - + Date: Tue, 12 Nov 2024 23:40:58 +0800 Subject: [PATCH 17/18] feat: create DownloadButton vue file --- components/DownloadButton.vue | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 components/DownloadButton.vue diff --git a/components/DownloadButton.vue b/components/DownloadButton.vue new file mode 100644 index 000000000..b5c533364 --- /dev/null +++ b/components/DownloadButton.vue @@ -0,0 +1,28 @@ + + From d38743016c04d5647af4c9245196ab7e71e8671e Mon Sep 17 00:00:00 2001 From: plvzfq-rit Date: Tue, 12 Nov 2024 23:49:06 +0800 Subject: [PATCH 18/18] refactor: use DownloadButton in LandingPageDownload --- components/LandingPageDownload.client.vue | 135 ++-------------------- 1 file changed, 9 insertions(+), 126 deletions(-) diff --git a/components/LandingPageDownload.client.vue b/components/LandingPageDownload.client.vue index d592fef97..b12826e5d 100644 --- a/components/LandingPageDownload.client.vue +++ b/components/LandingPageDownload.client.vue @@ -12,141 +12,24 @@
- - - .msi - - - - .zip - + + - - - .deb - - - - .rpm - - - - .tar.gz - + + + - - - arm64 .dmg - - - - arm64 .pkg - - - - x86_64 .dmg - - - - x86_64 .pkg - + + + +