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>
|
||||
</div>
|
||||
<div class="col-auto nopadding selectCol">
|
||||
<select
|
||||
class="md-select"
|
||||
@change="$root.setLz('');$root.setLzManual()"
|
||||
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>
|
||||
<select class="md-select" @change="$root.setLz('');$root.setLzManual()" 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>
|
||||
</select>
|
||||
<button
|
||||
class="md-btn"
|
||||
@click="exportLz"
|
||||
>
|
||||
Export
|
||||
</button>
|
||||
<button class="md-btn" @click="exportLz">Export</button>
|
||||
</div>
|
||||
</div>
|
||||
<hr />
|
||||
<div class="md-option-container">
|
||||
<template v-for="(val, key) in baseLz">
|
||||
<div
|
||||
class="md-option-line"
|
||||
v-if="$root.lz[key]"
|
||||
>
|
||||
<div class="md-option-line" v-if="$root.lz[key]">
|
||||
<div class="md-option-segment">{{ key }}</div>
|
||||
<div class="md-option-segment">
|
||||
<template v-if='typeof $root.lz[key] == "object"'>
|
||||
<div v-for="(variant, vkey) in $root.lz[key]">
|
||||
{{variant}}
|
||||
<input
|
||||
type="text"
|
||||
v-model="$root.lz[key][vkey]"
|
||||
/>
|
||||
<input type="text" v-model="$root.lz[key][vkey]" />
|
||||
</div>
|
||||
</template>
|
||||
<textarea
|
||||
type="text"
|
||||
v-model="$root.lz[key]"
|
||||
v-else
|
||||
></textarea>
|
||||
<textarea type="text" v-model="$root.lz[key]" v-else></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="md-option-line"
|
||||
v-else
|
||||
>
|
||||
<div class="md-option-line" v-else>
|
||||
<div class="md-option-segment">
|
||||
<b>{{ key }}</b>
|
||||
</div>
|
||||
<div class="md-option-segment">
|
||||
<textarea
|
||||
type="text"
|
||||
v-model="$root.lz[key]"
|
||||
:placeholder="val"
|
||||
></textarea>
|
||||
<textarea type="text" v-model="$root.lz[key]" :placeholder="val"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
@ -2,16 +2,8 @@ import { html } from "../html.js";
|
|||
|
||||
export const sidebarLibraryItem = Vue.component("sidebar-library-item", {
|
||||
template: html`
|
||||
<button
|
||||
class="app-sidebar-item"
|
||||
:class="$root.getSidebarItemClass(page)"
|
||||
@click="$root.setWindowHash(page)"
|
||||
>
|
||||
<svg-icon
|
||||
:url="svgIconData"
|
||||
:name="'sidebar-' + svgIconName"
|
||||
v-if="svgIconData != ''"
|
||||
/>
|
||||
<button class="app-sidebar-item" :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>
|
||||
</button>
|
||||
`,
|
||||
|
|
|
@ -1,14 +1,7 @@
|
|||
import { html } from "../html.js";
|
||||
|
||||
export const svgIcon = Vue.component("svg-icon", {
|
||||
template: html`
|
||||
<div
|
||||
class="_svg-icon"
|
||||
:class="classes"
|
||||
:svg-name="name"
|
||||
:style="{'--icon': 'url(' + url + ')'}"
|
||||
></div>
|
||||
`,
|
||||
template: html` <div class="_svg-icon" :class="classes" :svg-name="name" :style="{'--icon': 'url(' + url + ')'}"></div> `,
|
||||
props: {
|
||||
name: {
|
||||
type: String,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue