mirror of
https://github.com/Alamantus/Lexiconga.git
synced 2025-09-03 01:34:23 +02:00
Compare commits
4 commits
efa623af85
...
76e3f77b0b
Author | SHA1 | Date | |
---|---|---|---|
76e3f77b0b | |||
|
f1b99960f3 | ||
d64890ec12 | |||
acdc5cbdaa |
6 changed files with 21 additions and 20 deletions
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "lexiconga",
|
||||
"version": "2.2.0",
|
||||
"version": "2.2.1",
|
||||
"description": "The quick and easy dictionary builder for constructed languages.",
|
||||
"main": "template-index.html",
|
||||
"repository": "https://github.com/Alamantus/Lexiconga.git",
|
||||
|
@ -28,7 +28,7 @@
|
|||
"parcel-plugin-goodie-bag": "^2.0.0",
|
||||
"rimraf": "^3.0.2",
|
||||
"sass": "^1.27.0",
|
||||
"sharp": "^0.26.1"
|
||||
"sharp": "^0.26.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"marked": "^1.2.0",
|
||||
|
|
|
@ -123,7 +123,7 @@ export function renderPartsOfSpeech(onlyOptions = false) {
|
|||
searchHTML = '<label>Unclassified <input type="checkbox" checked id="searchPartOfSpeech__None"></label>';
|
||||
window.currentDictionary.partsOfSpeech.forEach(partOfSpeech => {
|
||||
partOfSpeech = removeTags(partOfSpeech);
|
||||
optionsHTML += `<option value="${partOfSpeech}">${partOfSpeech}</option>`;
|
||||
optionsHTML += `<option value="${partOfSpeech.replace(/"/g, '"')}">${partOfSpeech}</option>`;
|
||||
searchHTML += `<label>${partOfSpeech} <input type="checkbox" checked id="searchPartOfSpeech_${slugify(partOfSpeech)}"></label>`;
|
||||
});
|
||||
searchHTML += `<a class="small button" id="checkAllFilters">Check All</a> <a class="small button" id="uncheckAllFilters">Uncheck All</a>`;
|
||||
|
|
|
@ -160,25 +160,26 @@ export function renderEditForm(wordId = false) {
|
|||
wordId = typeof wordId.target === 'undefined' ? wordId : parseInt(this.id.replace('edit_', ''));
|
||||
const word = window.currentDictionary.words.find(w => w.wordId === wordId);
|
||||
if (word) {
|
||||
const escapeQuotes = (value) => value.replace(/"/g, '"');
|
||||
const wordHasAdvancedFields = (word.hasOwnProperty('etymology') && word.etymology)
|
||||
|| (word.hasOwnProperty('related') && word.related) || (word.hasOwnProperty('principalParts') && word.principalParts);
|
||||
const ipaPronunciationField = `<input id="wordPronunciation_${wordId}" class="ipa-field" maxlength="200" value="${word.pronunciation}"><br>
|
||||
const ipaPronunciationField = `<input id="wordPronunciation_${wordId}" class="ipa-field" maxlength="200" value="${escapeQuotes(word.pronunciation)}"><br>
|
||||
<a class="label-help-button ipa-field-help-button">Field Help</a>`;
|
||||
const plainPronunciationField = `<input id="wordPronunciation_${wordId}" maxlength="200" value="${word.pronunciation}">`;
|
||||
const plainPronunciationField = `<input id="wordPronunciation_${wordId}" maxlength="200" value="${escapeQuotes(word.pronunciation)}">`;
|
||||
const editForm = `<form id="editForm_${wordId}" class="edit-form">
|
||||
<label>Word<span class="red">*</span><br>
|
||||
<input id="wordName_${wordId}" maxlength="200" value="${word.name}">
|
||||
<input id="wordName_${wordId}" maxlength="200" value="${escapeQuotes(word.name)}">
|
||||
</label>
|
||||
<label>Pronunciation<a class="label-button ipa-table-button">IPA Chart</a><br>
|
||||
${window.settings.useIPAPronunciationField ? ipaPronunciationField : plainPronunciationField}
|
||||
</label>
|
||||
<label>Part of Speech<br>
|
||||
<select id="wordPartOfSpeech_${wordId}" class="part-of-speech-select">
|
||||
<option value="${word.partOfSpeech}" selected>${word.partOfSpeech}</option>
|
||||
<option value="${escapeQuotes(word.partOfSpeech)}" selected>${word.partOfSpeech}</option>
|
||||
</select>
|
||||
</label>
|
||||
<label>Definition<span class="red">*</span><br>
|
||||
<input id="wordDefinition_${wordId}" maxlength="2500" value="${word.definition}" placeholder="Equivalent words">
|
||||
<input id="wordDefinition_${wordId}" maxlength="2500" value="${escapeQuotes(word.definition)}" placeholder="Equivalent words">
|
||||
</label>
|
||||
<label>Details<span class="red">*</span><a class="label-button maximize-button">Maximize</a><br>
|
||||
<textarea id="wordDetails_${wordId}" placeholder="Markdown formatting allowed">${word.details}</textarea>
|
||||
|
@ -193,13 +194,13 @@ export function renderEditForm(wordId = false) {
|
|||
<small>Choose one to fill the details field. (Note: Will erase anything currently there.)</small>
|
||||
</label>
|
||||
<label>Etymology / Root Words<br>
|
||||
<input id="wordEtymology_${wordId}" maxlength="2500" placeholder="comma,separated,root,words" value="${word.hasOwnProperty('etymology') ? word.etymology : ''}">
|
||||
<input id="wordEtymology_${wordId}" maxlength="2500" placeholder="comma,separated,root,words" value="${word.hasOwnProperty('etymology') ? escapeQuotes(word.etymology.toString()) : ''}">
|
||||
</label>
|
||||
<label>Related Words<br>
|
||||
<input id="wordRelated_${wordId}" maxlength="2500" placeholder="comma,separated,related,words" value="${word.hasOwnProperty('related') ? word.related : ''}">
|
||||
<input id="wordRelated_${wordId}" maxlength="2500" placeholder="comma,separated,related,words" value="${word.hasOwnProperty('related') ? escapeQuotes(word.related.toString()) : ''}">
|
||||
</label>
|
||||
<label>Principal Parts<a href="https://en.wikipedia.org/wiki/Principal_parts" target="_blank" class="label-button">What's This?</a><br>
|
||||
<input id="wordPrincipalParts_${wordId}" maxlength="2500" placeholder="comma,separated,principal,parts" value="${word.hasOwnProperty('principalParts') ? word.principalParts : ''}">
|
||||
<input id="wordPrincipalParts_${wordId}" maxlength="2500" placeholder="comma,separated,principal,parts" value="${word.hasOwnProperty('principalParts') ? escapeQuotes(word.principalParts.toString()) : ''}">
|
||||
</label>
|
||||
</div>
|
||||
<div id="wordErrorMessage_${wordId}"></div>
|
||||
|
|
|
@ -131,7 +131,7 @@ export function renderPartsOfSpeech(onlyOptions = false) {
|
|||
searchHTML = '<label>Unclassified <input type="checkbox" checked id="searchPartOfSpeech__None"></label>';
|
||||
window.currentDictionary.partsOfSpeech.forEach(partOfSpeech => {
|
||||
partOfSpeech = removeTags(partOfSpeech);
|
||||
optionsHTML += `<option value="${partOfSpeech}">${partOfSpeech}</option>`;
|
||||
optionsHTML += `<option value="${partOfSpeech.replace(/"/g, '"')}">${partOfSpeech}</option>`;
|
||||
searchHTML += `<label>${partOfSpeech} <input type="checkbox" checked id="searchPartOfSpeech_${slugify(partOfSpeech)}"></label>`;
|
||||
});
|
||||
searchHTML += `<a class="small button" id="checkAllFilters">Check All</a> <a class="small button" id="uncheckAllFilters">Uncheck All</a>`;
|
||||
|
|
|
@ -134,7 +134,7 @@ switch ($view) {
|
|||
oldLoad && oldLoad();
|
||||
if (UpUp) {
|
||||
UpUp.start({
|
||||
'cache-version': '2.2.0',
|
||||
'cache-version': '2.2.1',
|
||||
'content-url': 'offline.html',
|
||||
'assets': [
|
||||
\"" . implode('","', $files) . "\"
|
||||
|
|
14
yarn.lock
14
yarn.lock
|
@ -1265,9 +1265,9 @@ bindings@^1.5.0:
|
|||
file-uri-to-path "1.0.0"
|
||||
|
||||
bl@^4.0.1:
|
||||
version "4.0.2"
|
||||
resolved "https://registry.yarnpkg.com/bl/-/bl-4.0.2.tgz#52b71e9088515d0606d9dd9cc7aa48dc1f98e73a"
|
||||
integrity sha512-j4OH8f6Qg2bGuWfRiltT2HYGx0e1QcBTrK9KAHNMwMZdQnDZFk0ZSYIpADjYCB3U12nicC5tVJwSIhwOWjb4RQ==
|
||||
version "4.0.3"
|
||||
resolved "https://registry.yarnpkg.com/bl/-/bl-4.0.3.tgz#12d6287adc29080e22a705e5764b2a9522cdc489"
|
||||
integrity sha512-fs4G6/Hu4/EE+F75J8DuN/0IpQqNjAdC7aEQv7Qt8MHGUH7Ckv2MwTEEeN9QehD0pfIDkMI1bkHYkKy7xHyKIg==
|
||||
dependencies:
|
||||
buffer "^5.5.0"
|
||||
inherits "^2.0.4"
|
||||
|
@ -5267,10 +5267,10 @@ shallow-copy@~0.0.1:
|
|||
resolved "https://registry.yarnpkg.com/shallow-copy/-/shallow-copy-0.0.1.tgz#415f42702d73d810330292cc5ee86eae1a11a170"
|
||||
integrity sha1-QV9CcC1z2BAzApLMXuhurhoRoXA=
|
||||
|
||||
sharp@^0.26.1:
|
||||
version "0.26.1"
|
||||
resolved "https://registry.yarnpkg.com/sharp/-/sharp-0.26.1.tgz#084e3447ba17f1baf3e3f2e08305ed7aec236ce9"
|
||||
integrity sha512-9MhwS4ys8pnwBH7MtnBdLzUv+cb24QC4xbzzQL6A+1MQ4Se2V6oPHEX8TIGIZUPRKi6S1kJPVNzt/Xqqp6/H3Q==
|
||||
sharp@^0.26.2:
|
||||
version "0.26.2"
|
||||
resolved "https://registry.yarnpkg.com/sharp/-/sharp-0.26.2.tgz#3d5777d246ae32890afe82a783c1cbb98456a88c"
|
||||
integrity sha512-bGBPCxRAvdK9bX5HokqEYma4j/Q5+w8Nrmb2/sfgQCLEUx/HblcpmOfp59obL3+knIKnOhyKmDb4tEOhvFlp6Q==
|
||||
dependencies:
|
||||
color "^3.1.2"
|
||||
detect-libc "^1.0.3"
|
||||
|
|
Loading…
Add table
Reference in a new issue