Skip to content

Commit

Permalink
Merge pull request #5 from Ulauncher/fedora-repo
Browse files Browse the repository at this point in the history
Changed links for Fedora
  • Loading branch information
gornostal authored Aug 19, 2021
2 parents dc26ac1 + e055184 commit c0a6eb0
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 17 deletions.
6 changes: 3 additions & 3 deletions _includes/google-analytics.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@
$('#release-deb').click(function(){
sendReleaseDownloadEvent('Debian');
});
$('#release-fedora').click(function(){
sendReleaseDownloadEvent('Fedora');
});
$('#release-suse').click(function(){
sendReleaseDownloadEvent('OpenSUSE');
});
Expand All @@ -20,6 +17,9 @@
$('.event-aur').click(function(){
sendReleaseDownloadEvent('Arch Linux');
});
$('.event-fedora').click(function(){
sendReleaseDownloadEvent('Fedora');
});

function sendReleaseDownloadEvent(label) {
if (localStorage.getItem('downloaded-previously')) {
Expand Down
8 changes: 6 additions & 2 deletions _includes/index/releases.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,14 @@
</li>
<li class="distro-icon distro-fedora">
<p>
<b class="distro-name">Fedora</b> <span id="release-fedora"><i>loading link...</i></span>
<b class="distro-name">Fedora</b> Available for all current Fedora Linux Releases: <br />
<a class="event-fedora" id="release-fedora" href="#">#</a>
</p>

<code>sudo dnf install packagename.rpm</code>
<div style="display: none" id="fedora-dev-repo">
<code>sudo dnf copr enable troycurtisjr/ulauncher</code>
</div>
<code class="event-fedora">sudo dnf install ulauncher</code>
</li>
<li class="distro-icon distro-opensuse">
<p>
Expand Down
22 changes: 10 additions & 12 deletions assets/js/releases.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,14 @@ jQuery(function($) {
.attr('href', aurLink)
.text(aurLink);

var fedoraLink = selectStable ? 'https://src.fedoraproject.org/rpms/ulauncher/' :
'https://copr.fedorainfracloud.org/coprs/troycurtisjr/ulauncher/';
$('#release-fedora')
.attr('href', fedoraLink)
.text(fedoraLink);

$('#fedora-dev-repo').toggle(!selectStable);

var aurShell = selectStable ? 'git clone https://aur.archlinux.org/ulauncher.git && cd ulauncher && makepkg -is' :
'git clone https://aur.archlinux.org/ulauncher-git.git && cd ulauncher-git && makepkg -is';
$('#aur-shell').html(aurShell);
Expand Down Expand Up @@ -75,12 +83,6 @@ jQuery(function($) {
function renderReleaseLinks (r) {
var dlIcon = '<i class="fas fa-download"></i> ';
$('#release-deb').html('<a href="' + r.assets.deb.url + '">' + dlIcon + r.assets.deb.name + '</a>');
if (r.assets.fedora33) {
$('#release-fedora').html(`<a class="asset-link" href="${r.assets.fedora.url}">${dlIcon}${r.assets.fedora.name}</a>
<a class="asset-link" href="${r.assets.fedora33.url}">${dlIcon}${r.assets.fedora33.name}</a>`);
} else {
$('#release-fedora').html('<a href="' + r.assets.fedora.url + '">' + dlIcon + r.assets.fedora.name + '</a>');
}
if (r.assets.suse) {
$('.distro-icon.distro-opensuse').show();
$('#release-suse').html('<a href="' + r.assets.suse.url + '">' + dlIcon + r.assets.suse.name + '</a>');
Expand Down Expand Up @@ -113,14 +115,10 @@ jQuery(function($) {
}

function getAssets(release) {
var suse = getAssetLink(release.assets, 'suse.rpm');
var centos = getAssetLink(release.assets, 'centos7.rpm');
var fedora = getAssetLink(release.assets, 'fedora.rpm');
var fedora33 = getAssetLink(release.assets, 'fedora33.rpm');
var deb = getAssetLink(release.assets, '.deb');

if ((fedora || fedora33) && deb) {
return { suse, centos, fedora, fedora33, deb };
if (deb) {
return { deb };
}
}

Expand Down

0 comments on commit c0a6eb0

Please sign in to comment.