Show popular apps first when no category is selected

This commit is contained in:
Johannes Zellner
2021-03-18 14:14:22 +01:00
parent 09e07868bb
commit 050ea48e3e
2 changed files with 32 additions and 2 deletions

View File

@@ -290,7 +290,33 @@
<br/>
<a href="https://forum.cloudron.io/category/5/app-requests" target="_blank">{{ 'appstore.appMissing' | tr }}</a>
</div>
<div class="col-md-12" ng-show="category === '' && popularApps.length">
<div class="row-no-margin">
<div class="col-sm-12">
<h2>{{ 'appstore.category.popular' | tr }}</h2>
</div>
</div>
<div class="row-no-margin">
<div class="col-sm-1 appstore-item" ng-repeat="app in popularApps">
<div class="appstore-item-content highlight" ng-click="gotoApp(app)" ng-class="{ 'appstore-item-content-testing': app.releaseState === 'unstable' }">
<span class="badge badge-danger appstore-item-badge-testing" ng-show="app.releaseState === 'unstable'">{{ 'appstore.unstable' | tr }}</span>
<div class="appstore-item-content-icon col-same-height">
<img ng-src="{{app.iconUrl}}" onerror="this.onerror=null;this.src='img/appicon_fallback.png'" class="app-icon"/>
</div>
<div class="appstore-item-content-description col-same-height">
<h4 class="appstore-item-content-title">{{ app.manifest.title }}</h4>
<div class="appstore-item-content-tagline text-muted">{{ app.manifest.tagline }}</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-12" ng-show="apps.length">
<div class="row-no-margin">
<div class="col-sm-12">
<h2>{{ 'appstore.category.all' | tr }}</h2>
</div>
</div>
<div class="row-no-margin">
<div class="col-sm-1 appstore-item" ng-repeat="app in apps">
<div class="appstore-item-content highlight" ng-click="gotoApp(app)" ng-class="{ 'appstore-item-content-testing': app.releaseState === 'unstable' }">