aboutsummaryrefslogtreecommitdiffstats
path: root/apps/user_status
diff options
context:
space:
mode:
authorJulia Kirschenheuter <6078378+JuliaKirschenheuter@users.noreply.github.com>2023-08-22 15:07:46 +0200
committerGitHub <noreply@github.com>2023-08-22 15:07:46 +0200
commite42d82fe13d49bf5bfc3b42c8c686292f81af1cc (patch)
treeb5a01306cefbecb54fe0bd28855df7f6e2ada7e9 /apps/user_status
parentda3c94161bb78c09cf5575f6111c1e91dde1411d (diff)
parent558f5f97fc2e8eb7e5e7c808cf3cb08e38a3eca8 (diff)
downloadnextcloud-server-e42d82fe13d49bf5bfc3b42c8c686292f81af1cc.tar.gz
nextcloud-server-e42d82fe13d49bf5bfc3b42c8c686292f81af1cc.zip
Merge pull request #39987 from nextcloud/fix/39926-fix_predefined_status-buttons
Fix predefined status buttons
Diffstat (limited to 'apps/user_status')
-rw-r--r--apps/user_status/src/components/PredefinedStatus.vue12
-rw-r--r--apps/user_status/src/components/PredefinedStatusesList.vue20
-rw-r--r--apps/user_status/src/components/SetStatusModal.vue2
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">