Adjustments to attaches block

This commit is contained in:
KingOfDog 2020-11-08 16:35:28 +01:00
parent 5dd1b7c0ef
commit 92933de4bd
8 changed files with 125 additions and 36 deletions

View File

@ -19695,18 +19695,48 @@ var staticRenderFns = []
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.map.js
var es_array_map = __webpack_require__("d81d");
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"0e1ca7e0-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/AttachesBlock.vue?vue&type=template&id=1044397c&
var AttachesBlockvue_type_template_id_1044397c_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"attaches-block"},[_c('div',{staticClass:"attaches-block-file-icon",style:({ color: _vm.color }),attrs:{"data-extension":_vm.data.file.extension}},[_c('svg',{attrs:{"width":"32","height":"40"}},[(_vm.color)?_c('path',{attrs:{"d":"M17 0l15 14V3v34a3 3 0 0 1-3 3H3a3 3 0 0 1-3-3V3a3 3 0 0 1 3-3h20-6zm0 2H3a1 1 0 0 0-1 1v34a1 1 0 0 0 1 1h26a1 1 0 0 0 1-1V14H17V2zm2 10h7.926L19 4.602V12z"}}):_c('g',{attrs:{"fill":"#A8ACB8","fill-rule":"evenodd"}},[_c('path',{attrs:{"fill-rule":"nonzero","d":"M17 0l15 14V3v34a3 3 0 0 1-3 3H3a3 3 0 0 1-3-3V3a3 3 0 0 1 3-3h20-6zm0 2H3a1 1 0 0 0-1 1v34a1 1 0 0 0 1 1h26a1 1 0 0 0 1-1V14H17V2zm2 10h7.926L19 4.602V12z"}}),_c('path',{attrs:{"d":"M7 22h18v2H7zm0 4h18v2H7zm0 4h18v2H7z"}})])])]),_c('div',{staticClass:"attaches-block-file-info"},[_c('p',{staticClass:"attaches-block-title"},[_vm._v(_vm._s(_vm.data.file.name))]),_c('p',{staticClass:"attaches-block-size"},[_vm._v(_vm._s(_vm._f("byteFormatter")(_vm.data.file.size)))])]),_c('a',{staticClass:"attaches-block-file-download-button",attrs:{"href":_vm.data.file.url,"target":"_blank"}},[_c('svg',{attrs:{"xmlns":"http://www.w3.org/2000/svg","width":"17pt","height":"17pt","viewBox":"0 0 17 17"}},[_c('path',{attrs:{"d":"M9.457 8.945V2.848A.959.959 0 0 0 8.5 1.89a.959.959 0 0 0-.957.957v6.097L4.488 5.891a.952.952 0 0 0-1.351 0 .952.952 0 0 0 0 1.351l4.687 4.688a.955.955 0 0 0 1.352 0l4.687-4.688a.952.952 0 0 0 0-1.351.952.952 0 0 0-1.351 0zM3.59 14.937h9.82a.953.953 0 0 0 .953-.957.952.952 0 0 0-.953-.953H3.59a.952.952 0 0 0-.953.953c0 .532.425.957.953.957zm0 0","fill-rule":"evenodd"}})])])])}
var AttachesBlockvue_type_template_id_1044397c_staticRenderFns = []
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"0e1ca7e0-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/AttachesBlock.vue?vue&type=template&id=d2793378&
var AttachesBlockvue_type_template_id_d2793378_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"attaches-block"},[_c('div',{staticClass:"attaches-block-file-icon",style:({ color: _vm.color }),attrs:{"data-extension":_vm.data.file.extension}},[_c('a',{attrs:{"href":_vm.url,"target":"blank"}},[_c('svg',{attrs:{"width":"32","height":"40"}},[(_vm.color)?_c('path',{attrs:{"d":"M17 0l15 14V3v34a3 3 0 0 1-3 3H3a3 3 0 0 1-3-3V3a3 3 0 0 1 3-3h20-6zm0 2H3a1 1 0 0 0-1 1v34a1 1 0 0 0 1 1h26a1 1 0 0 0 1-1V14H17V2zm2 10h7.926L19 4.602V12z"}}):_c('g',{attrs:{"fill":"#A8ACB8","fill-rule":"evenodd"}},[_c('path',{attrs:{"fill-rule":"nonzero","d":"M17 0l15 14V3v34a3 3 0 0 1-3 3H3a3 3 0 0 1-3-3V3a3 3 0 0 1 3-3h20-6zm0 2H3a1 1 0 0 0-1 1v34a1 1 0 0 0 1 1h26a1 1 0 0 0 1-1V14H17V2zm2 10h7.926L19 4.602V12z"}}),_c('path',{attrs:{"d":"M7 22h18v2H7zm0 4h18v2H7zm0 4h18v2H7z"}})])])])]),_c('div',{staticClass:"attaches-block-file-info"},[_c('a',{attrs:{"href":_vm.url,"target":"blank"}},[_c('p',{staticClass:"attaches-block-title"},[_vm._v(_vm._s(_vm.data.file.name))])]),_c('p',{staticClass:"attaches-block-size"},[_vm._v(_vm._s(_vm._f("byteFormatter")(_vm.data.file.size)))])]),_c('a',{staticClass:"attaches-block-file-download-button",attrs:{"href":_vm.url,"target":"_blank"}},[_c('svg',{attrs:{"xmlns":"http://www.w3.org/2000/svg","width":"17pt","height":"17pt","viewBox":"0 0 17 17"}},[_c('path',{attrs:{"d":"M9.457 8.945V2.848A.959.959 0 0 0 8.5 1.89a.959.959 0 0 0-.957.957v6.097L4.488 5.891a.952.952 0 0 0-1.351 0 .952.952 0 0 0 0 1.351l4.687 4.688a.955.955 0 0 0 1.352 0l4.687-4.688a.952.952 0 0 0 0-1.351.952.952 0 0 0-1.351 0zM3.59 14.937h9.82a.953.953 0 0 0 .953-.957.952.952 0 0 0-.953-.953H3.59a.952.952 0 0 0-.953.953c0 .532.425.957.953.957zm0 0","fill-rule":"evenodd"}})])])])}
var AttachesBlockvue_type_template_id_d2793378_staticRenderFns = []
// CONCATENATED MODULE: ./src/components/AttachesBlock.vue?vue&type=template&id=1044397c&
// CONCATENATED MODULE: ./src/components/AttachesBlock.vue?vue&type=template&id=d2793378&
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.concat.js
var es_array_concat = __webpack_require__("99af");
// EXTERNAL MODULE: ./src/filters/byteFormatter.js
var byteFormatter = __webpack_require__("573e");
var byteFormatter_default = /*#__PURE__*/__webpack_require__.n(byteFormatter);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/AttachesBlock.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
@ -19783,6 +19813,9 @@ var extensions = {
computed: {
color: function color() {
return extensions[this.data.file.extension];
},
url: function url() {
return "".concat(this.$baseFileUrl, "/").concat(this.data.file.id);
}
}
});
@ -19898,8 +19931,8 @@ function normalizeComponent (
var component = normalizeComponent(
components_AttachesBlockvue_type_script_lang_js_,
AttachesBlockvue_type_template_id_1044397c_render,
AttachesBlockvue_type_template_id_1044397c_staticRenderFns,
AttachesBlockvue_type_template_id_d2793378_render,
AttachesBlockvue_type_template_id_d2793378_staticRenderFns,
false,
null,
null,
@ -20045,9 +20078,6 @@ var ImageBlockvue_type_template_id_a3549484_staticRenderFns = []
// CONCATENATED MODULE: ./src/components/ImageBlock.vue?vue&type=template&id=a3549484&
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.concat.js
var es_array_concat = __webpack_require__("99af");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.for-each.js
var es_array_for_each = __webpack_require__("4160");

File diff suppressed because one or more lines are too long

View File

@ -19704,18 +19704,48 @@ var staticRenderFns = []
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.map.js
var es_array_map = __webpack_require__("d81d");
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"0e1ca7e0-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/AttachesBlock.vue?vue&type=template&id=1044397c&
var AttachesBlockvue_type_template_id_1044397c_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"attaches-block"},[_c('div',{staticClass:"attaches-block-file-icon",style:({ color: _vm.color }),attrs:{"data-extension":_vm.data.file.extension}},[_c('svg',{attrs:{"width":"32","height":"40"}},[(_vm.color)?_c('path',{attrs:{"d":"M17 0l15 14V3v34a3 3 0 0 1-3 3H3a3 3 0 0 1-3-3V3a3 3 0 0 1 3-3h20-6zm0 2H3a1 1 0 0 0-1 1v34a1 1 0 0 0 1 1h26a1 1 0 0 0 1-1V14H17V2zm2 10h7.926L19 4.602V12z"}}):_c('g',{attrs:{"fill":"#A8ACB8","fill-rule":"evenodd"}},[_c('path',{attrs:{"fill-rule":"nonzero","d":"M17 0l15 14V3v34a3 3 0 0 1-3 3H3a3 3 0 0 1-3-3V3a3 3 0 0 1 3-3h20-6zm0 2H3a1 1 0 0 0-1 1v34a1 1 0 0 0 1 1h26a1 1 0 0 0 1-1V14H17V2zm2 10h7.926L19 4.602V12z"}}),_c('path',{attrs:{"d":"M7 22h18v2H7zm0 4h18v2H7zm0 4h18v2H7z"}})])])]),_c('div',{staticClass:"attaches-block-file-info"},[_c('p',{staticClass:"attaches-block-title"},[_vm._v(_vm._s(_vm.data.file.name))]),_c('p',{staticClass:"attaches-block-size"},[_vm._v(_vm._s(_vm._f("byteFormatter")(_vm.data.file.size)))])]),_c('a',{staticClass:"attaches-block-file-download-button",attrs:{"href":_vm.data.file.url,"target":"_blank"}},[_c('svg',{attrs:{"xmlns":"http://www.w3.org/2000/svg","width":"17pt","height":"17pt","viewBox":"0 0 17 17"}},[_c('path',{attrs:{"d":"M9.457 8.945V2.848A.959.959 0 0 0 8.5 1.89a.959.959 0 0 0-.957.957v6.097L4.488 5.891a.952.952 0 0 0-1.351 0 .952.952 0 0 0 0 1.351l4.687 4.688a.955.955 0 0 0 1.352 0l4.687-4.688a.952.952 0 0 0 0-1.351.952.952 0 0 0-1.351 0zM3.59 14.937h9.82a.953.953 0 0 0 .953-.957.952.952 0 0 0-.953-.953H3.59a.952.952 0 0 0-.953.953c0 .532.425.957.953.957zm0 0","fill-rule":"evenodd"}})])])])}
var AttachesBlockvue_type_template_id_1044397c_staticRenderFns = []
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"0e1ca7e0-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/AttachesBlock.vue?vue&type=template&id=d2793378&
var AttachesBlockvue_type_template_id_d2793378_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"attaches-block"},[_c('div',{staticClass:"attaches-block-file-icon",style:({ color: _vm.color }),attrs:{"data-extension":_vm.data.file.extension}},[_c('a',{attrs:{"href":_vm.url,"target":"blank"}},[_c('svg',{attrs:{"width":"32","height":"40"}},[(_vm.color)?_c('path',{attrs:{"d":"M17 0l15 14V3v34a3 3 0 0 1-3 3H3a3 3 0 0 1-3-3V3a3 3 0 0 1 3-3h20-6zm0 2H3a1 1 0 0 0-1 1v34a1 1 0 0 0 1 1h26a1 1 0 0 0 1-1V14H17V2zm2 10h7.926L19 4.602V12z"}}):_c('g',{attrs:{"fill":"#A8ACB8","fill-rule":"evenodd"}},[_c('path',{attrs:{"fill-rule":"nonzero","d":"M17 0l15 14V3v34a3 3 0 0 1-3 3H3a3 3 0 0 1-3-3V3a3 3 0 0 1 3-3h20-6zm0 2H3a1 1 0 0 0-1 1v34a1 1 0 0 0 1 1h26a1 1 0 0 0 1-1V14H17V2zm2 10h7.926L19 4.602V12z"}}),_c('path',{attrs:{"d":"M7 22h18v2H7zm0 4h18v2H7zm0 4h18v2H7z"}})])])])]),_c('div',{staticClass:"attaches-block-file-info"},[_c('a',{attrs:{"href":_vm.url,"target":"blank"}},[_c('p',{staticClass:"attaches-block-title"},[_vm._v(_vm._s(_vm.data.file.name))])]),_c('p',{staticClass:"attaches-block-size"},[_vm._v(_vm._s(_vm._f("byteFormatter")(_vm.data.file.size)))])]),_c('a',{staticClass:"attaches-block-file-download-button",attrs:{"href":_vm.url,"target":"_blank"}},[_c('svg',{attrs:{"xmlns":"http://www.w3.org/2000/svg","width":"17pt","height":"17pt","viewBox":"0 0 17 17"}},[_c('path',{attrs:{"d":"M9.457 8.945V2.848A.959.959 0 0 0 8.5 1.89a.959.959 0 0 0-.957.957v6.097L4.488 5.891a.952.952 0 0 0-1.351 0 .952.952 0 0 0 0 1.351l4.687 4.688a.955.955 0 0 0 1.352 0l4.687-4.688a.952.952 0 0 0 0-1.351.952.952 0 0 0-1.351 0zM3.59 14.937h9.82a.953.953 0 0 0 .953-.957.952.952 0 0 0-.953-.953H3.59a.952.952 0 0 0-.953.953c0 .532.425.957.953.957zm0 0","fill-rule":"evenodd"}})])])])}
var AttachesBlockvue_type_template_id_d2793378_staticRenderFns = []
// CONCATENATED MODULE: ./src/components/AttachesBlock.vue?vue&type=template&id=1044397c&
// CONCATENATED MODULE: ./src/components/AttachesBlock.vue?vue&type=template&id=d2793378&
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.concat.js
var es_array_concat = __webpack_require__("99af");
// EXTERNAL MODULE: ./src/filters/byteFormatter.js
var byteFormatter = __webpack_require__("573e");
var byteFormatter_default = /*#__PURE__*/__webpack_require__.n(byteFormatter);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/AttachesBlock.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
@ -19792,6 +19822,9 @@ var extensions = {
computed: {
color: function color() {
return extensions[this.data.file.extension];
},
url: function url() {
return "".concat(this.$baseFileUrl, "/").concat(this.data.file.id);
}
}
});
@ -19907,8 +19940,8 @@ function normalizeComponent (
var component = normalizeComponent(
components_AttachesBlockvue_type_script_lang_js_,
AttachesBlockvue_type_template_id_1044397c_render,
AttachesBlockvue_type_template_id_1044397c_staticRenderFns,
AttachesBlockvue_type_template_id_d2793378_render,
AttachesBlockvue_type_template_id_d2793378_staticRenderFns,
false,
null,
null,
@ -20054,9 +20087,6 @@ var ImageBlockvue_type_template_id_a3549484_staticRenderFns = []
// CONCATENATED MODULE: ./src/components/ImageBlock.vue?vue&type=template&id=a3549484&
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.concat.js
var es_array_concat = __webpack_require__("99af");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.for-each.js
var es_array_for_each = __webpack_require__("4160");

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,7 +1,7 @@
{
"name": "block-renderer",
"description": "Content renderer for JSON blocks from Editor.js",
"version": "0.4.2",
"version": "0.5.0",
"author": "KingOfDog <info@kingofdog.de>",
"repository": {
"type": "git",

View File

@ -5,26 +5,52 @@
:style="{ color: color }"
class="attaches-block-file-icon"
>
<svg width="32" height="40">
<path
v-if="color"
d="M17 0l15 14V3v34a3 3 0 0 1-3 3H3a3 3 0 0 1-3-3V3a3 3 0 0 1 3-3h20-6zm0 2H3a1 1 0 0 0-1 1v34a1 1 0 0 0 1 1h26a1 1 0 0 0 1-1V14H17V2zm2 10h7.926L19 4.602V12z"
/>
<g v-else fill="#A8ACB8" fill-rule="evenodd">
<a
:href="url"
target="blank"
>
<svg
width="32"
height="40"
>
<path
fill-rule="nonzero"
v-if="color"
d="M17 0l15 14V3v34a3 3 0 0 1-3 3H3a3 3 0 0 1-3-3V3a3 3 0 0 1 3-3h20-6zm0 2H3a1 1 0 0 0-1 1v34a1 1 0 0 0 1 1h26a1 1 0 0 0 1-1V14H17V2zm2 10h7.926L19 4.602V12z"
/>
<path d="M7 22h18v2H7zm0 4h18v2H7zm0 4h18v2H7z" />
</g>
</svg>
<g
v-else
fill="#A8ACB8"
fill-rule="evenodd"
>
<path
fill-rule="nonzero"
d="M17 0l15 14V3v34a3 3 0 0 1-3 3H3a3 3 0 0 1-3-3V3a3 3 0 0 1 3-3h20-6zm0 2H3a1 1 0 0 0-1 1v34a1 1 0 0 0 1 1h26a1 1 0 0 0 1-1V14H17V2zm2 10h7.926L19 4.602V12z"
/>
<path d="M7 22h18v2H7zm0 4h18v2H7zm0 4h18v2H7z" />
</g>
</svg>
</a>
</div>
<div class="attaches-block-file-info">
<p class="attaches-block-title">{{ data.file.name }}</p>
<a
:href="url"
target="blank"
>
<p class="attaches-block-title">{{ data.file.name }}</p>
</a>
<p class="attaches-block-size">{{ data.file.size | byteFormatter }}</p>
</div>
<a :href="data.file.url" target="_blank" class="attaches-block-file-download-button">
<svg xmlns="http://www.w3.org/2000/svg" width="17pt" height="17pt" viewBox="0 0 17 17">
<a
:href="url"
target="_blank"
class="attaches-block-file-download-button"
>
<svg
xmlns="http://www.w3.org/2000/svg"
width="17pt"
height="17pt"
viewBox="0 0 17 17"
>
<path
d="M9.457 8.945V2.848A.959.959 0 0 0 8.5 1.89a.959.959 0 0 0-.957.957v6.097L4.488 5.891a.952.952 0 0 0-1.351 0 .952.952 0 0 0 0 1.351l4.687 4.688a.955.955 0 0 0 1.352 0l4.687-4.688a.952.952 0 0 0 0-1.351.952.952 0 0 0-1.351 0zM3.59 14.937h9.82a.953.953 0 0 0 .953-.957.952.952 0 0 0-.953-.953H3.59a.952.952 0 0 0-.953.953c0 .532.425.957.953.957zm0 0"
fill-rule="evenodd"
@ -77,6 +103,9 @@ export default {
computed: {
color() {
return extensions[this.data.file.extension];
},
url() {
return `${this.$baseFileUrl}/${this.data.file.id}`;
}
}
};