Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6f7a8f64e2 |
@@ -43,7 +43,9 @@ export function SettingTile({ title, description, before, after, children }: Set
|
|||||||
</Text>
|
</Text>
|
||||||
)}
|
)}
|
||||||
{description && (
|
{description && (
|
||||||
<Text className={BreakWord} size="T200" priority="300">
|
// [Gitea #291] A <div>, not a <p>: many tiles pass blocks (badges,
|
||||||
|
// <Box>, <Text>) as the description, which is invalid inside a <p>.
|
||||||
|
<Text as="div" className={BreakWord} size="T200" priority="300">
|
||||||
{description}
|
{description}
|
||||||
</Text>
|
</Text>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -310,9 +310,13 @@ export function UploadCardRenderer({
|
|||||||
const { file } = upload;
|
const { file } = upload;
|
||||||
const fileSizeExceeded = file.size >= allowSize;
|
const fileSizeExceeded = file.size >= allowSize;
|
||||||
|
|
||||||
if (upload.status === UploadStatus.Idle && !fileSizeExceeded) {
|
// [Gitea #291] Start in an effect, not during render: the desktop taskbar
|
||||||
startUpload();
|
// progress hook subscribes to the upload atoms, so a render-time start
|
||||||
}
|
// updated another component mid-render (React warning on every image send).
|
||||||
|
const idle = upload.status === UploadStatus.Idle;
|
||||||
|
useEffect(() => {
|
||||||
|
if (idle && !fileSizeExceeded) startUpload();
|
||||||
|
}, [idle, fileSizeExceeded, startUpload]);
|
||||||
|
|
||||||
const handleSpoiler = (marked: boolean) => {
|
const handleSpoiler = (marked: boolean) => {
|
||||||
setMetadata(fileItem, { ...metadata, markedAsSpoiler: marked });
|
setMetadata(fileItem, { ...metadata, markedAsSpoiler: marked });
|
||||||
|
|||||||
@@ -596,6 +596,10 @@ function Appearance() {
|
|||||||
/>
|
/>
|
||||||
</SequenceCard>
|
</SequenceCard>
|
||||||
|
|
||||||
|
<DesktopChromeSetting />
|
||||||
|
<AutostartSetting />
|
||||||
|
<KeychainMirrorSetting />
|
||||||
|
|
||||||
<SequenceCard className={SequenceCardStyle} variant="SurfaceVariant" direction="Column">
|
<SequenceCard className={SequenceCardStyle} variant="SurfaceVariant" direction="Column">
|
||||||
<SettingTile
|
<SettingTile
|
||||||
title="Twitter Emoji"
|
title="Twitter Emoji"
|
||||||
@@ -2852,23 +2856,6 @@ function PackageUpdate({ help }: { help: NonNullable<ReturnType<typeof packageUp
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* [Gitea #290] Desktop-only settings in their own section (they used to sit
|
|
||||||
* inside Appearance, between Monochrome Mode and Twitter Emoji). Renders
|
|
||||||
* nothing outside the desktop app.
|
|
||||||
*/
|
|
||||||
function DesktopSettings() {
|
|
||||||
if (!isTauriEnv()) return null;
|
|
||||||
return (
|
|
||||||
<Box direction="Column" gap="100">
|
|
||||||
<Text size="L400">Desktop</Text>
|
|
||||||
<AutostartSetting />
|
|
||||||
<KeychainMirrorSetting />
|
|
||||||
<DesktopChromeSetting />
|
|
||||||
</Box>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
function AppUpdates() {
|
function AppUpdates() {
|
||||||
const { isTauri, status, check, install, installKind } = useTauriUpdater();
|
const { isTauri, status, check, install, installKind } = useTauriUpdater();
|
||||||
if (!isTauri) return null;
|
if (!isTauri) return null;
|
||||||
@@ -2977,7 +2964,6 @@ export function General({ requestClose }: GeneralProps) {
|
|||||||
<StorageUsage />
|
<StorageUsage />
|
||||||
<SettingsSyncSection />
|
<SettingsSyncSection />
|
||||||
<Calls />
|
<Calls />
|
||||||
<DesktopSettings />
|
|
||||||
<AppUpdates />
|
<AppUpdates />
|
||||||
</Box>
|
</Box>
|
||||||
</PageContent>
|
</PageContent>
|
||||||
|
|||||||
Reference in New Issue
Block a user