Skip to content

Commit

Permalink
clear album name once it is created, clear album name when changing p…
Browse files Browse the repository at this point in the history
…arent
  • Loading branch information
ildyria committed Oct 19, 2024
1 parent a293683 commit a302434
Showing 1 changed file with 2 additions and 19 deletions.
21 changes: 2 additions & 19 deletions resources/js/components/forms/album/AlbumCreateDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ function create() {
title: title.value,
parent_id: parentId.value,
}).then((response) => {
title.value = undefined;
visible.value = false;
AlbumService.clearCache(parentId.value);
router.push(`/gallery/${response.data}`);
Expand All @@ -59,26 +60,8 @@ function create() {
watch(
() => props.parentId,
(newAlbumID, _oldAlbumID) => {
title.value = undefined;
parentId.value = newAlbumID as string | null;
},
);
</script>
<!-- <div>
<div class="p-9">
<p class="mb-5 text-text-main-200 text-sm/4">{{ __('lychee.TITLE_NEW_ALBUM') }}</p>
<form>
<div class="my-3 first:mt-0 last:mb-0">
<x-forms.inputs.text class="w-full" autocapitalize="off" wire:model="title"
x-intersect="$el.focus()"
placeholder="{{ __('lychee.UNTITLED') }}" :has_error="$errors->has('title')" />
</div>
</form>
</div>
<div class="flex w-full box-border">
<x-forms.buttons.cancel class="border-t border-t-bg-800 rounded-bl-md w-full"
wire:click="close">{{ __('lychee.CANCEL') }}</x-forms.buttons.cancel>
<x-forms.buttons.action class="border-t border-t-bg-800 rounded-br-md w-full"
@keydown.enter.window="$wire.submit()"
wire:click="submit">{{ __('lychee.CREATE_ALBUM') }}</x-forms.buttons.action>
</div>
</div> -->

0 comments on commit a302434

Please sign in to comment.