diff options
author | julia.kirschenheuter <julia.kirschenheuter@nextcloud.com> | 2023-08-21 13:21:52 +0200 |
---|---|---|
committer | julia.kirschenheuter <julia.kirschenheuter@nextcloud.com> | 2023-08-22 13:20:34 +0200 |
commit | 558f5f97fc2e8eb7e5e7c808cf3cb08e38a3eca8 (patch) | |
tree | bc44bd0891e3337252feebd189f76b7b33faecef /apps/user_status | |
parent | a4f3088c6eab2c76bf0c64d39d5493dfe184593e (diff) | |
download | nextcloud-server-558f5f97fc2e8eb7e5e7c808cf3cb08e38a3eca8.tar.gz nextcloud-server-558f5f97fc2e8eb7e5e7c808cf3cb08e38a3eca8.zip |
Add logic for predefined status to be visible.
Add styles for radio buttons to be visible in checked, active and focus-visible state.
Signed-off-by: julia.kirschenheuter <julia.kirschenheuter@nextcloud.com>
Diffstat (limited to 'apps/user_status')
-rw-r--r-- | apps/user_status/src/components/PredefinedStatus.vue | 12 | ||||
-rw-r--r-- | apps/user_status/src/components/PredefinedStatusesList.vue | 20 | ||||
-rw-r--r-- | apps/user_status/src/components/SetStatusModal.vue | 2 |
3 files changed, 20 insertions, 14 deletions
diff --git a/apps/user_status/src/components/PredefinedStatus.vue b/apps/user_status/src/components/PredefinedStatus.vue index 69cf108c7ad..a5c621aea28 100644 --- a/apps/user_status/src/components/PredefinedStatus.vue +++ b/apps/user_status/src/components/PredefinedStatus.vue @@ -119,13 +119,15 @@ export default { } &__input:checked + &__label, - &__input:focus + &__label, - &__label:hover { - background-color: var(--color-background-hover); + &__label:active { + outline: 2px solid var(--color-main-text); + box-shadow: 0 0 0 4px var(--color-main-background); + border-radius: var(--border-radius-large); } - &__label:active { - background-color: var(--color-background-dark); + &__input:focus-visible + &__label { + outline: 2px solid var(--color-primary-element) !important; + border-radius: var(--border-radius-large); } } </style> diff --git a/apps/user_status/src/components/PredefinedStatusesList.vue b/apps/user_status/src/components/PredefinedStatusesList.vue index 65e8eabad82..e5a6fd8b03a 100644 --- a/apps/user_status/src/components/PredefinedStatusesList.vue +++ b/apps/user_status/src/components/PredefinedStatusesList.vue @@ -30,7 +30,7 @@ :icon="status.icon" :message="status.message" :clear-at="status.clearAt" - :selected="!isCustomStatus && lastSelected === status.id" + :selected="lastSelected === status.id" @select="selectStatus(status)" /> </ul> <div v-else @@ -48,13 +48,6 @@ export default { components: { PredefinedStatus, }, - props: { - /** If the current selected status is a custom one */ - isCustomStatus: { - type: Boolean, - required: true, - }, - }, data() { return { lastSelected: null, @@ -63,9 +56,20 @@ export default { computed: { ...mapState({ predefinedStatuses: state => state.predefinedStatuses.predefinedStatuses, + messageId: state => state.userStatus.messageId, }), ...mapGetters(['statusesHaveLoaded']), }, + + watch: { + messageId: { + immediate: true, + handler() { + this.lastSelected = this.messageId + }, + }, + }, + /** * Loads all predefined statuses from the server * when this component is mounted diff --git a/apps/user_status/src/components/SetStatusModal.vue b/apps/user_status/src/components/SetStatusModal.vue index c45213f9069..d763c094895 100644 --- a/apps/user_status/src/components/SetStatusModal.vue +++ b/apps/user_status/src/components/SetStatusModal.vue @@ -58,7 +58,7 @@ :icon="backupIcon" :message="backupMessage" @select="revertBackupFromServer" /> - <PredefinedStatusesList :is-custom-status="isCustomStatus" @select-status="selectPredefinedMessage" /> + <PredefinedStatusesList @select-status="selectPredefinedMessage" /> <ClearAtSelect :clear-at="clearAt" @select-clear-at="setClearAt" /> <div class="status-buttons"> |