-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1505 from cloud-pi-native/develop
Develop
- Loading branch information
Showing
39 changed files
with
347 additions
and
152 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!env node | ||
import path from 'node:path' | ||
|
||
import { createCustomCollectionFile } from '@gouvminint/vue-dsfr/meta' | ||
import { Command } from 'commander' | ||
|
||
const program = new Command() | ||
|
||
program | ||
.option('-s, --source <filepath>', 'Chemin vers le fichier de tuples [IconifyJSON, string[]]') | ||
.option('-t, --target <filepath>', 'Chemin vers le fichier destination (src/icons.ts par défaut)') | ||
.parse(process.argv) | ||
|
||
const options = program.opts() | ||
|
||
if (options.source && options.target) { | ||
createCustomCollectionFile(path.resolve(process.cwd(), options.source), path.resolve(process.cwd(), options.target)) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
// @ts-check | ||
import { icons as riCollection } from '@iconify-json/ri' | ||
|
||
/** | ||
* @type {string[]} | ||
*/ | ||
const riIconNames = [ | ||
'account-circle-line', | ||
'add-line', | ||
'admin-line', | ||
'alert-line', | ||
'archive-line', | ||
'arrow-drop-left-line', | ||
'arrow-drop-right-line', | ||
'arrow-go-back-line', | ||
'arrow-left-double-line', | ||
'arrow-right-double-line', | ||
'arrow-right-s-line', | ||
'arrow-up-s-line', | ||
'award-line', | ||
'building-line', | ||
'check-line', | ||
'checkbox-blank-circle-fill', | ||
'checkbox-circle-line', | ||
'clipboard-line', | ||
'close-line', | ||
'dashboard-line', | ||
'delete-bin-7-line', | ||
'exchange-line', | ||
'eye-line', | ||
'eye-off-line', | ||
'file-download-line', | ||
'filter-line', | ||
'filter-off-line', | ||
'flow-chart', | ||
'focus-3-line', | ||
'folder-user-line', | ||
'folders-line', | ||
'git-branch-line', | ||
'git-merge-line', | ||
'github-line', | ||
'heart-pulse-line', | ||
'key-2-line', | ||
'key-2-line', | ||
'loader-4-line', | ||
'lock-line', | ||
'lock-unlock-line', | ||
'mail-line', | ||
'microsoft-line', | ||
'moon-clear-line', | ||
'newspaper-line', | ||
'pencil-line', | ||
'refresh-line', | ||
'restart-line', | ||
'send-plane-line', | ||
'server-line', | ||
'settings-3-line', | ||
'shield-check-line', | ||
'sound-module-line', | ||
'stock-line', | ||
'sun-line', | ||
'team-line', | ||
'tools-line', | ||
'upload-cloud-line', | ||
'user-add-line', | ||
'user-shared-2-line', | ||
] | ||
|
||
/** | ||
* @type {[import('@iconify/vue').IconifyJSON, string[]][]} | ||
*/ | ||
export const collectionsToFilter = [ | ||
[riCollection, riIconNames], | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
<script lang="ts" setup> | ||
import type { Project } from '@/utils/project-utils.js' | ||
import { descriptionMaxLength, projectIsLockedInfo } from '@cpn-console/shared' | ||
withDefaults(defineProps<{ | ||
project: Project | ||
canEditDescription: boolean | ||
}>(), { | ||
canEditDescription: false, | ||
}) | ||
const emits = defineEmits<{ | ||
(e: 'update:modelValue'): void | ||
(e: 'saveDescription'): void | ||
}>() | ||
const isEditingDescription = ref(false) | ||
function getDynamicTitle(locked?: Project['locked'], description?: Project['description']) { | ||
if (locked) return projectIsLockedInfo | ||
if (description) return 'Editer la description' | ||
return 'Ajouter une description' | ||
} | ||
const modelValue = defineModel<string>() | ||
function saveDescription() { | ||
emits('saveDescription') | ||
isEditingDescription.value = false | ||
} | ||
</script> | ||
|
||
<template> | ||
<div | ||
class="fr-callout" | ||
> | ||
<!-- Section nom --> | ||
<h1 | ||
class="fr-callout__title fr-mb-3w" | ||
> | ||
{{ project.name }}<span class="fr-callout__title fr-mb-3w italic inline opacity-70"> | ||
({{ project.organization.label }}) | ||
</span> | ||
</h1> | ||
|
||
<!-- Section description --> | ||
<div | ||
v-if="isEditingDescription" | ||
> | ||
<DsfrInput | ||
v-model="modelValue" | ||
data-testid="descriptionInput" | ||
:is-textarea="true" | ||
:maxlength="descriptionMaxLength" | ||
label="Description du projet" | ||
label-visible | ||
:hint="`Courte description expliquant la finalité du projet (${descriptionMaxLength} caractères maximum).`" | ||
placeholder="Application de réservation de places à l'examen du permis B." | ||
/> | ||
<div | ||
class="flex justify-between" | ||
> | ||
<DsfrButton | ||
data-testid="saveDescriptionBtn" | ||
label="Enregistrer la description" | ||
secondary | ||
:icon="project.operationsInProgress.includes('update') | ||
? { name: 'ri:refresh-line', animation: 'spin' } | ||
: 'ri:send-plane-line'" | ||
:disabled="project.operationsInProgress.includes('update')" | ||
@click="saveDescription" | ||
/> | ||
<DsfrButton | ||
label="Annuler" | ||
primary | ||
@click="isEditingDescription = false" | ||
/> | ||
</div> | ||
</div> | ||
<div | ||
v-else | ||
class="flex gap-4 items-center" | ||
> | ||
<p | ||
v-if="project.description" | ||
data-testid="descriptionP" | ||
> | ||
{{ project.description }} | ||
</p> | ||
<p | ||
v-else | ||
data-testid="descriptionP" | ||
class="disabled" | ||
> | ||
Aucune description pour le moment... | ||
</p> | ||
<DsfrButton | ||
v-if="canEditDescription" | ||
class="fr-mt-0" | ||
icon="ri:pencil-line" | ||
data-testid="setDescriptionBtn" | ||
:title="getDynamicTitle(project.locked, project.description)" | ||
icon-only | ||
secondary | ||
@click="isEditingDescription = true" | ||
/> | ||
</div> | ||
|
||
<!-- Section version --> | ||
<div | ||
v-if="project.lastSuccessProvisionningVersion" | ||
title="Version de la console lors du dernier provisionnement réussi du projet" | ||
> | ||
<code | ||
class="fr-text-default--info text-sm" | ||
>Version: {{ project.lastSuccessProvisionningVersion }}</code> | ||
</div> | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.