-
- {title}
-
+ {smallTitle && (
+
+ {title}
+
+ ) || (
+
+ {title}
+
+ )}
{buttons}
diff --git a/tgui/packages/tgui/interfaces/CharacterDirectory.js b/tgui/packages/tgui/interfaces/CharacterDirectory.js
index e378a6809cf..f85da538b98 100644
--- a/tgui/packages/tgui/interfaces/CharacterDirectory.js
+++ b/tgui/packages/tgui/interfaces/CharacterDirectory.js
@@ -1,6 +1,16 @@
+/* eslint-disable */
import { Fragment } from 'inferno';
import { useBackend, useLocalState } from '../backend';
-import { Box, Button, Icon, LabeledList, Section, Table, Stack } from '../components';
+import {
+ Box,
+ Button,
+ Icon,
+ LabeledList,
+ Section,
+ Table,
+ Flex,
+ Tabs,
+ Stack } from '../components';
import { Window } from '../layouts';
const erpTagColor = {
@@ -15,146 +25,257 @@ export const CharacterDirectory = (props, context) => {
const { act, data } = useBackend(context);
const {
+ personalName,
personalVisibility,
personalTag,
personalErpTag,
prefsOnly,
personalAdvert,
personalFlist,
+ personalDMs,
} = data;
- const [overlay, setOverlay] = useLocalState(context, 'overlay', null);
- const [overwritePrefs, setOverwritePrefs] = useLocalState(context, 'overwritePrefs', prefsOnly);
+ const [
+ SelectedTab,
+ setSelectedTab,
+ ] = useLocalState(context, 'SelectedTab', 1);
return (
-
-
- {(overlay && ) || (
-
+
+
+
+
-
- Save to current preferences slot:
-
-
- }>
-
- {/* option buttons, but compacter */}
-
- Visibility:
-
-
-
-
- Vore Tag:
-
-
-
-
- ERP Tag:
-
-
-
-
-
-
-
-
-
-
-
+
+ } />
+
+
+
+ {
+ setSelectedTab(1);
+ act('JustUpdate');
+ }}>
+ Directory
+
+ {
+ setSelectedTab(2);
+ act('JustUpdate');
+ }}>
+ Options
+
+ {/* {
+ setSelectedTab(3);
+ act('JustUpdate');
+ }}>
+
+ */}
+
+
+
+
-
-
- )}
+
+
+
+
+
);
};
-const ViewCharacter = (props, context) => {
- const [overlay, setOverlay] = useLocalState(context, 'overlay', null);
+const VisibilityButton = (props, context) => {
+ const { act, data } = useBackend(context);
+ const { personalVisibility } = data;
+
+ return (
+
+ );
+}
+
+// / The main window! either your characters or the available characters
+const MainWindow = (props, context) => { // main screen turn on
+ const { act, data } = useBackend(context);
+
+ const [
+ SelectedTab,
+ setSelectedTab,
+ ] = useLocalState(context, 'SelectedTab', 1);
+
+
+ return (
+ <>
+ {SelectedTab === 1 && (
+
+ )}
+ {SelectedTab === 2 && (
+
+ )}
+ {SelectedTab === 3 && (
+
+ )}
+ >
+ );
+};
+
+const SettingsControl = (props, context) => {
+ const { act, data } = useBackend(context);
+ const {
+ personalName,
+ personalVisibility,
+ personalTag,
+ personalErpTag,
+ prefsOnly,
+ personalAdvert,
+ personalFlist,
+ personalDMs,
+ } = data;
+ const [overwritePrefs, setOverwritePrefs] = useLocalState(context, 'overwritePrefs', prefsOnly);
return (
setOverlay(null)} />}>
-
-
-
-
-
-
-
-
- {overlay.character_ad || 'Unset.'}
-
-
-
-
- {overlay.ooc_notes || 'Unset.'}
-
-
-
-
- {overlay.flavor_text || 'Unset.'}
-
-
+ title="Controls"
+ buttons={
+
+ {/*
+ Save to current preferences slot:
+
+
+ }>
+
+ {/* option buttons, but compacter */}
+ {/*
+ Visibility:
+
+
+ */}
+
+ Open For DMs:
+
+
+
+
+ Vore Tag:
+
+
+
+
+ ERP Tag:
+
+
+
+
+
+
+
+
+
+
+
+
+ );
+};
+
+const ReadMe = (props, context) => {
+ const { act, data } = useBackend(context);
+ const { ReadmeText } = data;
+
+ return (
+
);
};
+const BottomToolbar = (props, context) => {
+ const { act, data } = useBackend(context);
+ const { personalLookingForFriends } = data;
+
+ return (
+
+
+
+
+
+
+
+
+
+ );
+};
+
const CharacterDirectoryList = (props, context) => {
const { act, data } = useBackend(context);
@@ -165,21 +286,31 @@ const CharacterDirectoryList = (props, context) => {
const [overlay, setOverlay] = useLocalState(context, 'overlay', null);
return (
-
act('refresh')} />}>
-
+ act('refresh')} />
+ }>
+
Name
Gender
Species
- Preference
+ Orientation
Position
Vore
-
- Advert
+
+ Examine
-
+
F-List
+
+ Message
+
{directory
.sort((a, b) => {
@@ -188,8 +319,23 @@ const CharacterDirectoryList = (props, context) => {
})
.map((character, i) => (
-
- {canOrbit ?
diff --git a/tgui/packages/tgui/interfaces/CharacterInspection.js b/tgui/packages/tgui/interfaces/CharacterInspection.js
new file mode 100644
index 00000000000..c833a93b2c8
--- /dev/null
+++ b/tgui/packages/tgui/interfaces/CharacterInspection.js
@@ -0,0 +1,354 @@
+/* eslint-disable */
+import { Fragment } from 'inferno';
+import { useBackend, useLocalState } from '../backend';
+import {
+ Box,
+ Button,
+ Icon,
+ LabeledList,
+ Flex,
+ Section,
+ Table,
+ Stack,
+ Tabs } from '../components';
+import { Window } from '../layouts';
+import { marked } from 'marked';
+import { sanitizeText } from '../sanitize';
+
+export const CharacterInspection = (props, context) => {
+ const { act, data } = useBackend(context);
+ const {
+ gender,
+ species,
+ vorepref,
+ erppref,
+ kisspref,
+ flink,
+ ad,
+ notes,
+ flavor,
+ their_quid,
+ viewer_quid,
+ name,
+ looking_for_friends,
+ dms_r_open,
+ } = data;
+
+ const [
+ SelectedTab,
+ setSelectedTab,
+ ] = useLocalState(context, 'SelectedTab', 1);
+
+ return (
+
+
+
+
+
+ Say Hi! -->
+ act("pager", {
+ their_quid: their_quid,
+ viewer_quid: viewer_quid,
+ })}
+ icon="envelope"
+ tooltip="Send a message to this character!"
+ disabled={!data.dms_r_open}
+ mr={1} />
+ >
+ )} >
+
+
+
+
+
+
+
+
+ {
+ setSelectedTab(1);
+ act('JustUpdate');
+ }}>
+ Flavor Text
+
+ {
+ setSelectedTab(2);
+ act('JustUpdate');
+ }}>
+ OOC Notes
+
+ {
+ setSelectedTab(3);
+ act('JustUpdate');
+ }}>
+ Extra Info
+
+ {/* {
+ setSelectedTab(4);
+ act('JustUpdate');
+ }}>
+ Gallery (SFW)
+
+ {
+ setSelectedTab(5);
+ act('JustUpdate');
+ }}>
+ Gallery (NSFW)
+ */}
+
+
+
+
+
+
+
+
+
+
+
+ );
+};
+
+// / The main window! either your characters or the available characters
+const MainWindow = (props, context) => { // main screen turn on
+ const { act, data } = useBackend(context);
+
+ const [
+ SelectedTab,
+ setSelectedTab,
+ ] = useLocalState(context, 'SelectedTab', 1);
+
+
+ return (
+ <>
+ {SelectedTab === 1 && (
+
+ {data.profile_pic && (
+
+ act("show_pic", {
+ their_quid: data.their_quid,
+ viewer_quid: data.viewer_quid,
+ })}>
+
+
+
+ )}
+
+
+ )
+ || SelectedTab === 2 && (
+
+ )
+ || SelectedTab === 3 && (
+
+ )
+ // || SelectedTab === 4 && (
+ //
+ // )
+ // || SelectedTab === 5 && (
+ //
+ // ) // coming soon: these
+ }
+ >
+ );
+};
+
+// / The bottom toolbar
+const BottomToolbar = (props, context) => {
+ const { act, data } = useBackend(context);
+ const {
+ looking_for_friends,
+ their_quid,
+ viewer_quid,
+ } = data;
+
+ return (
+
+ {
+ true
+ ? looking_for_friends ? (
+ act("pager", {
+ their_quid: their_quid,
+ viewer_quid: viewer_quid,
+ })}
+ tooltip="They're looking for a friend! Send them a message!"
+ mr={1}>
+ Looking for friends! -->
+
+ <-- Send me a message!
+
+ ) : (
+ act("pager", {
+ their_quid: their_quid,
+ viewer_quid: viewer_quid,
+ })}
+ color="transparent"
+ icon="envelope-circle-check"
+ tooltip="Send a message to this character!"
+ mr={1} />
+ )
+ :
+ }
+
+ );
+};
+
+// / The ERP Preference
+const ERPPref = (props, context) => {
+ const { act, data } = useBackend(context);
+ const { erppref } = data;
+
+ return (
+
+ {erppref}
+
+ );
+};
+
+// / The Vore Preference
+const VorePref = (props, context) => {
+ const { act, data } = useBackend(context);
+ const { vorepref } = data;
+
+ return (
+
+ {vorepref}
+
+ );
+};
+
+// / The Kiss Preference
+const KissPref = (props, context) => {
+ const { act, data } = useBackend(context);
+ const { kisspref } = data;
+
+ return (
+
+ {kisspref}
+
+ );
+};
+
+// / The F-list link
+const FlistLink = (props, context) => {
+ const { act, data } = useBackend(context);
+ const {
+ flink,
+ their_quid,
+ viewer_quid,
+ } = data;
+
+ return (
+ flink && (
+ act("view_flist", {
+ their_quid: their_quid,
+ viewer_quid: viewer_quid,
+ })}
+ content="F-List"
+ color="transparent"
+ icon="link"
+ tooltip="View this character's F-List (if any)!"
+ tooltipPosition="bottom"
+ disabled={!flink}
+ mr={1} />
+ )
+ );
+};
+
+// / Sanitizes and marks up text
+const Text2HTML = (text) => {
+ // Default values
+ let coolTags = [
+ 'b',
+ 'br',
+ 'center',
+ 'code',
+ 'div',
+ 'font',
+ 'hr',
+ 'i',
+ 'li',
+ 'menu',
+ 'ol',
+ 'p',
+ 'pre',
+ 'table',
+ 'td',
+ 'th',
+ 'tr',
+ 'u',
+ 'ul',
+ ];
+ let uncoolAttr = ['class', 'style'];
+
+ const sanitizedText = sanitizeText(text, coolTags, uncoolAttr);
+ const formattedText = marked(sanitizedText, { smartypants: true, gfm: true, tables: true, sanitize: false, breaks: true, smartLists: true });
+ return { __html: formattedText };
+};
diff --git a/tgui/packages/tgui/styles/components/Section.scss b/tgui/packages/tgui/styles/components/Section.scss
index 662d13cfdf8..65b7d2607c2 100644
--- a/tgui/packages/tgui/styles/components/Section.scss
+++ b/tgui/packages/tgui/styles/components/Section.scss
@@ -36,6 +36,12 @@ $separator-color: colors.$primary !default;
color: $title-text-color;
}
+.Section__titleText_small {
+ font-size: base.em(12px);
+ font-weight: bold;
+ color: $title-text-color;
+}
+
.Section__buttons {
position: absolute;
display: inline-block;