Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(web): standardize settings labels #10303

Merged
merged 3 commits into from
Jun 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,7 @@

<SettingSwitch
{disabled}
title={$t('enable').toUpperCase()}
subtitle={$t('admin.oauth_enable_description')}
title={$t('admin.oauth_enable_description')}
bind:checked={config.oauth.enabled}
/>

Expand Down Expand Up @@ -223,9 +222,8 @@
<div class="ml-4 mt-4 flex flex-col gap-4">
<div class="ml-4 mt-4 flex flex-col">
<SettingSwitch
title={$t('enabled')}
title={$t('admin.password_enable_description')}
{disabled}
subtitle={$t('admin.password_enable_description')}
bind:checked={config.passwordLogin.enabled}
/>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
/>

<SettingSelect
label={$t('admin.transcoding_audio_codec').toUpperCase()}
label={$t('admin.transcoding_audio_codec')}
{disabled}
desc={$t('admin.transcoding_audio_codec_description')}
bind:value={config.ffmpeg.targetAudioCodec}
Expand All @@ -100,7 +100,7 @@
/>

<SettingCheckboxes
label={$t('admin.transcoding_accepted_audio_codecs').toUpperCase()}
label={$t('admin.transcoding_accepted_audio_codecs')}
{disabled}
desc={$t('admin.transcoding_accepted_audio_codecs_description')}
bind:value={config.ffmpeg.acceptedAudioCodecs}
Expand All @@ -114,7 +114,7 @@
/>

<SettingSelect
label={$t('admin.transcoding_video_codec').toUpperCase()}
label={$t('admin.transcoding_video_codec')}
{disabled}
desc={$t('admin.transcoding_video_codec_description')}
bind:value={config.ffmpeg.targetVideoCodec}
Expand All @@ -130,7 +130,7 @@
/>

<SettingCheckboxes
label={$t('admin.transcoding_accepted_video_codecs').toUpperCase()}
label={$t('admin.transcoding_accepted_video_codecs')}
{disabled}
desc={$t('admin.transcoding_accepted_video_codecs_description')}
bind:value={config.ffmpeg.acceptedVideoCodecs}
Expand All @@ -145,7 +145,7 @@
/>

<SettingSelect
label={$t('admin.transcoding_target_resolution').toUpperCase()}
label={$t('admin.transcoding_target_resolution')}
{disabled}
desc={$t('admin.transcoding_target_resolution_description')}
bind:value={config.ffmpeg.targetResolution}
Expand All @@ -164,7 +164,7 @@
<SettingInputField
inputType={SettingInputFieldType.TEXT}
{disabled}
label={$t('admin.transcoding_max_bitrate').toUpperCase()}
label={$t('admin.transcoding_max_bitrate')}
desc={$t('admin.transcoding_max_bitrate_description')}
bind:value={config.ffmpeg.maxBitrate}
isEdited={config.ffmpeg.maxBitrate !== savedConfig.ffmpeg.maxBitrate}
Expand All @@ -173,14 +173,14 @@
<SettingInputField
inputType={SettingInputFieldType.NUMBER}
{disabled}
label={$t('admin.transcoding_threads').toUpperCase()}
label={$t('admin.transcoding_threads')}
desc={$t('admin.transcoding_threads_description')}
bind:value={config.ffmpeg.threads}
isEdited={config.ffmpeg.threads !== savedConfig.ffmpeg.threads}
/>

<SettingSelect
label={$t('admin.transcoding_transcode_policy').toUpperCase()}
label={$t('admin.transcoding_transcode_policy')}
{disabled}
desc={$t('admin.transcoding_transcode_policy_description')}
bind:value={config.ffmpeg.transcode}
Expand Down Expand Up @@ -208,7 +208,7 @@
/>

<SettingSelect
label={$t('admin.transcoding_tone_mapping').toUpperCase()}
label={$t('admin.transcoding_tone_mapping')}
{disabled}
desc={$t('admin.transcoding_tone_mapping_description')}
bind:value={config.ffmpeg.tonemap}
Expand All @@ -235,7 +235,7 @@
/>

<SettingSwitch
title={$t('admin.transcoding_two_pass_encoding').toUpperCase()}
title={$t('admin.transcoding_two_pass_encoding')}
{disabled}
subtitle={$t('admin.transcoding_two_pass_encoding_setting_description')}
bind:checked={config.ffmpeg.twoPass}
Expand All @@ -249,7 +249,7 @@
>
<div class="ml-4 mt-4 flex flex-col gap-4">
<SettingSelect
label={$t('admin.transcoding_acceleration_api').toUpperCase()}
label={$t('admin.transcoding_acceleration_api')}
{disabled}
desc={$t('admin.transcoding_acceleration_api_description')}
bind:value={config.ffmpeg.accel}
Expand Down Expand Up @@ -277,15 +277,15 @@
/>

<SettingSwitch
title={$t('admin.transcoding_hardware_decoding').toUpperCase()}
title={$t('admin.transcoding_hardware_decoding')}
{disabled}
subtitle={$t('admin.transcoding_hardware_decoding_setting_description')}
bind:checked={config.ffmpeg.accelDecode}
isEdited={config.ffmpeg.accelDecode !== savedConfig.ffmpeg.accelDecode}
/>

<SettingSelect
label={$t('admin.transcoding_constant_quality_mode').toUpperCase()}
label={$t('admin.transcoding_constant_quality_mode')}
desc={$t('admin.transcoding_constant_quality_mode_description')}
bind:value={config.ffmpeg.cqMode}
options={[
Expand All @@ -298,7 +298,7 @@
/>

<SettingSwitch
title={$t('admin.transcoding_temporal_aq').toUpperCase()}
title={$t('admin.transcoding_temporal_aq')}
{disabled}
subtitle={$t('admin.transcoding_temporal_aq_description')}
bind:checked={config.ffmpeg.temporalAQ}
Expand All @@ -307,7 +307,7 @@

<SettingInputField
inputType={SettingInputFieldType.TEXT}
label={$t('admin.transcoding_preferred_hardware_device').toUpperCase()}
label={$t('admin.transcoding_preferred_hardware_device')}
desc={$t('admin.transcoding_preferred_hardware_device_description')}
bind:value={config.ffmpeg.preferredHwDevice}
isEdited={config.ffmpeg.preferredHwDevice !== savedConfig.ffmpeg.preferredHwDevice}
Expand All @@ -324,7 +324,7 @@
<div class="ml-4 mt-4 flex flex-col gap-4">
<SettingInputField
inputType={SettingInputFieldType.NUMBER}
label={$t('admin.transcoding_tone_mapping_npl').toUpperCase()}
label={$t('admin.transcoding_tone_mapping_npl')}
desc={$t('admin.transcoding_tone_mapping_npl_description')}
bind:value={config.ffmpeg.npl}
isEdited={config.ffmpeg.npl !== savedConfig.ffmpeg.npl}
Expand All @@ -333,7 +333,7 @@

<SettingInputField
inputType={SettingInputFieldType.NUMBER}
label={$t('admin.transcoding_max_b_frames').toUpperCase()}
label={$t('admin.transcoding_max_b_frames')}
desc={$t('admin.transcoding_max_b_frames_description')}
bind:value={config.ffmpeg.bframes}
isEdited={config.ffmpeg.bframes !== savedConfig.ffmpeg.bframes}
Expand All @@ -342,7 +342,7 @@

<SettingInputField
inputType={SettingInputFieldType.NUMBER}
label={$t('admin.transcoding_reference_frames').toUpperCase()}
label={$t('admin.transcoding_reference_frames')}
desc={$t('admin.transcoding_reference_frames_description')}
bind:value={config.ffmpeg.refs}
isEdited={config.ffmpeg.refs !== savedConfig.ffmpeg.refs}
Expand All @@ -351,7 +351,7 @@

<SettingInputField
inputType={SettingInputFieldType.NUMBER}
label={$t('admin.transcoding_max_keyframe_interval').toUpperCase()}
label={$t('admin.transcoding_max_keyframe_interval')}
desc={$t('admin.transcoding_max_keyframe_interval_description')}
bind:value={config.ffmpeg.gopSize}
isEdited={config.ffmpeg.gopSize !== savedConfig.ffmpeg.gopSize}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<form autocomplete="off" on:submit|preventDefault>
<div class="ml-4 mt-4 flex flex-col gap-4">
<SettingSelect
label={$t('admin.image_thumbnail_format').toUpperCase()}
label={$t('admin.image_thumbnail_format')}
desc={$t('admin.image_format_description')}
bind:value={config.image.thumbnailFormat}
options={[
Expand All @@ -39,7 +39,7 @@
/>

<SettingSelect
label={$t('admin.image_thumbnail_resolution').toUpperCase()}
label={$t('admin.image_thumbnail_resolution')}
desc={$t('admin.image_thumbnail_resolution_description')}
number
bind:value={config.image.thumbnailSize}
Expand All @@ -56,7 +56,7 @@
/>

<SettingSelect
label={$t('admin.image_preview_format').toUpperCase()}
label={$t('admin.image_preview_format')}
desc={$t('admin.image_format_description')}
bind:value={config.image.previewFormat}
options={[
Expand All @@ -69,7 +69,7 @@
/>

<SettingSelect
label={$t('admin.image_preview_resolution').toUpperCase()}
label={$t('admin.image_preview_resolution')}
desc={$t('admin.image_preview_resolution_description')}
number
bind:value={config.image.previewSize}
Expand All @@ -86,15 +86,15 @@

<SettingInputField
inputType={SettingInputFieldType.NUMBER}
label={$t('admin.image_quality').toUpperCase()}
label={$t('admin.image_quality')}
desc={$t('admin.image_quality_description')}
bind:value={config.image.quality}
isEdited={config.image.quality !== savedConfig.image.quality}
{disabled}
/>

<SettingSwitch
title={$t('admin.image_prefer_wide_gamut').toUpperCase()}
title={$t('admin.image_prefer_wide_gamut')}
subtitle={$t('admin.image_prefer_wide_gamut_setting_description')}
checked={config.image.colorspace === Colorspace.P3}
on:toggle={(e) => (config.image.colorspace = e.detail ? Colorspace.P3 : Colorspace.Srgb)}
Expand All @@ -103,7 +103,7 @@
/>

<SettingSwitch
title={$t('admin.image_prefer_embedded_preview').toUpperCase()}
title={$t('admin.image_prefer_embedded_preview')}
subtitle={$t('admin.image_prefer_embedded_preview_setting_description')}
checked={config.image.extractEmbedded}
on:toggle={() => (config.image.extractEmbedded = !config.image.extractEmbedded)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,8 @@
<form autocomplete="off" on:submit|preventDefault>
<div class="ml-4 mt-4 flex flex-col gap-4">
<SettingSwitch
title={$t('enable')}
title={$t('admin.library_watching_enable_description')}
{disabled}
subtitle={$t('admin.library_watching_enable_description')}
bind:checked={config.library.watch.enabled}
/>
</div>
Expand All @@ -65,14 +64,18 @@
<form autocomplete="off" on:submit|preventDefault>
<div class="ml-4 mt-4 flex flex-col gap-4">
<SettingSwitch
title={$t('enabled').toUpperCase()}
title={$t('admin.library_scanning_enable_description')}
{disabled}
subtitle={$t('admin.library_scanning_enable_description')}
bind:checked={config.library.scan.enabled}
/>

<div class="flex flex-col my-2 dark:text-immich-dark-fg">
<label class="text-sm" for="expression-select">{$t('admin.library_cron_expression_presets')}</label>
<label
class="font-medium text-immich-primary dark:text-immich-dark-primary text-sm"
for="expression-select"
>
{$t('admin.library_cron_expression_presets')}
</label>
<select
class="p-2 mt-2 text-sm rounded-lg bg-slate-200 hover:cursor-pointer dark:bg-gray-600"
disabled={disabled || !config.library.scan.enabled}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,12 @@
<form autocomplete="off" on:submit|preventDefault>
<div class="ml-4 mt-4 flex flex-col gap-4">
<SettingSwitch
title={$t('enabled').toUpperCase()}
title={$t('admin.logging_enable_description')}
{disabled}
subtitle={$t('admin.logging_enable_description')}
bind:checked={config.logging.enabled}
/>
<SettingSelect
label={$t('level').toUpperCase()}
label={$t('level')}
desc={$t('admin.logging_level_description')}
bind:value={config.logging.level}
options={[
Expand Down
Loading
Loading