mirror of
https://github.com/IliesAllali/parenthese.git
synced 2026-11-11 16:12:14 +00:00
barre : partager, souvenir propriétaire, aide pour tous, nettoyage
- Rond du compte : « Partager l'arbre » ouvre la fenêtre « La famille participe » (propriétaire). - « Propositions à relire » ouvre la même fenêtre et la fait défiler jusqu'à la section (ancre #contrib-propositions). - « Un souvenir » disponible pour le propriétaire, même parcours que le membre (choix de la personne, puis souvenirs). - Aide : HELP_URL passé à tous les rôles. - Suppression de .pz-lang--nav (plus aucune référence). Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
7d123d66ef
commit
d4416ef2ee
6 files changed
+23
-6
No files matched your search
@@ -3057,8 +3057,8 @@ function App() {
|
||||
activeTreeId={tree.treeContext.treeId}
|
||||
onEditClick={handleEditToggle}
|
||||
onAddPersonClick={handleOpenAddPerson}
|
||||
onAddSouvenirClick={isFamilyVisitor ? handleOpenSouvenirPicker : undefined}
|
||||
helpUrl={isFamilyVisitor ? HELP_URL : ''}
|
||||
onAddSouvenirClick={isFamilyVisitor || userRole.isAdmin ? handleOpenSouvenirPicker : undefined}
|
||||
helpUrl={HELP_URL}
|
||||
onShareClick={userRole.isAdmin ? handleOpenContributionPanel : undefined}
|
||||
onTreeSelect={handleOpenTreeFromAccount}
|
||||
onCreateTree={handleOpenTreeWizard}
|
||||
|
||||
@@ -434,7 +434,7 @@ const ContributionPanel = ({
|
||||
{/* ── En-tête sessions ── */}
|
||||
<div className="contrib-list-header">
|
||||
<div className="contrib-list-heading">
|
||||
<h2>{t('Propositions à relire')}</h2>
|
||||
<h2 id="contrib-propositions">{t('Propositions à relire')}</h2>
|
||||
<p>{t('Acceptez ou refusez chaque modification, puis appliquez vos choix.')}</p>
|
||||
</div>
|
||||
<div className="contrib-list-header-actions">
|
||||
|
||||
@@ -24,6 +24,7 @@ function AvatarMenu({
|
||||
isOwner = false,
|
||||
pendingContributions = 0,
|
||||
onContributionsClick,
|
||||
onShareClick,
|
||||
helpUrl = '',
|
||||
onAccountClick,
|
||||
onSelectTree,
|
||||
@@ -106,6 +107,10 @@ function AvatarMenu({
|
||||
<NavMenuItem icon={<Plus {...ICON} />} label={t('Créer un nouvel arbre')} onSelect={() => { onClose(); onCreateTree?.() }} />
|
||||
</NavMenuGroup>
|
||||
|
||||
{isOwner && onShareClick && (
|
||||
<NavMenuItem icon={<Share2 {...ICON} />} label={t("Partager l'arbre")} onSelect={() => { onClose(); onShareClick() }} />
|
||||
)}
|
||||
|
||||
{isOwner && (
|
||||
<NavMenuItem icon={<Settings {...ICON} />} label={t("Paramètres de l'arbre")} onSelect={() => { onClose(); onSettings?.() }} />
|
||||
)}
|
||||
|
||||
@@ -126,6 +126,17 @@ function ContextualNavbar({
|
||||
}
|
||||
|
||||
const closeMenus = () => setOpenMenu(null)
|
||||
|
||||
// « Propositions à relire » ouvre la fenêtre de partage, positionnée sur la section des propositions
|
||||
const openProposals = () => {
|
||||
onShareClick?.()
|
||||
const scrollWhenReady = (retries) => {
|
||||
const section = document.getElementById('contrib-propositions')
|
||||
if (section) section.scrollIntoView({ block: 'start' })
|
||||
else if (retries > 0) setTimeout(() => scrollWhenReady(retries - 1), 100)
|
||||
}
|
||||
scrollWhenReady(20)
|
||||
}
|
||||
// Chaque action ferme le menu avant de se lancer
|
||||
const run = (action) => () => {
|
||||
closeMenus()
|
||||
@@ -188,7 +199,7 @@ function ContextualNavbar({
|
||||
}]
|
||||
} else {
|
||||
const addItems = []
|
||||
if (isFamily) {
|
||||
if (onAddSouvenirClick) {
|
||||
addItems.push({ key: 'souvenir', icon: <ImagePlus {...ICON} />, label: t('Un souvenir'), sub: t('photo, vidéo, voix, document'), onSelect: onAddSouvenirClick })
|
||||
}
|
||||
if (isFamily || isOwner || isDemo) {
|
||||
@@ -389,7 +400,8 @@ function ContextualNavbar({
|
||||
activeTreeName={activeTreeName}
|
||||
isOwner={isOwner}
|
||||
pendingContributions={pendingContributions}
|
||||
onContributionsClick={onShareClick}
|
||||
onContributionsClick={openProposals}
|
||||
onShareClick={onShareClick}
|
||||
helpUrl={helpUrl}
|
||||
onAccountClick={onAccountClick}
|
||||
onSelectTree={onTreeSelect}
|
||||
|
||||
@@ -233,4 +233,5 @@ export default {
|
||||
"Terminer la modification": "Finish editing",
|
||||
"Aide": "Help",
|
||||
"Se déconnecter": "Sign out",
|
||||
"Partager l'arbre": "Share the tree",
|
||||
}
|
||||
@@ -261,6 +261,5 @@ button:disabled:has(.pz-busy.is-busy) { opacity: 1; cursor: progress; }
|
||||
.pz-lang-row-label { display: inline-flex; align-items: center; gap: 10px; }
|
||||
.pz-lang-row-label svg { color: var(--pz-muted); flex: none; }
|
||||
/* Dans la barre d'actions, séparé des boutons par un filet */
|
||||
.pz-lang--nav { margin-left: 4px; padding: 0 4px 0 8px; border-left: 1px solid var(--pz-line); align-self: stretch; }
|
||||
/* Sous les écrans d'accès et de connexion */
|
||||
.pz-lang--screen { justify-self: center; }
|
||||
Reference in new issue
Block a user