diff --git a/src/js/index.js b/src/js/index.js index 29a8d3689..89130dd52 100644 --- a/src/js/index.js +++ b/src/js/index.js @@ -209,6 +209,36 @@ app.filter('shortAppMessage', function () { }; }); +app.filter('selectedTagFilter', function () { + return function selectedTagFilter(apps, selectedTags) { + return apps.filter(function (app) { + if (selectedTags.length === 0) return true; + + return !!selectedTags.find(function (tag) { + return !app.tags ? false : (app.tags.indexOf(tag) !== -1); + }); + }); + }; +}); + +app.filter('selectedDomainFilter', function () { + return function selectedDomainFilter(apps, selectedDomains) { + return apps.filter(function (app) { + if (selectedDomains.length === 0) return true; + + return !!selectedDomains.find(function (domain) { + return app.domain === domain.domain; + }); + }); + }; +}); + +app.filter('prettyDomains', function () { + return function prettyDomains(domains) { + return domains.map(function (d) { return d.domain; }).join(', '); + }; +}); + app.filter('prettyMemory', function () { return function (memory) { // Adjust the default memory limit if it changes diff --git a/src/theme.scss b/src/theme.scss index f53a46ebb..9cbffae5b 100644 --- a/src/theme.scss +++ b/src/theme.scss @@ -250,49 +250,6 @@ h1, h2, h3 { // Apps view // ---------------------------- -.domain-header { - padding-left: 15px; - font-size: 24px; -} - -.tags-sidebar { - position: absolute; - left: 10px; - top: 50px; - - h1 { - font-size: 14px; - } - - .tag { - display: block; - padding: 6px 10px; - margin: 0; - overflow: hidden; - color: black; - text-overflow: ellipsis; - white-space: nowrap; - font-size: 16px; - - &:hover, - &:focus, - &.tag-active { - text-decoration: none; - background-color: white; - color: black; - } - - &.tag-active { - background-color: $navbar-default-link-hover-color; - color: white; - } - - & > i { - width: 30px; - } - } -} - .app-grid { display: flex; flex-wrap: wrap; diff --git a/src/views/apps.html b/src/views/apps.html index 539896aff..b090985b2 100644 --- a/src/views/apps.html +++ b/src/views/apps.html @@ -512,61 +512,59 @@