maglevcms 1.4.0 → 1.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/components/maglev/content/image.rb +1 -1
- data/app/components/maglev/page_component.rb +9 -7
- data/app/components/maglev/section_component.rb +34 -4
- data/app/controllers/concerns/maglev/content_locale_concern.rb +3 -1
- data/app/controllers/concerns/maglev/services_concern.rb +2 -1
- data/app/controllers/maglev/api/assets_controller.rb +3 -3
- data/app/controllers/maglev/application_controller.rb +5 -0
- data/app/controllers/maglev/assets_controller.rb +1 -1
- data/app/controllers/maglev/editor_controller.rb +12 -3
- data/app/controllers/maglev/page_preview_controller.rb +2 -0
- data/app/frontend/admin/controllers/iframe_controller.js +1 -1
- data/app/frontend/admin/controllers/screenshot_controller.js +5 -1
- data/app/frontend/admin/index.js +1 -1
- data/app/frontend/editor/App.vue +1 -1
- data/app/frontend/editor/components/dynamic-form/dynamic-input.vue +17 -18
- data/app/frontend/editor/components/dynamic-form/index.vue +1 -1
- data/app/frontend/editor/components/header-nav/device-toggler.vue +1 -1
- data/app/frontend/editor/components/header-nav/index.vue +3 -3
- data/app/frontend/editor/components/header-nav/locale-toggler/index.vue +4 -4
- data/app/frontend/editor/components/header-nav/preview-toggler.vue +3 -3
- data/app/frontend/editor/components/header-nav/publish-button.vue +3 -3
- data/app/frontend/editor/components/header-nav/save-button.vue +1 -1
- data/app/frontend/editor/components/icon-library/index.vue +1 -1
- data/app/frontend/editor/components/image-library/index.vue +2 -2
- data/app/frontend/editor/components/image-library/list-item.vue +1 -1
- data/app/frontend/editor/components/image-library/uploader.vue +1 -1
- data/app/frontend/editor/components/kit/accordion.vue +8 -3
- data/app/frontend/editor/components/kit/checkbox-input.vue +1 -1
- data/app/frontend/editor/components/kit/collection-item-input.vue +7 -4
- data/app/frontend/editor/components/kit/color-input/core-input.vue +19 -12
- data/app/frontend/editor/components/kit/color-input/preset-button.vue +14 -10
- data/app/frontend/editor/components/kit/color-input/preset-dropdown.vue +8 -7
- data/app/frontend/editor/components/kit/color-input.vue +3 -5
- data/app/frontend/editor/components/kit/confirmation-button.vue +3 -3
- data/app/frontend/editor/components/kit/divider.vue +4 -4
- data/app/frontend/editor/components/kit/dropdown.vue +1 -1
- data/app/frontend/editor/components/kit/hint.vue +3 -3
- data/app/frontend/editor/components/kit/icon-input.vue +6 -6
- data/app/frontend/editor/components/kit/icon.vue +7 -2
- data/app/frontend/editor/components/kit/image-input.vue +7 -7
- data/app/frontend/editor/components/kit/index.js +25 -25
- data/app/frontend/editor/components/kit/link-input.vue +12 -8
- data/app/frontend/editor/components/kit/list-item-button.vue +2 -2
- data/app/frontend/editor/components/kit/modal-root.vue +3 -3
- data/app/frontend/editor/components/kit/modal.vue +2 -2
- data/app/frontend/editor/components/kit/page-icon.vue +2 -2
- data/app/frontend/editor/components/kit/pagination/index.vue +3 -3
- data/app/frontend/editor/components/kit/rich-text-input/block-button.vue +10 -10
- data/app/frontend/editor/components/kit/rich-text-input/menu-button.vue +1 -1
- data/app/frontend/editor/components/kit/rich-text-input/table-button.vue +18 -12
- data/app/frontend/editor/components/kit/rich-text-input.vue +3 -3
- data/app/frontend/editor/components/kit/search-input.vue +4 -3
- data/app/frontend/editor/components/kit/select-input.vue +43 -25
- data/app/frontend/editor/components/kit/simple-select.vue +1 -1
- data/app/frontend/editor/components/kit/submit-button.vue +4 -4
- data/app/frontend/editor/components/kit/tabs.vue +14 -4
- data/app/frontend/editor/components/kit/text-input.vue +4 -3
- data/app/frontend/editor/components/kit/textarea-input.vue +5 -3
- data/app/frontend/editor/components/link-picker/email.vue +1 -1
- data/app/frontend/editor/components/link-picker/index.vue +2 -2
- data/app/frontend/editor/components/link-picker/page.vue +5 -5
- data/app/frontend/editor/components/link-picker/url.vue +2 -2
- data/app/frontend/editor/components/page/edit.vue +5 -4
- data/app/frontend/editor/components/page/form/main.vue +3 -3
- data/app/frontend/editor/components/page/form/seo.vue +5 -5
- data/app/frontend/editor/components/page/list/list-item.vue +12 -12
- data/app/frontend/editor/components/page/new.vue +5 -4
- data/app/frontend/editor/components/section-block-pane/index.vue +1 -1
- data/app/frontend/editor/components/section-block-pane/setting-list.vue +1 -1
- data/app/frontend/editor/components/section-highlighter/bottom-actions.vue +1 -1
- data/app/frontend/editor/components/section-highlighter/top-left-actions.vue +7 -3
- data/app/frontend/editor/components/section-highlighter/top-right-actions.vue +9 -6
- data/app/frontend/editor/components/section-list/list-item.vue +12 -5
- data/app/frontend/editor/components/section-pane/block-list/list-item.vue +3 -3
- data/app/frontend/editor/components/section-pane/block-list/new-block-button.vue +4 -4
- data/app/frontend/editor/components/section-pane/block-tree/new-nested-block-button.vue +4 -4
- data/app/frontend/editor/components/section-pane/block-tree/tree-node.vue +2 -2
- data/app/frontend/editor/components/section-pane/index.vue +4 -3
- data/app/frontend/editor/components/section-pane/setting-list.vue +1 -1
- data/app/frontend/editor/components/sidebar-nav.vue +5 -5
- data/app/frontend/editor/components/style-pane/index.vue +1 -1
- data/app/frontend/editor/components/theme-section-list/index.vue +2 -2
- data/app/frontend/editor/components/theme-section-list/list-item.vue +1 -1
- data/app/frontend/editor/layouts/slide-pane.vue +1 -1
- data/app/frontend/editor/locales/index.js +5 -2
- data/app/frontend/editor/misc/utils.js +10 -7
- data/app/frontend/editor/mixins/global.js +1 -1
- data/app/frontend/editor/services/api.js +2 -2
- data/app/frontend/editor/services/image.js +6 -2
- data/app/frontend/editor/services/section.js +2 -1
- data/app/frontend/editor/store/actions/page.js +1 -1
- data/app/frontend/editor/store/getters.js +1 -1
- data/app/frontend/editor/views/content-pane.vue +9 -5
- data/app/frontend/editor/views/page-preview.vue +5 -1
- data/app/frontend/editor/views/pages/edit.vue +1 -1
- data/app/frontend/editor/views/pages/index.vue +1 -1
- data/app/frontend/live-preview-client/index.js +0 -1
- data/app/frontend/live-preview-client/rails.js +1 -1
- data/app/frontend/live-preview-client/run-scripts.js +22 -24
- data/app/helpers/maglev/application_helper.rb +2 -1
- data/app/helpers/maglev/page_preview_helper.rb +14 -3
- data/app/models/maglev/asset.rb +14 -0
- data/app/models/maglev/page/search_concern.rb +2 -1
- data/app/models/maglev/page.rb +18 -0
- data/app/models/maglev/page_path.rb +17 -0
- data/app/models/maglev/setting_types/collection_item.rb +1 -1
- data/app/models/maglev/site/locales_concern.rb +1 -1
- data/app/models/maglev/site.rb +24 -0
- data/app/services/maglev/fetch_site.rb +1 -1
- data/app/services/maglev/setup_pages.rb +3 -0
- data/app/views/maglev/admin/themes/_sections.html.erb +3 -3
- data/db/migrate/20200824085207_create_maglev_sites.rb +2 -1
- data/db/migrate/20200824104648_create_maglev_pages.rb +2 -1
- data/db/migrate/20201206172020_create_maglev_assets.rb +2 -1
- data/db/migrate/20210830085101_create_maglev_page_paths.rb +3 -2
- data/lib/generators/maglev/templates/install/config/initializers/maglev.rb +1 -1
- data/lib/maglev/engine.rb +1 -0
- data/lib/maglev/migration.rb +20 -0
- data/lib/maglev/version.rb +1 -1
- data/lib/maglev.rb +8 -1
- data/lib/tasks/maglev_tasks.rake +1 -1
- data/package.json +22 -18
- data/{postcss.config.js → postcss.config.cjs} +1 -1
- data/tailwind.config.js +10 -2
- data/yarn.lock +1412 -1003
- metadata +23 -9
- data/.eslintrc.js +0 -49
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 45b336e791f110d5c7c1982631955c14664c2a66184b44b83a31f5689800d1d0
|
4
|
+
data.tar.gz: 65ea43f9f7006d128a21adad2c832f896d314715d83bc47283070ae60fb41dff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 17be0c14ba106d648cf9fa13953adff4e63f342a6d7d6acaa215cc6200f41c8d710e2d0b3c14d803f92ee4521c977f03b8c8389cd5351eb60bd87c23fbe50d73
|
7
|
+
data.tar.gz: 0adbc6d304a7b46cf1f4b1b6640fde924bad6d456931f0527adba2b01bcf3f06211f2cbe14f80c0fa93950f05d64eb01c7fb67cd136988d756103b2346b7c177
|
@@ -2,18 +2,19 @@
|
|
2
2
|
|
3
3
|
module Maglev
|
4
4
|
class PageComponent < BaseComponent
|
5
|
-
attr_reader :site, :theme, :page, :page_sections, :templates_root_path, :config
|
5
|
+
attr_reader :site, :theme, :page, :page_sections, :templates_root_path, :config, :rendering_mode
|
6
6
|
|
7
|
-
# rubocop:disable Lint/MissingSuper
|
8
|
-
def initialize(site:, theme:, page:, page_sections:,
|
7
|
+
# rubocop:disable Lint/MissingSuper
|
8
|
+
def initialize(site:, theme:, page:, page_sections:, context:)
|
9
9
|
@site = site
|
10
10
|
@theme = theme
|
11
11
|
@page = page
|
12
12
|
@page_sections = page_sections
|
13
|
-
@templates_root_path = templates_root_path
|
14
|
-
@config = config
|
13
|
+
@templates_root_path = context[:templates_root_path]
|
14
|
+
@config = context[:config]
|
15
|
+
@rendering_mode = context[:rendering_mode]
|
15
16
|
end
|
16
|
-
# rubocop:enable Lint/MissingSuper
|
17
|
+
# rubocop:enable Lint/MissingSuper
|
17
18
|
|
18
19
|
# Sections within a dropzone
|
19
20
|
def sections
|
@@ -37,7 +38,8 @@ module Maglev
|
|
37
38
|
parent: self,
|
38
39
|
definition: definition,
|
39
40
|
attributes: attributes.deep_transform_keys! { |k| k.to_s.underscore.to_sym },
|
40
|
-
templates_root_path: templates_root_path
|
41
|
+
templates_root_path: templates_root_path,
|
42
|
+
rendering_mode: rendering_mode
|
41
43
|
)
|
42
44
|
end
|
43
45
|
end
|
@@ -7,16 +7,17 @@ module Maglev
|
|
7
7
|
extend Forwardable
|
8
8
|
def_delegators :parent, :site, :config
|
9
9
|
|
10
|
-
attr_reader :parent, :id, :type, :settings, :attributes, :definition, :templates_root_path
|
10
|
+
attr_reader :parent, :id, :type, :settings, :attributes, :definition, :templates_root_path, :rendering_mode
|
11
11
|
|
12
12
|
# rubocop:disable Lint/MissingSuper
|
13
|
-
def initialize(parent:, attributes:, definition:, templates_root_path:)
|
13
|
+
def initialize(parent:, attributes:, definition:, templates_root_path:, rendering_mode:)
|
14
14
|
@parent = parent # aka a PageComponent
|
15
15
|
@id = attributes[:id]
|
16
16
|
@type = attributes[:type]
|
17
17
|
@definition = definition
|
18
18
|
@attributes = attributes
|
19
19
|
@templates_root_path = templates_root_path
|
20
|
+
@rendering_mode = rendering_mode
|
20
21
|
|
21
22
|
@settings = settings_proxy(
|
22
23
|
build_settings_map(attributes[:settings])
|
@@ -30,12 +31,12 @@ module Maglev
|
|
30
31
|
|
31
32
|
# rubocop:disable Rails/OutputSafety
|
32
33
|
def dom_data
|
33
|
-
"data-maglev-section-id=\"#{id}\"".html_safe
|
34
|
+
"data-maglev-section-id=\"#{id}\" data-maglev-section-type=\"#{type}\"".html_safe
|
34
35
|
end
|
35
36
|
# rubocop:enable Rails/OutputSafety
|
36
37
|
|
37
38
|
def tag_data
|
38
|
-
{ maglev_section_id: id }
|
39
|
+
{ maglev_section_id: id, maglev_section_type: type }
|
39
40
|
end
|
40
41
|
|
41
42
|
def blocks
|
@@ -53,6 +54,8 @@ module Maglev
|
|
53
54
|
template: "#{templates_root_path}/sections/#{definition.category}/#{type}",
|
54
55
|
locals: { section: self, maglev_section: self }
|
55
56
|
)
|
57
|
+
rescue StandardError => e
|
58
|
+
handle_error(e)
|
56
59
|
end
|
57
60
|
|
58
61
|
private
|
@@ -92,5 +95,32 @@ module Maglev
|
|
92
95
|
attributes: block_attributes
|
93
96
|
)
|
94
97
|
end
|
98
|
+
|
99
|
+
def handle_error(exception)
|
100
|
+
throw exception if %i[live section].include?(rendering_mode) || Rails.env.test?
|
101
|
+
|
102
|
+
Rails.logger.error [
|
103
|
+
"⚠️ [Maglev] Error when rendering a \"#{type}\" type section ⚠️",
|
104
|
+
exception.message,
|
105
|
+
*exception.backtrace
|
106
|
+
].join($INPUT_RECORD_SEPARATOR)
|
107
|
+
|
108
|
+
render_error
|
109
|
+
end
|
110
|
+
|
111
|
+
def render_error
|
112
|
+
<<~HTML
|
113
|
+
<div #{dom_data} style="padding: 5rem 0;">
|
114
|
+
<div style="max-width: 40rem; margin: 0 auto; background-color: rgb(254 242 242); color: rgb(153 27 27); padding: 1rem; border-radius: 0.375rem;">
|
115
|
+
<h3 style="font-weight: 500; color: rgb(153 27 27); font-size: 0.875rem; line-height: 1.25rem;">
|
116
|
+
We've encountered an error while rendering the <strong>"#{type}"</strong> section.
|
117
|
+
</h3>
|
118
|
+
<p style="margin-top: 0.5rem; font-size: 0.775rem; line-height: 1.25rem; color: rgb(185 28 28);">
|
119
|
+
Check out your application logs for more details.
|
120
|
+
</p>
|
121
|
+
</div>
|
122
|
+
</div>
|
123
|
+
HTML
|
124
|
+
end
|
95
125
|
end
|
96
126
|
end
|
@@ -12,7 +12,7 @@ module Maglev
|
|
12
12
|
end
|
13
13
|
|
14
14
|
def show
|
15
|
-
@asset = resources.find(
|
15
|
+
@asset = resources.find(resource_id)
|
16
16
|
end
|
17
17
|
|
18
18
|
def create
|
@@ -21,12 +21,12 @@ module Maglev
|
|
21
21
|
end
|
22
22
|
|
23
23
|
def update
|
24
|
-
resources.find(
|
24
|
+
resources.find(resource_id).update!(asset_params)
|
25
25
|
head :ok
|
26
26
|
end
|
27
27
|
|
28
28
|
def destroy
|
29
|
-
resources.find(
|
29
|
+
resources.find(resource_id).destroy!
|
30
30
|
head :no_content
|
31
31
|
end
|
32
32
|
|
@@ -9,7 +9,7 @@ module Maglev
|
|
9
9
|
include Maglev::ContentLocaleConcern
|
10
10
|
|
11
11
|
before_action :fetch_maglev_site, only: :show
|
12
|
-
before_action :
|
12
|
+
before_action :ensure_path_and_content_locale, only: :show
|
13
13
|
before_action :set_content_locale, only: :show
|
14
14
|
|
15
15
|
helper_method :maglev_home_page_id
|
@@ -25,8 +25,10 @@ module Maglev
|
|
25
25
|
|
26
26
|
private
|
27
27
|
|
28
|
-
def
|
29
|
-
|
28
|
+
def ensure_path_and_content_locale
|
29
|
+
return unless params[:path].blank? || params[:locale].blank?
|
30
|
+
|
31
|
+
redirect_to default_maglev_editor_path
|
30
32
|
end
|
31
33
|
|
32
34
|
def maglev_home_page_id
|
@@ -46,5 +48,12 @@ module Maglev
|
|
46
48
|
def maglev_rendering_mode
|
47
49
|
:editor
|
48
50
|
end
|
51
|
+
|
52
|
+
def default_maglev_editor_path
|
53
|
+
editor_path(
|
54
|
+
params[:path] || 'index',
|
55
|
+
locale: params[:locale] || default_content_locale
|
56
|
+
)
|
57
|
+
end
|
49
58
|
end
|
50
59
|
end
|
@@ -5,7 +5,7 @@ export default class extends Controller {
|
|
5
5
|
this.element.addEventListener('load', () => {
|
6
6
|
setTimeout(() => {
|
7
7
|
let height =
|
8
|
-
this.element.contentDocument.querySelector('
|
8
|
+
this.element.contentDocument.querySelector('[data-maglev-section-id]').clientHeight
|
9
9
|
|
10
10
|
if (height < 200) height = 200
|
11
11
|
|
@@ -21,7 +21,11 @@ export default class extends Controller {
|
|
21
21
|
'[data-maglev-dropzone]',
|
22
22
|
)
|
23
23
|
this.sourceTarget.contentWindow
|
24
|
-
.html2canvas(realSource, {
|
24
|
+
.html2canvas(realSource, {
|
25
|
+
allowTaint: true,
|
26
|
+
logging: true,
|
27
|
+
useCORS: true,
|
28
|
+
})
|
25
29
|
.then((canvas) => {
|
26
30
|
this.outputTarget.src = canvas.toDataURL() // for debugging purpose
|
27
31
|
axios
|
data/app/frontend/admin/index.js
CHANGED
@@ -4,7 +4,7 @@ import { Application } from 'stimulus'
|
|
4
4
|
import { registerControllers } from 'stimulus-vite-helpers'
|
5
5
|
|
6
6
|
const application = Application.start()
|
7
|
-
const controllers = import.meta.
|
7
|
+
const controllers = import.meta.glob('./**/*_controller.js', { eager: true })
|
8
8
|
registerControllers(application, controllers)
|
9
9
|
|
10
10
|
window.stimulusApplication = application
|
data/app/frontend/editor/App.vue
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
<template>
|
2
2
|
<div>
|
3
|
-
<text-input
|
3
|
+
<uikit-text-input
|
4
4
|
:label="label"
|
5
5
|
:name="setting.id"
|
6
6
|
:isFocused="isFocused"
|
@@ -12,7 +12,7 @@
|
|
12
12
|
parseInt(options.nbRows || 1) < 2
|
13
13
|
"
|
14
14
|
/>
|
15
|
-
<textarea-input
|
15
|
+
<uikit-textarea-input
|
16
16
|
:label="label"
|
17
17
|
:name="setting.id"
|
18
18
|
:isFocused="isFocused"
|
@@ -23,7 +23,7 @@
|
|
23
23
|
setting.type == 'text' && !options.html && parseInt(options.nbRows) > 1
|
24
24
|
"
|
25
25
|
/>
|
26
|
-
<rich-text-input
|
26
|
+
<uikit-rich-text-input
|
27
27
|
:label="label"
|
28
28
|
:name="setting.id"
|
29
29
|
:isFocused="isFocused"
|
@@ -34,27 +34,27 @@
|
|
34
34
|
v-model="inputValue"
|
35
35
|
v-if="setting.type == 'text' && options.html"
|
36
36
|
/>
|
37
|
-
<image-input
|
37
|
+
<uikit-image-input
|
38
38
|
:label="label"
|
39
39
|
:name="setting.id"
|
40
40
|
:isFocused="isFocused"
|
41
41
|
v-model="inputValue"
|
42
42
|
v-if="setting.type == 'image'"
|
43
43
|
/>
|
44
|
-
<icon-input
|
44
|
+
<uikit-icon-input
|
45
45
|
:label="label"
|
46
46
|
:name="setting.id"
|
47
47
|
:isFocused="isFocused"
|
48
48
|
v-model="inputValue"
|
49
49
|
v-if="setting.type == 'icon'"
|
50
50
|
/>
|
51
|
-
<checkbox-input
|
51
|
+
<uikit-checkbox-input
|
52
52
|
:label="label"
|
53
53
|
:name="setting.id"
|
54
54
|
v-model="inputValue"
|
55
55
|
v-if="setting.type == 'checkbox'"
|
56
56
|
/>
|
57
|
-
<link-input
|
57
|
+
<uikit-link-input
|
58
58
|
:label="label"
|
59
59
|
:name="setting.id"
|
60
60
|
:isFocused="isFocused"
|
@@ -62,21 +62,21 @@
|
|
62
62
|
v-model="inputValue"
|
63
63
|
v-if="setting.type == 'link'"
|
64
64
|
/>
|
65
|
-
<color-input
|
65
|
+
<uikit-color-input
|
66
66
|
:label="label"
|
67
67
|
:name="setting.id"
|
68
68
|
v-model="inputValue"
|
69
69
|
:presets="options.presets"
|
70
70
|
v-if="setting.type == 'color'"
|
71
71
|
/>
|
72
|
-
<simple-select
|
72
|
+
<uikit-simple-select
|
73
73
|
:label="label"
|
74
74
|
:name="setting.id"
|
75
75
|
v-model="inputValue"
|
76
76
|
:selectOptions="options.selectOptions"
|
77
77
|
v-if="setting.type == 'select'"
|
78
78
|
/>
|
79
|
-
<collection-item-input
|
79
|
+
<uikit-collection-item-input
|
80
80
|
:label="label"
|
81
81
|
:name="setting.id"
|
82
82
|
v-model="inputValue"
|
@@ -84,16 +84,13 @@
|
|
84
84
|
v-if="setting.type == 'collection_item'"
|
85
85
|
/>
|
86
86
|
|
87
|
-
<divider
|
87
|
+
<uikit-divider
|
88
88
|
:text="label"
|
89
89
|
:withHint="options.withHint"
|
90
90
|
v-if="setting.type == 'divider'"
|
91
91
|
/>
|
92
92
|
|
93
|
-
<hint
|
94
|
-
:text="label"
|
95
|
-
v-if="setting.type == 'hint'"
|
96
|
-
/>
|
93
|
+
<uikit-hint :text="label" v-if="setting.type == 'hint'" />
|
97
94
|
</div>
|
98
95
|
</template>
|
99
96
|
|
@@ -104,15 +101,17 @@ export default {
|
|
104
101
|
setting: { type: Object, default: () => ({ type: 'text' }) },
|
105
102
|
content: { type: Array, required: true },
|
106
103
|
isFocused: { type: Boolean, default: false },
|
107
|
-
i18nScope: { type: String, required: false }
|
104
|
+
i18nScope: { type: String, required: false },
|
108
105
|
},
|
109
106
|
computed: {
|
110
107
|
label() {
|
111
|
-
// i18n key examples:
|
108
|
+
// i18n key examples:
|
112
109
|
// - themes.simple.style.settings.main_color
|
113
110
|
// - themes.simple.sections.navbar_01.settings.title
|
114
111
|
const i18nKey = `${this.i18nScope}.${this.setting.id}`
|
115
|
-
const translation = !this.isBlank(this.i18nScope)
|
112
|
+
const translation = !this.isBlank(this.i18nScope)
|
113
|
+
? this.$st(i18nKey)
|
114
|
+
: null
|
116
115
|
return translation || this.setting.label
|
117
116
|
},
|
118
117
|
options() {
|
@@ -25,7 +25,7 @@ export default {
|
|
25
25
|
settings: { type: Array, default: () => [] },
|
26
26
|
content: { type: Array, default: () => [] },
|
27
27
|
focusedSetting: { type: String, default: undefined },
|
28
|
-
i18nScope: { type: String, required: false }
|
28
|
+
i18nScope: { type: String, required: false },
|
29
29
|
},
|
30
30
|
methods: {
|
31
31
|
onChange(change) {
|
@@ -18,9 +18,9 @@
|
|
18
18
|
}"
|
19
19
|
>
|
20
20
|
<span>{{ $t('headerNav.pages') }}</span>
|
21
|
-
<page-icon class="ml-4" :page="currentPage" />
|
21
|
+
<uikit-page-icon class="ml-4" :page="currentPage" />
|
22
22
|
<span class="ml-2">{{ currentPage.title }}</span>
|
23
|
-
<icon name="arrow-down-s-line" class="ml-3" />
|
23
|
+
<uikit-icon name="arrow-down-s-line" class="ml-3" />
|
24
24
|
</router-link>
|
25
25
|
|
26
26
|
<separator />
|
@@ -33,7 +33,7 @@
|
|
33
33
|
'bg-editor-primary bg-opacity-5': isEditPageActive,
|
34
34
|
}"
|
35
35
|
>
|
36
|
-
<icon name="settings-4-line" size="1.25rem" />
|
36
|
+
<uikit-icon name="settings-4-line" size="1.25rem" />
|
37
37
|
<span class="ml-2">{{ $t('headerNav.pageSettings') }}</span>
|
38
38
|
</router-link>
|
39
39
|
|
@@ -1,13 +1,13 @@
|
|
1
1
|
<template>
|
2
2
|
<div>
|
3
|
-
<dropdown placement="bottom" ref="dropdown" class="h-full flex">
|
3
|
+
<uikit-dropdown placement="bottom" ref="dropdown" class="h-full flex">
|
4
4
|
<template v-slot:button>
|
5
5
|
<button
|
6
6
|
class="h-full w-full px-6 hover:bg-editor-primary hover:bg-opacity-5 transition-colors duration-200 flex items-center focus:outline-none focus:none"
|
7
7
|
>
|
8
|
-
<icon name="ri-global-line" class="mr-2" />
|
8
|
+
<uikit-icon name="ri-global-line" class="mr-2" />
|
9
9
|
<span class="mr-1">{{ currentLabel }}</span>
|
10
|
-
<icon name="arrow-down-s-line" />
|
10
|
+
<uikit-icon name="arrow-down-s-line" />
|
11
11
|
</button>
|
12
12
|
</template>
|
13
13
|
<template v-slot:content>
|
@@ -20,7 +20,7 @@
|
|
20
20
|
/>
|
21
21
|
</div>
|
22
22
|
</template>
|
23
|
-
</dropdown>
|
23
|
+
</uikit-dropdown>
|
24
24
|
</div>
|
25
25
|
</template>
|
26
26
|
|
@@ -1,12 +1,12 @@
|
|
1
1
|
<template>
|
2
2
|
<div>
|
3
|
-
<dropdown placement="bottom" ref="dropdown" class="h-full flex">
|
3
|
+
<uikit-dropdown placement="bottom" ref="dropdown" class="h-full flex">
|
4
4
|
<template v-slot:button>
|
5
5
|
<button
|
6
6
|
class="h-full w-full px-6 hover:bg-editor-primary hover:bg-opacity-5 transition-colors duration-200 flex items-center focus:outline-none focus:none"
|
7
7
|
>
|
8
8
|
<span>{{ $t('headerNav.previewToggler.button') }}</span>
|
9
|
-
<icon name="arrow-down-s-line" />
|
9
|
+
<uikit-icon name="arrow-down-s-line" />
|
10
10
|
</button>
|
11
11
|
</template>
|
12
12
|
<template v-slot:content>
|
@@ -22,7 +22,7 @@
|
|
22
22
|
}}</a>
|
23
23
|
</div>
|
24
24
|
</template>
|
25
|
-
</dropdown>
|
25
|
+
</uikit-dropdown>
|
26
26
|
</div>
|
27
27
|
</template>
|
28
28
|
|
@@ -22,14 +22,14 @@
|
|
22
22
|
:disabled="isInProgress || hasModifiedSections"
|
23
23
|
>
|
24
24
|
<span class="flex items-center justify-center space-x-2">
|
25
|
-
<icon
|
25
|
+
<uikit-icon
|
26
26
|
icon="circle-notch"
|
27
27
|
name="ri-loader-4-line"
|
28
28
|
spin
|
29
29
|
v-if="isInProgress"
|
30
30
|
/>
|
31
|
-
<icon name="ri-check-line" v-if="isSuccess" />
|
32
|
-
<icon name="ri-alert-line" v-if="isFail" />
|
31
|
+
<uikit-icon name="ri-check-line" v-if="isSuccess" />
|
32
|
+
<uikit-icon name="ri-alert-line" v-if="isFail" />
|
33
33
|
<span>{{ label }}</span>
|
34
34
|
</span>
|
35
35
|
</button>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
@uploaded="refresh"
|
7
7
|
class="flex-shrink-0"
|
8
8
|
/>
|
9
|
-
<search-input
|
9
|
+
<uikit-search-input
|
10
10
|
class="w-72 ml-auto"
|
11
11
|
:placeholder="$t('imageLibrary.searchPlaceholder')"
|
12
12
|
@search="search"
|
@@ -31,7 +31,7 @@
|
|
31
31
|
/>
|
32
32
|
</transition>
|
33
33
|
</div>
|
34
|
-
<pagination
|
34
|
+
<uikit-pagination
|
35
35
|
labelI18nKey="imageLibrary.pagination.label"
|
36
36
|
noItemsI18nKey="imageLibrary.pagination.noItems"
|
37
37
|
:activePage="activePage"
|
@@ -24,7 +24,7 @@
|
|
24
24
|
class="px-1 py-1 bg-white rounded-full flex items-center justify-center text-gray-900 ml-auto"
|
25
25
|
@click="() => (this.askingForRemoval = true)"
|
26
26
|
>
|
27
|
-
<icon name="delete-bin-line" size="1rem" />
|
27
|
+
<uikit-icon name="delete-bin-line" size="1rem" />
|
28
28
|
</button>
|
29
29
|
</div>
|
30
30
|
</transition>
|
@@ -7,13 +7,18 @@
|
|
7
7
|
>
|
8
8
|
<slot name="header">HINT</slot>
|
9
9
|
<button class="ml-auto">
|
10
|
-
<icon
|
10
|
+
<uikit-icon
|
11
11
|
name="arrow-up-s-line"
|
12
12
|
size="1.5rem"
|
13
13
|
class="ml-auto"
|
14
14
|
v-if="show"
|
15
15
|
/>
|
16
|
-
<icon
|
16
|
+
<uikit-icon
|
17
|
+
name="arrow-down-s-line"
|
18
|
+
size="1.5rem"
|
19
|
+
class="ml-auto"
|
20
|
+
v-else
|
21
|
+
/>
|
17
22
|
</button>
|
18
23
|
</div>
|
19
24
|
<transition
|
@@ -35,7 +40,7 @@
|
|
35
40
|
|
36
41
|
<script>
|
37
42
|
export default {
|
38
|
-
name: '
|
43
|
+
name: 'UIKitAccordion',
|
39
44
|
props: {
|
40
45
|
headerClass: { type: String, default: '' },
|
41
46
|
},
|
@@ -4,7 +4,7 @@
|
|
4
4
|
{{ label }}
|
5
5
|
</label>
|
6
6
|
|
7
|
-
<select-input
|
7
|
+
<uikit-select-input
|
8
8
|
:withLabel="false"
|
9
9
|
:placeholder="$t(`collectionItemInput.select.placeholder`)"
|
10
10
|
:searchEnabled="true"
|
@@ -16,7 +16,10 @@
|
|
16
16
|
v-model="selectedCollectionItem"
|
17
17
|
>
|
18
18
|
<template v-slot:value>
|
19
|
-
<div
|
19
|
+
<div
|
20
|
+
class="flex items-center flex-grow-0 overflow-x-hidden"
|
21
|
+
:title="selectedCollectionItem.label"
|
22
|
+
>
|
20
23
|
<div
|
21
24
|
class="h-10 w-10 bg-gray-400 mr-3"
|
22
25
|
v-if="selectedCollectionItem.imageUrl"
|
@@ -37,7 +40,7 @@
|
|
37
40
|
<span class="truncate font-bold">{{ item.label }}</span>
|
38
41
|
</div>
|
39
42
|
</template>
|
40
|
-
</select-input>
|
43
|
+
</uikit-select-input>
|
41
44
|
</div>
|
42
45
|
</template>
|
43
46
|
|
@@ -45,7 +48,7 @@
|
|
45
48
|
import { camelizeKeys } from '@/misc/utils'
|
46
49
|
|
47
50
|
export default {
|
48
|
-
name: '
|
51
|
+
name: 'UIKitCollectionItemInput',
|
49
52
|
props: {
|
50
53
|
label: { type: String, default: 'Label' },
|
51
54
|
name: { type: String, default: 'image' },
|