Skip to content
Permalink
Browse files

Merge pull request #2526 from getkirby/release/3.3.5

3.3.5
  • Loading branch information
bastianallgeier committed Mar 17, 2020
2 parents 0330c0a + 1ad77af commit a7f2f9695509ad6f7e407c5214b0a7aff0b99039
Showing with 774 additions and 242 deletions.
  1. +5 −1 .github/README.md
  2. +1 −1 composer.json
  3. +1 −1 composer.lock
  4. +7 −0 config/fields/mixins/picker.php
  5. +13 −3 config/helpers.php
  6. +9 −9 i18n/translations/cs.json
  7. +1 −1 panel/dist/css/app.css
  8. +1 −1 panel/dist/js/app.js
  9. +8 −0 panel/src/App.vue
  10. +23 −8 panel/src/components/Dialogs/Dialog.vue
  11. +4 −0 panel/src/components/Dialogs/LanguageCreateDialog.vue
  12. +4 −0 panel/src/components/Dialogs/LanguageUpdateDialog.vue
  13. +2 −0 panel/src/components/Forms/Field.vue
  14. +5 −5 panel/src/components/Forms/Field/FilesField.vue
  15. +5 −5 panel/src/components/Forms/Field/PagesField.vue
  16. +5 −10 panel/src/components/Forms/Field/UsersField.vue
  17. +1 −2 panel/src/components/Forms/Input/TextareaInput.vue
  18. +1 −1 panel/src/components/Forms/Toolbar.vue
  19. +53 −2 panel/src/components/Layout/Cards.vue
  20. +1 −0 panel/src/components/Layout/Column.vue
  21. +1 −0 panel/src/components/Layout/Header.vue
  22. +4 −0 panel/src/components/Misc/Text.vue
  23. +8 −2 panel/src/components/Views/UserView.vue
  24. +2 −2 panel/src/helpers/upload.js
  25. +16 −2 panel/src/mixins/picker/field.js
  26. +18 −6 panel/src/store/store.js
  27. +0 −1 src/Cms/App.php
  28. +1 −1 src/Cms/FileActions.php
  29. +7 −0 src/Cms/FileRules.php
  30. +68 −20 src/Cms/HasSiblings.php
  31. +51 −2 src/Cms/Language.php
  32. +4 −1 src/Cms/LanguageRouter.php
  33. +11 −0 src/Cms/LanguageRoutes.php
  34. +31 −21 src/Cms/Page.php
  35. +109 −92 src/Cms/PageSiblings.php
  36. +20 −0 src/Cms/UserActions.php
  37. +11 −0 src/Toolkit/Dir.php
  38. +1 −1 src/Toolkit/Query.php
  39. +2 −6 tests/Cms/Files/FileTest.php
  40. +43 −0 tests/Cms/KirbyText/KirbyTagTest.php
  41. +20 −1 tests/Cms/Languages/LanguageTest.php
  42. +27 −0 tests/Cms/Pages/PageSiblingsTest.php
  43. +16 −0 tests/Cms/Pages/PageStatesTest.php
  44. +61 −5 tests/Cms/Pages/PageTemplateTest.php
  45. +4 −10 tests/Cms/Pages/PageTest.php
  46. +13 −5 tests/Cms/Plugins/PanelPluginsTest.php
  47. +4 −10 tests/Cms/Site/SiteTest.php
  48. +20 −0 tests/Cms/Users/UserActionsTest.php
  49. +25 −4 tests/Toolkit/DirTest.php
  50. +26 −0 tests/Toolkit/QueryTest.php
@@ -1,6 +1,10 @@
# Kirby

[![Build Status](https://travis-ci.com/getkirby/kirby.svg?branch=master)](https://travis-ci.com/getkirby/kirby)
[![Release](https://flat.badgen.net/github/release/getkirby/kirby/stable)](https://github.com/getkirby/kirby/releases/latest)
[![Build Status](https://flat.badgen.net/travis/getkirby/kirby)](https://travis-ci.com/getkirby/kirby)
[![Coverage Status](https://flat.badgen.net/coveralls/c/github/getkirby/kirby)](https://coveralls.io/github/getkirby/kirby)
[![Downloads](https://flat.badgen.net/packagist/dt/getkirby/cms)](https://github.com/getkirby/kirby/releases/latest)
[![Twitter](https://flat.badgen.net/twitter/follow/getkirby)](https://twitter.com/getkirby)

This is Kirby's core application folder. Get started with one of the following repositories instead:

@@ -1,7 +1,7 @@
{
"name": "getkirby/cms",
"description": "The Kirby 3 core",
"version": "3.3.4",
"version": "3.3.5",
"license": "proprietary",
"keywords": ["kirby", "cms", "core"],
"homepage": "https://getkirby.com",

Some generated files are not rendered by default. Learn more.

@@ -25,6 +25,13 @@
return $info;
},

/**
* Whether each item should be clickable
*/
'link' => function (bool $link = true) {
return $link;
},

/**
* The minimum number of required selected
*/
@@ -401,15 +401,25 @@ function kirby()
* @param string|array $type
* @param string $value
* @param array $attr
* @param array $data
* @return string
*/
function kirbytag($type, string $value = null, array $attr = []): string
function kirbytag($type, string $value = null, array $attr = [], array $data = []): string
{
if (is_array($type) === true) {
return App::instance()->kirbytag(key($type), current($type), $type);
$kirbytag = $type;
$type = key($kirbytag);
$value = current($kirbytag);
$attr = $kirbytag;

// check data attribute and separate from attr data if exists
if (isset($attr['data']) === true) {
$data = $attr['data'];
unset($attr['data']);
}
}

return App::instance()->kirbytag($type, $value, $attr);
return App::instance()->kirbytag($type, $value, $attr, $data);
}

/**
@@ -43,7 +43,7 @@
"error.avatar.create.fail": "Nebylo možné nahrát profilový obrázek",
"error.avatar.delete.fail": "Nebylo mo\u017en\u00e9 smazat profilov\u00fd obr\u00e1zek",
"error.avatar.dimensions.invalid":
"Výšku a šířka profilového obrázku by měla být pod 3000 pixelů",
"Šířka a výška obrázku musí být pod 3000 pixelů",
"error.avatar.mime.forbidden":
"Profilový obrázek musí být ve formátu JPEG nebo PNG",

@@ -61,21 +61,21 @@
"Přípona souboru \"{extension}\" není povolena",
"error.file.extension.missing":
"Nem\u016f\u017eete nahr\u00e1t soubor bez p\u0159\u00edpony",
"error.file.maxheight": "The height of the image must not exceed {height} pixels",
"error.file.maxsize": "The file is too large",
"error.file.maxwidth": "The width of the image must not exceed {width} pixels",
"error.file.maxheight": "Výška obrázku nesmí přesáhnout {height} pixelů",
"error.file.maxsize": "Soubor je příliš velký",
"error.file.maxwidth": "Šířka obrázku nesmí přesáhnout {width} pixelů",
"error.file.mime.differs":
"Nahraný soubor musí být stejného typu \"{mime}\"",
"error.file.mime.forbidden": "Soubor typu \"{mime}\" není povolený",
"error.file.mime.invalid": "Invalid mime type: {mime}",
"error.file.mime.invalid": "Neplatný MIME typ: {mime}",
"error.file.mime.missing":
"Nelze rozeznat mime typ souboru \"{filename}\"",
"error.file.minheight": "The height of the image must be at least {height} pixels",
"error.file.minsize": "The file is too small",
"error.file.minwidth": "The width of the image must be at least {width} pixels",
"error.file.minheight": "Výška obrázku musí být alespoň {height} pixelů",
"error.file.minsize": "Soubor je příliš malý",
"error.file.minwidth": "Šířka obrázku musí být alespoň {width} pixelů",
"error.file.name.missing": "Název souboru nesmí být prázdný",
"error.file.notFound": "Soubor se nepoda\u0159ilo nal\u00e9zt",
"error.file.orientation": "The orientation of the image must be \"{orientation}\"",
"error.file.orientation": "Orientace obrázku másí být \"{orientation}\"",
"error.file.type.forbidden": "Nemáte povoleno nahrávat soubory typu {type} ",
"error.file.undefined": "Soubor se nepoda\u0159ilo nal\u00e9zt",

Large diffs are not rendered by default.

Large diffs are not rendered by default.

@@ -5,6 +5,8 @@
:data-loading="$store.state.isLoading"
:data-topbar="inside"
:data-dialog="$store.state.dialog"
:data-translation="translation"
:data-translation-default="defaultTranslation"
class="k-panel"
>
<keep-alive>
@@ -57,6 +59,12 @@ export default {
return !this.$route.meta.outside && this.$store.state.user.current
? true
: false;
},
defaultTranslation() {
return this.$store.state.languages.current ? this.$store.state.languages.current === this.$store.state.languages.default : false;
},
translation() {
return this.$store.state.languages.current ? this.$store.state.languages.current.code : false;
}
},
created() {
@@ -40,7 +40,10 @@
type: String,
default: "check"
},
size: String,
size: {
type: String,
default: "default"
},
theme: String,
visible: Boolean
},
@@ -176,7 +179,7 @@
.k-dialog-box {
position: relative;
background: $color-light;
width: 22rem;
width: 100%;
box-shadow: $box-shadow;
border-radius: $border-radius;
line-height: 1;
@@ -186,16 +189,28 @@
flex-direction: column;
}
.k-dialog-box[data-size="small"] {
width: 20rem;
@media screen and (min-width: 20rem) {
.k-dialog-box[data-size="small"] {
width: 20rem;
}
}
.k-dialog-box[data-size="medium"] {
width: 30rem;
@media screen and (min-width: 22rem) {
.k-dialog-box[data-size="default"] {
width: 22rem;
}
}
.k-dialog-box[data-size="large"] {
width: 40rem;
@media screen and (min-width: 30rem) {
.k-dialog-box[data-size="medium"] {
width: 30rem;
}
}
@media screen and (min-width: 40rem) {
.k-dialog-box[data-size="large"] {
width: 40rem;
}
}
.k-dialog-notification {
@@ -94,6 +94,10 @@ export default {
this.$refs.dialog.open();
},
submit() {
if (this.language.locale) {
this.language.locale = this.language.locale.trim() || null;
}
this.$api
.post("languages", {
name: this.language.name,
@@ -64,6 +64,10 @@ export default {
return;
}
if (typeof this.language.locale === "string") {
this.language.locale = this.language.locale.trim() || null;
}
this.$api
.patch("languages/" + this.language.code, {
name: this.language.name,
@@ -1,6 +1,7 @@
<template>
<div
:data-disabled="disabled"
:data-translate="translate"
:class="'k-field k-field-name-' + name"
@focusin="$emit('focus', $event)"
@focusout="$emit('blur', $event)"
@@ -49,6 +50,7 @@ export default {
label: String,
name: [String, Number],
required: Boolean,
translate: Boolean,
type: String
},
computed: {
@@ -7,11 +7,11 @@
<k-dropdown>
<k-button
ref="pickerToggle"
icon="add"
:icon="btnIcon"
class="k-field-options-button"
@click="$refs.picker.toggle()"
>
{{ $t('add') }}
{{ btnLabel }}
</k-button>
<k-dropdown-content ref="picker" align="right">
<k-dropdown-item icon="check" @click="open">{{ $t('select') }}</k-dropdown-item>
@@ -40,7 +40,7 @@
:key="file.filename"
:sortable="!disabled && selected.length > 1"
:text="file.text"
:link="file.link"
:link="link ? file.link : null"
:info="file.info"
:image="file.image"
:icon="file.icon"
@@ -62,7 +62,7 @@
icon="image"
@click="open"
>
{{ empty || $t('field.files.empty') }}
{{ empty || $t("field.files.empty") }}
</k-empty>

<k-files-dialog ref="selector" @submit="select" />
@@ -78,7 +78,7 @@ import picker from "@/mixins/picker/field.js";
export default {
mixins: [picker],
props: {
uploads: [Boolean, Object, Array],
uploads: [Boolean, Object, Array]
},
created() {
this.$events.$on("file.delete", this.removeById);
@@ -3,11 +3,11 @@
<k-button-group slot="options" class="k-field-options">
<k-button
v-if="more && !disabled"
icon="add"
:icon="btnIcon"
class="k-field-options-button"
@click="open"
>
{{ $t('select') }}
{{ btnLabel }}
</k-button>
</k-button-group>
<template v-if="selected.length">
@@ -26,7 +26,7 @@
:sortable="!disabled && selected.length > 1"
:text="page.text"
:info="page.info"
:link="page.link"
:link="link ? page.link : null"
:icon="page.icon"
:image="page.image"
>
@@ -46,7 +46,7 @@
icon="page"
@click="open"
>
{{ empty || $t('field.pages.empty') }}
{{ empty || $t("field.pages.empty") }}
</k-empty>
<k-pages-dialog ref="selector" @submit="select" />
</k-field>
@@ -68,7 +68,7 @@ export default {
max: this.max,
multiple: this.multiple,
search: this.search,
selected: this.selected.map(page => page.id),
selected: this.selected.map(page => page.id)
});
}
}
@@ -4,11 +4,11 @@
<k-button-group slot="options" class="k-field-options">
<k-button
v-if="more && !disabled"
icon="add"
:icon="btnIcon"
class="k-field-options-button"
@click="open"
>
{{ $t('select') }}
{{ btnLabel }}
</k-button>
</k-button-group>

@@ -27,7 +27,7 @@
:sortable="!disabled && selected.length > 1"
:text="user.text"
:info="user.info"
:link="$api.users.link(user.id)"
:link="link ? $api.users.link(user.id) : null"
:image="user.image"
:icon="user.icon"
>
@@ -40,13 +40,8 @@
</component>
</k-draggable>
</template>
<k-empty
v-else
:data-invalid="isInvalid"
icon="users"
@click="open"
>
{{ empty || $t('field.users.empty') }}
<k-empty v-else :data-invalid="isInvalid" icon="users" @click="open">
{{ empty || $t("field.users.empty") }}
</k-empty>
<k-users-dialog ref="selector" @submit="select" />
</k-field>
@@ -174,7 +174,7 @@ export default {
},
onDrop($event) {
// dropping files
if (this.$helper.isUploadEvent($event)) {
if (this.uploads && this.$helper.isUploadEvent($event)) {
return this.$refs.fileUpload.drop($event.dataTransfer.files, {
url: config.api + "/" + this.endpoints.field + "/upload",
multiple: false
@@ -203,7 +203,6 @@ export default {
this.over = false;
},
onOver($event) {
// drag & drop for files
if (this.uploads && this.$helper.isUploadEvent($event)) {
$event.dataTransfer.dropEffect = "copy";
@@ -208,7 +208,7 @@ export default {
link: {
label: this.$t("toolbar.button.link"),
icon: "url",
shortcut: "l",
shortcut: "k",
command: "dialog",
args: "link"
},

0 comments on commit a7f2f96

Please sign in to comment.
You can’t perform that action at this time.