@@ -14,7 +14,7 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: Windows
|
runs-on: windows-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v6
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ export function MessageImage(props: AttachmentProps) {
|
|||||||
download,
|
download,
|
||||||
downloadStatus,
|
downloadStatus,
|
||||||
getBlob,
|
getBlob,
|
||||||
getPreview} = useAttachment(props.attachment, props.chacha_key_plain);
|
getPreview } = useAttachment(props.attachment, props.chacha_key_plain);
|
||||||
const mainRef = useRef<HTMLDivElement>(null);
|
const mainRef = useRef<HTMLDivElement>(null);
|
||||||
const error = downloadStatus == DownloadStatus.ERROR;
|
const error = downloadStatus == DownloadStatus.ERROR;
|
||||||
const { open } = useImageViewer();
|
const { open } = useImageViewer();
|
||||||
@@ -55,7 +55,6 @@ export function MessageImage(props: AttachmentProps) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<AspectRatio onClick={onClick} ref={mainRef} style={{
|
<AspectRatio onClick={onClick} ref={mainRef} style={{
|
||||||
minWidth: 200,
|
minWidth: 200,
|
||||||
@@ -76,7 +75,7 @@ export function MessageImage(props: AttachmentProps) {
|
|||||||
border: '1px solid ' + colors.borderColor,
|
border: '1px solid ' + colors.borderColor,
|
||||||
display: loadedImage ? 'block' : 'none'
|
display: loadedImage ? 'block' : 'none'
|
||||||
}} src={blob} onLoad={() => setLoadedImage(true)}></img>)}
|
}} src={blob} onLoad={() => setLoadedImage(true)}></img>)}
|
||||||
{((downloadStatus != DownloadStatus.DOWNLOADED && downloadStatus != DownloadStatus.PENDING) || !loadedImage) && preview.length >= 20 && (
|
{((downloadStatus == DownloadStatus.NOT_DOWNLOADED) || !loadedImage) && preview.length >= 20 && (
|
||||||
<>
|
<>
|
||||||
<img style={{
|
<img style={{
|
||||||
minHeight: 220,
|
minHeight: 220,
|
||||||
@@ -85,44 +84,6 @@ export function MessageImage(props: AttachmentProps) {
|
|||||||
objectFit: 'cover',
|
objectFit: 'cover',
|
||||||
border: '1px solid ' + colors.borderColor
|
border: '1px solid ' + colors.borderColor
|
||||||
}} src={/*block render???*/blurhashToBase64Image(preview, 200, 220)}></img>
|
}} src={/*block render???*/blurhashToBase64Image(preview, 200, 220)}></img>
|
||||||
<Portal target={mainRef.current!}>
|
|
||||||
<Flex direction={'column'} pos={'absolute'} justify={'center'} top={0} h={'100%'} align={'center'} gap={'xs'}>
|
|
||||||
{!error && (
|
|
||||||
<Box style={{
|
|
||||||
backgroundColor: 'rgba(0, 0, 0, 0.3)',
|
|
||||||
borderRadius: 50,
|
|
||||||
height: 40,
|
|
||||||
width: 40,
|
|
||||||
display: 'flex',
|
|
||||||
justifyContent: 'center',
|
|
||||||
alignItems: 'center',
|
|
||||||
}}>
|
|
||||||
{downloadPercentage > 0 ? (
|
|
||||||
<AnimatedRoundedProgress size={40} value={downloadPercentage} color="white"></AnimatedRoundedProgress>
|
|
||||||
) : (
|
|
||||||
<IconArrowDown size={25} color={'white'} />
|
|
||||||
)}
|
|
||||||
</Box>
|
|
||||||
)}
|
|
||||||
{error && (
|
|
||||||
<Box p={'xs'} style={{
|
|
||||||
backgroundColor: 'rgba(0, 0, 0, 0.3)',
|
|
||||||
borderRadius: 8,
|
|
||||||
display: 'flex',
|
|
||||||
justifyContent: 'center',
|
|
||||||
alignItems: 'center',
|
|
||||||
gap: 4
|
|
||||||
}}>
|
|
||||||
<Text size={'xs'} c={'white'}>
|
|
||||||
Image expired
|
|
||||||
</Text>
|
|
||||||
<IconFlameFilled size={15} style={{
|
|
||||||
fontSmooth: 'always'
|
|
||||||
}} color={'white'} />
|
|
||||||
</Box>
|
|
||||||
)}
|
|
||||||
</Flex>
|
|
||||||
</Portal>
|
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
@@ -149,6 +110,43 @@ export function MessageImage(props: AttachmentProps) {
|
|||||||
<IconCircleX size={40} color={colors.error} />
|
<IconCircleX size={40} color={colors.error} />
|
||||||
</Overlay>
|
</Overlay>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
{(downloadStatus == DownloadStatus.NOT_DOWNLOADED || downloadStatus == DownloadStatus.DOWNLOADING) && (<Flex direction={'column'} pos={'absolute'} top={0} justify={'center'} h={'100%'} align={'center'} gap={'xs'}>
|
||||||
|
{!error && (
|
||||||
|
<Box style={{
|
||||||
|
backgroundColor: 'rgba(0, 0, 0, 0.3)',
|
||||||
|
borderRadius: 50,
|
||||||
|
height: 40,
|
||||||
|
width: 40,
|
||||||
|
display: 'flex',
|
||||||
|
justifyContent: 'center',
|
||||||
|
alignItems: 'center',
|
||||||
|
}}>
|
||||||
|
{downloadPercentage > 0 ? (
|
||||||
|
<AnimatedRoundedProgress size={40} value={downloadPercentage} color="white"></AnimatedRoundedProgress>
|
||||||
|
) : (
|
||||||
|
<IconArrowDown size={25} color={'white'} />
|
||||||
|
)}
|
||||||
|
</Box>
|
||||||
|
)}
|
||||||
|
{error && (
|
||||||
|
<Box p={'xs'} style={{
|
||||||
|
backgroundColor: 'rgba(0, 0, 0, 0.3)',
|
||||||
|
borderRadius: 8,
|
||||||
|
display: 'flex',
|
||||||
|
justifyContent: 'center',
|
||||||
|
alignItems: 'center',
|
||||||
|
gap: 4
|
||||||
|
}}>
|
||||||
|
<Text size={'xs'} c={'white'}>
|
||||||
|
Image expired
|
||||||
|
</Text>
|
||||||
|
<IconFlameFilled size={15} style={{
|
||||||
|
fontSmooth: 'always'
|
||||||
|
}} color={'white'} />
|
||||||
|
</Box>
|
||||||
|
)}
|
||||||
|
</Flex>)}
|
||||||
</AspectRatio>
|
</AspectRatio>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,7 +20,8 @@ export function UpdateAlert(props : UpdateAlertProps) {
|
|||||||
updateStatus,
|
updateStatus,
|
||||||
downloadLastApplicationUpdate,
|
downloadLastApplicationUpdate,
|
||||||
restartAppForUpdateApply,
|
restartAppForUpdateApply,
|
||||||
checkForUpdates
|
checkForUpdates,
|
||||||
|
updateServer
|
||||||
} = useUpdater();
|
} = useUpdater();
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@@ -34,7 +35,7 @@ export function UpdateAlert(props : UpdateAlertProps) {
|
|||||||
<Button h={45} leftSection={
|
<Button h={45} leftSection={
|
||||||
<IconRefresh size={15}/>
|
<IconRefresh size={15}/>
|
||||||
} onClick={() => {
|
} onClick={() => {
|
||||||
window.shell.openExternal(kernelUpdateUrl);
|
window.shell.openExternal(updateServer + kernelUpdateUrl);
|
||||||
}} fullWidth variant={'gradient'} gradient={{ from: 'red', to: 'orange', deg: 233 }} radius={radius}>
|
}} fullWidth variant={'gradient'} gradient={{ from: 'red', to: 'orange', deg: 233 }} radius={radius}>
|
||||||
Kernel update required
|
Kernel update required
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ export interface UpdateContextValue {
|
|||||||
checkForUpdates: () => void;
|
checkForUpdates: () => void;
|
||||||
downloadLastApplicationUpdate: () => void;
|
downloadLastApplicationUpdate: () => void;
|
||||||
restartAppForUpdateApply: () => void;
|
restartAppForUpdateApply: () => void;
|
||||||
|
updateServer: string | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const UpdateProviderContext = createContext<UpdateContextValue | null>(null);
|
export const UpdateProviderContext = createContext<UpdateContextValue | null>(null);
|
||||||
@@ -167,7 +168,8 @@ export function UpdateProvider(props: UpdateProviderProps) {
|
|||||||
kernelUpdateUrl,
|
kernelUpdateUrl,
|
||||||
checkForUpdates,
|
checkForUpdates,
|
||||||
downloadLastApplicationUpdate,
|
downloadLastApplicationUpdate,
|
||||||
restartAppForUpdateApply
|
restartAppForUpdateApply,
|
||||||
|
updateServer: updateServerRef.current
|
||||||
}}>
|
}}>
|
||||||
{props.children}
|
{props.children}
|
||||||
</UpdateProviderContext.Provider>
|
</UpdateProviderContext.Provider>
|
||||||
|
|||||||
@@ -1,11 +1,8 @@
|
|||||||
export const APP_VERSION = "1.0.2";
|
export const APP_VERSION = "1.0.3";
|
||||||
export const CORE_MIN_REQUIRED_VERSION = "1.4.9";
|
export const CORE_MIN_REQUIRED_VERSION = "1.4.9";
|
||||||
|
|
||||||
export const RELEASE_NOTICE = `
|
export const RELEASE_NOTICE = `
|
||||||
**Update v1.0.2** :emoji_1f631:
|
**Update v1.0.3** :emoji_1f631:
|
||||||
- Support multiple file downloads
|
- Fix kernel update alert
|
||||||
- Fix fallback after boot loading
|
- Fix UI bugs.
|
||||||
- Fix corss-chat reading messages
|
|
||||||
- Support sync attachments on other devices
|
|
||||||
- Fix UI bugs
|
|
||||||
`;
|
`;
|
||||||
Reference in New Issue
Block a user