Skip to content

Commit 24c47e1

Browse files
added docx logo
1 parent 465e5d0 commit 24c47e1

5 files changed

Lines changed: 115 additions & 78 deletions

File tree

dist/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/server/public/app.js

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -117,12 +117,6 @@ function renderPresets() {
117117
const content = document.createElement('div')
118118
content.className = 'preset-content'
119119

120-
<<<<<<< HEAD
121-
const logo = document.createElement('div')
122-
logo.style.fontSize = '2rem'
123-
logo.style.marginBottom = '0.5rem'
124-
logo.textContent = preset.logo
125-
=======
126120
let logo
127121
if (preset.logo.url) {
128122
logo = document.createElement('img')
@@ -135,7 +129,6 @@ function renderPresets() {
135129
logo.style.marginBottom = '0.5rem'
136130
logo.textContent = preset.logo.icon
137131
}
138-
>>>>>>> 71ca210 (update logos)
139132

140133
const title = document.createElement('h3')
141134
title.textContent = preset.name
@@ -244,15 +237,11 @@ function initializeUpload() {
244237
}
245238
} catch (error) {
246239
console.error('Error opening file dialog:', error)
247-
<<<<<<< HEAD
248-
alert(window.i18n ? window.i18n.t('submit.errorFileDialog') : 'Error opening file dialog')
249-
=======
250240
alert(
251241
window.i18n
252242
? window.i18n.t('submit.errorFileDialog')
253243
: 'Error opening file dialog',
254244
)
255-
>>>>>>> 71ca210 (update logos)
256245
}
257246
} else {
258247
// Fallback: create temporary file input for browser mode
@@ -507,43 +496,31 @@ function initializeForm() {
507496

508497
// Validation
509498
if (currentSourceType === 'upload' && selectedFiles.length === 0) {
510-
<<<<<<< HEAD
511-
alert(window.i18n ? window.i18n.t('submit.errorNoFile') : 'Please upload at least one file.')
512-
=======
513499
alert(
514500
window.i18n
515501
? window.i18n.t('submit.errorNoFile')
516502
: 'Please upload at least one file.',
517503
)
518-
>>>>>>> 71ca210 (update logos)
519504
return
520505
}
521506

522507
if (currentSourceType === 'git') {
523508
const gitUrl = document.getElementById('gitUrl').value.trim()
524509
if (!gitUrl) {
525-
<<<<<<< HEAD
526-
alert(window.i18n ? window.i18n.t('submit.errorNoGitUrl') : 'Please enter a Git repository URL.')
527-
=======
528510
alert(
529511
window.i18n
530512
? window.i18n.t('submit.errorNoGitUrl')
531513
: 'Please enter a Git repository URL.',
532514
)
533-
>>>>>>> 71ca210 (update logos)
534515
return
535516
}
536517
}
537518

538519
// Disable submit button
539520
submitBtn.disabled = true
540-
<<<<<<< HEAD
541-
submitBtn.textContent = window.i18n ? window.i18n.t('submit.starting') : 'Starting export...'
542-
=======
543521
submitBtn.textContent = window.i18n
544522
? window.i18n.t('submit.starting')
545523
: 'Starting export...'
546-
>>>>>>> 71ca210 (update logos)
547524

548525
try {
549526
const formData = new FormData()
@@ -575,15 +552,11 @@ function initializeForm() {
575552
} else if (selectedFormat) {
576553
formData.append('format', selectedFormat.value)
577554
} else {
578-
<<<<<<< HEAD
579-
alert(window.i18n ? window.i18n.t('submit.errorNoTarget') : 'Please select an export target.')
580-
=======
581555
alert(
582556
window.i18n
583557
? window.i18n.t('submit.errorNoTarget')
584558
: 'Please select an export target.',
585559
)
586-
>>>>>>> 71ca210 (update logos)
587560
return
588561
}
589562

@@ -610,16 +583,12 @@ function initializeForm() {
610583

611584
if (!response.ok) {
612585
const error = await response.json()
613-
<<<<<<< HEAD
614-
throw new Error(error.error || (window.i18n ? window.i18n.t('submit.errorFailed') : 'Export failed'))
615-
=======
616586
throw new Error(
617587
error.error ||
618588
(window.i18n
619589
? window.i18n.t('submit.errorFailed')
620590
: 'Export failed'),
621591
)
622-
>>>>>>> 71ca210 (update logos)
623592
}
624593

625594
const result = await response.json()
@@ -630,15 +599,11 @@ function initializeForm() {
630599
selectedFiles = []
631600
updateFileList()
632601
} catch (error) {
633-
<<<<<<< HEAD
634-
alert((window.i18n ? window.i18n.t('submit.errorCreating') : 'Error creating export: ') + error.message)
635-
=======
636602
alert(
637603
(window.i18n
638604
? window.i18n.t('submit.errorCreating')
639605
: 'Error creating export: ') + error.message,
640606
)
641-
>>>>>>> 71ca210 (update logos)
642607
} finally {
643608
submitBtn.disabled = false
644609
submitBtn.innerHTML = `

dist/server/public/index.html

Lines changed: 49 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,11 @@ <h3 data-i18n="formats.epub.title">EPUB</h3>
346346
data-description="Microsoft Word document format for professional documents. Compatible with Word 2007+, LibreOffice Writer, and Google Docs. <a href='https://en.wikipedia.org/wiki/Office_Open_XML' target='_blank'>Learn more</a>"
347347
/>
348348
<div class="preset-content">
349-
<div class="format-icon">📝</div>
349+
<img
350+
style="height: 48px"
351+
src="../assets/docx.svg"
352+
alt="DOCX"
353+
/>
350354
<h3 data-i18n="formats.docx.title">DOCX</h3>
351355
<p data-i18n="formats.docx.subtitle">Word Document</p>
352356
</div>
@@ -1195,12 +1199,25 @@ <h3 class="settings-heading" data-i18n="settings.docx.title">
11951199
</div>
11961200

11971201
<div class="form-group">
1198-
<label for="docxOrientation" data-i18n="settings.docx.orientation"
1202+
<label
1203+
for="docxOrientation"
1204+
data-i18n="settings.docx.orientation"
11991205
>Orientation</label
12001206
>
12011207
<select id="docxOrientation" name="option_docx-orientation">
1202-
<option value="portrait" selected data-i18n="settings.docx.orientationPortrait">Portrait</option>
1203-
<option value="landscape" data-i18n="settings.docx.orientationLandscape">Landscape</option>
1208+
<option
1209+
value="portrait"
1210+
selected
1211+
data-i18n="settings.docx.orientationPortrait"
1212+
>
1213+
Portrait
1214+
</option>
1215+
<option
1216+
value="landscape"
1217+
data-i18n="settings.docx.orientationLandscape"
1218+
>
1219+
Landscape
1220+
</option>
12041221
</select>
12051222
<span class="hint" data-i18n="settings.docx.orientationHint"
12061223
>Page orientation</span
@@ -1245,11 +1262,31 @@ <h3 class="settings-heading" data-i18n="settings.docx.title">
12451262
>LiaScript Theme</label
12461263
>
12471264
<select id="docxTheme" name="option_docx-theme">
1248-
<option value="" selected data-i18n="settings.docx.themeDefault">Default</option>
1249-
<option value="turquoise" data-i18n="settings.docx.themeTurquoise">Turquoise</option>
1250-
<option value="blue" data-i18n="settings.docx.themeBlue">Blue</option>
1251-
<option value="red" data-i18n="settings.docx.themeRed">Red</option>
1252-
<option value="yellow" data-i18n="settings.docx.themeYellow">Yellow</option>
1265+
<option
1266+
value=""
1267+
selected
1268+
data-i18n="settings.docx.themeDefault"
1269+
>
1270+
Default
1271+
</option>
1272+
<option
1273+
value="turquoise"
1274+
data-i18n="settings.docx.themeTurquoise"
1275+
>
1276+
Turquoise
1277+
</option>
1278+
<option value="blue" data-i18n="settings.docx.themeBlue">
1279+
Blue
1280+
</option>
1281+
<option value="red" data-i18n="settings.docx.themeRed">
1282+
Red
1283+
</option>
1284+
<option
1285+
value="yellow"
1286+
data-i18n="settings.docx.themeYellow"
1287+
>
1288+
Yellow
1289+
</option>
12531290
</select>
12541291
<span class="hint" data-i18n="settings.docx.themeHint"
12551292
>Color scheme for the document</span
@@ -1291,7 +1328,9 @@ <h3 class="settings-heading" data-i18n="settings.docx.title">
12911328
id="docxPageNumber"
12921329
name="option_docx-page-number"
12931330
/>
1294-
<span data-i18n="settings.docx.pageNumber">Page Numbers</span>
1331+
<span data-i18n="settings.docx.pageNumber"
1332+
>Page Numbers</span
1333+
>
12951334
</label>
12961335
<span class="hint" data-i18n="settings.docx.pageNumberHint"
12971336
>Add page numbers to the footer</span

0 commit comments

Comments
 (0)