Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Add link for opening app details
Add `alt` for `AppScore` image

Signed-off-by: julia.kirschenheuter <[email protected]>
  • Loading branch information
JuliaKirschenheuter committed Nov 15, 2023
commit 25d87033b109538da95d35fc0ac6201c61db57f7
2 changes: 1 addition & 1 deletion apps/settings/css/settings.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion apps/settings/css/settings.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 4 additions & 12 deletions apps/settings/css/settings.scss
Original file line number Diff line number Diff line change
Expand Up @@ -650,14 +650,6 @@ span.version {
margin: 5px 0;
}

.app-name, .app-image * {
cursor: pointer;
}

.app-summary {
opacity: .7;
}

.app-image-icon .icon-settings-dark {
width: 100%;
height: 150px;
Expand All @@ -671,6 +663,10 @@ span.version {

.actions {
margin-top: 10px;

button {
margin: 10px 0;
}
}
}

Expand Down Expand Up @@ -881,10 +877,6 @@ span.version {
$toolbar-padding: 8px;
$toolbar-height: 44px + $toolbar-padding * 2;

.section {
cursor: pointer;
}

.app-list-move {
transition: transform 1s;
}
Expand Down
37 changes: 17 additions & 20 deletions apps/settings/src/components/AppList/AppItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,10 @@
<template>
<component :is="listView ? `tr` : `li`"
class="section"
:class="{ selected: isSelected }"
@click="showAppDetails">
:class="{ selected: isSelected }">
<component :is="dataItemTag"
class="app-image app-image-icon"
:headers="getDataItemHeaders(`app-table-col-icon`)"
@click="showAppDetails">
:headers="getDataItemHeaders(`app-table-col-icon`)">
<div v-if="(listView && !app.preview) || (!listView && !screenshotLoaded)" class="icon-settings-dark" />

<svg v-else-if="listView && app.preview"
Expand All @@ -48,9 +46,11 @@
</component>
<component :is="dataItemTag"
class="app-name"
:headers="getDataItemHeaders(`app-table-col-name`)"
@click="showAppDetails">
{{ app.name }}
:headers="getDataItemHeaders(`app-table-col-name`)">
<router-link class="app-name--link" :to="{ name: 'apps-details', params: { category: category, id: app.id }}"
:aria-label="t('settings', 'Show details for {appName} app', { appName:app.name })">
{{ app.name }}
</router-link>
</component>
<component :is="dataItemTag"
v-if="!listView"
Expand Down Expand Up @@ -185,19 +185,6 @@ export default {

},
methods: {
async showAppDetails(event) {
if (event.currentTarget.tagName === 'INPUT' || event.currentTarget.tagName === 'A') {
return
}
try {
await this.$router.push({
name: 'apps-details',
params: { category: this.category, id: this.app.id },
})
} catch (e) {
// we already view this app
}
},
prefix(prefix, content) {
return prefix + '_' + content
},
Expand All @@ -217,4 +204,14 @@ export default {
.app-image img {
width: 100%;
}

.app-name--link::after {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
}

</style>
10 changes: 6 additions & 4 deletions apps/settings/src/components/AppList/AppScore.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
-->

<template>
<img :src="scoreImage" class="app-score-image">
<img :src="scoreImage" :alt="t('settings', 'Rating: {score}/10', {score:appScore})" class="app-score-image">
</template>
<script>
import { imagePath } from '@nextcloud/router'
Expand All @@ -30,11 +30,13 @@ export default {
name: 'AppScore',
props: ['score'],
computed: {
appScore() {
return Math.round(this.score * 10)
},
scoreImage() {
const score = Math.round(this.score * 10)
const imageName = 'rating/s' + score + '.svg'
const imageName = 'rating/s' + this.appScore + '.svg'
return imagePath('core', imageName)
},
}
},
}
</script>
2 changes: 1 addition & 1 deletion cypress/e2e/settings/apps.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ describe('Settings: App management', { testIsolation: true }, () => {

it('View app details', () => {
// When I click on the "QA testing" app
cy.get('#apps-list').contains('tr', 'QA testing').click({ force: true })
cy.get('#apps-list').contains('a', 'QA testing').click({ force: true })
// I see that the app details are shown
cy.get('#app-sidebar-vue')
.should('be.visible')
Expand Down
4 changes: 2 additions & 2 deletions dist/settings-apps-view-7418.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/settings-apps-view-7418.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/settings-vue-settings-apps-users-management.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/settings-vue-settings-apps-users-management.js.map

Large diffs are not rendered by default.