mirror of
https://github.com/spacedriveapp/spacedrive.git
synced 2026-04-20 06:28:14 -04:00
* d * wip * Nit: margin and padding tweak * UI design tweaks * Update Job.tsx * Improve UI * [WIP] - Refactor job manager * remove invalidate explorer event on thumb generation. the event above performs atomic updates on the front end when new thumbnails are generated, now just need to make that work * prettier formatting + removed unused imports * UI tweaks * progress bar width adjustment * tweaks * fix em * fix thumbnail generation * fix progress bar * fix time --------- Co-authored-by: Jamie Pine <ijamespine@me.com> Co-authored-by: Brendan Allan <brendonovich@outlook.com> Co-authored-by: Oscar Beaumont <oscar@otbeaumont.me>
12 lines
420 B
TypeScript
12 lines
420 B
TypeScript
import cryptoRandomString from 'crypto-random-string';
|
|
import { useCallback, useState } from 'react';
|
|
|
|
// NOTE: `crypto` module is not available in RN so this can't be in client
|
|
export const generatePassword = (length: number) =>
|
|
cryptoRandomString({ length, type: 'ascii-printable' });
|
|
|
|
export function useForceUpdate() {
|
|
const [, setTick] = useState(0);
|
|
return useCallback(() => setTick((tick) => tick + 1), []);
|
|
}
|