feat(api-detail): bouton Voir doc en accès direct + assets seeder yaml
- Déplace "Voir la documentation" hors du dropdown Actions en bouton principal à gauche du menu (désactivé si status ≠ GENERATED) - nest-cli.json : copie automatique des assets YAML du seeder (src/modules/seeder/assets/**/*.yaml → dist, watchAssets: true) Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Happy <yesreply@happy.engineering>
This commit is contained in:
@@ -3,7 +3,13 @@
|
|||||||
"collection": "@nestjs/schematics",
|
"collection": "@nestjs/schematics",
|
||||||
"sourceRoot": "src",
|
"sourceRoot": "src",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"deleteOutDir": true
|
"deleteOutDir": true,
|
||||||
|
"assets": [
|
||||||
|
{
|
||||||
|
"include": "modules/seeder/assets/**/*.yaml",
|
||||||
|
"watchAssets": true
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"entryFile": "back/src/main"
|
"entryFile": "back/src/main"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -77,21 +77,21 @@ import { ApiEntry, ApiEntryListItem, Category } from '@datacat/shared';
|
|||||||
</select>
|
</select>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
<!-- Droite : bouton Actions + dropdown -->
|
<!-- Droite : bouton Voir doc + Actions dropdown -->
|
||||||
<div style="position:relative;flex-shrink:0;">
|
<div style="display:flex;align-items:center;gap:0.5rem;flex-shrink:0;">
|
||||||
|
<a class="fr-btn fr-btn--icon-left fr-icon-eye-line"
|
||||||
|
[routerLink]="entry.status === 'GENERATED' ? ['/catalog', entry.id, 'docs'] : null"
|
||||||
|
[style.opacity]="entry.status !== 'GENERATED' ? '0.5' : '1'"
|
||||||
|
[style.pointer-events]="entry.status !== 'GENERATED' ? 'none' : 'auto'">
|
||||||
|
Voir la documentation
|
||||||
|
</a>
|
||||||
|
<div style="position:relative;">
|
||||||
<button class="fr-btn fr-btn--secondary fr-btn--icon-right fr-icon-arrow-down-s-line"
|
<button class="fr-btn fr-btn--secondary fr-btn--icon-right fr-icon-arrow-down-s-line"
|
||||||
(click)="actionsOpen.set(!actionsOpen())">
|
(click)="actionsOpen.set(!actionsOpen())">
|
||||||
Actions
|
Actions
|
||||||
</button>
|
</button>
|
||||||
@if (actionsOpen()) {
|
@if (actionsOpen()) {
|
||||||
<div style="position:absolute;right:0;top:calc(100% + 4px);z-index:1000;background:#fff;border:1px solid #ddd;box-shadow:0 4px 12px rgba(0,0,0,.15);min-width:220px;border-radius:4px;overflow:hidden;">
|
<div style="position:absolute;right:0;top:calc(100% + 4px);z-index:1000;background:#fff;border:1px solid #ddd;box-shadow:0 4px 12px rgba(0,0,0,.15);min-width:220px;border-radius:4px;overflow:hidden;">
|
||||||
<a [routerLink]="['/catalog', entry.id, 'docs']"
|
|
||||||
(click)="actionsOpen.set(false)"
|
|
||||||
style="display:block;padding:0.75rem 1rem;text-decoration:none;color:#161616;border-bottom:1px solid #eee;"
|
|
||||||
[style.opacity]="entry.status !== 'GENERATED' ? '0.5' : '1'"
|
|
||||||
[style.pointer-events]="entry.status !== 'GENERATED' ? 'none' : 'auto'">
|
|
||||||
Voir la documentation
|
|
||||||
</a>
|
|
||||||
<button style="display:block;width:100%;text-align:left;padding:0.75rem 1rem;background:none;border:none;border-bottom:1px solid #eee;cursor:pointer;color:#161616;"
|
<button style="display:block;width:100%;text-align:left;padding:0.75rem 1rem;background:none;border:none;border-bottom:1px solid #eee;cursor:pointer;color:#161616;"
|
||||||
(click)="onNewVersion(); actionsOpen.set(false)">
|
(click)="onNewVersion(); actionsOpen.set(false)">
|
||||||
Nouvelle version
|
Nouvelle version
|
||||||
@@ -118,6 +118,7 @@ import { ApiEntry, ApiEntryListItem, Category } from '@datacat/shared';
|
|||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- Navigation onglets -->
|
<!-- Navigation onglets -->
|
||||||
<div style="display:flex;border-bottom:2px solid #e5e5e5;margin-bottom:1.5rem;">
|
<div style="display:flex;border-bottom:2px solid #e5e5e5;margin-bottom:1.5rem;">
|
||||||
|
|||||||
Reference in New Issue
Block a user