resolve conflict
This commit is contained in:
parent
fa34aed357
commit
d4fe38e65a
16 changed files with 92 additions and 19 deletions
1
public/content/creations/creations.txt
Normal file
1
public/content/creations/creations.txt
Normal file
|
|
@ -0,0 +1 @@
|
|||
Uuid: rVtGY13I3P0Pi1pE
|
||||
1
public/content/materials/materials.txt
Normal file
1
public/content/materials/materials.txt
Normal file
|
|
@ -0,0 +1 @@
|
|||
Uuid: sYmWEXRPBE9Ym4nn
|
||||
|
Before Width: | Height: | Size: 114 KiB After Width: | Height: | Size: 114 KiB |
|
|
@ -10,7 +10,7 @@ Tags:
|
|||
|
||||
----
|
||||
|
||||
Uuid: RBUbSD0s5cYo0uQE
|
||||
Uuid: jGugtGC1EbgJQrYq
|
||||
|
||||
----
|
||||
|
||||
|
Before Width: | Height: | Size: 217 KiB After Width: | Height: | Size: 217 KiB |
|
|
@ -10,7 +10,7 @@ Tags:
|
|||
|
||||
----
|
||||
|
||||
Uuid: nf6u4SZVnNUUKKU2
|
||||
Uuid: TCy5v8H96mcAaTc8
|
||||
|
||||
----
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 119 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 213 KiB |
|
|
@ -2,7 +2,7 @@ Description:
|
|||
|
||||
----
|
||||
|
||||
Tags: coloris & nuances, DA globale
|
||||
Tags: bouton poussoir, DA globale, forme & design
|
||||
|
||||
----
|
||||
|
||||
|
|
@ -10,7 +10,7 @@ Date: 2024-10-02 02:10
|
|||
|
||||
----
|
||||
|
||||
Uuid: gc1lqYk2YUOBgEoS
|
||||
Uuid: BJZhoIKbKAh76NEV
|
||||
|
||||
----
|
||||
|
||||
|
|
@ -10,15 +10,15 @@ Clientbriefpdf:
|
|||
|
||||
----
|
||||
|
||||
Description: Sed congue magna magna lorem aliquam diam dolor arcu fusce adipiscing morbi suspendisse sit dolor erat lorem phasellus sollicitudin cursus dolor aliquam maximus accumsan maximus phasellus ipsum cursus nisi cursus erat nec suspendisse morbi interdum suspendisse purus eget gravida ut mi hendrerit sit molestie eros scelerisque accumsan orci dolor amet.
|
||||
Description:
|
||||
|
||||
----
|
||||
|
||||
Clientbriefimages:
|
||||
|
||||
- file://gc1lqYk2YUOBgEoS
|
||||
- file://RBUbSD0s5cYo0uQE
|
||||
- file://nf6u4SZVnNUUKKU2
|
||||
- file://BJZhoIKbKAh76NEV
|
||||
- file://jGugtGC1EbgJQrYq
|
||||
- file://TCy5v8H96mcAaTc8
|
||||
|
||||
----
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,8 @@ return [
|
|||
'routes' => [
|
||||
require(__DIR__ . '/routes/logout.php'),
|
||||
require(__DIR__ . '/routes/toggle-favorite.php'),
|
||||
require(__DIR__ . '/routes/upload-images.php')
|
||||
require(__DIR__ . '/routes/upload-images.php'),
|
||||
require(__DIR__ . '/routes/save-page.php'),
|
||||
],
|
||||
'hooks' => [
|
||||
'page.create:after' => require_once(__DIR__ . '/hooks/create-steps.php'),
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ return [
|
|||
return Str::contains($path, 'pages/projects');
|
||||
}
|
||||
],
|
||||
'-',
|
||||
'inspirations' => [
|
||||
'label' => 'Inspirations',
|
||||
'icon' => 'images',
|
||||
|
|
@ -46,6 +47,24 @@ return [
|
|||
return Str::contains($path, 'pages/inspirations');
|
||||
}
|
||||
],
|
||||
'materials' => [
|
||||
'label' => 'Matériauthèque',
|
||||
'icon' => 'images',
|
||||
'link' => 'pages/materials',
|
||||
'current' => function (string $current): bool {
|
||||
$path = Kirby\Cms\App::instance()->path();
|
||||
return Str::contains($path, 'pages/materials');
|
||||
}
|
||||
],
|
||||
'creations' => [
|
||||
'label' => 'Réalisations',
|
||||
'icon' => 'images',
|
||||
'link' => 'pages/creations',
|
||||
'current' => function (string $current): bool {
|
||||
$path = Kirby\Cms\App::instance()->path();
|
||||
return Str::contains($path, 'pages/creations');
|
||||
}
|
||||
],
|
||||
'-',
|
||||
'notifications' => [
|
||||
'label' => 'Notifications',
|
||||
|
|
|
|||
22
public/site/config/routes/save-page.php
Normal file
22
public/site/config/routes/save-page.php
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
'pattern' => '(:all)save-page.json',
|
||||
'method' => 'POST',
|
||||
'action' => function () {
|
||||
$json = file_get_contents('php://input');
|
||||
$data = json_decode($json);
|
||||
|
||||
$page = page($data->pageUri);
|
||||
|
||||
$newProperties = [];
|
||||
|
||||
foreach ($data->properties as $incomingProperty) {
|
||||
$newProperties[$incomingProperty->name] = $incomingProperty->value;
|
||||
}
|
||||
|
||||
$newPage = $page->update($newProperties);
|
||||
|
||||
return json_encode($newProperties);
|
||||
}
|
||||
];
|
||||
0
public/site/templates/creations.php
Normal file
0
public/site/templates/creations.php
Normal file
0
public/site/templates/materials.php
Normal file
0
public/site/templates/materials.php
Normal file
|
|
@ -15,6 +15,8 @@
|
|||
placeholder="Ajoutez une description générale de votre projet…"
|
||||
rows="3"
|
||||
class="border border-grey-200 | rounded-xl | p-16 | w-full"
|
||||
v-model="page.content.description"
|
||||
@input="savePage()"
|
||||
></textarea>
|
||||
</div>
|
||||
<fieldset class="project-details__filters | flex-1">
|
||||
|
|
@ -223,14 +225,6 @@ const { page } = usePageStore();
|
|||
const toast = useToast();
|
||||
const selectedTags = ref([]);
|
||||
|
||||
const beforeSend = (event) => {
|
||||
const formData = event.formData;
|
||||
formData.append(
|
||||
"pageUri",
|
||||
"projects/miss-dior-blooming-bouquet/client-brief"
|
||||
);
|
||||
};
|
||||
|
||||
const modal = ref(null);
|
||||
watch(modal, (newValue) => {
|
||||
if (newValue) {
|
||||
|
|
@ -246,7 +240,34 @@ watch(modal, (newValue) => {
|
|||
|
||||
const images = ref(page.images);
|
||||
|
||||
const onAdvancedUpload = (event) => {
|
||||
const isWaitingForSave = ref(false);
|
||||
function savePage() {
|
||||
if (!isWaitingForSave.value) {
|
||||
isWaitingForSave.value = true;
|
||||
setTimeout(() => {
|
||||
const headers = {
|
||||
method: "POST",
|
||||
body: JSON.stringify({
|
||||
pageUri: page.uri,
|
||||
properties: [
|
||||
{
|
||||
name: "description",
|
||||
value: page.content.description,
|
||||
},
|
||||
],
|
||||
}),
|
||||
};
|
||||
fetch("/save-page.json", headers)
|
||||
.then((res) => res.json())
|
||||
.then((json) => {
|
||||
isWaitingForSave.value = false;
|
||||
console.log(json);
|
||||
});
|
||||
}, 3000);
|
||||
}
|
||||
}
|
||||
|
||||
function onAdvancedUpload(event) {
|
||||
if (event.xhr.status === 200) {
|
||||
toast.add({
|
||||
severity: "success",
|
||||
|
|
@ -266,7 +287,15 @@ const onAdvancedUpload = (event) => {
|
|||
});
|
||||
console.error(JSON.parse(event.xhr.response));
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
function beforeSend(event) {
|
||||
const formData = event.formData;
|
||||
formData.append(
|
||||
"pageUri",
|
||||
"projects/miss-dior-blooming-bouquet/client-brief"
|
||||
);
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue