This commit is contained in:
		
							parent
							
								
									e8df6e8116
								
							
						
					
					
						commit
						ee676f7cb3
					
				
					 4 changed files with 38 additions and 3 deletions
				
			
		| 
						 | 
					@ -289,7 +289,8 @@ export default class MiOS extends EventEmitter {
 | 
				
			||||||
				me.client_settings = Object.assign({
 | 
									me.client_settings = Object.assign({
 | 
				
			||||||
					fetchOnScroll: true,
 | 
										fetchOnScroll: true,
 | 
				
			||||||
					showMaps: true,
 | 
										showMaps: true,
 | 
				
			||||||
					showPostFormOnTopOfTl: false
 | 
										showPostFormOnTopOfTl: false,
 | 
				
			||||||
 | 
										gradientWindowHeader: false
 | 
				
			||||||
				}, me.client_settings);
 | 
									}, me.client_settings);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
				// ローカルストレージにキャッシュ
 | 
									// ローカルストレージにキャッシュ
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -34,6 +34,7 @@
 | 
				
			||||||
			<mk-switch v-model="os.i.client_settings.showMaps" @change="onChangeShowMaps" text="マップの自動展開">
 | 
								<mk-switch v-model="os.i.client_settings.showMaps" @change="onChangeShowMaps" text="マップの自動展開">
 | 
				
			||||||
				<span>位置情報が添付された投稿のマップを自動的に展開します。</span>
 | 
									<span>位置情報が添付された投稿のマップを自動的に展開します。</span>
 | 
				
			||||||
			</mk-switch>
 | 
								</mk-switch>
 | 
				
			||||||
 | 
								<mk-switch v-model="os.i.client_settings.gradientWindowHeader" @change="onChangeGradientWindowHeader" text="ウィンドウのタイトルバーにグラデーションを使用"/>
 | 
				
			||||||
		</section>
 | 
							</section>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		<section class="web" v-show="page == 'web'">
 | 
							<section class="web" v-show="page == 'web'">
 | 
				
			||||||
| 
						 | 
					@ -258,6 +259,12 @@ export default Vue.extend({
 | 
				
			||||||
				value: v
 | 
									value: v
 | 
				
			||||||
			});
 | 
								});
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
 | 
							onChangeGradientWindowHeader(v) {
 | 
				
			||||||
 | 
								(this as any).api('i/update_client_setting', {
 | 
				
			||||||
 | 
									name: 'gradientWindowHeader',
 | 
				
			||||||
 | 
									value: v
 | 
				
			||||||
 | 
								});
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
		onChangeDisableViaMobile(v) {
 | 
							onChangeDisableViaMobile(v) {
 | 
				
			||||||
			(this as any).api('i/update_client_setting', {
 | 
								(this as any).api('i/update_client_setting', {
 | 
				
			||||||
				name: 'disableViaMobile',
 | 
									name: 'disableViaMobile',
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,6 +1,6 @@
 | 
				
			||||||
<template>
 | 
					<template>
 | 
				
			||||||
<div class="mk-widget-container" :class="{ naked }">
 | 
					<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>
 | 
							<div class="title"><slot name="header"></slot></div>
 | 
				
			||||||
		<slot name="func"></slot>
 | 
							<slot name="func"></slot>
 | 
				
			||||||
	</header>
 | 
						</header>
 | 
				
			||||||
| 
						 | 
					@ -20,6 +20,15 @@ export default Vue.extend({
 | 
				
			||||||
			type: Boolean,
 | 
								type: Boolean,
 | 
				
			||||||
			default: false
 | 
								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>
 | 
					</script>
 | 
				
			||||||
| 
						 | 
					@ -69,4 +78,8 @@ export default Vue.extend({
 | 
				
			||||||
			&:active
 | 
								&:active
 | 
				
			||||||
				color #999
 | 
									color #999
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							&.withGradient
 | 
				
			||||||
 | 
								> .title
 | 
				
			||||||
 | 
									background linear-gradient(to bottom, #fff, #ececec)
 | 
				
			||||||
 | 
									box-shadow 0 1px rgba(#000, 0.11)
 | 
				
			||||||
</style>
 | 
					</style>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -3,7 +3,10 @@
 | 
				
			||||||
	<div class="bg" ref="bg" v-show="isModal" @click="onBgClick"></div>
 | 
						<div class="bg" ref="bg" v-show="isModal" @click="onBgClick"></div>
 | 
				
			||||||
	<div class="main" ref="main" tabindex="-1" :data-is-modal="isModal" @mousedown="onBodyMousedown" @keydown="onKeydown" :style="{ width, height }">
 | 
						<div class="main" ref="main" tabindex="-1" :data-is-modal="isModal" @mousedown="onBodyMousedown" @keydown="onKeydown" :style="{ width, height }">
 | 
				
			||||||
		<div class="body">
 | 
							<div class="body">
 | 
				
			||||||
			<header ref="header" @contextmenu.prevent="() => {}" @mousedown.prevent="onHeaderMousedown">
 | 
								<header ref="header"
 | 
				
			||||||
 | 
									:class="{ withGradient }"
 | 
				
			||||||
 | 
									@contextmenu.prevent="() => {}" @mousedown.prevent="onHeaderMousedown"
 | 
				
			||||||
 | 
								>
 | 
				
			||||||
				<h1><slot name="header"></slot></h1>
 | 
									<h1><slot name="header"></slot></h1>
 | 
				
			||||||
				<div>
 | 
									<div>
 | 
				
			||||||
					<button class="popout" v-if="popoutUrl" @mousedown.stop="() => {}" @click="popout" title="ポップアウト">%fa:R window-restore%</button>
 | 
										<button class="popout" v-if="popoutUrl" @mousedown.stop="() => {}" @click="popout" title="ポップアウト">%fa:R window-restore%</button>
 | 
				
			||||||
| 
						 | 
					@ -75,6 +78,13 @@ export default Vue.extend({
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
		canResize(): boolean {
 | 
							canResize(): boolean {
 | 
				
			||||||
			return !this.isFlexible;
 | 
								return !this.isFlexible;
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							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;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -537,6 +547,10 @@ export default Vue.extend({
 | 
				
			||||||
				border-radius 6px 6px 0 0
 | 
									border-radius 6px 6px 0 0
 | 
				
			||||||
				box-shadow 0 1px 0 rgba(#000, 0.1)
 | 
									box-shadow 0 1px 0 rgba(#000, 0.1)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
									&.withGradient
 | 
				
			||||||
 | 
										background linear-gradient(to bottom, #fff, #ececec)
 | 
				
			||||||
 | 
										box-shadow 0 1px 0 rgba(#000, 0.15)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
				&, *
 | 
									&, *
 | 
				
			||||||
					user-select none
 | 
										user-select none
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue