Skip to content

Commit

Permalink
Merge pull request #2526 from getkirby/release/3.3.5
Browse files Browse the repository at this point in the history
3.3.5
  • Loading branch information
bastianallgeier authored Mar 17, 2020
2 parents 0330c0a + 1ad77af commit a7f2f96
Show file tree
Hide file tree
Showing 50 changed files with 774 additions and 242 deletions.
6 changes: 5 additions & 1 deletion .github/README.md
Original file line number Diff line number Diff line change
@@ -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:

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion composer.lock

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

7 changes: 7 additions & 0 deletions config/fields/mixins/picker.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down
16 changes: 13 additions & 3 deletions config/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/**
Expand Down
18 changes: 9 additions & 9 deletions i18n/translations/cs.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",

Expand All @@ -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",

Expand Down
2 changes: 1 addition & 1 deletion panel/dist/css/app.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion panel/dist/js/app.js

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions panel/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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() {
Expand Down
31 changes: 23 additions & 8 deletions panel/src/components/Dialogs/Dialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@
type: String,
default: "check"
},
size: String,
size: {
type: String,
default: "default"
},
theme: String,
visible: Boolean
},
Expand Down Expand Up @@ -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;
Expand All @@ -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 {
Expand Down
4 changes: 4 additions & 0 deletions panel/src/components/Dialogs/LanguageCreateDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 4 additions & 0 deletions panel/src/components/Dialogs/LanguageUpdateDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 2 additions & 0 deletions panel/src/components/Forms/Field.vue
Original file line number Diff line number Diff line change
@@ -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)"
Expand Down Expand Up @@ -49,6 +50,7 @@ export default {
label: String,
name: [String, Number],
required: Boolean,
translate: Boolean,
type: String
},
computed: {
Expand Down
10 changes: 5 additions & 5 deletions panel/src/components/Forms/Field/FilesField.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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"
Expand All @@ -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" />
Expand All @@ -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);
Expand Down
10 changes: 5 additions & 5 deletions panel/src/components/Forms/Field/PagesField.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand All @@ -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"
>
Expand All @@ -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>
Expand All @@ -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)
});
}
}
Expand Down
15 changes: 5 additions & 10 deletions panel/src/components/Forms/Field/UsersField.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand All @@ -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"
>
Expand All @@ -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>
Expand Down
3 changes: 1 addition & 2 deletions panel/src/components/Forms/Input/TextareaInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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";
Expand Down
2 changes: 1 addition & 1 deletion panel/src/components/Forms/Toolbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ export default {
link: {
label: this.$t("toolbar.button.link"),
icon: "url",
shortcut: "l",
shortcut: "k",
command: "dialog",
args: "link"
},
Expand Down
Loading

0 comments on commit a7f2f96

Please sign in to comment.