Commit bb7e16f6 authored by MARCO Jonathan's avatar MARCO Jonathan
Browse files

馃攢 Merge branch 'release/3.0.39'

parents 3da9623a 01d83eaa
Pipeline #84431 passed with stage
in 13 seconds
{
"name": "@vue-unistra/formbuilder",
"version": "3.0.38",
"version": "3.0.39",
"main": "dist/index.js",
"files": [
"dist/*",
......
......@@ -3,12 +3,12 @@
<v-row>
<v-col>
<v-select
:label="_uct('builder.tabs.data.localeRichText.label')"
:items="locales"
item-text="locale"
item-value="locale"
:value="localeSelected"
@change="updateLocaleSelected"
:label="_uct('builder.tabs.data.localeRichText.label')"
:items="locales"
item-text="locale"
item-value="locale"
:value="localeSelected"
@change="updateLocaleSelected"
/>
</v-col>
</v-row>
......@@ -20,124 +20,132 @@
<v-toolbar color="primary" flat dense>
<v-toolbar-items>
<v-btn
tile
elevation="0"
x-small
:class="{ 'light-button': !isLightButton(isActive.bold()) }"
:color="isActive.bold() ? 'secondary' : 'primary'"
@click="commands.bold"
tile
elevation="0"
x-small
:class="{ 'light-button': !isLightButton(isActive.bold()) }"
:color="isActive.bold() ? 'secondary' : 'primary'"
@click="commands.bold"
>
<v-icon small>mdi-format-bold</v-icon>
</v-btn>
<v-btn
tile
elevation="0"
x-small
:class="{ 'light-button': !isLightButton(isActive.italic()) }"
:color="isActive.italic() ? 'secondary' : 'primary'"
@click="commands.italic"
tile
elevation="0"
x-small
:class="{ 'light-button': !isLightButton(isActive.italic()) }"
:color="isActive.italic() ? 'secondary' : 'primary'"
@click="commands.italic"
>
<v-icon small>mdi-format-italic</v-icon>
</v-btn>
<v-btn
tile
elevation="0"
x-small
:class="{ 'light-button': !isLightButton(isActive.heading({ level: 1 })) }"
:color="isActive.heading({ level: 1 }) ? 'secondary' : 'primary'"
@click="commands.heading({ level: 1 })"
tile
elevation="0"
x-small
:class="{ 'light-button': !isLightButton(isActive.heading({ level: 1 })) }"
:color="isActive.heading({ level: 1 }) ? 'secondary' : 'primary'"
@click="commands.heading({ level: 1 })"
>
<v-icon small>mdi-format-header-1</v-icon>
</v-btn>
<v-btn
tile
elevation="0"
x-small
:class="{ 'light-button': !isLightButton(isActive.heading({ level: 2 })) }"
:color="isActive.heading({ level: 2 }) ? 'secondary' : 'primary'"
@click="commands.heading({ level: 2 })"
tile
elevation="0"
x-small
:class="{ 'light-button': !isLightButton(isActive.heading({ level: 2 })) }"
:color="isActive.heading({ level: 2 }) ? 'secondary' : 'primary'"
@click="commands.heading({ level: 2 })"
>
<v-icon small>mdi-format-header-2</v-icon>
</v-btn>
<v-btn
tile
elevation="0"
x-small
:class="{ 'light-button': !isLightButton(isActive.heading({ level: 3 })) }"
:color="isActive.heading({ level: 3 }) ? 'secondary' : 'primary'"
@click="commands.heading({ level: 3 })"
tile
elevation="0"
x-small
:class="{ 'light-button': !isLightButton(isActive.heading({ level: 3 })) }"
:color="isActive.heading({ level: 3 }) ? 'secondary' : 'primary'"
@click="commands.heading({ level: 3 })"
>
<v-icon small>mdi-format-header-3</v-icon>
</v-btn>
<v-btn
tile
elevation="0"
x-small
:class="{ 'light-button': !isLightButton(isActive.link()) }"
:color="isActive.link() ? 'secondary' : 'primary'"
@click.stop="showLinkDialog(getMarkAttrs('link'))"
tile
elevation="0"
x-small
:class="{ 'light-button': !isLightButton(isActive.link()) }"
:color="isActive.link() ? 'secondary' : 'primary'"
@click.stop="showLinkDialog(getMarkAttrs('link'))"
>
<v-icon small>mdi-link</v-icon>
</v-btn>
<v-btn
tile
elevation="0"
x-small
:class="{ 'light-button': !isLightButton(isActive.bullet_list()) }"
:color="isActive.bullet_list() ? 'secondary' : 'primary'"
@click="commands.bullet_list"
tile
elevation="0"
x-small
:class="{ 'light-button': !isLightButton(isActive.bullet_list()) }"
:color="isActive.bullet_list() ? 'secondary' : 'primary'"
@click="commands.bullet_list"
>
<v-icon small>mdi-format-list-bulleted</v-icon>
</v-btn>
<v-btn
tile
elevation="0"
x-small
:class="{ 'light-button': !isLightButton(isActive.ordered_list()) }"
:color="isActive.ordered_list() ? 'secondary' : 'primary'"
@click="commands.ordered_list"
tile
elevation="0"
x-small
:class="{ 'light-button': !isLightButton(isActive.ordered_list()) }"
:color="isActive.ordered_list() ? 'secondary' : 'primary'"
@click="commands.ordered_list"
>
<v-icon small>mdi-format-list-numbered</v-icon>
</v-btn>
<!-- dialog to add link -->
<v-dialog
v-model="link.dialog.display"
max-width="300"
v-model="link.dialog.display"
max-width="300"
>
<v-card>
<v-card-title>
{{ isActive.link() ? 'Update link' : 'Add link' }}
</v-card-title>
<v-divider/>
<v-divider />
<v-card-text>
<v-text-field
v-model="link.url"
label="URL"
placeholder="https://"
hint="Enter URL"
>
</v-text-field>
v-model="link.url"
label="URL"
placeholder="https://"
hint="Enter URL"
/>
</v-card-text>
<v-divider/>
<v-divider />
<v-card-actions>
<v-spacer/>
<v-spacer />
<v-btn
outlined
tile
elevation="0"
color="primary"
@click="saveLink(commands.link, null)"
>
{{ _uct('builder.tabs.data.richText.buttons.delete') }}
</v-btn>
<v-btn
outlined
tile
elevation="0"
color="primary"
@click="saveLink(commands.link, null)"
outlined
tile
elevation="0"
color="primary"
@click="link.dialog.display = false"
>
<strong>Close</strong>
{{ _uct('builder.tabs.data.richText.buttons.close') }}
</v-btn>
<v-btn
tile
elevation="0"
color="primary"
@click="saveLink(commands.link, link.url)"
tile
elevation="0"
color="primary"
@click="saveLink(commands.link, link.url)"
>
<strong>Save</strong>
{{ _uct('builder.tabs.data.richText.buttons.save') }}
</v-btn>
</v-card-actions>
</v-card>
......@@ -147,7 +155,7 @@
</editor-menu-bar>
</v-card-title>
<v-card-text class="pa-4">
<editor-content class="content-editor" :editor="editor"/>
<editor-content class="content-editor" :editor="editor" />
</v-card-text>
</v-card>
</v-col>
......@@ -275,9 +283,9 @@ export default Vue.extend({
initEditor(): void {
let content = this._uct('builder.tabs.data.richTextDefaultValue');
const contentTranslated = this.$store.getters['form/translation'](
this.fieldId,
this.localeSelected,
'content',
this.fieldId,
this.localeSelected,
'content',
);
if (contentTranslated !== '') {
......
......@@ -112,7 +112,7 @@ export const fr: AppMessages = {
cancel: 'Annuler',
save: 'Enregistrer',
},
autocompleteLabel: "Valeur auto-g茅n茅r茅e",
autocompleteLabel: 'Valeur auto-g茅n茅r茅e',
label: 'Libell茅',
title: 'Nouvelle option',
value: 'Valeur',
......@@ -128,6 +128,13 @@ export const fr: AppMessages = {
title: 'Options',
},
richTextDefaultValue: 'Entrez une nouvelle valeur ici.',
richText: {
buttons: {
close: 'Fermer',
delete: 'Supprimer',
save: 'Enregistrer',
},
},
selectAll: 'Tout s茅lectionner',
uniqueValue: 'Valeur unique',
fileSystem: {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment