feat(frontend): 横スワイプでタブを切り替える機能 (#13011)
* (add) 横スワイプでタブを切り替える機能 * Change Changelog * y方向の移動が一定量を超えたらスワイプを中断するように * Update swipe distance thresholds * Remove console.log * adjust threshold * rename, use v-model * fix * Update MkHorizontalSwipe.vue Co-authored-by: syuilo <Syuilotan@yahoo.co.jp> * use css module --------- Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
This commit is contained in:
		| @@ -9,13 +9,15 @@ SPDX-License-Identifier: AGPL-3.0-only | ||||
| 		<MkPageHeader v-model:tab="tab" :actions="headerActions" :tabs="headerTabs"/> | ||||
| 	</template> | ||||
|  | ||||
| 	<MkSpacer v-if="tab === 'info'" :contentMax="800"> | ||||
| 		<XFileInfo :fileId="fileId"/> | ||||
| 	</MkSpacer> | ||||
| 	<MkHorizontalSwipe v-model:tab="tab" :tabs="headerTabs"> | ||||
| 		<MkSpacer v-if="tab === 'info'" key="info" :contentMax="800"> | ||||
| 			<XFileInfo :fileId="fileId"/> | ||||
| 		</MkSpacer> | ||||
|  | ||||
| 	<MkSpacer v-else-if="tab === 'notes'" :contentMax="800"> | ||||
| 		<XNotes :fileId="fileId"/> | ||||
| 	</MkSpacer> | ||||
| 		<MkSpacer v-else-if="tab === 'notes'" key="notes" :contentMax="800"> | ||||
| 			<XNotes :fileId="fileId"/> | ||||
| 		</MkSpacer> | ||||
| 	</MkHorizontalSwipe> | ||||
| </MkStickyContainer> | ||||
| </template> | ||||
|  | ||||
| @@ -23,6 +25,7 @@ SPDX-License-Identifier: AGPL-3.0-only | ||||
| import { computed, ref, defineAsyncComponent } from 'vue'; | ||||
| import { i18n } from '@/i18n.js'; | ||||
| import { definePageMetadata } from '@/scripts/page-metadata.js'; | ||||
| import MkHorizontalSwipe from '@/components/MkHorizontalSwipe.vue'; | ||||
|  | ||||
| const props = defineProps<{ | ||||
| 	fileId: string; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 かっこかり
					かっこかり