diff --git a/package.json b/package.json
index 1149d200b..7dcb88e7f 100644
--- a/package.json
+++ b/package.json
@@ -31,6 +31,7 @@
"vue-router": "^3.0.1",
"vue-template-compiler": "^2.3.4",
"vue-timeago": "^3.1.2",
+ "vuelidate": "^0.7.4",
"vuex": "^3.0.1",
"whatwg-fetch": "^2.0.3"
},
diff --git a/src/App.scss b/src/App.scss
index 15dec7ecf..5355d8998 100644
--- a/src/App.scss
+++ b/src/App.scss
@@ -119,7 +119,7 @@ input, textarea, .select {
box-sizing: border-box;
display: inline-block;
position: relative;
- height: 29px;
+ height: 28px;
line-height: 16px;
hyphens: none;
@@ -136,7 +136,7 @@ input, textarea, .select {
height: 100%;
color: $fallback--text;
color: var(--text, $fallback--text);
- line-height: 29px;
+ line-height: 28px;
z-index: 0;
pointer-events: none;
}
@@ -156,7 +156,7 @@ input, textarea, .select {
font-size: 14px;
width: 100%;
z-index: 1;
- height: 29px;
+ height: 28px;
line-height: 16px;
}
diff --git a/src/components/export_import/export_import.vue b/src/components/export_import/export_import.vue
new file mode 100644
index 000000000..451a26684
--- /dev/null
+++ b/src/components/export_import/export_import.vue
@@ -0,0 +1,87 @@
+
+
+
+
+
+
+
{{ importFailedText }}
+
+
+
+
+
+
+
diff --git a/src/components/font_control/font_control.js b/src/components/font_control/font_control.js
new file mode 100644
index 000000000..8e2b0e45f
--- /dev/null
+++ b/src/components/font_control/font_control.js
@@ -0,0 +1,58 @@
+import { set } from 'vue'
+
+export default {
+ props: [
+ 'name', 'label', 'value', 'fallback', 'options', 'no-inherit'
+ ],
+ data () {
+ return {
+ lValue: this.value,
+ availableOptions: [
+ this.noInherit ? '' : 'inherit',
+ 'custom',
+ ...(this.options || []),
+ 'serif',
+ 'monospace',
+ 'sans-serif'
+ ].filter(_ => _)
+ }
+ },
+ beforeUpdate () {
+ this.lValue = this.value
+ },
+ computed: {
+ present () {
+ return typeof this.lValue !== 'undefined'
+ },
+ dValue () {
+ return this.lValue || this.fallback || {}
+ },
+ family: {
+ get () {
+ return this.dValue.family
+ },
+ set (v) {
+ set(this.lValue, 'family', v)
+ this.$emit('input', this.lValue)
+ }
+ },
+ isCustom () {
+ return this.preset === 'custom'
+ },
+ preset: {
+ get () {
+ if (this.family === 'serif' ||
+ this.family === 'sans-serif' ||
+ this.family === 'monospace' ||
+ this.family === 'inherit') {
+ return this.family
+ } else {
+ return 'custom'
+ }
+ },
+ set (v) {
+ this.family = v === 'custom' ? '' : v
+ }
+ }
+ }
+}
diff --git a/src/components/font_control/font_control.vue b/src/components/font_control/font_control.vue
index 85f19eea7..ed36b2806 100644
--- a/src/components/font_control/font_control.vue
+++ b/src/components/font_control/font_control.vue
@@ -32,66 +32,7 @@
-
+