import '@material/mwc-button'; import '@material/mwc-checkbox'; import '@material/mwc-fab'; import '@material/mwc-formfield'; import '@material/mwc-list/mwc-list-item'; import '@material/mwc-select'; import '@material/mwc-textarea'; import '@material/mwc-textfield'; import collect from 'collect.js'; import LocaleCode from 'locale-code'; import Mithril from 'mithril'; // eslint-disable-next-line import/no-absolute-path import logoUrl from '/images/logo_completo.png'; import Card from '../Components/Card/Card.jsx'; import Content from '../Components/Card/Content.jsx'; import Cell from '../Components/Grid/Cell.jsx'; import LayoutGrid from '../Components/Grid/LayoutGrid.jsx'; import Row from '../Components/Grid/Row.jsx'; import Mdi from '../Components/Mdi.jsx'; import Page from '../Components/Page.jsx'; export default class SetupPage extends Page { languages() { const listItems: Array[Mithril.Vnode] = []; for (const lang of this.page.props.languages) { const attributes = { selected: this.page.props.locale === lang }; const langCode = lang.replace('_', '-'); listItems.push( {LocaleCode.getLanguageNativeName(langCode)} {LocaleCode.getLanguageNativeName(langCode)} ); } return listItems; } view(vnode) { const examplesTexts = collect(); for (const example of ['localhost', 'root', 'mysql', 'openstamanager']) { examplesTexts.put(example, this.__('Esempio: :example', {example})); } return ( <> {this.__('OpenSTAManager')}

{this.__('Benvenuto in :name!', {name: {this.__('OpenSTAManager')}})}

{this.__('Puoi procedere alla configurazione tecnica del software attraverso i ' + 'parametri seguenti, che potranno essere corretti secondo necessità tramite il file .env.')}
{this.__("Se necessiti supporto puoi contattarci tramite l':contactLink o tramite il nostro :forumLink.", { // eslint-disable-next-line no-secrets/no-secrets contactLink: {this.__('assistenza ufficiale')}, forumLink: {this.__('forum')} })}

{this.__('Formato date')}

{this.__('I formati sono impostabili attraverso lo standard previsto da :link.', {link: PHP}) }

{this.__('Database')}


{this.__('* Campi obbligatori')}

{this.__('Lingua')}

{this.languages()}

{this.__('Licenza')}

{this.__('OpenSTAManager è tutelato dalla licenza GPL 3.0, da accettare obbligatoriamente per poter utilizzare il gestionale.')}

); } oncreate(vnode: Mithril.VnodeDOM) { super.oncreate(vnode); $('mwc-fab#contrast-switcher').on('click', function () { $(this).toggleClass('contrast-light').toggleClass('contrast-dark'); $('body').toggleClass('mdc-high-contrast'); }); } }