mirror of
				https://codeberg.org/yeentown/barkey.git
				synced 2025-10-31 13:34:12 +00:00 
			
		
		
		
	merge: Make post form attachments accessible (!638)
View MR for information: https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/638 Closes #705 Approved-by: fEmber <acomputerdog@gmail.com> Approved-by: Marie <github@yuugi.dev>
This commit is contained in:
		
						commit
						9420bd32a0
					
				
					 1 changed files with 13 additions and 2 deletions
				
			
		|  | @ -7,7 +7,14 @@ SPDX-License-Identifier: AGPL-3.0-only | ||||||
| <div v-show="props.modelValue.length != 0" :class="$style.root"> | <div v-show="props.modelValue.length != 0" :class="$style.root"> | ||||||
| 	<Sortable :modelValue="props.modelValue" :class="$style.files" itemKey="id" :animation="150" :delay="100" :delayOnTouchOnly="true" @update:modelValue="v => emit('update:modelValue', v)"> | 	<Sortable :modelValue="props.modelValue" :class="$style.files" itemKey="id" :animation="150" :delay="100" :delayOnTouchOnly="true" @update:modelValue="v => emit('update:modelValue', v)"> | ||||||
| 		<template #item="{element}"> | 		<template #item="{element}"> | ||||||
| 			<div :class="$style.file" @click="showFileMenu(element, $event)" @contextmenu.prevent="showFileMenu(element, $event)"> | 			<div | ||||||
|  | 				:class="$style.file" | ||||||
|  | 				role="button" | ||||||
|  | 				tabindex="0" | ||||||
|  | 				@click="showFileMenu(element, $event)" | ||||||
|  | 				@keydown.space.enter="showFileMenu(element, $event)" | ||||||
|  | 				@contextmenu.prevent="showFileMenu(element, $event)" | ||||||
|  | 			> | ||||||
| 				<MkDriveFileThumbnail :data-id="element.id" :class="$style.thumbnail" :file="element" fit="cover"/> | 				<MkDriveFileThumbnail :data-id="element.id" :class="$style.thumbnail" :file="element" fit="cover"/> | ||||||
| 				<div v-if="element.isSensitive" :class="$style.sensitive"> | 				<div v-if="element.isSensitive" :class="$style.sensitive"> | ||||||
| 					<i class="ti ti-eye-exclamation" style="margin: auto;"></i> | 					<i class="ti ti-eye-exclamation" style="margin: auto;"></i> | ||||||
|  | @ -132,7 +139,7 @@ async function crop(file: Misskey.entities.DriveFile): Promise<void> { | ||||||
| 	emit('replaceFile', file, newFile); | 	emit('replaceFile', file, newFile); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| function showFileMenu(file: Misskey.entities.DriveFile, ev: MouseEvent): void { | function showFileMenu(file: Misskey.entities.DriveFile, ev: MouseEvent | KeyboardEvent): void { | ||||||
| 	if (menuShowing) return; | 	if (menuShowing) return; | ||||||
| 
 | 
 | ||||||
| 	const isImage = file.type.startsWith('image/'); | 	const isImage = file.type.startsWith('image/'); | ||||||
|  | @ -187,6 +194,10 @@ function showFileMenu(file: Misskey.entities.DriveFile, ev: MouseEvent): void { | ||||||
| 	border-radius: var(--radius-xs); | 	border-radius: var(--radius-xs); | ||||||
| 	overflow: hidden; | 	overflow: hidden; | ||||||
| 	cursor: move; | 	cursor: move; | ||||||
|  | 
 | ||||||
|  | 	&:focus-visible { | ||||||
|  | 		outline-offset: 4px; | ||||||
|  | 	} | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| .thumbnail { | .thumbnail { | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue