-
+
+
+
+
+
+
+
+
+
+
+
@@ -98,7 +119,9 @@
editorTheme: undefined,
autofoldTextEditor: undefined,
guidedTour: undefined,
- logDisplay: undefined
+ logDisplay: undefined,
+ editorFontSize: undefined,
+ editorFontFamily: undefined
};
},
created() {
@@ -112,6 +135,8 @@
this.autofoldTextEditor = localStorage.getItem("autofoldTextEditor") === "true";
this.guidedTour = localStorage.getItem("tourDoneOrSkip") === "true";
this.logDisplay = localStorage.getItem("logDisplay") || logDisplayTypes.DEFAULT;
+ this.editorFontSize = localStorage.getItem("editorFontSize") || 12;
+ this.editorFontFamily = localStorage.getItem("editorFontFamily") || "'Source Code Pro', monospace";
},
methods: {
onNamespaceSelect(value) {
@@ -174,6 +199,16 @@
localStorage.setItem("logDisplay", value);
this.logDisplay = value;
this.$toast().saved();
+ },
+ onFontSize(value) {
+ localStorage.setItem("editorFontSize", value);
+ this.editorFontSize = value;
+ this.$toast().saved();
+ },
+ onFontFamily(value) {
+ localStorage.setItem("editorFontFamily", value);
+ this.editorFontFamily = value;
+ this.$toast().saved();
}
},
computed: {
@@ -215,6 +250,40 @@
{value: logDisplayTypes.HIDDEN, text: this.$t("collapse all")}
]
},
+ fontFamilyOptions() {
+ // Array of font family that contains arabic language and japanese, chinese, korean languages compatible font family
+ return [
+ {
+ value: "'Source Code Pro', monospace",
+ text: "Source Code Pro"
+ },
+ {
+ value: "'Courier New', monospace",
+ text: "Courier"
+ },
+ {
+ value: "'Times New Roman', serif",
+ text: "Times New Roman"
+ },
+ {
+ value: "'Book Antiqua', serif",
+ text: "Book Antiqua"
+ },
+ {
+ value: "'Times New Roman Arabic', serif",
+ text: "Times New Roman Arabic"
+ },
+ {
+ value: "'SimSun', sans-serif",
+ text: "SimSun"
+ }
+ ]
+ }
}
};
+
diff --git a/ui/src/translations.json b/ui/src/translations.json
index 7e9b87d465f..bbdbdbc9427 100644
--- a/ui/src/translations.json
+++ b/ui/src/translations.json
@@ -245,6 +245,8 @@
"Default log level": "Default log level",
"unsaved changed ?": "You have unsaved changes, do you want to leave this page?",
"Editor theme": "Editor theme",
+ "Editor fontsize": "Editor font size",
+ "Editor fontfamily": "Editor font family",
"errors": {
"404": {
"title": "Page not found",
@@ -708,6 +710,8 @@
"Default log level": "Niveau de log par défaut",
"unsaved changed ?": "Vous avez des changements non sauvegardés, voulez-vous quitter la page ?",
"Editor theme": "Theme de l'éditeur",
+ "Editor fontsize": "Taille de police de l'éditeur",
+ "Editor fontfamily": "Police de l'éditeur",
"errors": {
"404": {
"title": "Page introuvable",