improvements to style editor
This commit is contained in:
parent
cbbeb8009f
commit
605360360d
2 changed files with 149 additions and 107 deletions
|
@ -283,6 +283,7 @@
|
||||||
// top: 0;
|
// top: 0;
|
||||||
height : calc(100% - 60px - var(--navigationBarHeight));
|
height : calc(100% - 60px - var(--navigationBarHeight));
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
|
|
||||||
.inner-container {
|
.inner-container {
|
||||||
display: flex;
|
display: flex;
|
||||||
height : calc(100% - var(--navigationBarHeight));
|
height : calc(100% - var(--navigationBarHeight));
|
||||||
|
@ -972,9 +973,11 @@
|
||||||
display : flex;
|
display : flex;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
padding : 16px 32px;
|
padding : 16px 32px;
|
||||||
|
|
||||||
>.latestRelease {
|
>.latestRelease {
|
||||||
width: 250px;
|
width: 250px;
|
||||||
}
|
}
|
||||||
|
|
||||||
>.topSongs {
|
>.topSongs {
|
||||||
width: calc(100% - 250px);
|
width: calc(100% - 250px);
|
||||||
}
|
}
|
||||||
|
@ -1016,6 +1019,37 @@
|
||||||
.settings-page {
|
.settings-page {
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
|
|
||||||
|
.stylestack-editor {
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
.btn,
|
||||||
|
.btn-group {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.themeLabel {
|
||||||
|
display:flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.removeItem {
|
||||||
|
border: 0px;
|
||||||
|
background: transparent;
|
||||||
|
height: 32px;
|
||||||
|
font-weight: bold;
|
||||||
|
color: var(--textColor);
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.stylesDropdown {
|
||||||
|
>.dropdown-menu {
|
||||||
|
height : 300px;
|
||||||
|
overflow-y: overlay;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
.nav {
|
.nav {
|
||||||
width : 90%;
|
width : 90%;
|
||||||
margin: 16px auto 0px;
|
margin: 16px auto 0px;
|
||||||
|
@ -1068,7 +1102,8 @@
|
||||||
box-shadow : var(--mediaItemShadow-Shadow);
|
box-shadow : var(--mediaItemShadow-Shadow);
|
||||||
background : black;
|
background : black;
|
||||||
|
|
||||||
.spprev, .nextprev {
|
.spprev,
|
||||||
|
.nextprev {
|
||||||
position : absolute;
|
position : absolute;
|
||||||
height : 100%;
|
height : 100%;
|
||||||
width : 64px;
|
width : 64px;
|
||||||
|
@ -1077,6 +1112,7 @@
|
||||||
z-index : 1;
|
z-index : 1;
|
||||||
border : 0px;
|
border : 0px;
|
||||||
transition: background 0.2s var(--appleEase), transform 0.2s var(--appleEase);
|
transition: background 0.2s var(--appleEase), transform 0.2s var(--appleEase);
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background: var(--selected);
|
background: var(--selected);
|
||||||
transform : scale(1.1);
|
transform : scale(1.1);
|
||||||
|
@ -1104,6 +1140,7 @@
|
||||||
|
|
||||||
.spprev {
|
.spprev {
|
||||||
left: 0;
|
left: 0;
|
||||||
|
|
||||||
&:before {
|
&:before {
|
||||||
-webkit-mask-image: url("./views/svg/chevron-left.svg");
|
-webkit-mask-image: url("./views/svg/chevron-left.svg");
|
||||||
}
|
}
|
||||||
|
@ -1112,6 +1149,7 @@
|
||||||
|
|
||||||
.nextprev {
|
.nextprev {
|
||||||
right: 0;
|
right: 0;
|
||||||
|
|
||||||
&:before {
|
&:before {
|
||||||
-webkit-mask-image: url("./views/svg/chevron-right.svg");
|
-webkit-mask-image: url("./views/svg/chevron-right.svg");
|
||||||
}
|
}
|
||||||
|
@ -1154,6 +1192,7 @@
|
||||||
transform : scale(1.2) translate3d(0, 0, 0);
|
transform : scale(1.2) translate3d(0, 0, 0);
|
||||||
will-change: opacity, transform;
|
will-change: opacity, transform;
|
||||||
}
|
}
|
||||||
|
|
||||||
.spfade-leave-to {
|
.spfade-leave-to {
|
||||||
opacity : 1;
|
opacity : 1;
|
||||||
transform : scale(1) translate3d(0, 0, 0);
|
transform : scale(1) translate3d(0, 0, 0);
|
||||||
|
@ -1171,9 +1210,11 @@
|
||||||
0% {
|
0% {
|
||||||
background-position: 0% 0%;
|
background-position: 0% 0%;
|
||||||
}
|
}
|
||||||
|
|
||||||
50% {
|
50% {
|
||||||
background-position: 100% 0%;
|
background-position: 100% 0%;
|
||||||
}
|
}
|
||||||
|
|
||||||
100% {
|
100% {
|
||||||
background-position: 0% 0%;
|
background-position: 0% 0%;
|
||||||
}
|
}
|
||||||
|
|
|
@ -843,13 +843,13 @@
|
||||||
<div class="md-option-line">
|
<div class="md-option-line">
|
||||||
<!-- Do not translate -->
|
<!-- Do not translate -->
|
||||||
<div class="md-option-segment">
|
<div class="md-option-segment">
|
||||||
Style Stack Editor
|
Style Editor<br>
|
||||||
|
<small>Mix and match various theme components to get Cider looking exactly how you want.</small>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="md-option-segment">
|
||||||
|
|
||||||
<div class="md-option-line">
|
|
||||||
<stylestack-editor :themes="themes"/>
|
<stylestack-editor :themes="themes"/>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="md-option-line">
|
<div class="md-option-line">
|
||||||
<div class="md-option-segment">
|
<div class="md-option-segment">
|
||||||
|
@ -954,24 +954,23 @@
|
||||||
Vue.component('stylestack-editor', {
|
Vue.component('stylestack-editor', {
|
||||||
/*html*/
|
/*html*/
|
||||||
template: `
|
template: `
|
||||||
|
<div class="stylestack-editor">
|
||||||
|
<draggable class="list-group" v-model="$root.cfg.visual.styles" @end="$root.reloadStyles()">
|
||||||
|
<b-list-group-item variant="dark" v-for="theme in $root.cfg.visual.styles" :key="theme">
|
||||||
<b-row>
|
<b-row>
|
||||||
<b-col>
|
<b-col class="themeLabel">{{getThemeName(theme)}}</b-col>
|
||||||
<select size="6" v-model="selected" style="width:100%;">
|
<b-col sm="auto">
|
||||||
<option v-for="theme in $root.cfg.visual.styles" :value="theme">{{theme}}</option>
|
<button class="removeItem codicon codicon-close" @click="remove(theme)"></button>
|
||||||
</select>
|
|
||||||
<div class="btn-group" style="width: 100%">
|
|
||||||
<button @click="moveUp" class="md-btn md-btn-small">Up</button>
|
|
||||||
<button @click="remove" class="md-btn md-btn-small">Remove</button>
|
|
||||||
<button @click="moveDown" class="md-btn md-btn-small">Down</button>
|
|
||||||
</div>
|
|
||||||
</b-col>
|
|
||||||
<b-col>
|
|
||||||
<select class="md-select" style="width:100%;" v-model="newTheme">
|
|
||||||
<option v-for="theme in themes" :value="theme.file">{{theme.name}}</option>
|
|
||||||
</select>
|
|
||||||
<button class="md-btn" @click="addStyle()">Add</button>
|
|
||||||
</b-col>
|
</b-col>
|
||||||
</b-row>
|
</b-row>
|
||||||
|
</b-list-group-item>
|
||||||
|
<b-list-group-item variant="dark">
|
||||||
|
<b-dropdown class="stylesDropdown" variant="primary" text="Add Style...">
|
||||||
|
<b-dropdown-item v-for="theme in themes" @click="addStyle(theme.file)">{{theme.name}}</b-dropdown-item>
|
||||||
|
</b-dropdown>
|
||||||
|
</b-list-group-item>
|
||||||
|
</draggable>
|
||||||
|
</div>
|
||||||
`,
|
`,
|
||||||
props: {
|
props: {
|
||||||
themes: {
|
themes: {
|
||||||
|
@ -986,6 +985,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getThemeName(filename) {
|
||||||
|
return this.themes.find(theme => theme.file === filename).name;
|
||||||
|
},
|
||||||
moveUp() {
|
moveUp() {
|
||||||
const styles = this.$root.cfg.visual.styles
|
const styles = this.$root.cfg.visual.styles
|
||||||
const index = styles.indexOf(this.selected)
|
const index = styles.indexOf(this.selected)
|
||||||
|
@ -1004,16 +1006,15 @@
|
||||||
}
|
}
|
||||||
this.$root.reloadStyles()
|
this.$root.reloadStyles()
|
||||||
},
|
},
|
||||||
remove() {
|
remove(style) {
|
||||||
const styles = this.$root.cfg.visual.styles
|
const styles = this.$root.cfg.visual.styles
|
||||||
const index = styles.indexOf(this.selected)
|
const index = styles.indexOf(style)
|
||||||
styles.splice(index, 1)
|
styles.splice(index, 1)
|
||||||
this.$root.reloadStyles()
|
this.$root.reloadStyles()
|
||||||
},
|
},
|
||||||
addStyle() {
|
addStyle(style) {
|
||||||
const styles = this.$root.cfg.visual.styles
|
const styles = this.$root.cfg.visual.styles
|
||||||
styles.push(this.newTheme)
|
styles.push(style)
|
||||||
this.newTheme = null
|
|
||||||
this.$root.reloadStyles()
|
this.$root.reloadStyles()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue