From 29792e3416c2c2cb6f15d6d7667d262524257ffe Mon Sep 17 00:00:00 2001 From: Kristian Zendato Date: Fri, 31 Jul 2026 15:52:55 +0800 Subject: [PATCH] feat: profile view on mobile screen Signed-off-by: Kristian Zendato --- 3rdparty | 2 +- apps/profile/src/views/ProfileApp.vue | 161 +++++++++++++++----- core/img/actions/mail-outline.svg | 1 + core/img/actions/phone-outline.svg | 1 + core/img/actions/timezone.svg | 2 +- lib/private/Profile/Actions/EmailAction.php | 2 +- lib/private/Profile/Actions/PhoneAction.php | 2 +- 7 files changed, 128 insertions(+), 43 deletions(-) create mode 100644 core/img/actions/mail-outline.svg create mode 100644 core/img/actions/phone-outline.svg diff --git a/3rdparty b/3rdparty index ec0e643aab90b..5935defbd4b61 160000 --- a/3rdparty +++ b/3rdparty @@ -1 +1 @@ -Subproject commit ec0e643aab90b8366fe1267b7068ed6e2b95532c +Subproject commit 5935defbd4b614d76f84ef357f28810957d1ee11 diff --git a/apps/profile/src/views/ProfileApp.vue b/apps/profile/src/views/ProfileApp.vue index 92faf6fce3491..ad409ebead28d 100644 --- a/apps/profile/src/views/ProfileApp.vue +++ b/apps/profile/src/views/ProfileApp.vue @@ -12,6 +12,7 @@ import { subscribe, unsubscribe } from '@nextcloud/event-bus' import { loadState } from '@nextcloud/initial-state' import { translate as t } from '@nextcloud/l10n' import { generateUrl } from '@nextcloud/router' +import { useIsMobile } from '@nextcloud/vue/composables/useIsMobile' import { computed, onBeforeMount, onBeforeUnmount, onMounted, ref } from 'vue' import NcActionLink from '@nextcloud/vue/components/NcActionLink' import NcActions from '@nextcloud/vue/components/NcActions' @@ -22,7 +23,8 @@ import NcContent from '@nextcloud/vue/components/NcContent' import NcEmptyContent from '@nextcloud/vue/components/NcEmptyContent' import NcRichText from '@nextcloud/vue/components/NcRichText' import AccountIcon from 'vue-material-design-icons/AccountOutline.vue' -import MapMarkerIcon from 'vue-material-design-icons/MapMarker.vue' +import BriefcaseIcon from 'vue-material-design-icons/BriefcaseOutline.vue' +import MapMarkerIcon from 'vue-material-design-icons/MapMarkerOutline.vue' import PencilIcon from 'vue-material-design-icons/PencilOutline.vue' import ProfileSection from '../components/ProfileSection.vue' @@ -60,9 +62,13 @@ onBeforeMount(() => { }) const isCurrentUser = getCurrentUser()?.uid === profileParameters.userId +const isMobile = useIsMobile() const primaryAction = profileParameters.actions[0] -const otherActions = profileParameters.actions.slice(1) +const showEditAsPrimaryAction = computed(() => isMobile.value && isCurrentUser) +const otherActions = computed(() => showEditAsPrimaryAction.value + ? profileParameters.actions + : profileParameters.actions.slice(1)) const settingsUrl = generateUrl('/settings/user') const emptyProfileMessage = isCurrentUser @@ -113,28 +119,41 @@ function openStatusModal() {
+

{{ profileParameters.displayname || profileParameters.userId }}

- · + · {{ profileParameters.pronouns }} +
+
+ + + {{ userStatus.icon }} {{ userStatus.message }} + + + - {{ t('profile', 'Edit Profile') }}
- - {{ userStatus.icon }} {{ userStatus.message }} -
@@ -142,6 +161,7 @@ function openStatusModal() {