fix(web): enhance face tagging confirmation and fix #18605 (#18610)

* Fix: enhance face tagging confirmation and fix double label in checkboxes

* fix code formatting

---------

Co-authored-by: dvbthien <dvbthien@gmail.com>
This commit is contained in:
Xuan Binh 2025-05-26 02:34:12 +07:00 committed by GitHub
parent c4df96bd72
commit d22fb2d5db
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 12 additions and 8 deletions

View File

@ -301,10 +301,9 @@
"transcoding_encoding_options": "Encoding Options", "transcoding_encoding_options": "Encoding Options",
"transcoding_encoding_options_description": "Set codecs, resolution, quality and other options for the encoded videos", "transcoding_encoding_options_description": "Set codecs, resolution, quality and other options for the encoded videos",
"transcoding_hardware_acceleration": "Hardware Acceleration", "transcoding_hardware_acceleration": "Hardware Acceleration",
"transcoding_hardware_acceleration_description": "Experimental; much faster, but will have lower quality at the same bitrate", "transcoding_hardware_acceleration_description": "Experimental: faster transcoding but may reduce quality at same bitrate",
"transcoding_hardware_decoding": "Hardware decoding", "transcoding_hardware_decoding": "Hardware decoding",
"transcoding_hardware_decoding_setting_description": "Enables end-to-end acceleration instead of only accelerating encoding. May not work on all videos.", "transcoding_hardware_decoding_setting_description": "Enables end-to-end acceleration instead of only accelerating encoding. May not work on all videos.",
"transcoding_hevc_codec": "HEVC codec",
"transcoding_max_b_frames": "Maximum B-frames", "transcoding_max_b_frames": "Maximum B-frames",
"transcoding_max_b_frames_description": "Higher values improve compression efficiency, but slow down encoding. May not be compatible with hardware acceleration on older devices. 0 disables B-frames, while -1 sets this value automatically.", "transcoding_max_b_frames_description": "Higher values improve compression efficiency, but slow down encoding. May not be compatible with hardware acceleration on older devices. 0 disables B-frames, while -1 sets this value automatically.",
"transcoding_max_bitrate": "Maximum bitrate", "transcoding_max_bitrate": "Maximum bitrate",
@ -662,6 +661,8 @@
"confirm_keep_this_delete_others": "All other assets in the stack will be deleted except for this asset. Are you sure you want to continue?", "confirm_keep_this_delete_others": "All other assets in the stack will be deleted except for this asset. Are you sure you want to continue?",
"confirm_new_pin_code": "Confirm new PIN code", "confirm_new_pin_code": "Confirm new PIN code",
"confirm_password": "Confirm password", "confirm_password": "Confirm password",
"confirm_tag_face": "Do you want to tag this face as {name}?",
"confirm_tag_face_unnamed": "Do you want to tag this face?",
"connected_to": "Connected to", "connected_to": "Connected to",
"contain": "Contain", "contain": "Contain",
"context": "Context", "context": "Context",
@ -840,6 +841,7 @@
"error_delete_face": "Error deleting face from asset", "error_delete_face": "Error deleting face from asset",
"error_loading_image": "Error loading image", "error_loading_image": "Error loading image",
"error_saving_image": "Error: {error}", "error_saving_image": "Error: {error}",
"error_tag_face_bounding_box": "Error tagging face - cannot get bounding box coordinates",
"error_title": "Error - Something went wrong", "error_title": "Error - Something went wrong",
"errors": { "errors": {
"cannot_navigate_next_asset": "Cannot navigate to the next asset", "cannot_navigate_next_asset": "Cannot navigate to the next asset",
@ -978,7 +980,6 @@
"exif_bottom_sheet_location": "LOCATION", "exif_bottom_sheet_location": "LOCATION",
"exif_bottom_sheet_people": "PEOPLE", "exif_bottom_sheet_people": "PEOPLE",
"exif_bottom_sheet_person_add_person": "Add name", "exif_bottom_sheet_person_add_person": "Add name",
"exif_bottom_sheet_person_age": "Age {age}",
"exif_bottom_sheet_person_age_months": "Age {months} months", "exif_bottom_sheet_person_age_months": "Age {months} months",
"exif_bottom_sheet_person_age_year_months": "Age 1 year, {months} months", "exif_bottom_sheet_person_age_year_months": "Age 1 year, {months} months",
"exif_bottom_sheet_person_age_years": "Age {years}", "exif_bottom_sheet_person_age_years": "Age {years}",

View File

@ -279,12 +279,17 @@
const data = getFaceCroppedCoordinates(); const data = getFaceCroppedCoordinates();
if (!data) { if (!data) {
notificationController.show({ notificationController.show({
message: 'Error tagging face - cannot get bounding box coordinates', message: $t('error_tag_face_bounding_box'),
}); });
return; return;
} }
const isConfirmed = await modalManager.showDialog({ prompt: `Do you want to tag this face as ${person.name}?` }); const isConfirmed = await modalManager.showDialog({
prompt: person.name
? $t('confirm_tag_face', { values: { name: person.name } })
: $t('confirm_tag_face_unnamed'),
});
if (!isConfirmed) { if (!isConfirmed) {
return; return;
} }

View File

@ -60,9 +60,7 @@
{disabled} {disabled}
onCheckedChange={() => handleCheckboxChange(option.value)} onCheckedChange={() => handleCheckboxChange(option.value)}
/> />
<Label label={option.text} for="{option.value}-checkbox"> <Label label={option.text} for="{option.value}-checkbox" />
{option.text}
</Label>
</div> </div>
{/each} {/each}
</div> </div>