Skip to content

Commit

Permalink
re-fix conflicts
Browse files Browse the repository at this point in the history
correcting mistakes in the merging process
  • Loading branch information
Doubleumc committed Jul 24, 2024
1 parent 44f48af commit dd97261
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 34 deletions.
2 changes: 1 addition & 1 deletion tgui/packages/tgui/interfaces/DemoSim.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Button, Section, ProgressBar, NoticeBox, Box, Stack } from '../componen
import { Window } from '../layouts';

export const DemoSim = () => {
const { act, data } = useBackend<DemoSimData>();
const { act, data } = useBackend();

const timeLeft = data.nextdetonationtime - data.worldtime;
const timeLeftPct = timeLeft / data.detonation_cooldown;
Expand Down
2 changes: 1 addition & 1 deletion tgui/packages/tgui/interfaces/GameMaster.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ export const GameMasterObjectivePanel = (props, context) => {
{data.game_master_objectives.map((val) => {
if (val) {
return (
<Stack.Item>
<Stack.Item key={val.object_name}>
<Divider />
<Stack>
<Stack.Item align="center">
Expand Down
2 changes: 1 addition & 1 deletion tgui/packages/tgui/interfaces/GameMasterRappelMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export const GameMasterRappelPanel = (props, context) => {
{data.game_master_rappels.map((val) => {
if (val) {
return (
<Stack.Item>
<Stack.Item key={val.rappel_name}>
<Divider />
<Stack>
<Stack.Item align="center">
Expand Down
9 changes: 1 addition & 8 deletions tgui/packages/tgui/interfaces/ListInputModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,7 @@ type ListInputData = {

export const ListInputModal = (props) => {
const { act, data } = useBackend<ListInputData>();
const {
items = [],
message = '',
init_value,
large_buttons,
timeout,
title,
} = data;
const { items = [], message = '', init_value, timeout, title, theme } = data;
const [selected, setSelected] = useLocalState<number>(
'selected',
items.indexOf(init_value)
Expand Down
4 changes: 2 additions & 2 deletions tgui/packages/tgui/interfaces/ResinPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ interface StructureEntry {
id: string;
}

export const ResinPanel = (props, context) => {
const { act, data } = useBackend<ResinPanelData>(context);
export const ResinPanel = () => {
const { act, data } = useBackend<ResinPanelData>();
const {
structure_list,
hives_list,
Expand Down
41 changes: 20 additions & 21 deletions tgui/packages/tgui/interfaces/SoundPanel.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useBackend, useLocalState } from 'tgui/backend';
import { Box, Button, Dropdown, Input, Section, Slider, Stack, Tabs } from 'tgui/components';
import { Window } from 'tgui/layouts';
import { Component, Fragment } from 'inferno';
import { Component } from 'react';
import { debounce } from 'common/timer';

interface SoundPanelData {
Expand All @@ -22,8 +22,8 @@ interface SoundPanelData {
target_group: string;
}

export const SoundPanel = (props, context) => {
const { act, data } = useBackend<SoundPanelData>(context);
export const SoundPanel = () => {
const { act, data } = useBackend<SoundPanelData>();
const { sound_list, sound_path } = data;

const PAGES = [
Expand All @@ -45,7 +45,6 @@ export const SoundPanel = (props, context) => {
},
];
const [tabIndex, setTabIndex] = useLocalState<number>(
context,
'tabIndex',
PAGES.findIndex((page) => page.title === 'Local')
);
Expand Down Expand Up @@ -96,9 +95,9 @@ export const SoundPanel = (props, context) => {
};

interface ListSearchBoxProps {
items: string[];
selection: string;
onSelection: (value: string) => void;
readonly items: string[];
readonly selection: string;
readonly onSelection: (value: string) => void;
}

interface ListSearchBoxState {
Expand Down Expand Up @@ -158,7 +157,7 @@ class ListSearchBox extends Component<ListSearchBoxProps, ListSearchBoxState> {

render() {
return (
<Fragment>
<>
<Stack.Item grow>
<Section fill scrollable title="File">
{this.parsedItems
Expand All @@ -181,7 +180,7 @@ class ListSearchBox extends Component<ListSearchBoxProps, ListSearchBoxState> {
animation: 'none',
transition: 'none',
}}>
<div
<Box
style={{
'font-size': '0.75rem',
opacity: 0.5,
Expand All @@ -190,7 +189,7 @@ class ListSearchBox extends Component<ListSearchBoxProps, ListSearchBoxState> {
top: 0,
}}>
{item.dirName}
</div>
</Box>
</Button>
);
})}
Expand All @@ -204,13 +203,13 @@ class ListSearchBox extends Component<ListSearchBoxProps, ListSearchBoxState> {
value={this.state.query}
/>
</Stack.Item>
</Fragment>
</>
);
}
}

const SoundOptions = (props, context) => {
const { act, data } = useBackend<SoundPanelData>(context);
const SoundOptions = () => {
const { act, data } = useBackend<SoundPanelData>();
const {
category_list,
sound_path,
Expand Down Expand Up @@ -313,8 +312,8 @@ const SoundOptions = (props, context) => {
);
};

const ClientPage = (props, context) => {
const { act, data } = useBackend<SoundPanelData>(context);
const ClientPage = () => {
const { act, data } = useBackend<SoundPanelData>();
const { target_player_desc, sound_path } = data;

return (
Expand All @@ -337,8 +336,8 @@ const ClientPage = (props, context) => {
);
};

const LocalPage = (props, context) => {
const { act, data } = useBackend<SoundPanelData>(context);
const LocalPage = () => {
const { act, data } = useBackend<SoundPanelData>();
const { target_loc_desc, sound_path, loc_click_intercept, loc_click_play } =
data;

Expand Down Expand Up @@ -377,8 +376,8 @@ const LocalPage = (props, context) => {
);
};

const ZLevelPage = (props, context) => {
const { act, data } = useBackend<SoundPanelData>(context);
const ZLevelPage = () => {
const { act, data } = useBackend<SoundPanelData>();
const { zlevel_list, sound_path, target_zlevel } = data;

return (
Expand Down Expand Up @@ -407,8 +406,8 @@ const ZLevelPage = (props, context) => {
);
};

const ServerPage = (props, context) => {
const { act, data } = useBackend<SoundPanelData>(context);
const ServerPage = () => {
const { act, data } = useBackend<SoundPanelData>();
const { group_list, sound_path, target_group } = data;

return (
Expand Down

0 comments on commit dd97261

Please sign in to comment.