This commit is contained in:
syuilo 2018-03-06 14:33:01 +09:00
parent e8df6e8116
commit ee676f7cb3
4 changed files with 38 additions and 3 deletions

View file

@ -1,6 +1,6 @@
<template>
<div class="mk-widget-container" :class="{ naked }">
<header v-if="showHeader">
<header :class="{ withGradient }" v-if="showHeader">
<div class="title"><slot name="header"></slot></div>
<slot name="func"></slot>
</header>
@ -20,6 +20,15 @@ export default Vue.extend({
type: Boolean,
default: false
}
},
computed: {
withGradient(): boolean {
return (this as any).os.isSignedIn
? (this as any).os.i.client_settings.gradientWindowHeader != null
? (this as any).os.i.client_settings.gradientWindowHeader
: false
: false;
}
}
});
</script>
@ -69,4 +78,8 @@ export default Vue.extend({
&:active
color #999
&.withGradient
> .title
background linear-gradient(to bottom, #fff, #ececec)
box-shadow 0 1px rgba(#000, 0.11)
</style>