Skip to content

Commit

Permalink
switch to pastagang server
Browse files Browse the repository at this point in the history
  • Loading branch information
felixroos committed Dec 31, 2024
1 parent 032d759 commit f8b21cc
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 12 deletions.
51 changes: 46 additions & 5 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,59 @@

<body>
<div class="slots">
<div class="slot" id="slot1">
<div class="slot" id="slot-1">
<select class="target">
<option value="strudel">strudel</option>
<!-- <option value="hydra">hydra</option> -->
<option value="hydra">hydra</option>
</select>
<div class="editor"></div>
</div>

<div class="slot" id="slot2">
<div class="slot" id="slot-2">
<select class="target">
<option value="strudel">strudel</option>
<option value="hydra">hydra</option>
</select>
<div class="editor"></div>
</div>
<div class="slot" id="slot-3">
<select class="target">
<option value="strudel">strudel</option>
<option value="hydra">hydra</option>
</select>
<div class="editor"></div>
</div>
<div class="slot" id="slot-4">
<select class="target">
<option value="strudel">strudel</option>
<option value="hydra">hydra</option>
</select>
<div class="editor"></div>
</div>
<div class="slot" id="slot-5">
<select class="target">
<option value="strudel">strudel</option>
<option value="hydra">hydra</option>
</select>
<div class="editor"></div>
</div>
<div class="slot" id="slot-6">
<select class="target">
<option value="strudel">strudel</option>
<option value="hydra">hydra</option>
</select>
<div class="editor"></div>
</div>
<div class="slot" id="slot-7">
<select class="target">
<option value="strudel">strudel</option>
<option value="hydra">hydra</option>
</select>
<div class="editor"></div>
</div>
<div class="slot" id="slot-8">
<select class="target">
<option value="strudel">strudel</option>
<!-- <option value="hydra">hydra</option> -->
<option value="hydra">hydra</option>
</select>
<div class="editor"></div>
</div>
Expand Down
8 changes: 4 additions & 4 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const flokBasicSetup = (doc) => {

const createEditor = (doc) => {
console.log("createEditor", doc);
if (!["slot1", "slot2"].includes(doc.id)) {
if (!["1", "2", "3", "4", "5", "6", "7", "8"].includes(doc.id)) {
console.warn(
`ignoring doc with id "${doc.id}". only slot1 and slot2 is allowed rn..`
);
Expand Down Expand Up @@ -63,14 +63,14 @@ const createEditor = (doc) => {
],
});

const editorEl = document.querySelector(`#${doc.id} .editor`);
const editorEl = document.querySelector(`#slot-${doc.id} .editor`);
const view = new EditorView({
state,
parent: editorEl,
});
editorViews.set(doc.id, view);

const targetEl = document.querySelector(`#${doc.id} .target`);
const targetEl = document.querySelector(`#slot-${doc.id} .target`);
targetEl.value = doc.target;

targetEl.addEventListener("change", (e) => {
Expand All @@ -86,7 +86,7 @@ const handleEvalHydra = (msg) => {
// evaluate hydra code here...
};

const session = new Session("nudelsalat", {
const session = new Session("pastagang", {
// changed this part to what flok.cc uses
hostname: "flok.cc",
port: "", //parseInt(port),
Expand Down
6 changes: 3 additions & 3 deletions src/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ body {
}

.slots {
display: flex;
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
width: 100%;
height: 100%;
}
Expand All @@ -19,8 +20,7 @@ body {
display: flex;
flex-direction: column;
flex-grow: 1;
margin: 0.25em;
width: 50%;
width: 100%;
}

.slot .title {
Expand Down

0 comments on commit f8b21cc

Please sign in to comment.