Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
JannisDommer committed Jan 5, 2024
2 parents b4091a1 + 4f033a8 commit 93bd994
Show file tree
Hide file tree
Showing 17 changed files with 919 additions and 204 deletions.
4 changes: 3 additions & 1 deletion WebSocketClient/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ COPY . .
RUN npm run build

# Install Nginx
RUN apt-get update && apt-get install -y nginx
RUN apt-get update
RUN apt-get install -y nginx
RUN apt-get clean

# Copy your static files into the Nginx document root directory
RUN cp -r dist/* /var/www/html/
Expand Down
6 changes: 6 additions & 0 deletions WebSocketClient/dark_mode_dev_env.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
cp -r ./dist/assets/dark_modern* ./node_modules/.vite/deps/dark_modern.json
cp -r ./dist/assets/dark_plus* ./node_modules/.vite/deps/dark_plus.json
cp -r ./dist/assets/dark_vs* ./node_modules/.vite/deps/dark_vs.json
cp -r ./dist/assets/light_modern* ./node_modules/.vite/deps/light_modern.json
cp -r ./dist/assets/light_plus* ./node_modules/.vite/deps/light_plus.json
cp -r ./dist/assets/light_vs* ./node_modules/.vite/deps/light_vs.json
402 changes: 376 additions & 26 deletions WebSocketClient/index.html

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions WebSocketClient/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion WebSocketClient/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite dev",
"dev": "./dark_mode_dev_env.sh && vite dev",
"build": "tsc && vite build",
"preview": "vite preview"
},
Expand All @@ -28,6 +28,7 @@
"@codingame/monaco-vscode-theme-service-override": "~1.83.2",
"@viz-js/viz": "^3.2.3",
"dotenv": "^16.3.1",
"intro.js": "^7.2.0",
"lodash": "^4.17.21",
"monaco-editor": "^0.44.0",
"monaco-editor-workers": "~0.44.0",
Expand Down
35 changes: 35 additions & 0 deletions WebSocketClient/split.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
.splitter {
width: 100%;
height: 80vh;
display: flex;

}

#separator {
cursor: col-resize;
background-color: #aaa;
background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='30'><path d='M2 0 v30 M5 0 v30 M8 0 v30' fill='none' stroke='black'/></svg>");
background-repeat: no-repeat;
background-position: center;
width: 10px;
height: 100%;

/* Prevent the browser's built-in drag from interfering */
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}

#first {
background-color: rgb(255, 255, 255);
width: 100%;
height: 100%;
min-width: 10px;
}

#second {
background-color: rgb(255, 255, 255);
width: 0%;
height: 100%;
min-width: 10px;
}
2 changes: 2 additions & 0 deletions WebSocketClient/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@ export default {
port: 30000,
languageServerHostName: "localhost",
debug: true,
MAX_NUMBER_LINES: 100,
MAX_NUMBER_CHARACTERS: 10000,
};
49 changes: 49 additions & 0 deletions WebSocketClient/src/intro.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
import introJs from "intro.js";
import { sendGenerateGraphCommand } from "./main";


export const initIntroJS = () => {


var intro = introJs();

intro.setOptions({
steps: [{
element: '#container', intro: 'This is the texteditor where you write and edit your uvl feature model.',
}, {
element: '.codelens-decoration', intro: 'You can use the buttons to activate and deactivate functionality.'
}, {
element: "[id='1']",
intro: 'Click here to visualize your feature model und click on it again to hide it again.'
}, {
element: "#separator", intro: 'You can change the size of the editor and the visualization with your mouse.'
}],
});

const button = document.getElementById("tutorialButton");

intro.onchange(function(targetElement) {
if(targetElement.id === "1"){
sendGenerateGraphCommand();
}

});

button?.addEventListener("click", () => {
intro.setOption("exitOnOverlayClick", false);
intro.setOption("overlayOpacity", 0);
intro.setOption("disableInteraction", true);
intro.setOption("highlightClass", "tmpClass");
intro.start();

var helperLayer = document.getElementsByClassName("tmpClass");
setTimeout(() => {
if(helperLayer[0] instanceof HTMLElement){
helperLayer[0].style["box-shadow"] = "rgb(255, 255, 255) 0px 0px 1px 2px, rgba(230, 230, 230, 0.44) 0px 0px 0px 5000px";
}
}, 100);


});

}
Loading

0 comments on commit 93bd994

Please sign in to comment.