Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable28] fix(settings): apps list layout #44327

Draft
wants to merge 8 commits into
base: stable28
Choose a base branch
from
150 changes: 0 additions & 150 deletions apps/settings/css/settings.scss
Original file line number Diff line number Diff line change
Expand Up @@ -539,20 +539,6 @@ span.usersLastLoginTooltip {
}

/* APPS */
#app-content > svg.app-filter {
float: left;
height: 0;
width: 0;
}

#app-category-app-bundles {
margin-bottom: 20px;
}

.appinfo {
margin: 1em 40px;
}

#app-navigation {
/* Navigation icons */
img {
Expand All @@ -570,24 +556,6 @@ span.usersLastLoginTooltip {
display: block;
}
}

.appwarning {
background: #fcc;
}

&.appwarning:hover {
background: #fbb;
}

.app-external {
color: var(--color-text-maxcontrast);
}
}

span.version {
margin-left: 1em;
margin-right: 1em;
color: var(--color-text-maxcontrast);
}

.app-version {
Expand Down Expand Up @@ -654,10 +622,6 @@ span.version {
opacity: 0.5;
}

.app-score-image {
height: 14px;
}

.actions {
margin-top: 10px;

Expand Down Expand Up @@ -796,12 +760,6 @@ span.version {
}
}

@media only screen and (max-width: 500px) {
.apps-list.installed .app-groups {
display: none !important;
}
}

.section {
margin-bottom: 0;
/* section divider lines, none needed for last one */
Expand All @@ -821,49 +779,13 @@ span.version {
}
}

.followupsection {
display: block;
padding: 0 30px 30px 30px;
}

.app-image {
position: relative;
height: 150px;
opacity: 1;
overflow: hidden;
}

.app-description-toggle-show, .app-description-toggle-hide {
clear: both;
padding: 7px 0;
cursor: pointer;
opacity: .5;
}

.app-description-container {
clear: both;
position: relative;
top: 7px;
}

.app-description {
clear: both;
}

#app-category-1 {
margin-bottom: 18px;
}

/* capitalize 'Other' category */

#app-category-925 {
text-transform: capitalize;
}

.app-dependencies {
color: #ce3702;
}

.missing-dependencies {
list-style: initial;
list-style-type: initial;
Expand Down Expand Up @@ -934,14 +856,6 @@ span.version {

}

.groups-enable {
margin-top: 0;

label {
margin-right: 3px;
}
}

.app-image {
width: 44px;
height: auto;
Expand Down Expand Up @@ -982,78 +896,14 @@ span.version {
flex-wrap: wrap;
align-content: flex-start;

&.hidden {
display: none;
}

.section {
position: relative;
flex: 0 0 auto;

h2.app-name {
display: block;
margin: 8px 0;
}

&:hover {
background-color: var(--color-background-dark);
}
}

.app-description {
p {
margin: 10px 0;
}

ul {
list-style: disc;
}

ol {
list-style: decimal;

ol, ul {
padding-left: 15px;
}
}

> {
ul, ol {
margin-left: 19px;
}
}

ul {
ol, ul {
padding-left: 15px;
}
}
}

/* Bundle header */
.apps-header {
position: relative;

div {
display: table-cell;
height: 70px;
}

h2 {
padding-left: 6px;
padding-top: 15px;
margin-bottom: 12px;
.enable {
position: relative;
top: -1px;
margin-left: 12px;
}

+ .section {
margin-top: 50px;
}
}
}
}

// Display buttons above each other on mobile
Expand Down
84 changes: 51 additions & 33 deletions apps/settings/src/components/AppList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,14 @@

<template>
<div id="app-content-inner">
<div id="apps-list" class="apps-list" :class="{installed: (useBundleView || useListView), store: useAppStoreView}">
<div id="apps-list"
class="apps-list"
:class="{
'apps-list--list-view': (useBundleView || useListView),
'apps-list--store-view': useAppStoreView,
}">
<template v-if="useListView">
<div v-if="showUpdateAll" class="toolbar">
<div v-if="showUpdateAll" class="apps-list__toolbar">
{{ n('settings', '%n app has an update available', '%n apps have an update available', counter) }}
<NcButton v-if="showUpdateAll"
id="app-list-update-all"
Expand All @@ -34,59 +39,59 @@
</NcButton>
</div>

<div v-if="!showUpdateAll" class="toolbar">
<div v-if="!showUpdateAll" class="apps-list__toolbar">
{{ t('settings', 'All apps are up-to-date.') }}
</div>

<transition-group name="app-list" tag="table" class="apps-list-container">
<tr key="app-list-view-header" class="apps-header">
<th class="app-image">
<TransitionGroup name="apps-list" tag="table" class="apps-list__list-container">
<tr key="app-list-view-header">
<th>
<span class="hidden-visually">{{ t('settings', 'Icon') }}</span>
</th>
<th class="app-name">
<th>
<span class="hidden-visually">{{ t('settings', 'Name') }}</span>
</th>
<th class="app-version">
<th>
<span class="hidden-visually">{{ t('settings', 'Version') }}</span>
</th>
<th class="app-level">
<th>
<span class="hidden-visually">{{ t('settings', 'Level') }}</span>
</th>
<th class="actions">
<th>
<span class="hidden-visually">{{ t('settings', 'Actions') }}</span>
</th>
</tr>
<AppItem v-for="app in apps"
:key="app.id"
:app="app"
:category="category" />
</transition-group>
</TransitionGroup>
</template>

<table v-if="useBundleView"
class="apps-list-container">
<tr key="app-list-view-header" class="apps-header">
<th id="app-table-col-icon" class="app-image">
class="apps-list__list-container">
<tr key="app-list-view-header">
<th id="app-table-col-icon">
<span class="hidden-visually">{{ t('settings', 'Icon') }}</span>
</th>
<th id="app-table-col-name" class="app-name">
<th id="app-table-col-name">
<span class="hidden-visually">{{ t('settings', 'Name') }}</span>
</th>
<th id="app-table-col-version" class="app-version">
<th id="app-table-col-version">
<span class="hidden-visually">{{ t('settings', 'Version') }}</span>
</th>
<th id="app-table-col-level" class="app-level">
<th id="app-table-col-level">
<span class="hidden-visually">{{ t('settings', 'Level') }}</span>
</th>
<th id="app-table-col-actions" class="actions">
<th id="app-table-col-actions">
<span class="hidden-visually">{{ t('settings', 'Actions') }}</span>
</th>
</tr>
<template v-for="bundle in bundles">
<tr :key="bundle.id">
<th :id="`app-table-rowgroup-${bundle.id}`" colspan="5" scope="rowgroup">
<div class="app-bundle-heading">
<span class="app-bundle-header">
<div class="apps-list__bundle-heading">
<span class="apps-list__bundle-header">
{{ bundle.name }}
</span>
<NcButton type="secondary" @click="toggleBundle(bundle.id)">
Expand All @@ -103,7 +108,7 @@
:category="category" />
</template>
</table>
<ul v-if="useAppStoreView" class="apps-store-view">
<ul v-if="useAppStoreView" class="apps-list__store-container">
<AppItem v-for="app in apps"
:key="app.id"
:app="app"
Expand All @@ -112,29 +117,41 @@
</ul>
</div>

<div id="apps-list-search" class="apps-list installed">
<div class="apps-list-container">
<template v-if="search !== '' && searchApps.length > 0">
<div class="section">
<div />
<td colspan="5">
<h2>{{ t('settings', 'Results from other categories') }}</h2>
</td>
</div>
<div id="apps-list-search" class="apps-list apps-list--list-view">
<div class="apps-list__list-container">
<table v-if="search !== '' && searchApps.length > 0" class="apps-list__list-container">
<caption class="apps-list__bundle-header">
{{ t('settings', 'Results from other categories') }}
</caption>
<tr key="app-list-view-header">
<th>
<span class="hidden-visually">{{ t('settings', 'Icon') }}</span>
</th>
<th>
<span class="hidden-visually">{{ t('settings', 'Name') }}</span>
</th>
<th>
<span class="hidden-visually">{{ t('settings', 'Version') }}</span>
</th>
<th>
<span class="hidden-visually">{{ t('settings', 'Level') }}</span>
</th>
<th>
<span class="hidden-visually">{{ t('settings', 'Actions') }}</span>
</th>
</tr>
<AppItem v-for="app in searchApps"
:key="app.id"
:app="app"
:category="category" />
</template>
</table>
</div>
</div>

<div v-if="search !== '' && !loading && searchApps.length === 0 && apps.length === 0" id="apps-list-empty" class="emptycontent emptycontent-search">
<div id="app-list-empty-icon" class="icon-settings-dark" />
<h2>{{ t('settings', 'No apps found for your version') }}</h2>
</div>

<div id="searchresults" />
</div>
</template>

Expand Down Expand Up @@ -197,6 +214,7 @@ export default {
// An app level of `200` will be set for apps featured on the app store
return apps.filter(app => app.level === 200)
}

// filter app store categories
return apps.filter(app => {
return app.appstore && app.category !== undefined
Expand Down
Loading