Skip to content

Commit

Permalink
Merge tag v2.3.21 into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
roadiz-ci committed Jul 29, 2024
1 parent 63fdcb6 commit 4fc2ecb
Show file tree
Hide file tree
Showing 40 changed files with 82 additions and 162 deletions.
2 changes: 1 addition & 1 deletion src/Controllers/Documents/DocumentsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,7 @@ public function uploadAction(Request $request, ?int $folderId = null, string $_f
return new JsonResponse([
'success' => true,
'document' => $documentModel->toArray(),
], JsonResponse::HTTP_CREATED);
], Response::HTTP_CREATED);
} else {
return $this->redirectToRoute('documentsHomePage', ['folderId' => $folderId]);
}
Expand Down
9 changes: 0 additions & 9 deletions src/Models/DocumentModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,6 @@

final class DocumentModel implements ModelInterface
{
public static array $thumbnailArray = [
"fit" => "40x40",
"quality" => 50,
"sharpen" => 5,
"inline" => false,
];
public static array $thumbnail80Array = [
"fit" => "80x80",
"quality" => 50,
Expand All @@ -33,9 +27,6 @@ final class DocumentModel implements ModelInterface
"inline" => false,
"embed" => true,
];
public static array $largeArray = [
"noProcess" => true,
];

public function __construct(
private readonly DocumentInterface $document,
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
12 changes: 0 additions & 12 deletions src/Resources/app/assets/img/browserconfig.xml

This file was deleted.

Binary file removed src/Resources/app/assets/img/favicon-160x160.png
Binary file not shown.
Binary file removed src/Resources/app/assets/img/favicon-192x192.png
Binary file not shown.
Binary file removed src/Resources/app/assets/img/favicon-96x96.png
Binary file not shown.
Binary file removed src/Resources/app/assets/img/matrix@2x.png
Binary file not shown.
Binary file removed src/Resources/app/assets/img/mstile-144x144.png
Binary file not shown.
Binary file removed src/Resources/app/assets/img/mstile-150x150.png
Binary file not shown.
Binary file removed src/Resources/app/assets/img/mstile-310x150.png
Binary file not shown.
Binary file removed src/Resources/app/assets/img/mstile-310x310.png
Binary file not shown.
Binary file removed src/Resources/app/assets/img/mstile-70x70.png
Binary file not shown.
69 changes: 37 additions & 32 deletions src/Resources/app/components/DrawerItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,32 +7,30 @@
:class="{ 'has-thumbnail': item.thumbnail, 'not-published': item.isPublished === false }">

<div class="uk-sortable-handle"></div>
<div class="border" :style="{ backgroundColor: getColor() }"></div>
<div class="border" :style="{ backgroundColor: color }"></div>
<figure class="thumbnail"
v-if="getThumbnail() && !item.thumbnail.processable"
:style="{ 'background-image': 'url(' + getThumbnail() + ')' }"></figure>
v-if="thumbnailUrl && !item.thumbnail.processable"
:style="{ 'background-image': 'url(' + thumbnailUrl + ')' }"></figure>
<figure class="thumbnail"
v-else-if="getThumbnail() && item.thumbnail.processable">
v-else-if="thumbnailUrl && item.thumbnail.processable">
<picture>
<source :srcset="getThumbnail() + '.webp'" type="image/webp" />
<img :src="getThumbnail()" :alt="name">
<source :srcset="thumbnailUrl + '.webp'" type="image/webp" />
<img :src="thumbnailUrl" :alt="name">
</picture>
</figure>
<div class="names">
<p class="parent-name">
<template v-if="parentName">
<template v-if="subParentName">
<span class="sub">
{{ subParentName }}
</span>
</template>
<span class="direct">{{ parentName }}</span>
<p class="parent-name" v-if="parentName">
<template v-if="subParentName">
<span class="sub">
{{ subParentName }}
</span>
</template>
<span class="direct">{{ parentName }}</span>
</p>
<span class="name">{{ name }}</span>
<input type="hidden" :name="drawerName + '[' + index +']'" :value="item.id" />
<div class="links" :class="getEditItem() ? '' : 'no-edit'">
<ajax-link :href="getEditItem() + getReferer()" class="uk-button link uk-button-mini" v-if="getEditItem()">
<input type="hidden" :name="inputName" :value="item.id" v-if="inputName && item && item.id" />
<div class="links" :class="editItemUrl ? '' : 'no-edit'">
<ajax-link :href="editItemUrl + referer" class="uk-button link uk-button-mini" v-if="editItemUrl">
<i class="uk-icon-rz-pencil"></i>
</ajax-link><a href="#"
class="uk-button uk-button-mini link uk-button-danger rz-no-ajax-link"
Expand Down Expand Up @@ -85,26 +83,21 @@
type: String
}
},
methods: {
onAddItemButtonClick: function () {
// If document is in the explorer panel
if (this.isItemExplorer) {
this.addItem(this.item)
}
},
onRemoveItemButtonClick: function () {
// Call parent function to remove the document from widget
this.removeItem(this.item)
},
getColor: function () {
computed: {
color: function () {
if (this.item.nodeType && this.item.nodeType.color) {
return this.item.nodeType.color
} else if (this.item.color) {
return this.item.color
}
return null
},
getEditItem () {
inputName () {
if (this.drawerName) {
return this.drawerName + '[' + this.index + ']'
}
},
editItemUrl () {
if (this.editItem) {
return this.editItem
} else if (this.item.editItem) {
Expand All @@ -113,10 +106,10 @@
return null
},
getReferer: function () {
referer: function () {
return '?referer=' + window.location.pathname
},
getThumbnail: function () {
thumbnailUrl: function () {
if (this.item.thumbnail && this.item.thumbnail.url) {
return this.item.thumbnail.url
} else if (this.item.thumbnail) {
Expand All @@ -125,6 +118,18 @@
return null
}
},
methods: {
onAddItemButtonClick: function () {
// If document is in the explorer panel
if (this.isItemExplorer) {
this.addItem(this.item)
}
},
onRemoveItemButtonClick: function () {
// Call parent function to remove the document from widget
this.removeItem(this.item)
}
},
components: {
AjaxLink
}
Expand Down
21 changes: 4 additions & 17 deletions src/Resources/app/less/base/elements.less
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@
}

.border-radius(@topright: 0, @bottomright: 0, @bottomleft: 0, @topleft: 0) {
border-top-right-radius: @topright;
border-bottom-right-radius: @bottomright;
border-bottom-left-radius: @bottomleft;
border-top-left-radius: @topleft;
border-top-right-radius: @topright;
border-bottom-right-radius: @bottomright;
border-bottom-left-radius: @bottomleft;
border-top-left-radius: @topleft;
.background-clip(padding-box);
}

Expand Down Expand Up @@ -91,10 +91,6 @@
transition-delay: @delay;
}

.transition-property(@property: all) {
transition-property: @property;
}

.transition-timing-function(@ease: ease-in){
transition-timing-function: @ease;
}
Expand Down Expand Up @@ -149,15 +145,6 @@
appearance: none;
}

.keep-image-aspect(){
image-rendering: optimizeSpeed; /* Legal fallback */
image-rendering: pixellated; /* Firefox */
image-rendering: -o-crisp-edges; /* Opera */
image-rendering: -webkit-optimize-contrast; /* Chrome (and eventually Safari) */
image-rendering: optimize-contrast; /* CSS3 Proposed */
-ms-interpolation-mode:nearest-neighbor; /* IE8+ */
}

.color-placeholder(@color) {
&::placeholder {
color:@color;
Expand Down
31 changes: 0 additions & 31 deletions src/Resources/app/less/panels/entries_panel/admin_entries.less
Original file line number Diff line number Diff line change
Expand Up @@ -75,17 +75,6 @@
}
.info {
padding: 0 42px 0 20px;
&:after {
position: absolute;
content: "";
display: block;
width: 9px;
height: 6px;
right: 15px;
top: 24px;
.matrix-icon();
background-position: @icon-size*-1 @icon-size*-1;
}
}
& > p > .info {
font-weight: bold;
Expand Down Expand Up @@ -296,26 +285,6 @@
.box-sizing();
text-align: center;
padding: 7px 0;

&:after {
display: block;
width: 20px; height: 20px;
content: "";
.matrix-icon();
background-position: @icon-size*-1 0;
position: absolute;
right: -15px; top: 117px;
opacity: 1;
.transform-transition(~'ease 0.8s, 0.8s opacity ease');
.transition-timing-function(@easeOutExpo);
}

&.tree-panel-hidden {
&:after {
.transform(translate(5px));
opacity: 0;
}
}
}
&-button {
width: 20px;
Expand Down
12 changes: 0 additions & 12 deletions src/Resources/app/less/responsive/less-768.less
Original file line number Diff line number Diff line change
Expand Up @@ -224,18 +224,6 @@
.info{
min-width: inherit;
}

&:after{
position: absolute;
content: "";
display: block;
width: 9px;
height: 6px;
right: 10px;
top: 26px;
.matrix-icon();
background-position: @icon-size*-1 @icon-size*-1;
}
}

i{
Expand Down
9 changes: 0 additions & 9 deletions src/Resources/app/less/vars.less
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,6 @@
@icon-size : 20px;
@icons-picture : @icon-size*31 @icon-size*21;

.matrix-icon(@x:0, @y:0) {
background-image: url(../img/matrix@2x.png);
background-repeat: no-repeat;
background-size: @icons-picture;
background-position: @x @y;
.keep-image-aspect();
}


/* -------- FONTS -------- */
@main-font: system-ui;
@roadiz-mono-font: monospace;
Expand Down
14 changes: 6 additions & 8 deletions src/Resources/app/less/widgets/drawer_item.less
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,9 @@
border: 1px dashed transparent;
position: relative;
display: flex;
align-items: flex-start;
align-items: flex-end;
justify-items: center;
width: 240px;
height: @drawer-item-height;
margin: 0 10px 10px 0;
padding: 0;
background: #E5E5E5;
Expand Down Expand Up @@ -71,7 +70,7 @@
}
}

.border{
.border {
position: absolute;
top: 0;
bottom: 0;
Expand Down Expand Up @@ -126,16 +125,15 @@
}

.parent-name {
height: 12px;
font-size: 8px;
text-transform: uppercase;
display: block;
line-height: 11px;
color: rgba(0, 0, 0, 0.6);
letter-spacing: 0.07em;
font-weight: 700;
letter-spacing: 0.08em;
font-weight: 600;
text-overflow: ellipsis;
white-space: nowrap;
text-wrap: pretty;
overflow: hidden;
margin: 0;
padding-right: 10px;
Expand All @@ -157,7 +155,7 @@
padding-right: 10px;

text-overflow: ellipsis;
white-space: nowrap;
text-wrap: pretty;
overflow: hidden;
}

Expand Down
3 changes: 2 additions & 1 deletion src/Resources/app/less/widgets/drawer_widget.less
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@
}
}

.drawer-widget-sortable{
.drawer-widget-sortable {
margin: 0;
padding: 10px;

Expand All @@ -167,6 +167,7 @@
display: flex;
flex-wrap: wrap;
min-height: 80px;
align-items: flex-start;
}
}

Expand Down
Loading

0 comments on commit 4fc2ecb

Please sign in to comment.