From 469b5a584fe80f34e34cc7ff0a89258dffaf2282 Mon Sep 17 00:00:00 2001 From: szewczyw Date: Wed, 5 Feb 2025 14:20:09 +0100 Subject: [PATCH 1/3] mark_text_doesnt_work (#291) Updated existing theme so that line highlighting is transparent, had to add new theme because ovewriting exisiting value was impossible. Reviewed-on: https://gitea.release11.com/R11/release11-tools/pulls/291 Reviewed-by: Adam Bem Co-authored-by: szewczyw Co-committed-by: szewczyw --- .../components/common/CodeEditorComponent.vue | 48 +++++++++++++++++-- 1 file changed, 45 insertions(+), 3 deletions(-) diff --git a/Frontend/src/components/common/CodeEditorComponent.vue b/Frontend/src/components/common/CodeEditorComponent.vue index bc233b7..5087942 100644 --- a/Frontend/src/components/common/CodeEditorComponent.vue +++ b/Frontend/src/components/common/CodeEditorComponent.vue @@ -2,7 +2,8 @@ import { onBeforeUpdate, inject } from 'vue' import { Codemirror } from 'vue-codemirror' import { oneDark } from '@codemirror/theme-one-dark' -import { espresso } from 'thememirror'; +import { createTheme} from 'thememirror'; +import {tags as t} from '@lezer/highlight'; import {xml} from '@codemirror/lang-xml' import {json} from '@codemirror/lang-json' import {html} from '@codemirror/lang-html' @@ -18,6 +19,47 @@ const props= defineProps({ }, }) +const lightTheme = createTheme({ + variant: 'light', + settings: { + background: '#FFFFFF', + foreground: '#000000', + caret: '#000000', + selection: '#80C7FF', + gutterBackground: '#FFFFFF', + gutterForeground: '#00000070', + lineHighlight: '#C1E2F840', + }, + styles: [ + { + tag: t.comment, + color: '#AAAAAA', + }, + { + tag: [t.keyword, t.operator, t.typeName, t.tagName, t.propertyName], + color: '#2F6F9F', + fontWeight: 'bold', + }, + { + tag: [t.attributeName, t.definition(t.propertyName)], + color: '#4F9FD0', + }, + { + tag: [t.className, t.string, t.special(t.brace)], + color: '#CF4F5F', + }, + { + tag: t.number, + color: '#CF4F5F', + fontWeight: 'bold', + }, + { + tag: t.variableName, + fontWeight: 'bold', + }, + ], +}); + const emit = defineEmits( [ 'update:updatedCode' @@ -37,7 +79,7 @@ function selectTheme() { if (isDarkModeSet()) return oneDark; else - return espresso; + return lightTheme; } function isDarkModeSet(){ @@ -83,4 +125,4 @@ function parseLanguage(name: String){ /> - + \ No newline at end of file From 79959c5ff988c492527945815878bd36779a88ce Mon Sep 17 00:00:00 2001 From: Wojciech Mizia Date: Wed, 5 Feb 2025 14:28:20 +0100 Subject: [PATCH 2/3] issue_tracker (#296) Co-authored-by: Wojciech Szewczyk Reviewed-on: https://gitea.release11.com/R11/release11-tools/pulls/296 Co-authored-by: Wojciech Mizia Co-committed-by: Wojciech Mizia --- issue_template/bug.md | 21 +++++++++++++++++++++ issue_template/feature.md | 10 ++++++++++ 2 files changed, 31 insertions(+) create mode 100644 issue_template/bug.md create mode 100644 issue_template/feature.md diff --git a/issue_template/bug.md b/issue_template/bug.md new file mode 100644 index 0000000..8b7acd0 --- /dev/null +++ b/issue_template/bug.md @@ -0,0 +1,21 @@ +--- + +name: "Bug template" +about: "This template is for reporting bugs" +title: "Bug" + +--- + +## Description +*A clear and concise description of the issue.* + +### Selected Fields +- **Engine:** [Specify the engine used] +- **Version:** [Specify the version] +- **Tool:** [Specify the currently used tool] + +### Data: +*Paste used xml/xslt/json etc...* + +## Additional Context +*Any other information that might help with this issue.* diff --git a/issue_template/feature.md b/issue_template/feature.md new file mode 100644 index 0000000..3c491d9 --- /dev/null +++ b/issue_template/feature.md @@ -0,0 +1,10 @@ +--- + +name: "Feature request template" +about: "This template is for requesting features" +title: "Feature request" + +--- + +## Feature Request +*Describe the feature you’d like to see and why it’s useful.* From f3f88ad659c57537c260dabea6a7ddcec92b5366 Mon Sep 17 00:00:00 2001 From: Wojciech Mizia Date: Wed, 5 Feb 2025 17:01:23 +0100 Subject: [PATCH 3/3] xalan_single_files_frontend (#297) Reviewed-on: https://gitea.release11.com/R11/release11-tools/pulls/297 Reviewed-by: Wojciech Szewczyk Co-authored-by: Wojciech Mizia Co-committed-by: Wojciech Mizia --- .../xml/XmlOutputFieldComponent.vue | 30 +++++++++++++------ .../xml/XmlTabbedInputComponent.vue | 12 +++++--- Frontend/src/style.css | 4 +++ Frontend/src/views/XSLTView.vue | 6 ++-- 4 files changed, 37 insertions(+), 15 deletions(-) diff --git a/Frontend/src/components/xml/XmlOutputFieldComponent.vue b/Frontend/src/components/xml/XmlOutputFieldComponent.vue index 2e0adc8..09757f6 100644 --- a/Frontend/src/components/xml/XmlOutputFieldComponent.vue +++ b/Frontend/src/components/xml/XmlOutputFieldComponent.vue @@ -7,11 +7,12 @@ const props = defineProps( { tool: {type: String, required: true}, xml: {type: [String, Array], required: true}, - query: {type: String, required: true} + query: {type: String, required: true}, + activeTabId: {type: Number, required: false} } ) -const emit = defineEmits(["update"]); +const emit = defineEmits(["update", "update:engine"]); const result = ref(''); @@ -109,21 +110,23 @@ function prepareRequest():Request { function prepareURL(): string { const engineEndpoint = engine.value == "libxml" ? "libxml" : "java"; - + let tool = props.tool; - if (Array.isArray(props.xml) && props.xml.length > 1) + if (Array.isArray(props.xml) && props.xml.length > 1 && engine.value == "saxon") tool = "multiple/xslt"; return document.location.protocol + "//" + document.location.hostname + "/" + engineEndpoint + "/" + tool; } function selectRequestBodyType() : string { - if (Array.isArray(props.xml) && props.xml.length > 1) - return prepareRequestBodyMultiXml(); + if (Array.isArray(props.xml) && (engine.value == "xalan" || engine.value == "libxml")) + return prepareRequestBodySingleXml(props.xml.at(props.activeTabId!)!.data) + else if (Array.isArray(props.xml) && props.xml.length > 1) + return prepareRequestBodyMultiXml(); else if (Array.isArray(props.xml)) - return prepareRequestBodySingleXml(props.xml.at(0)!.data); + return prepareRequestBodySingleXml(props.xml.at(0)!.data); else - return prepareRequestBodySingleXml(props.xml!); + return prepareRequestBodySingleXml(props.xml!); } function prepareRequestBodySingleXml(data: string):string { @@ -188,6 +191,10 @@ function emitVersionChange() { emit("update", version.value); } +function emitEngineChange() { + emit("update:engine", engine.value); +} + function isVersionSelectionAvailable() { return !(versionsForCurrentEngine.value.length == 1 && versionsForCurrentEngine.value.at(0) == "N/A"); } @@ -202,6 +209,11 @@ function highlightField() { return ""; } +function handleChange() { + changeAvailableVersions(); + emitEngineChange(); +} +