client: select folder when entering it
Some checks failed
ci/woodpecker/push/lint-backend Pipeline was successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-client Pipeline was successful
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/lint-sw Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
ci/woodpecker/pr/lint-foundkey-js Pipeline was successful
ci/woodpecker/pr/lint-client Pipeline failed
ci/woodpecker/pr/lint-backend Pipeline failed
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/lint-sw Pipeline failed
ci/woodpecker/pr/test Pipeline failed
Some checks failed
ci/woodpecker/push/lint-backend Pipeline was successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-client Pipeline was successful
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/lint-sw Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
ci/woodpecker/pr/lint-foundkey-js Pipeline was successful
ci/woodpecker/pr/lint-client Pipeline failed
ci/woodpecker/pr/lint-backend Pipeline failed
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/lint-sw Pipeline failed
ci/woodpecker/pr/test Pipeline failed
As a convenience when a user is in the "select a folder" dialog, opens a folder an then clicks on the checkmark, the currently open folder is selected.
This commit is contained in:
parent
d26e2588e3
commit
02aaee6050
1 changed files with 8 additions and 2 deletions
|
@ -98,7 +98,6 @@ import { uploadFile, uploads } from '@/scripts/upload';
|
|||
|
||||
const props = withDefaults(defineProps<{
|
||||
initialFolder?: foundkey.entities.DriveFolder;
|
||||
type?: string;
|
||||
multiple?: boolean;
|
||||
select?: 'file' | 'folder' | null;
|
||||
}>(), {
|
||||
|
@ -133,7 +132,14 @@ let draghover = $ref(false);
|
|||
// (自分自身の階層にドロップできないようにするためのフラグ)
|
||||
let isDragSource = $ref(false);
|
||||
|
||||
watch($$(folder), () => emit('cd', folder));
|
||||
watch($$(folder), () => {
|
||||
emit('cd', folder)
|
||||
if (props.select === 'folder') {
|
||||
// convenience: entering a folder selects it
|
||||
selected = [folder];
|
||||
emit('change-selection', selected);
|
||||
}
|
||||
});
|
||||
|
||||
function onStreamDriveFileCreated(file: foundkey.entities.DriveFile) {
|
||||
addFile(file, true);
|
||||
|
|
Loading…
Reference in a new issue