Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

Fix select custom value size

Chocobozzz2c2e05719e2a
diff --git a/client/src/app/+admin/config/pages/admin-config-common.scss b/client/src/app/+admin/config/pages/admin-config-common.scss
index a4f3a99f36..26f15e4968 100644
--- a/client/src/app/+admin/config/pages/admin-config-common.scss
+++ b/client/src/app/+admin/config/pages/admin-config-common.scss
@@ -37,12 +37,18 @@ my-select-videos-scope,
my-select-checkbox,
my-select-options,
my-select-player-theme,
-my-select-custom-value {
+my-select-custom-value:not(.has-custom-value) {
display: block;
@include responsive-width($form-base-input-width);
}
+my-select-custom-value.has-custom-value {
+ display: block;
+
+ @include responsive-width($form-base-input-width + 140px);
+}
+
.inner-form-description {
font-size: 14px;
margin-bottom: 1rem;
diff --git a/client/src/app/+admin/overview/users/user-edit/user-edit.component.scss b/client/src/app/+admin/overview/users/user-edit/user-edit.component.scss
index 15493a5e61..43aab13a7b 100644
--- a/client/src/app/+admin/overview/users/user-edit/user-edit.component.scss
+++ b/client/src/app/+admin/overview/users/user-edit/user-edit.component.scss
@@ -20,12 +20,18 @@ my-input-text {
@include responsive-width($form-base-input-width);
}
-my-select-custom-value {
+my-select-custom-value:not(.has-custom-value) {
display: block;
@include responsive-width($form-base-input-width);
}
+my-select-custom-value.has-custom-value {
+ display: block;
+
+ @include responsive-width($form-base-input-width + 140px);
+}
+
.dashboard {
display: flex;
flex-wrap: wrap;
diff --git a/client/src/app/shared/shared-forms/select/select-custom-value.component.ts b/client/src/app/shared/shared-forms/select/select-custom-value.component.ts
index 574a47c1ab..13de0e8a20 100644
--- a/client/src/app/shared/shared-forms/select/select-custom-value.component.ts
+++ b/client/src/app/shared/shared-forms/select/select-custom-value.component.ts
@@ -14,7 +14,10 @@ import { SelectOptionsComponent } from './select-options.component'
multi: true
}
],
- imports: [ SelectOptionsComponent, FormsModule ]
+ imports: [ SelectOptionsComponent, FormsModule ],
+ host: {
+ '[class.has-custom-value]': 'isCustomValue()'
+ }
})
export class SelectCustomValueComponent implements ControlValueAccessor, OnChanges {
readonly inputId = input.required<string>()