ADD - implement EasyShare system

This commit is contained in:
smx.pusha
2026-08-11 14:57:33 +02:00
parent 67edb404c6
commit 7d146e709a
27 changed files with 2067 additions and 87 deletions
+27
View File
@@ -41,6 +41,7 @@ import {
RefreshCw,
Route,
Settings2,
Share2,
Shield,
ShieldCheck,
Sparkles,
@@ -69,6 +70,7 @@ import {
type MapPoint,
} from '@/features/map/defaultMapGeometry'
import { useCrewLinkStore } from '@/stores/crewlink'
import { useEasyShareStore } from '@/stores/easyshare'
import { usePhoneStore } from '@/stores/phone'
import type {
CrewLinkColour,
@@ -240,6 +242,20 @@ function showToast(message: string): void {
}, 2400)
}
function shareProfile(): void {
const profile = crew.profile
if (!profile) return
useEasyShareStore().open({
appId: 'crewlink',
copyText: `@${profile.username}`,
id: profile.id,
kind: 'profile',
link: `skyphone://crewlink/profile/${profile.id}`,
subtitle: activeGroup.value?.name,
title: `@${profile.username}`,
})
}
function updateValue(
target: 'username' | 'groupName' | 'inviteCode' | 'pingLabel',
event: Event,
@@ -900,6 +916,17 @@ onBeforeUnmount(() => {
<div><small>{{ t('yourCrewLinkId') }}</small><h1>@{{ crew.profile.username }}</h1><p>{{ activeGroup.name }} · {{ roleLabel(activeGroup.role) }}</p></div>
</div>
<k-list inset strong>
<k-list-item
link
link-component="button"
:title="phone.t('Apps.easyShare.shareProfile')"
@click="shareProfile"
>
<template #media><Share2 :size="20" /></template>
</k-list-item>
</k-list>
<k-block-title>{{ t('privacyVisibility') }}</k-block-title>
<k-list inset strong>
<k-list-item :title="t('shareOnMap')" :subtitle="t('shareOnMapBody')">