updated language toolbar

This commit is contained in:
ojack
2024-02-09 17:29:26 +01:00
parent 0d1043399b
commit b0f222913e
7 changed files with 25 additions and 17 deletions

View File

@@ -1,6 +1,6 @@
{ {
"name": "hydra-web-editor", "name": "hydra-web-editor",
"version": "1.4.2", "version": "1.4.3",
"description": "", "description": "",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {

File diff suppressed because one or more lines are too long

10
public/bundle.min.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -4,7 +4,7 @@ const i18nextBrowserLanguageDetector = require('i18next-browser-languagedetector
const languageResources = require('./text-elements.js') const languageResources = require('./text-elements.js')
const availableLanguages = ['ja', 'es', 'ar', 'id', 'pt-br', 'ch', 'ko', 'fr'] // localizations available in repository at /hydra-synth/l10n const availableLanguages = ['ja', 'es', 'ar', 'id', 'pt-br', 'ch', 'ko', 'fr', 'de'] // 'de' need to switch language selector localizations available in repository at /hydra-synth/l10n
const languagePath = (lang) => `https://raw.githubusercontent.com/hydra-synth/l10n/main/${lang}/editor.json` const languagePath = (lang) => `https://raw.githubusercontent.com/hydra-synth/l10n/main/${lang}/editor.json`
i18next i18next

View File

@@ -145,7 +145,8 @@ module.exports = function store(state, emitter) {
function showConfirmation(successCallback, terminateCallback) { function showConfirmation(successCallback, terminateCallback) {
var c = prompt(` var c = prompt(`
HYDRA SKETCH GALLERY HYDRA SKETCH GALLERY
///////////////////////////////////////
🎨 Click 'OK' to add your sketch and screenshot to the gallery of hydra sketches at https://botsin.space/@hydra. 🎨 Click 'OK' to add your sketch and screenshot to the gallery of hydra sketches at https://botsin.space/@hydra.

View File

@@ -12,13 +12,15 @@ module.exports = function mainView(state, emit) {
<div id="info-container" class="${state.showInfo ? "" : "hidden"}" style="direction:${textDirection}"> <div id="info-container" class="${state.showInfo ? "" : "hidden"}" style="direction:${textDirection}">
<div id="modal"> <div id="modal">
<div id="modal-header" style="opacity:${state.showUI === true? 1: 0}"> <div id="modal-header" style="opacity:${state.showUI === true? 1: 0}">
${state.showInfo && langArray.length > 1 ? html`<div style="display:flex;flex-wrap:wrap">${langArray.map(([key, val]) => html` <div></div>
<div class="language-select" onclick=${() => emit('set language', key)}>${val}</div>
`)}</div>` : html`<div></div>` }
${toolbar(state, emit)} ${toolbar(state, emit)}
</div> </div>
<div id="modal-body"> <div id="modal-body">
${state.showInfo && langArray.length > 1 ? html`<div style="padding-left:5px;display:flex;flex-wrap:wrap">${langArray.map(([key, val]) => html`
<div class="language-select" onclick=${() => emit('set language', key)}>${val}</div>
`)}</div>` : html`<div></div>` }
<div id="modal-content"> <div id="modal-content">
<h1>${t('info.title')}</h1> <h1>${t('info.title')}</h1>
<h3>${t('info.subtitle')}</h3> <h3>${t('info.subtitle')}</h3>
<br> ///////////////////////////////////////////////////////////<br> <br> ///////////////////////////////////////////////////////////<br>