stream_settings: Extract `creator_detail` section.

Extract display_pill and date code to separate
'creator_detail.hbs' file.
Rename 'stream_creator_details' to 'creator_details'.
This commit is contained in:
sujal shah 2024-07-23 23:31:08 +05:30 committed by Tim Abbott
parent 3514cbd7e8
commit 3b69f2e5d9
4 changed files with 25 additions and 24 deletions

View File

@ -970,7 +970,7 @@
}
.panel_user_list > .pill-container,
.stream_creator_details > .display_only_pill {
.creator_details > .display_only_pill {
&:hover {
color: inherit;
}

View File

@ -211,7 +211,7 @@
/* These pill are similar to .not-editable, but are meant to show
profile cards when clicked. */
.panel_user_list > .pill-container,
.stream_creator_details > .display_only_pill {
.creator_details > .display_only_pill {
background-color: hsl(0deg 0% 0% / 7%);
gap: 2px;
flex-wrap: nowrap;
@ -245,7 +245,7 @@
}
}
.stream_creator_details > .display_only_pill.inline_with_text_pill {
.creator_details > .display_only_pill.inline_with_text_pill {
padding: 0;
> .pill {

View File

@ -0,0 +1,20 @@
{{#if creator}}
{{#tr}}
Created by <z-user></z-user> on <z-date-created></z-date-created>.
{{#*inline "z-user"}}
{{> user_display_only_pill
is_inline=true
user_id=creator.user_id
img_src=creator.avatar_url
display_value=creator.full_name
is_current_user=is_creator
is_active=creator.is_active }}
{{/inline}}
{{#*inline "z-date-created"}}{{date_created_string}}{{/inline}}
{{/tr}}
{{else}}
{{#tr}}
Created on <z-date-created></z-date-created>.
{{#*inline "z-date-created"}}{{date_created_string}}{{/inline}}
{{/tr}}
{{/if}}

View File

@ -74,27 +74,8 @@
<div class="stream_email_address_error alert-notification"></div>
</div>
{{#with sub}}
<div class="stream_creator_details stream_details_subsection">
{{#if creator}}
{{#tr}}
Created by <z-user></z-user> on <z-stream-date-created></z-stream-date-created>.
{{#*inline "z-user"}}
{{> ../user_display_only_pill
is_inline=true
user_id=creator.user_id
img_src=creator.avatar_url
display_value=creator.full_name
is_current_user=is_creator
is_active=creator.is_active }}
{{/inline}}
{{#*inline "z-stream-date-created"}}{{date_created_string}}{{/inline}}
{{/tr}}
{{else}}
{{#tr}}
Created on <z-stream-date-created></z-stream-date-created>.
{{#*inline "z-stream-date-created"}}{{date_created_string}}{{/inline}}
{{/tr}}
{{/if}}
<div class="creator_details stream_details_subsection">
{{> ../creator_details}}
</div>
<div class="stream_details_subsection">
{{t "Channel ID"}}<br/>