fix: Better inform the user that a profile is required

Solves #1806
This commit is contained in:
Massedil
2025-06-28 19:27:18 +02:00
parent 3be29baa3c
commit 6020ad26af
3 changed files with 26 additions and 1 deletions

View File

@@ -230,6 +230,23 @@
</button>
</div>
</nav>
<div v-if="currentUser?.id && !currentActor?.id" class="p-5">
<o-notification variant="warning">
<div class="flex place-content-between items-center">
<span>
{{
t("You have to create and select a profile to fully use Mobilizon.")
}}
</span>
<o-button
:label="t('Create a new profile')"
variant="primary"
size="small"
@click="createProfile()"
/>
</div>
</o-notification>
</div>
</template>
<script lang="ts" setup>
@@ -261,11 +278,11 @@ import { ICurrentUser } from "@/types/current-user.model";
const { currentUser } = useCurrentUserClient();
const { currentActor } = useCurrentActorClient();
const { identities } = useCurrentUserIdentities();
const router = useRouter();
const route = useRoute();
const { identities } = useCurrentUserIdentities();
const { registrationsOpen, registrationsAllowlist, databaseLogin } =
useRegistrationConfig();
@@ -364,4 +381,10 @@ const performLogout = async () => {
return router.push({ name: RouteName.HOME });
}
};
const createProfile = () => {
router.push({
name: RouteName.CREATE_IDENTITY,
});
};
</script>