Skip to content

chore: nouveau serveur de preproduction #516

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions .github/workflows/staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,19 @@ jobs:
npm run build:widget -- --base "https://cartobio-preprod.agencebio.org/notification-webcomponent/"
npm run build:widget-demo -- --base "https://cartobio-preprod.agencebio.org/notification-webcomponent/"

- name: Install SSH Key
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.AGENCEBIO_SSH_PRIVATE_KEY }}
known_hosts: ${{ secrets.AGENCEBIO_SSH_KNOWN_HOSTS }}
- name: Install SSH Key
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.AGENCEBIO_SSH_PRIVATE_KEY }}
known_hosts: ${{ secrets.AGENCEBIO_PREPROD_SSH_KNOWN_HOSTS }}

- name: rsync
run: |
rsync -avzr --delete --exclude 'node_modules' --exclude '.git*' ./dist/ ${REMOTE_USER}@${REMOTE_HOST}:${REMOTE_PATH}
env:
REMOTE_HOST: ${{ secrets.AGENCEBIO_SSH_HOST }}
REMOTE_USER: ${{ secrets.AGENCEBIO_SSH_USERNAME }}
REMOTE_PATH: /var/www/cartobio-preprod.agencebio.org/
- name: rsync
run: |
rsync -avzr --delete --exclude 'node_modules' --exclude '.git*' ./dist/ ${REMOTE_USER}@${REMOTE_HOST}:${REMOTE_PATH}
env:
REMOTE_HOST: ${{ secrets.AGENCEBIO_PREPROD_SSH_HOST }}
REMOTE_USER: ${{ secrets.AGENCEBIO_SSH_USERNAME }}
REMOTE_PATH: /var/www/cartobio-preprod.agencebio.org/

- id: version
run: echo v=$(node -p "require('./package.json').version") >> "$GITHUB_OUTPUT"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@ jobs:
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.AGENCEBIO_SSH_PRIVATE_KEY }}
known_hosts: ${{ secrets.AGENCEBIO_SSH_KNOWN_HOSTS }}
known_hosts: ${{ secrets.AGENCEBIO_PREPROD_SSH_KNOWN_HOSTS }}

- name: rsync
run: |
rsync -avzr --delete --exclude 'node_modules' --exclude '.git*' ./dist/ ${REMOTE_USER}@${REMOTE_HOST}:${REMOTE_PATH}
env:
REMOTE_HOST: ${{ secrets.AGENCEBIO_SSH_HOST }}
REMOTE_HOST: ${{ secrets.AGENCEBIO_PREPROD_SSH_HOST }}
REMOTE_USER: ${{ secrets.AGENCEBIO_SSH_USERNAME }}
REMOTE_PATH: /var/www/cartobio-test.agencebio.org/

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@agencebio/cartobio-front",
"version": "2.30.1",
"version": "2.30.2",
"private": true,
"type": "module",
"scripts": {
Expand Down
28 changes: 23 additions & 5 deletions src/components/map/CustomControlsParcelles.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,12 @@ const props = defineProps({
type: Boolean,
required: true,
},
disable: {
type: Boolean,
required: true,
},
});
const currentMode = ref(props.mode);
const currentMode = ref(!props.disable ? props.mode : "");
const windowWidth = useWindowWidth();

const selectModif = () => {
Expand Down Expand Up @@ -72,6 +76,7 @@ const redo = () => {
title="Modifier"
aria-label="Modifier"
@click="selectModif()"
:disabled="disable"
>
<span class="ri-shape-line" aria-hidden="true" style="font-size: 1.2em"></span>
<span v-if="windowWidth > 780" class="button-text">Modifier</span>
Expand All @@ -83,6 +88,7 @@ const redo = () => {
title="Diviser"
aria-label="Diviser"
@click="selectDivid()"
:disabled="disable"
>
<span class="ri-scissors-cut-line" aria-hidden="true" style="font-size: 1.2em"></span>
<span v-if="windowWidth > 780" class="button-text">Diviser</span>
Expand All @@ -95,6 +101,7 @@ const redo = () => {
title="Découper les bordures"
aria-label="Découper les bordures"
@click="selectCutBorders()"
:disabled="disable"
>
<span class="fr-icon-crop-line" aria-hidden="true"></span>
<span v-if="windowWidth > 780" class="button-text">{{
Expand All @@ -111,25 +118,32 @@ const redo = () => {
:class="mesureActive ? 'selected-button' : ''"
@click="selectMesure()"
aria-label="Mesurer"
:disabled="disable"
>
<span class="ri-ruler-line" aria-hidden="true" style="font-size: 1.5em"></span>
</button>
<div class="separator"></div>
<button type="button" title="Supprimer" aria-label="Supprimer" :disabled="!canDelete" @click="supprimer()">
<button
type="button"
title="Supprimer"
aria-label="Supprimer"
:disabled="!canDelete || disable"
@click="supprimer()"
>
<span class="fr-icon-delete-line" aria-hidden="true" style="font-size: 1.2em"></span>
</button>
<button type="button" title="Annuler" aria-label="Annuler" :disabled="!canUndo" @click="undo()">
<button type="button" title="Annuler" aria-label="Annuler" :disabled="!canUndo || disable" @click="undo()">
<span class="fr-icon-arrow-go-back-line" aria-hidden="true" style="font-size: 1.2em"></span>
</button>
<button type="button" title="Rétablir" aria-label="Rétablir" :disabled="!canRedo" @click="redo()">
<button type="button" title="Rétablir" aria-label="Rétablir" :disabled="!canRedo || disable" @click="redo()">
<span class="fr-icon-arrow-go-forward-line" aria-hidden="true" style="font-size: 1.2em"></span>
</button>
</div>
</div>
</Teleport>
</template>

<style>
<style scoped>
.command-modif-parcellaire {
display: inline-flex;
justify-content: space-between;
Expand Down Expand Up @@ -177,6 +191,10 @@ button:hover {
background-color: #f5f5f5;
}

button:disabled .button-text {
color: gray;
}

.button-text {
margin-left: 4px;
color: #000091;
Expand Down
11 changes: 9 additions & 2 deletions src/pages/[...all].vue
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
<route lang="yaml">
meta:
seo:
title: Oups, page introuvable
title: Page introuvable
</route>

<template>
<div class="fr-container fr-my-5w">
<h2>Page introuvable</h2>

<p>Damned !</p>
<p>Vous tentez d’accéder à une page qui a été supprimée ou qui n’a jamais existé.</p>
<router-link :to="store.startPage" class="fr-btn fr-btn--secondary">Revenir à l'accueil</router-link>
</div>
</template>

<script setup>
import { useUserStore } from "@/stores/user";

const store = useUserStore();
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ meta:
:canRedo="historyIndex < history.length - 1"
:canDelete="currentMode == 'modif' && selectedParcelles !== null && modifiedFeature.length > 1"
:mesureActive="measureOn"
:disable="disableBar"
@divide="openDivide"
@cutBorders="openCutBorders"
@editContour="openEdit"
Expand Down Expand Up @@ -390,6 +391,8 @@ const selectedParcelles = ref(null);
const history = ref([]);
const historyIndex = ref(-1);

const disableBar = ref(false);

const helper = {
modif: {
title: "Modifier le tracé",
Expand Down Expand Up @@ -2087,6 +2090,8 @@ function loadFeatureModif() {
if (e.message.startsWith("Feature is not")) {
loadingError.value =
"La modification de contour n’est pas encore disponible pour les parcelles évidées. Veuillez nous en excuser.";
draw.setMode("select");
disableBar.value = true;
} else {
throw e;
}
Expand Down
Loading