diff --git a/api/models/Asset.js b/api/models/Asset.js index 1024551c6..7dd4cad1c 100644 --- a/api/models/Asset.js +++ b/api/models/Asset.js @@ -24,7 +24,7 @@ module.exports = { platform: { type: 'string', - isIn: ['linux_32', 'linux_64', 'osx_64', 'osx_arm64', 'windows_32', 'windows_64'], + isIn: ['linux_32', 'linux_64', 'linux_arm64', 'osx_64', 'osx_arm64', 'windows_32', 'windows_64', 'windows_arm64'], required: true }, diff --git a/api/services/PlatformService.js b/api/services/PlatformService.js index 0f7689f81..021b5b3e2 100644 --- a/api/services/PlatformService.js +++ b/api/services/PlatformService.js @@ -9,6 +9,7 @@ var PlatformService = { LINUX: 'linux', LINUX_32: 'linux_32', LINUX_64: 'linux_64', + LINUX_ARM64: 'linux_arm64', OSX: 'osx', OSX_32: 'osx_32', OSX_64: 'osx_64', @@ -16,6 +17,7 @@ var PlatformService = { WINDOWS: 'windows', WINDOWS_32: 'windows_32', WINDOWS_64: 'windows_64', + WINDOWS_ARM64: 'windows_arm64', }; /** @@ -37,9 +39,9 @@ PlatformService.detectFromRequest = function(req) { var source = req.headers['user-agent']; var ua = useragent.parse(source); - if (ua.isWindows) return [this.WINDOWS_32, this.WINDOWS_64]; + if (ua.isWindows) return [this.WINDOWS_32, this.WINDOWS_64, this.WINDOWS_ARM64]; if (ua.isMac) return [this.OSX_64, this.OSX_ARM64]; // this.OSX_ARM64 until a bug with arm64 useragent is fixed - if (ua.isLinux64) return [this.LINUX_64, this.LINUX_32]; + if (ua.isLinux64) return [this.LINUX_64, this.LINUX_32, this.LINUX_ARM64]; if (ua.isLinux) return [this.LINUX_32]; }; diff --git a/assets/js/admin/add-version-asset-modal/add-version-asset-modal.pug b/assets/js/admin/add-version-asset-modal/add-version-asset-modal.pug index 87c19bd69..cf55806da 100644 --- a/assets/js/admin/add-version-asset-modal/add-version-asset-modal.pug +++ b/assets/js/admin/add-version-asset-modal/add-version-asset-modal.pug @@ -32,7 +32,7 @@ form(name='assetForm', role='form') ngf-change='updateAssetName()', ng-model='asset.file', name='file', - ngf-accept="'.dmg,.zip,.deb,.exe,.nupkg,.blockmap'", + ngf-accept="'.dmg,.zip,.deb,.exe,.nupkg,.blockmap,.AppImage'", ngf-max-size='500MB', required='', ) @@ -51,4 +51,4 @@ form(name='assetForm', role='form') button.btn.btn-danger(type='button', ng-click='closeModal()') Cancel - + diff --git a/assets/js/core/data/data-service.js b/assets/js/core/data/data-service.js index 79d18e53f..12e0f243b 100644 --- a/assets/js/core/data/data-service.js +++ b/assets/js/core/data/data-service.js @@ -26,19 +26,23 @@ angular.module('app.core.data.service', [ self.availablePlatforms = { windows_64: 'Windows 64 bit', windows_32: 'Windows 32 bit', + windows_arm64: 'Windows 64 bit ARM', osx_64: 'OS X 64 bit Intel', osx_arm64: 'OS X 64 bit ARM', linux_64: 'Linux 64 bit', - linux_32: 'Linux 32 bit' + linux_32: 'Linux 32 bit', + linux_arm64: 'Linux 64 bit ARM' }; self.filetypes = { windows_64: ['.exe', '.msi'], windows_32: ['.exe', '.msi'], + windows_arm64: ['.exe', '.msi'], osx_64: ['.dmg', '.pkg', '.mas'], osx_arm64: ['.dmg', '.pkg', '.mas'], linux_64: ['.deb', '.gz', '.rpm', '.AppImage'], - linux_32: ['.deb', '.gz', '.rpm', '.AppImage'] + linux_32: ['.deb', '.gz', '.rpm', '.AppImage'], + linux_arm64: ['.deb', '.gz', '.rpm', '.AppImage'] }; /** diff --git a/assets/js/download/download-controller.js b/assets/js/download/download-controller.js index 016faa14d..23248e10c 100644 --- a/assets/js/download/download-controller.js +++ b/assets/js/download/download-controller.js @@ -21,7 +21,7 @@ angular.module('app.releases', []) self.platform = 'osx'; self.archs = ['64', 'arm64']; } else { - self.archs = ['32', '64']; + self.archs = ['32', '64', 'arm64']; } self.setRouteParams = (channel, flavor) => { diff --git a/assets/js/download/download.pug b/assets/js/download/download.pug index 141570550..6a4d64c59 100644 --- a/assets/js/download/download.pug +++ b/assets/js/download/download.pug @@ -2,14 +2,14 @@ .col-md-12 h2 Download our #{process.env.WEBSITE_APP_TITLE || 'Electron App'} small.pull-right - | Channel: + | Channel: select( ng-model='vm.channel' ng-options='channel for channel in vm.availableChannels' ng-change='vm.getLatestReleases()' ) small.pull-left - | Flavor: + | Flavor: select( ng-model='vm.flavor' ng-options='flavor for flavor in vm.availableFlavors' @@ -18,13 +18,13 @@ .row.text-center.padding-top-20(ng-if="vm.latestReleases") .col-md-12(ng-if="vm.platform === 'osx' && vm.latestReleases['64']") .jumbotron - h4 OS X + h4 OS X span.text-muted 64 bit INTEL a.btn.btn-success.btn-lg( ng-click="vm.download(vm.latestReleases['64'])" ) i.fa.fa-download.fa-5x - h5 {{ vm.latestReleases['64'].version }} + h5 {{ vm.latestReleases['64'].version }} label.label.label-info( ng-show="vm.latestReleases['64'].channel !== 'stable'" ) @@ -38,13 +38,13 @@ ) .col-md-12(ng-if="vm.platform === 'osx' && vm.latestReleases['arm64']") .jumbotron - h4 OS X + h4 OS X span.text-muted 64 bit ARM a.btn.btn-success.btn-lg( ng-click="vm.download(vm.latestReleases['arm64'])" ) i.fa.fa-download.fa-5x - h5 {{ vm.latestReleases['arm64'].version }} + h5 {{ vm.latestReleases['arm64'].version }} label.label.label-info( ng-show="vm.latestReleases['arm64'].channel !== 'stable'" ) @@ -70,7 +70,7 @@ ng-click="vm.download(vm.latestReleases['32'])" ) i.fa.fa-download.fa-5x - h5 {{ vm.latestReleases['32'].version }} + h5 {{ vm.latestReleases['32'].version }} label.label.label-info( ng-show="vm.latestReleases['32'].channel !== 'stable'" ) @@ -91,7 +91,7 @@ ng-click="vm.download(vm.latestReleases['64'])" ) i.fa.fa-download.fa-5x - h5 {{ vm.latestReleases['64'].version }} + h5 {{ vm.latestReleases['64'].version }} label.label.label-info( ng-show="vm.latestReleases['64'].channel !== 'stable'" ) @@ -103,12 +103,33 @@ p.release-notes.text-muted( ng-bind-html="vm.latestReleases['64'].notes" ) + div( + ng-if="vm.latestReleases['arm64']", + ng-class="vm.latestReleases['32'] || vm.latestReleases['64'] ? 'col-sm-6' : 'col-sm-12'" + ) + h5.text-muted 64 bit ARM + a.btn.btn-success.btn-lg( + ng-click="vm.download(vm.latestReleases['arm64'])" + ) + i.fa.fa-download.fa-5x + h5 {{ vm.latestReleases['arm64'].version }} + label.label.label-info( + ng-show="vm.latestReleases['arm64'].channel !== 'stable'" + ) + | {{ vm.latestReleases['arm64'].channel }} + .padding-top-20.text-muted + span.timestamp(am-time-ago="vm.latestReleases['arm64'].createdAt") + .padding-top-20(ng-show="vm.latestReleases['arm64'].notes") + h4 Change Notes + p.release-notes.text-muted( + ng-bind-html="vm.latestReleases['arm64'].notes" + ) .row.text-center.padding-top-20(ng-if="!vm.latestReleases") .col-md-12 h5.text-muted | The {{ vm.flavor }} flavor has no {{ vm.channel }} releases available for {{ vm.platform }}. - + .row.text-center.padding-20-0 .col-sm-8.col-sm-offset-2 h5.pointer( @@ -120,7 +141,7 @@ div(ng-show="vm.showAllVersions") .jumbotron(ng-repeat='version in vm.versions') p.timestamp.text-muted(am-time-ago="version.createdAt") - h4 {{ version.name }} + h4 {{ version.name }} label.label( ng-class="version.channel.name === 'stable' ? 'label-success' : 'label-info'" )