diff --git a/package.json b/package.json index 11397139..7d7f4f16 100644 --- a/package.json +++ b/package.json @@ -22,6 +22,7 @@ "expo-image-picker": "~9.1.1", "expo-linear-gradient": "~8.3.0", "expo-localization": "^9.0.0", + "expo-permissions": "~9.3.0", "expo-secure-store": "~9.2.0", "expo-splash-screen": "~0.6.1", "expo-status-bar": "~1.0.2", diff --git a/src/@types/mastodon.d.ts b/src/@types/mastodon.d.ts index 282b9901..3c6ae887 100644 --- a/src/@types/mastodon.d.ts +++ b/src/@types/mastodon.d.ts @@ -1,137 +1,3 @@ -type AttachmentImage = { - // Base - id: string - type: 'image' - url: string - preview_url: string - - // Others - remote_url?: string - text_url?: string - meta?: { - original?: { width: number; height: number; size: string; aspect: number } - small?: { width: number; height: number; size: string; aspect: number } - focus?: { x: number; y: number } - } - description?: string - blurhash?: string -} - -type AttachmentVideo = { - // Base - id: string - type: 'video' - url: string - preview_url: string - - // Others - remote_url?: string - text_url?: string - meta?: { - length: string - duration: number - fps: number - size: string - width: number - height: number - aspect: number - audio_encode: string - audio_bitrate: string - audio_channels: string - original: { - width: number - height: number - frame_rate: string - duration: number - bitrate: number - } - small: { - width: number - height: number - size: string - aspect: number - } - } - description?: string - blurhash?: string -} - -type AttachmentGifv = { - // Base - id: string - type: 'gifv' - url: string - preview_url: string - - // Others - remote_url?: string - text_url?: string - meta?: { - length: string - duration: number - fps: number - size: string - width: number - height: number - aspect: number - original: { - width: number - height: number - frame_rate: string - duration: number - bitrate: number - } - small: { - width: number - height: number - size: string - aspect: number - } - } - description?: string - blurhash?: string -} - -type AttachmentAudio = { - // Base - id: string - type: 'audio' - url: string - preview_url: string - - // Others - remote_url?: string - text_url?: string - meta?: { - length: string - duration: number - audio_encode: string - audio_bitrate: string - audio_channels: string - original: { - duration: number - bitrate: number - } - } - description?: string - blurhash?: string -} - -type AttachmentUnknown = { - // Base - id: string - type: 'unknown' - url: string - preview_url: string - - // Others - remote_url?: string - text_url?: string - meta?: any - description?: string - blurhash?: string -} - declare namespace Mastodon { type Account = { // Base @@ -177,7 +43,141 @@ declare namespace Mastodon { | AttachmentVideo | AttachmentGifv | AttachmentAudio - | AttachmentUnknown + // | AttachmentUnknown + + type AttachmentImage = { + // Base + id: string + type: 'image' + url: string + preview_url: string + + // Others + remote_url?: string + text_url?: string + meta?: { + original?: { width: number; height: number; size: string; aspect: number } + small?: { width: number; height: number; size: string; aspect: number } + focus?: { x: number; y: number } + } + description?: string + blurhash?: string + } + + type AttachmentVideo = { + // Base + id: string + type: 'video' + url: string + preview_url: string + + // Others + remote_url?: string + text_url?: string + meta?: { + length: string + duration: number + fps: number + size: string + width: number + height: number + aspect: number + audio_encode: string + audio_bitrate: string + audio_channels: string + original: { + width: number + height: number + frame_rate: string + duration: number + bitrate: number + } + small: { + width: number + height: number + size: string + aspect: number + } + } + description?: string + blurhash?: string + } + + type AttachmentGifv = { + // Base + id: string + type: 'gifv' + url: string + preview_url: string + + // Others + remote_url?: string + text_url?: string + meta?: { + length: string + duration: number + fps: number + size: string + width: number + height: number + aspect: number + original: { + width: number + height: number + frame_rate: string + duration: number + bitrate: number + } + small: { + width: number + height: number + size: string + aspect: number + } + } + description?: string + blurhash?: string + } + + type AttachmentAudio = { + // Base + id: string + type: 'audio' + url: string + preview_url: string + + // Others + remote_url?: string + text_url?: string + meta?: { + length: string + duration: number + audio_encode: string + audio_bitrate: string + audio_channels: string + original: { + duration: number + bitrate: number + } + } + description?: string + blurhash?: string + } + + // type AttachmentUnknown = { + // // Base + // id: string + // type: 'unknown' + // url: string + // preview_url: string + + // // Others + // remote_url?: string + // text_url?: string + // meta?: any + // description?: string + // blurhash?: string + // } type Card = { // Base diff --git a/src/components/BottomSheet.tsx b/src/components/BottomSheet.tsx index 779db89f..967c0e5a 100644 --- a/src/components/BottomSheet.tsx +++ b/src/components/BottomSheet.tsx @@ -10,7 +10,7 @@ import { import { useSafeAreaInsets } from 'react-native-safe-area-context' import { useTheme } from 'src/utils/styles/ThemeManager' import { StyleConstants } from 'src/utils/styles/constants' -import Button from './Button' +import { ButtonRow } from './Button' export interface Props { children: React.ReactNode @@ -84,7 +84,7 @@ const BottomSheet: React.FC = ({ children, visible, handleDismiss }) => { style={[styles.handle, { backgroundColor: theme.background }]} /> {children} -