mirror of
				https://codeberg.org/yeentown/barkey.git
				synced 2025-11-04 15:34:13 +00:00 
			
		
		
		
	enhance(frontend): PC画面でチャンネルが複数列で表示されるように (#15129)
* チャンネル一覧の列を最大3列にした (Otaku-Social#13) * fix * fix * fix * 🎨 * fix * 🎨 * Update Changelog * Update Changelog * 要らない_marginを消す --------- Co-authored-by: tmorio <morikapusan@morikapu-denki.com>
This commit is contained in:
		
							parent
							
								
									234d91a884
								
							
						
					
					
						commit
						5a2b29a3b4
					
				
					 3 changed files with 33 additions and 6 deletions
				
			
		| 
						 | 
					@ -4,6 +4,8 @@
 | 
				
			||||||
-
 | 
					-
 | 
				
			||||||
 | 
					
 | 
				
			||||||
### Client
 | 
					### Client
 | 
				
			||||||
 | 
					- Enhance: PC画面でチャンネルが複数列で表示されるように  
 | 
				
			||||||
 | 
					  (Cherry-picked from https://github.com/Otaku-Social/maniakey/pull/13)
 | 
				
			||||||
- Fix: 画面サイズが変わった際にナビゲーションバーが自動で折りたたまれない問題を修正
 | 
					- Fix: 画面サイズが変わった際にナビゲーションバーが自動で折りたたまれない問題を修正
 | 
				
			||||||
- Fix: サーバー情報メニューに区切り線が不足していたのを修正
 | 
					- Fix: サーバー情報メニューに区切り線が不足していたのを修正
 | 
				
			||||||
- Fix: ノートがログインしているユーザーしか見れない場合にログインダイアログを閉じるとその後の動線がなくなる問題を修正
 | 
					- Fix: ノートがログインしているユーザーしか見れない場合にログインダイアログを閉じるとその後の動線がなくなる問題を修正
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -125,7 +125,9 @@ const bannerStyle = computed(() => {
 | 
				
			||||||
			position: absolute;
 | 
								position: absolute;
 | 
				
			||||||
			top: 16px;
 | 
								top: 16px;
 | 
				
			||||||
			left: 16px;
 | 
								left: 16px;
 | 
				
			||||||
 | 
								max-width: calc(100% - 32px);
 | 
				
			||||||
			padding: 12px 16px;
 | 
								padding: 12px 16px;
 | 
				
			||||||
 | 
								box-sizing: border-box;
 | 
				
			||||||
			background: rgba(0, 0, 0, 0.7);
 | 
								background: rgba(0, 0, 0, 0.7);
 | 
				
			||||||
			color: #fff;
 | 
								color: #fff;
 | 
				
			||||||
			font-size: 1.2em;
 | 
								font-size: 1.2em;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -6,9 +6,9 @@ SPDX-License-Identifier: AGPL-3.0-only
 | 
				
			||||||
<template>
 | 
					<template>
 | 
				
			||||||
<MkStickyContainer>
 | 
					<MkStickyContainer>
 | 
				
			||||||
	<template #header><MkPageHeader v-model:tab="tab" :actions="headerActions" :tabs="headerTabs"/></template>
 | 
						<template #header><MkPageHeader v-model:tab="tab" :actions="headerActions" :tabs="headerTabs"/></template>
 | 
				
			||||||
	<MkSpacer :contentMax="700">
 | 
						<MkSpacer :contentMax="1200">
 | 
				
			||||||
		<MkHorizontalSwipe v-model:tab="tab" :tabs="headerTabs">
 | 
							<MkHorizontalSwipe v-model:tab="tab" :tabs="headerTabs">
 | 
				
			||||||
			<div v-if="tab === 'search'" key="search">
 | 
								<div v-if="tab === 'search'" key="search" :class="$style.searchRoot">
 | 
				
			||||||
				<div class="_gaps">
 | 
									<div class="_gaps">
 | 
				
			||||||
					<MkInput v-model="searchQuery" :large="true" :autofocus="true" type="search" @enter="search">
 | 
										<MkInput v-model="searchQuery" :large="true" :autofocus="true" type="search" @enter="search">
 | 
				
			||||||
						<template #prefix><i class="ti ti-search"></i></template>
 | 
											<template #prefix><i class="ti ti-search"></i></template>
 | 
				
			||||||
| 
						 | 
					@ -27,23 +27,31 @@ SPDX-License-Identifier: AGPL-3.0-only
 | 
				
			||||||
			</div>
 | 
								</div>
 | 
				
			||||||
			<div v-if="tab === 'featured'" key="featured">
 | 
								<div v-if="tab === 'featured'" key="featured">
 | 
				
			||||||
				<MkPagination v-slot="{items}" :pagination="featuredPagination">
 | 
									<MkPagination v-slot="{items}" :pagination="featuredPagination">
 | 
				
			||||||
					<MkChannelPreview v-for="channel in items" :key="channel.id" class="_margin" :channel="channel"/>
 | 
										<div :class="$style.root">
 | 
				
			||||||
 | 
											<MkChannelPreview v-for="channel in items" :key="channel.id" :channel="channel"/>
 | 
				
			||||||
 | 
										</div>
 | 
				
			||||||
				</MkPagination>
 | 
									</MkPagination>
 | 
				
			||||||
			</div>
 | 
								</div>
 | 
				
			||||||
			<div v-else-if="tab === 'favorites'" key="favorites">
 | 
								<div v-else-if="tab === 'favorites'" key="favorites">
 | 
				
			||||||
				<MkPagination v-slot="{items}" :pagination="favoritesPagination">
 | 
									<MkPagination v-slot="{items}" :pagination="favoritesPagination">
 | 
				
			||||||
					<MkChannelPreview v-for="channel in items" :key="channel.id" class="_margin" :channel="channel"/>
 | 
										<div :class="$style.root">
 | 
				
			||||||
 | 
											<MkChannelPreview v-for="channel in items" :key="channel.id" :channel="channel"/>
 | 
				
			||||||
 | 
										</div>
 | 
				
			||||||
				</MkPagination>
 | 
									</MkPagination>
 | 
				
			||||||
			</div>
 | 
								</div>
 | 
				
			||||||
			<div v-else-if="tab === 'following'" key="following">
 | 
								<div v-else-if="tab === 'following'" key="following">
 | 
				
			||||||
				<MkPagination v-slot="{items}" :pagination="followingPagination">
 | 
									<MkPagination v-slot="{items}" :pagination="followingPagination">
 | 
				
			||||||
					<MkChannelPreview v-for="channel in items" :key="channel.id" class="_margin" :channel="channel"/>
 | 
										<div :class="$style.root">
 | 
				
			||||||
 | 
											<MkChannelPreview v-for="channel in items" :key="channel.id" :channel="channel"/>
 | 
				
			||||||
 | 
										</div>
 | 
				
			||||||
				</MkPagination>
 | 
									</MkPagination>
 | 
				
			||||||
			</div>
 | 
								</div>
 | 
				
			||||||
			<div v-else-if="tab === 'owned'" key="owned">
 | 
								<div v-else-if="tab === 'owned'" key="owned">
 | 
				
			||||||
				<MkButton class="new" @click="create()"><i class="ti ti-plus"></i></MkButton>
 | 
									<MkButton class="new" @click="create()"><i class="ti ti-plus"></i></MkButton>
 | 
				
			||||||
				<MkPagination v-slot="{items}" :pagination="ownedPagination">
 | 
									<MkPagination v-slot="{items}" :pagination="ownedPagination">
 | 
				
			||||||
					<MkChannelPreview v-for="channel in items" :key="channel.id" class="_margin" :channel="channel"/>
 | 
										<div :class="$style.root">
 | 
				
			||||||
 | 
											<MkChannelPreview v-for="channel in items" :key="channel.id" :channel="channel"/>
 | 
				
			||||||
 | 
										</div>
 | 
				
			||||||
				</MkPagination>
 | 
									</MkPagination>
 | 
				
			||||||
			</div>
 | 
								</div>
 | 
				
			||||||
		</MkHorizontalSwipe>
 | 
							</MkHorizontalSwipe>
 | 
				
			||||||
| 
						 | 
					@ -85,6 +93,7 @@ onMounted(() => {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const featuredPagination = {
 | 
					const featuredPagination = {
 | 
				
			||||||
	endpoint: 'channels/featured' as const,
 | 
						endpoint: 'channels/featured' as const,
 | 
				
			||||||
 | 
						limit: 10,
 | 
				
			||||||
	noPaging: true,
 | 
						noPaging: true,
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
const favoritesPagination = {
 | 
					const favoritesPagination = {
 | 
				
			||||||
| 
						 | 
					@ -157,3 +166,17 @@ definePageMetadata(() => ({
 | 
				
			||||||
	icon: 'ti ti-device-tv',
 | 
						icon: 'ti ti-device-tv',
 | 
				
			||||||
}));
 | 
					}));
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<style lang="scss" module>
 | 
				
			||||||
 | 
					.searchRoot {
 | 
				
			||||||
 | 
						width: 100%;
 | 
				
			||||||
 | 
						max-width: 700px;
 | 
				
			||||||
 | 
						margin: 0 auto;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					.root {
 | 
				
			||||||
 | 
						display: grid;
 | 
				
			||||||
 | 
						grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
 | 
				
			||||||
 | 
						gap: var(--MI-margin);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					</style>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue