mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-12 23:54:24 +01:00
Fix newscaster tgui missing 'title' setting
This commit is contained in:
@@ -333,6 +333,7 @@ GLOBAL_LIST_BOILERPLATE(allCasters, /obj/machinery/newscaster)
|
||||
// Creating Messages
|
||||
// data["channel_name"] = channel_name
|
||||
data["msg"] = msg
|
||||
data["title"] = title
|
||||
data["photo_data"] = !!photo_data
|
||||
|
||||
// Printing menu
|
||||
@@ -445,11 +446,11 @@ GLOBAL_LIST_BOILERPLATE(allCasters, /obj/machinery/newscaster)
|
||||
return TRUE
|
||||
|
||||
if("set_new_message")
|
||||
msg = sanitize(input(usr, "Write your Feed story", "Network Channel Handler", "") as message|null)
|
||||
msg = sanitize(tgui_input_message(usr, "Write your Feed story", "Network Channel Handler"))
|
||||
return TRUE
|
||||
|
||||
if("set_new_title")
|
||||
title = sanitize(input(usr, "Enter your Feed title", "Network Channel Handler", "") as message|null)
|
||||
title = sanitize(tgui_input_text(usr, "Enter your Feed title", "Network Channel Handler"))
|
||||
return TRUE
|
||||
|
||||
if("set_attachment")
|
||||
|
||||
@@ -193,6 +193,7 @@ const NewscasterNewStory = (props, context) => {
|
||||
const {
|
||||
channel_name,
|
||||
user,
|
||||
title,
|
||||
msg,
|
||||
photo_data,
|
||||
} = data;
|
||||
@@ -220,6 +221,23 @@ const NewscasterNewStory = (props, context) => {
|
||||
<LabeledList.Item label="Message Author" color="good">
|
||||
{user}
|
||||
</LabeledList.Item>
|
||||
<LabeledList.Item label="Message Title" verticalAlign="top">
|
||||
<Flex>
|
||||
<Flex.Item grow={1}>
|
||||
<Section width="99%" inline>
|
||||
{title || "(no title yet)"}
|
||||
</Section>
|
||||
</Flex.Item>
|
||||
<Flex.Item>
|
||||
<Button
|
||||
verticalAlign="top"
|
||||
onClick={() => act("set_new_title")}
|
||||
icon="pen"
|
||||
tooltip="Edit Title"
|
||||
tooltipPosition="left" />
|
||||
</Flex.Item>
|
||||
</Flex>
|
||||
</LabeledList.Item>
|
||||
<LabeledList.Item label="Message Body" verticalAlign="top">
|
||||
<Flex>
|
||||
<Flex.Item grow={1}>
|
||||
@@ -567,4 +585,4 @@ screenToTemplate[NEWSCASTER_SCREEN_NEWSTORY] = NewscasterNewStory;
|
||||
screenToTemplate[NEWSCASTER_SCREEN_PRINT] = NewscasterPrint;
|
||||
screenToTemplate[NEWSCASTER_SCREEN_NEWWANTED] = NewscasterNewWanted;
|
||||
screenToTemplate[NEWSCASTER_SCREEN_VIEWWANTED] = NewscasterViewWanted;
|
||||
screenToTemplate[NEWSCASTER_SCREEN_SELECTEDCHANNEL] = NewscasterViewSelected;
|
||||
screenToTemplate[NEWSCASTER_SCREEN_SELECTEDCHANNEL] = NewscasterViewSelected;
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user