diff --git a/apps/user_status/js/dashboard.js b/apps/user_status/js/dashboard.js index c60dcc17ef2eb373112dfb694fcfe8632bd98898..774e1653399e1e6a819bc51e7737388d34cd6737 100644 Binary files a/apps/user_status/js/dashboard.js and b/apps/user_status/js/dashboard.js differ diff --git a/apps/user_status/js/dashboard.js.map b/apps/user_status/js/dashboard.js.map index 1c2fba4674e6c2c7858d019be1fba3adacad2086..8d89fe07ae7deeec80bd35ca6f0ae33d4b46c704 100644 Binary files a/apps/user_status/js/dashboard.js.map and b/apps/user_status/js/dashboard.js.map differ diff --git a/apps/user_status/js/user-status-menu.js b/apps/user_status/js/user-status-menu.js index fa448d2a3d1c3456687874735eb73cc3a8e8cb06..257499c48be65acd8c8ac3414861408385361c8f 100644 Binary files a/apps/user_status/js/user-status-menu.js and b/apps/user_status/js/user-status-menu.js differ diff --git a/apps/user_status/js/user-status-menu.js.map b/apps/user_status/js/user-status-menu.js.map index 1f8e5695f0405effd81fd35bd4ab6cd3b4074600..9fdef2fca35f4ac0715f0434a2c6fcb4f0735e7d 100644 Binary files a/apps/user_status/js/user-status-menu.js.map and b/apps/user_status/js/user-status-menu.js.map differ diff --git a/apps/user_status/js/user-status-modal.js b/apps/user_status/js/user-status-modal.js index 463ab16482e2203d717fc7d2030930968f4f2dc5..eccfa67008ec5e9270239b2d70b2d558b1311b69 100644 Binary files a/apps/user_status/js/user-status-modal.js and b/apps/user_status/js/user-status-modal.js differ diff --git a/apps/user_status/js/user-status-modal.js.map b/apps/user_status/js/user-status-modal.js.map index 10c8b7e6080ba4af0042857e88e49993cd1ebf5f..f0475b9f3f43b5c1c0ec6f2333f0dd0c0c8284fd 100644 Binary files a/apps/user_status/js/user-status-modal.js.map and b/apps/user_status/js/user-status-modal.js.map differ diff --git a/apps/user_status/js/vendors-user-status-modal.js b/apps/user_status/js/vendors-user-status-modal.js index 1a4b647f502e088ea0919641be707bc431a2bfe6..69fc2571bd6eb6992585bb6442a7d32988acdac4 100644 Binary files a/apps/user_status/js/vendors-user-status-modal.js and b/apps/user_status/js/vendors-user-status-modal.js differ diff --git a/apps/user_status/js/vendors-user-status-modal.js.map b/apps/user_status/js/vendors-user-status-modal.js.map index 57fb4e9fca73f3a088891e83557a583decc9fb76..0bee4948ad1569c1978fc32743fa877549e8b18b 100644 Binary files a/apps/user_status/js/vendors-user-status-modal.js.map and b/apps/user_status/js/vendors-user-status-modal.js.map differ diff --git a/apps/user_status/src/views/Dashboard.vue b/apps/user_status/src/views/Dashboard.vue index 80f9385db7830564bd4ec65fa1e680328fa6578a..f92c6716a393ce6bfd33664c2b5e5f1eba175b80 100644 --- a/apps/user_status/src/views/Dashboard.vue +++ b/apps/user_status/src/views/Dashboard.vue @@ -24,6 +24,20 @@ id="user-status_panel" :items="items" :loading="loading"> + <template v-slot:default="{ item }"> + <DashboardWidgetItem + :main-text="item.mainText" + :sub-text="item.subText"> + <template v-slot:avatar> + <Avatar + class="item-avatar" + :size="44" + :user="item.avatarUsername" + :display-name="item.mainText" + :show-user-status-compact="false" /> + </template> + </DashboardWidgetItem> + </template> <template v-slot:empty-content> <EmptyContent id="user_status-widget-empty-content" @@ -35,7 +49,8 @@ </template> <script> -import { DashboardWidget } from '@nextcloud/vue-dashboard' +import { DashboardWidget, DashboardWidgetItem } from '@nextcloud/vue-dashboard' +import Avatar from '@nextcloud/vue/dist/Components/Avatar' import EmptyContent from '@nextcloud/vue/dist/Components/EmptyContent' import { loadState } from '@nextcloud/initial-state' import moment from '@nextcloud/moment' @@ -43,7 +58,9 @@ import moment from '@nextcloud/moment' export default { name: 'Dashboard', components: { + Avatar, DashboardWidget, + DashboardWidgetItem, EmptyContent, }, data() { @@ -56,13 +73,21 @@ export default { items() { return this.statuses.map((item) => { const icon = item.icon || '' - const message = item.message || '' - const status = item.status === 'dnd' ? `${icon} ${message}` : message + let message = item.message || '' + if (message === '') { + if (item.status === 'away') { + message = t('user_status', 'Away') + } + if (item.status === 'dnd') { + message = t('user_status', 'Do not disturb') + } + } + const status = item.icon !== '' ? `${icon} ${message}` : message let subText - if (item.icon === null && item.message === null && item.timestamp === null) { + if (item.icon === null && message === '' && item.timestamp === null) { subText = '' - } else if (item.icon === null && item.message === null && item.timestamp !== null) { + } else if (item.icon === null && message === '' && item.timestamp !== null) { subText = moment(item.timestamp, 'X').fromNow() } else if (item.timestamp !== null) { subText = this.t('user_status', '{status}, {timestamp}', {