Commit 23861329 authored by stahl's avatar stahl
Browse files

update grafik display, remove placeholder replace function, add

multiple placeholder addition
parent 3889913c
......@@ -10,7 +10,7 @@
</div>
<button @click="save">Speichern ...</button>&nbsp;&nbsp;
<div>
Seite
Grafik
<select
v-model="page"
>
......@@ -19,7 +19,7 @@
:key=index
:value=page
>
{{ page+1 }}
{{ ~~(page/2) + 1 }}-{{ mod(page,2) + 1}}
</option>
</select>
</div>
......@@ -53,12 +53,16 @@
</label>
</div>
<div class="actions editor">
<button @click="replaceWithPlaceholder()">Mit Platzhalter ersetzen [r]</button>
<button @click="addPlaceholder()">Platzhalter einfügen [p]</button>
<!--<button @click="replaceWithPlaceholder()">Mit Platzhalter ersetzen [r]</button>-->
<input type="number" min="1" v-model="numPlaceholderToInsert">
<button @click="addPlaceholder(numPlaceholderToInsert)">Platzhalter einfügen [p]</button>
<button @click="toggleAddThumbsDialogue()">Bild einfügen [a]</button>
<button @click="removeThumb()">Löschen [delete/backspace]</button>
</div>
<div class="actions info">
<div>
{{ ~~(page/2) + 1 }}-{{ mod(page,2) + 1}}
</div>
<div>
{{ x+1 }} / {{ y+1 }}
</div>
......@@ -193,6 +197,7 @@ export default {
const showGaps = ref(true);
const showLeftRightMarker = ref(true);
const showPreview = ref(false);
const numPlaceholderToInsert = ref(1);
const pageIndex = computed(() => {
return x.value + y.value * cols;
......@@ -204,10 +209,14 @@ export default {
files.value.splice(index.value, 1);
};
const replaceWithPlaceholder = () => {
files.value[index.value] = placeholder;
console.warn('disabled for now..');
return;
//files.value[index.value] = placeholder;
};
const addPlaceholder = () => {
files.value[index.value+1] = placeholder;
const addPlaceholder = (count) => {
let placeholders = Array(count).fill(placeholder);
console.log(placeholders);
files.value.splice(index.value+1, 0, ...placeholders);
};
const toggleAddThumbsDialogue = () => {
if (isAddThumbsDialogueActive.value == true) {
......@@ -271,7 +280,7 @@ export default {
replaceWithPlaceholder()
break;
case 80: //p
addPlaceholder()
addPlaceholder(1)
x.value = mod(x.value+1, cols);
break;
case 65: // a
......@@ -314,6 +323,7 @@ export default {
removeThumb,
replaceWithPlaceholder,
addPlaceholder,
numPlaceholderToInsert,
toggleAddThumbsDialogue,
isAddThumbsDialogueActive,
showGaps,
......@@ -476,13 +486,13 @@ header {
margin-bottom: 5px;
}
.actions.top {
grid-template-columns: 400px 400px 100px 100px 100px 100px;
grid-template-columns: 300px 400px 100px 50px 150px 150px;
}
.actions.options {
grid-template-columns: repeat(10, 200px);
}
.actions.editor {
grid-template-columns: repeat(10, 200px);
grid-template-columns: 100px 200px 200px 200px;
}
.thumb-preview {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment