chore: Prettified Code
[ci skip]
This commit is contained in:
parent
7b3c483df7
commit
3d4776a8db
3 changed files with 12 additions and 61 deletions
|
@ -9,69 +9,35 @@ export const i18nEditor = Vue.component("i18n-editor", {
|
||||||
<h1>i18n Editor</h1>
|
<h1>i18n Editor</h1>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-auto nopadding selectCol">
|
<div class="col-auto nopadding selectCol">
|
||||||
<select
|
<select class="md-select" @change="$root.setLz('');$root.setLzManual()" v-model="$root.cfg.general.language">
|
||||||
class="md-select"
|
<optgroup :label="index" v-for="(categories, index) in getLanguages()">
|
||||||
@change="$root.setLz('');$root.setLzManual()"
|
<option v-for="lang in categories" :value="lang.code">{{lang.nameNative}} ({{lang.nameEnglish }})</option>
|
||||||
v-model="$root.cfg.general.language"
|
|
||||||
>
|
|
||||||
<optgroup
|
|
||||||
:label="index"
|
|
||||||
v-for="(categories, index) in getLanguages()"
|
|
||||||
>
|
|
||||||
<option
|
|
||||||
v-for="lang in categories"
|
|
||||||
:value="lang.code"
|
|
||||||
>
|
|
||||||
{{lang.nameNative}} ({{lang.nameEnglish }})
|
|
||||||
</option>
|
|
||||||
</optgroup>
|
</optgroup>
|
||||||
</select>
|
</select>
|
||||||
<button
|
<button class="md-btn" @click="exportLz">Export</button>
|
||||||
class="md-btn"
|
|
||||||
@click="exportLz"
|
|
||||||
>
|
|
||||||
Export
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<hr />
|
<hr />
|
||||||
<div class="md-option-container">
|
<div class="md-option-container">
|
||||||
<template v-for="(val, key) in baseLz">
|
<template v-for="(val, key) in baseLz">
|
||||||
<div
|
<div class="md-option-line" v-if="$root.lz[key]">
|
||||||
class="md-option-line"
|
|
||||||
v-if="$root.lz[key]"
|
|
||||||
>
|
|
||||||
<div class="md-option-segment">{{ key }}</div>
|
<div class="md-option-segment">{{ key }}</div>
|
||||||
<div class="md-option-segment">
|
<div class="md-option-segment">
|
||||||
<template v-if='typeof $root.lz[key] == "object"'>
|
<template v-if='typeof $root.lz[key] == "object"'>
|
||||||
<div v-for="(variant, vkey) in $root.lz[key]">
|
<div v-for="(variant, vkey) in $root.lz[key]">
|
||||||
{{variant}}
|
{{variant}}
|
||||||
<input
|
<input type="text" v-model="$root.lz[key][vkey]" />
|
||||||
type="text"
|
|
||||||
v-model="$root.lz[key][vkey]"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<textarea
|
<textarea type="text" v-model="$root.lz[key]" v-else></textarea>
|
||||||
type="text"
|
|
||||||
v-model="$root.lz[key]"
|
|
||||||
v-else
|
|
||||||
></textarea>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div class="md-option-line" v-else>
|
||||||
class="md-option-line"
|
|
||||||
v-else
|
|
||||||
>
|
|
||||||
<div class="md-option-segment">
|
<div class="md-option-segment">
|
||||||
<b>{{ key }}</b>
|
<b>{{ key }}</b>
|
||||||
</div>
|
</div>
|
||||||
<div class="md-option-segment">
|
<div class="md-option-segment">
|
||||||
<textarea
|
<textarea type="text" v-model="$root.lz[key]" :placeholder="val"></textarea>
|
||||||
type="text"
|
|
||||||
v-model="$root.lz[key]"
|
|
||||||
:placeholder="val"
|
|
||||||
></textarea>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -2,16 +2,8 @@ import { html } from "../html.js";
|
||||||
|
|
||||||
export const sidebarLibraryItem = Vue.component("sidebar-library-item", {
|
export const sidebarLibraryItem = Vue.component("sidebar-library-item", {
|
||||||
template: html`
|
template: html`
|
||||||
<button
|
<button class="app-sidebar-item" :class="$root.getSidebarItemClass(page)" @click="$root.setWindowHash(page)">
|
||||||
class="app-sidebar-item"
|
<svg-icon :url="svgIconData" :name="'sidebar-' + svgIconName" v-if="svgIconData != ''" />
|
||||||
:class="$root.getSidebarItemClass(page)"
|
|
||||||
@click="$root.setWindowHash(page)"
|
|
||||||
>
|
|
||||||
<svg-icon
|
|
||||||
:url="svgIconData"
|
|
||||||
:name="'sidebar-' + svgIconName"
|
|
||||||
v-if="svgIconData != ''"
|
|
||||||
/>
|
|
||||||
<span class="sidebar-item-text">{{ name }}</span>
|
<span class="sidebar-item-text">{{ name }}</span>
|
||||||
</button>
|
</button>
|
||||||
`,
|
`,
|
||||||
|
|
|
@ -1,14 +1,7 @@
|
||||||
import { html } from "../html.js";
|
import { html } from "../html.js";
|
||||||
|
|
||||||
export const svgIcon = Vue.component("svg-icon", {
|
export const svgIcon = Vue.component("svg-icon", {
|
||||||
template: html`
|
template: html` <div class="_svg-icon" :class="classes" :svg-name="name" :style="{'--icon': 'url(' + url + ')'}"></div> `,
|
||||||
<div
|
|
||||||
class="_svg-icon"
|
|
||||||
:class="classes"
|
|
||||||
:svg-name="name"
|
|
||||||
:style="{'--icon': 'url(' + url + ')'}"
|
|
||||||
></div>
|
|
||||||
`,
|
|
||||||
props: {
|
props: {
|
||||||
name: {
|
name: {
|
||||||
type: String,
|
type: String,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue