|
import Component from '../lib/component.js'; |
|
import store from '../store/index.js'; |
|
|
|
|
|
|
|
|
|
export default class GlobalElements extends Component{ |
|
|
|
|
|
|
|
|
|
constructor() { |
|
super({ |
|
store, |
|
element: document.body, |
|
eventName: 'globalElementsChange' |
|
}); |
|
} |
|
|
|
|
|
|
|
|
|
render() { |
|
let dict = window.lang_dict[store.state.language]['globalElements']; |
|
|
|
|
|
this.element.querySelector('#demoTitle').innerText = dict['demoTitle']; |
|
|
|
|
|
this.element.querySelector('#getting-started-btn').innerText = dict['gettingStarted']; |
|
this.element.querySelector('#parkour-custom-btn').innerText = dict['parkourCustomization']; |
|
this.element.querySelector('#advanced-options-btn').innerText = dict['advancedOptions']; |
|
this.element.querySelector('#about-btn').innerHTML = `<i class="fas fa-info-circle fa-lg"></i> ${dict['about']}`; |
|
|
|
|
|
this.element.querySelector('#langSelect').selectedIndex = store.state.language == 'EN' ? 0 : 1; |
|
|
|
|
|
let modal = this.element.querySelector('#saveEnvModal'); |
|
modal.querySelector('#save-modal-title').innerHTML = dict['saveEnvModal']['title']; |
|
modal.querySelector('#save-modal-text').innerText = dict['saveEnvModal']['text']; |
|
modal.querySelector('#env-name-label').innerText = dict['saveEnvModal']['nameLabel']; |
|
modal.querySelector('#env-description-label').innerText = dict['saveEnvModal']['descriptionLabel']; |
|
modal.querySelector('#save-cancel-btn').innerText = dict['saveEnvModal']['cancelBtn']; |
|
modal.querySelector('#save-confirm-btn').innerText = dict['saveEnvModal']['confirmBtn']; |
|
} |
|
}; |