Skip to content

Commit 64318fe

Browse files
Merge branch 'master' into chore/ocp/drop-until-writelog
2 parents 0dd616f + 00c0813 commit 64318fe

24 files changed

+161
-97
lines changed

apps/files_sharing/src/components/SharingInput.vue

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
:clear-search-on-blur="() => false"
3535
:user-select="true"
3636
:options="options"
37-
@open="handleOpen"
3837
@search="asyncFind"
3938
@option:selected="openSharingDetails">
4039
<template #no-options="{ search }">
@@ -47,7 +46,6 @@
4746
<script>
4847
import { generateOcsUrl } from '@nextcloud/router'
4948
import { getCurrentUser } from '@nextcloud/auth'
50-
import { emit } from '@nextcloud/event-bus'
5149
import axios from '@nextcloud/axios'
5250
import debounce from 'debounce'
5351
import NcSelect from '@nextcloud/vue/dist/Components/NcSelect.js'
@@ -156,11 +154,6 @@ export default {
156154
},
157155
158156
methods: {
159-
handleOpen() {
160-
// Fix dropdown not opening when viewer is open, see https://github.com/nextcloud/viewer/pull/1319
161-
emit('viewer:trapElements:changed', this.$refs.select.$el)
162-
},
163-
164157
async asyncFind(query) {
165158
// save current query to check if we display
166159
// recommendations or search results

apps/files_sharing/src/views/SharingDetailsTab.vue

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -409,12 +409,6 @@ export default {
409409
* @return {boolean}
410410
*/
411411
isSetDownloadButtonVisible() {
412-
// TODO: Implement download permission for circle shares instead of hiding the option.
413-
// https://github.com/nextcloud/server/issues/39161
414-
if (this.share && this.share.type === this.SHARE_TYPES.SHARE_TYPE_CIRCLE) {
415-
return false
416-
}
417-
418412
const allowedMimetypes = [
419413
// Office documents
420414
'application/msword',

apps/settings/css/settings.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/settings/css/settings.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/settings/css/settings.scss

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -842,10 +842,6 @@ span.version {
842842
overflow: hidden;
843843
}
844844

845-
.app-name, .app-version, .app-score, .app-level {
846-
display: inline-block;
847-
}
848-
849845
.app-description-toggle-show, .app-description-toggle-hide {
850846
clear: both;
851847
padding: 7px 0;
@@ -918,7 +914,6 @@ span.version {
918914
display: table;
919915
width: 100%;
920916
height: auto;
921-
margin-top: $toolbar-height;
922917
}
923918

924919
margin-bottom: 100px;
@@ -1042,7 +1037,6 @@ span.version {
10421037

10431038
/* Bundle header */
10441039
.apps-header {
1045-
display: table-row;
10461040
position: relative;
10471041

10481042
div {
@@ -1051,11 +1045,9 @@ span.version {
10511045
}
10521046

10531047
h2 {
1054-
display: table-cell;
1055-
position: absolute;
10561048
padding-left: 6px;
10571049
padding-top: 15px;
1058-
1050+
margin-bottom: 12px;
10591051
.enable {
10601052
position: relative;
10611053
top: -1px;

apps/settings/src/components/AppList.vue

Lines changed: 68 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -38,35 +38,71 @@
3838
{{ t('settings', 'All apps are up-to-date.') }}
3939
</div>
4040

41-
<transition-group name="app-list" tag="div" class="apps-list-container">
41+
<transition-group name="app-list" tag="table" class="apps-list-container">
42+
<tr key="app-list-view-header" class="apps-header">
43+
<th class="app-image">
44+
<span class="hidden-visually">{{ t('settings', 'Icon') }}</span>
45+
</th>
46+
<th class="app-name">
47+
<span class="hidden-visually">{{ t('settings', 'Name') }}</span>
48+
</th>
49+
<th class="app-version">
50+
<span class="hidden-visually">{{ t('settings', 'Version') }}</span>
51+
</th>
52+
<th class="app-level">
53+
<span class="hidden-visually">{{ t('settings', 'Level') }}</span>
54+
</th>
55+
<th class="actions">
56+
<span class="hidden-visually">{{ t('settings', 'Actions') }}</span>
57+
</th>
58+
</tr>
4259
<AppItem v-for="app in apps"
4360
:key="app.id"
4461
:app="app"
4562
:category="category" />
4663
</transition-group>
4764
</template>
4865

49-
<transition-group v-if="useBundleView"
50-
name="app-list"
51-
tag="div"
66+
<table v-if="useBundleView"
5267
class="apps-list-container">
68+
<tr key="app-list-view-header" class="apps-header">
69+
<th id="app-table-col-icon" class="app-image">
70+
<span class="hidden-visually">{{ t('settings', 'Icon') }}</span>
71+
</th>
72+
<th id="app-table-col-name" class="app-name">
73+
<span class="hidden-visually">{{ t('settings', 'Name') }}</span>
74+
</th>
75+
<th id="app-table-col-version" class="app-version">
76+
<span class="hidden-visually">{{ t('settings', 'Version') }}</span>
77+
</th>
78+
<th id="app-table-col-level" class="app-level">
79+
<span class="hidden-visually">{{ t('settings', 'Level') }}</span>
80+
</th>
81+
<th id="app-table-col-actions" class="actions">
82+
<span class="hidden-visually">{{ t('settings', 'Actions') }}</span>
83+
</th>
84+
</tr>
5385
<template v-for="bundle in bundles">
54-
<div :key="bundle.id" class="apps-header">
55-
<div class="app-image" />
56-
<h2>{{ bundle.name }} <input type="button" :value="bundleToggleText(bundle.id)" @click="toggleBundle(bundle.id)"></h2>
57-
<div class="app-version" />
58-
<div class="app-level" />
59-
<div class="app-groups" />
60-
<div class="actions">
61-
&nbsp;
62-
</div>
63-
</div>
86+
<tr :key="bundle.id">
87+
<th :id="`app-table-rowgroup-${bundle.id}`" colspan="5" scope="rowgroup">
88+
<div class="app-bundle-heading">
89+
<span class="app-bundle-header">
90+
{{ bundle.name }}
91+
</span>
92+
<NcButton type="secondary" @click="toggleBundle(bundle.id)">
93+
{{ t('settings', bundleToggleText(bundle.id)) }}
94+
</NcButton>
95+
</div>
96+
</th>
97+
</tr>
6498
<AppItem v-for="app in bundleApps(bundle.id)"
6599
:key="bundle.id + app.id"
100+
:use-bundle-view="true"
101+
:headers="`app-table-rowgroup-${bundle.id}`"
66102
:app="app"
67103
:category="category" />
68104
</template>
69-
</transition-group>
105+
</table>
70106
<template v-if="useAppStoreView">
71107
<AppItem v-for="app in apps"
72108
:key="app.id"
@@ -88,8 +124,7 @@
88124
<AppItem v-for="app in searchApps"
89125
:key="app.id"
90126
:app="app"
91-
:category="category"
92-
:list-view="true" />
127+
:category="category" />
93128
</template>
94129
</div>
95130
</div>
@@ -240,9 +275,24 @@ export default {
240275
const limit = pLimit(1)
241276
this.apps
242277
.filter(app => app.update)
243-
.map(app => limit(() => this.$store.dispatch('updateApp', { appId: app.id }))
278+
.map(app => limit(() => this.$store.dispatch('updateApp', { appId: app.id })),
244279
)
245280
},
246281
},
247282
}
248283
</script>
284+
285+
<style lang="scss" scoped>
286+
.app-bundle-heading {
287+
display: flex;
288+
align-items: center;
289+
margin: 20px 10px 20px 0;
290+
}
291+
.app-bundle-header {
292+
margin: 0 10px 0 50px;
293+
font-weight: bold;
294+
font-size: 20px;
295+
line-height: 30px;
296+
color: var(--color-text-light);
297+
}
298+
</style>

apps/settings/src/components/AppList/AppItem.vue

Lines changed: 44 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,14 @@
2121
-->
2222

2323
<template>
24-
<div class="section" :class="{ selected: isSelected }" @click="showAppDetails">
25-
<div class="app-image app-image-icon" @click="showAppDetails">
24+
<component :is="listView ? `tr` : `div`"
25+
class="section"
26+
:class="{ selected: isSelected }"
27+
@click="showAppDetails">
28+
<component :is="dataItemTag"
29+
class="app-image app-image-icon"
30+
:headers="getDataItemHeaders(`app-table-col-icon`)"
31+
@click="showAppDetails">
2632
<div v-if="(listView && !app.preview) || (!listView && !screenshotLoaded)" class="icon-settings-dark" />
2733

2834
<svg v-else-if="listView && app.preview"
@@ -39,19 +45,28 @@
3945
</svg>
4046

4147
<img v-if="!listView && app.screenshot && screenshotLoaded" :src="app.screenshot" width="100%">
42-
</div>
43-
<div class="app-name" @click="showAppDetails">
48+
</component>
49+
<component :is="dataItemTag"
50+
class="app-name"
51+
:headers="getDataItemHeaders(`app-table-col-name`)"
52+
@click="showAppDetails">
4453
{{ app.name }}
45-
</div>
46-
<div v-if="!listView" class="app-summary">
54+
</component>
55+
<component :is="dataItemTag"
56+
v-if="!listView"
57+
class="app-summary"
58+
:headers="getDataItemHeaders(`app-version`)">
4759
{{ app.summary }}
48-
</div>
49-
<div v-if="listView" class="app-version">
60+
</component>
61+
<component :is="dataItemTag"
62+
v-if="listView"
63+
class="app-version"
64+
:headers="getDataItemHeaders(`app-table-col-version`)">
5065
<span v-if="app.version">{{ app.version }}</span>
5166
<span v-else-if="app.appstoreData.releases[0].version">{{ app.appstoreData.releases[0].version }}</span>
52-
</div>
67+
</component>
5368

54-
<div class="app-level">
69+
<component :is="dataItemTag" :headers="getDataItemHeaders(`app-table-col-level`)" class="app-level">
5570
<span v-if="app.level === 300"
5671
:title="t('settings', 'This app is supported via your current Nextcloud subscription.')"
5772
:aria-label="t('settings', 'This app is supported via your current Nextcloud subscription.')"
@@ -63,9 +78,8 @@
6378
class="official icon-checkmark">
6479
{{ t('settings', 'Featured') }}</span>
6580
<AppScore v-if="hasRating && !listView" :score="app.score" />
66-
</div>
67-
68-
<div class="actions">
81+
</component>
82+
<component :is="dataItemTag" :headers="getDataItemHeaders(`app-table-col-actions`)" class="actions">
6983
<div v-if="app.error" class="warning">
7084
{{ app.error }}
7185
</div>
@@ -104,8 +118,8 @@
104118
@click.stop="forceEnable(app.id)">
105119
{{ forceEnableButtonText }}
106120
</NcButton>
107-
</div>
108-
</div>
121+
</component>
122+
</component>
109123
</template>
110124

111125
<script>
@@ -128,6 +142,14 @@ export default {
128142
type: Boolean,
129143
default: true,
130144
},
145+
useBundleView: {
146+
type: Boolean,
147+
default: false,
148+
},
149+
headers: {
150+
type: String,
151+
default: null,
152+
},
131153
},
132154
data() {
133155
return {
@@ -140,6 +162,9 @@ export default {
140162
hasRating() {
141163
return this.app.appstoreData && this.app.appstoreData.ratingNumOverall > 5
142164
},
165+
dataItemTag() {
166+
return this.listView ? 'td' : 'div'
167+
},
143168
},
144169
watch: {
145170
'$route.params.id'(id) {
@@ -176,6 +201,10 @@ export default {
176201
prefix(prefix, content) {
177202
return prefix + '_' + content
178203
},
204+
205+
getDataItemHeaders(columnName) {
206+
return this.useBundleView ? [this.headers, columnName].join(' ') : null
207+
},
179208
},
180209
}
181210
</script>

dist/5688-5688.js.map

Lines changed: 0 additions & 1 deletion
This file was deleted.

dist/5688-5688.js renamed to dist/894-894.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)