fix(frontend): ページデザインの修正 (#13642)
This commit is contained in:
		| @@ -14,6 +14,7 @@ import XText from './page.text.vue'; | ||||
| import XSection from './page.section.vue'; | ||||
| import XImage from './page.image.vue'; | ||||
| import XNote from './page.note.vue'; | ||||
| import XDynamic from './page.dynamic.vue'; | ||||
|  | ||||
| function getComponent(type: string) { | ||||
| 	switch (type) { | ||||
| @@ -21,6 +22,20 @@ function getComponent(type: string) { | ||||
| 		case 'section': return XSection; | ||||
| 		case 'image': return XImage; | ||||
| 		case 'note': return XNote; | ||||
|  | ||||
| 		// 動的ページの代替用ブロック | ||||
| 		case 'button': | ||||
| 		case 'if': | ||||
| 		case 'textarea': | ||||
| 		case 'post': | ||||
| 		case 'canvas': | ||||
| 		case 'numberInput': | ||||
| 		case 'textInput': | ||||
| 		case 'switch': | ||||
| 		case 'radioButton': | ||||
| 		case 'counter': | ||||
| 			return XDynamic; | ||||
|  | ||||
| 		default: return null; | ||||
| 	} | ||||
| } | ||||
|   | ||||
							
								
								
									
										43
									
								
								packages/frontend/src/components/page/page.dynamic.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										43
									
								
								packages/frontend/src/components/page/page.dynamic.vue
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,43 @@ | ||||
| <!-- | ||||
| SPDX-FileCopyrightText: syuilo and misskey-project | ||||
| SPDX-License-Identifier: AGPL-3.0-only | ||||
| --> | ||||
|  | ||||
| <!-- 動的ページのブロックの代替。利用できないということを表示する --> | ||||
| <template> | ||||
| <div :class="$style.root"> | ||||
| 	<div :class="$style.heading"><i class="ti ti-dice-5"></i> {{ i18n.ts._pages.blocks.dynamic }}</div> | ||||
| 	<I18n :src="i18n.ts._pages.blocks.dynamicDescription" tag="div" :class="$style.text"> | ||||
| 		<template #play> | ||||
| 			<MkA to="/play" class="_link">Play</MkA> | ||||
| 		</template> | ||||
| 	</I18n> | ||||
| </div> | ||||
| </template> | ||||
|  | ||||
| <script lang="ts" setup> | ||||
| import * as Misskey from 'misskey-js'; | ||||
| import { i18n } from '@/i18n.js'; | ||||
|  | ||||
| const props = defineProps<{ | ||||
| 	block: Misskey.entities.PageBlock, | ||||
| 	page: Misskey.entities.Page, | ||||
| }>(); | ||||
| </script> | ||||
|  | ||||
| <style lang="scss" module> | ||||
| .root { | ||||
| 	border: 1px solid var(--divider); | ||||
| 	border-radius: var(--radius); | ||||
| 	padding: var(--margin); | ||||
| 	text-align: center; | ||||
| } | ||||
|  | ||||
| .heading { | ||||
| 	font-weight: 700; | ||||
| } | ||||
|  | ||||
| .text { | ||||
| 	font-size: 90%; | ||||
| } | ||||
| </style> | ||||
| @@ -6,7 +6,7 @@ SPDX-License-Identifier: AGPL-3.0-only | ||||
| <template> | ||||
| <div class="_gaps" :class="$style.textRoot"> | ||||
| 	<Mfm :text="block.text ?? ''" :isNote="false"/> | ||||
| 	<div v-if="isEnabledUrlPreview"> | ||||
| 	<div v-if="isEnabledUrlPreview" class="_gaps_s"> | ||||
| 		<MkUrlPreview v-for="url in urls" :key="url" :url="url"/> | ||||
| 	</div> | ||||
| </div> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 かっこかり
					かっこかり