CHONKY BOY
This commit is contained in:
parent
31ed921a1a
commit
c15f55d0ee
213 changed files with 64188 additions and 55736 deletions
|
@ -1,46 +1,45 @@
|
|||
import {html} from "../html.js"
|
||||
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 != ''"/>
|
||||
<span class="sidebar-item-text">{{ name }}</span>
|
||||
</button>
|
||||
`,
|
||||
props: {
|
||||
name: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
page: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
svgIcon: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: "",
|
||||
},
|
||||
svgIconName: {
|
||||
type: String,
|
||||
required: false
|
||||
},
|
||||
cdClick: {
|
||||
type: Function,
|
||||
required: false,
|
||||
},
|
||||
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 != ''" />
|
||||
<span class="sidebar-item-text">{{ name }}</span>
|
||||
</button>
|
||||
`,
|
||||
props: {
|
||||
name: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
data: function () {
|
||||
return {
|
||||
app: app,
|
||||
svgIconData: "",
|
||||
};
|
||||
page: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
async mounted() {
|
||||
if (this.svgIcon) {
|
||||
this.svgIconData = this.svgIcon;
|
||||
}
|
||||
svgIcon: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: "",
|
||||
},
|
||||
methods: {},
|
||||
})
|
||||
svgIconName: {
|
||||
type: String,
|
||||
required: false,
|
||||
},
|
||||
cdClick: {
|
||||
type: Function,
|
||||
required: false,
|
||||
},
|
||||
},
|
||||
data: function () {
|
||||
return {
|
||||
app: app,
|
||||
svgIconData: "",
|
||||
};
|
||||
},
|
||||
async mounted() {
|
||||
if (this.svgIcon) {
|
||||
this.svgIconData = this.svgIcon;
|
||||
}
|
||||
},
|
||||
methods: {},
|
||||
});
|
||||
|
|
|
@ -1,22 +1,20 @@
|
|||
import {html} from "../html.js"
|
||||
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>
|
||||
`,
|
||||
props: {
|
||||
name: {
|
||||
type: String,
|
||||
required: false
|
||||
},
|
||||
classes: {
|
||||
type: String,
|
||||
required: false
|
||||
},
|
||||
url: {
|
||||
type: String,
|
||||
required: true,
|
||||
default: "./assets/repeat.svg"
|
||||
}
|
||||
}
|
||||
})
|
||||
template: html` <div class="_svg-icon" :class="classes" :svg-name="name" :style="{'--icon': 'url(' + url + ')'}"></div> `,
|
||||
props: {
|
||||
name: {
|
||||
type: String,
|
||||
required: false,
|
||||
},
|
||||
classes: {
|
||||
type: String,
|
||||
required: false,
|
||||
},
|
||||
url: {
|
||||
type: String,
|
||||
required: true,
|
||||
default: "./assets/repeat.svg",
|
||||
},
|
||||
},
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue