From eae67b06310e199ec86c659c0bd5119fe8f68322 Mon Sep 17 00:00:00 2001 From: Bloop <13398309+vinylspiders@users.noreply.github.com> Date: Sat, 9 Dec 2023 23:13:38 -0500 Subject: [PATCH] Replaces prettierx with the normal prettier (#80189) (#25538) * Replaces prettierx with the normal prettier (#80189) Oh god the file diff... I'm so, so sorry. No need to worry though. This just replaces the prettierx version that we were using and replaces it with normal prettier. Most of the settings were default or no longer valid with this version. You no longer get this warning #70484 It actually drives me up the wall and I have to click it each time I open my editor. N/A nothing player facing * Converts this to tsx * Update JobsPage.tsx * Update JobsPage.tsx * Update JobsPage.tsx --------- Co-authored-by: Jeremiah <42397676+jlsnow301@users.noreply.github.com> --- .vscode/settings.json | 6 +- tgui/.prettierrc.yml | 14 - tgui/.yarn/sdks/eslint/package.json | 5 +- tgui/.yarn/sdks/prettier/bin/prettier.cjs | 20 + .../sdks/prettier/{index.js => index.cjs} | 6 +- tgui/.yarn/sdks/prettier/package.json | 7 +- tgui/.yarn/sdks/typescript/lib/tsserver.js | 2 + .../sdks/typescript/lib/tsserverlibrary.js | 2 + tgui/.yarn/sdks/typescript/lib/typescript.js | 6 +- tgui/.yarn/sdks/typescript/package.json | 6 +- tgui/package.json | 4 +- tgui/packages/common/collections.ts | 12 +- tgui/packages/common/color.js | 6 +- tgui/packages/common/redux.test.ts | 11 +- tgui/packages/common/redux.ts | 18 +- tgui/packages/common/timer.ts | 6 +- tgui/packages/tgui-bench/lib/benchmark.d.ts | 2 +- .../tgui-bench/tests/DisposalUnit.test.tsx | 2 +- .../tgui-bench/tests/Tooltip.test.tsx | 2 +- tgui/packages/tgui-dev-server/dreamseeker.js | 2 +- tgui/packages/tgui-dev-server/link/retrace.js | 2 +- tgui/packages/tgui-dev-server/reloader.js | 6 +- tgui/packages/tgui-panel/Panel.jsx | 3 +- .../tgui-panel/audio/NowPlayingWidget.jsx | 11 +- .../tgui-panel/chat/ChatPageSettings.jsx | 30 +- tgui/packages/tgui-panel/chat/ChatPanel.jsx | 7 +- tgui/packages/tgui-panel/chat/ChatTabs.jsx | 8 +- tgui/packages/tgui-panel/chat/middleware.js | 24 +- tgui/packages/tgui-panel/chat/reducer.js | 11 +- tgui/packages/tgui-panel/chat/renderer.jsx | 30 +- .../tgui-panel/chat/replaceInTextNode.js | 2 +- tgui/packages/tgui-panel/index.jsx | 6 +- tgui/packages/tgui-panel/ping/reducer.js | 8 +- tgui/packages/tgui-panel/reconnect.tsx | 6 +- .../tgui-panel/settings/SettingsPanel.jsx | 58 +- tgui/packages/tgui-panel/settings/actions.js | 6 +- .../tgui-panel/settings/middleware.js | 8 +- tgui/packages/tgui-panel/settings/reducer.js | 13 +- tgui/packages/tgui-panel/styles/main.scss | 2 +- .../tgui-panel/styles/themes/light.scss | 2 +- tgui/packages/tgui-say/TguiSay.tsx | 3 +- tgui/packages/tgui-say/timers.ts | 4 +- tgui/packages/tgui/backend.ts | 12 +- tgui/packages/tgui/components/Blink.jsx | 3 +- .../tgui/components/BodyZoneSelector.tsx | 3 +- tgui/packages/tgui/components/Box.tsx | 2 +- tgui/packages/tgui/components/Button.jsx | 6 +- tgui/packages/tgui/components/Chart.tsx | 5 +- tgui/packages/tgui/components/Collapsible.jsx | 3 +- tgui/packages/tgui/components/ColorBox.jsx | 3 +- tgui/packages/tgui/components/Dialog.tsx | 3 +- .../tgui/components/DraggableControl.jsx | 4 +- tgui/packages/tgui/components/Dropdown.tsx | 9 +- tgui/packages/tgui/components/FitText.tsx | 11 +- tgui/packages/tgui/components/Icon.tsx | 3 +- .../tgui/components/InfinitePlane.jsx | 9 +- tgui/packages/tgui/components/Input.jsx | 3 +- tgui/packages/tgui/components/Knob.jsx | 19 +- .../tgui/components/LabeledControls.jsx | 6 +- tgui/packages/tgui/components/LabeledList.tsx | 12 +- tgui/packages/tgui/components/MenuBar.tsx | 18 +- tgui/packages/tgui/components/Modal.jsx | 3 +- tgui/packages/tgui/components/NumberInput.jsx | 11 +- tgui/packages/tgui/components/Popper.tsx | 11 +- .../tgui/components/RestrictedInput.jsx | 11 +- tgui/packages/tgui/components/RoundGauge.jsx | 11 +- tgui/packages/tgui/components/Section.tsx | 3 +- tgui/packages/tgui/components/Slider.jsx | 11 +- tgui/packages/tgui/components/Stack.tsx | 9 +- tgui/packages/tgui/components/Table.jsx | 3 +- tgui/packages/tgui/components/Tabs.tsx | 6 +- tgui/packages/tgui/components/TextArea.jsx | 6 +- tgui/packages/tgui/components/Tooltip.tsx | 2 +- tgui/packages/tgui/contants.test.ts | 7 +- tgui/packages/tgui/debug/KitchenSink.jsx | 3 +- tgui/packages/tgui/debug/middleware.js | 6 +- tgui/packages/tgui/drag.ts | 18 +- tgui/packages/tgui/events.test.ts | 8 +- tgui/packages/tgui/events.ts | 2 +- tgui/packages/tgui/format.test.ts | 8 +- tgui/packages/tgui/format.ts | 6 +- tgui/packages/tgui/http.ts | 2 +- .../tgui/interfaces/AbductorConsole.jsx | 12 +- .../tgui/interfaces/AccountingConsole.tsx | 18 +- .../packages/tgui/interfaces/Achievements.jsx | 16 +- tgui/packages/tgui/interfaces/AdminFax.jsx | 43 +- tgui/packages/tgui/interfaces/AdminPDA.jsx | 9 +- tgui/packages/tgui/interfaces/Adminhelp.tsx | 10 +- .../tgui/interfaces/AdventureBrowser.tsx | 5 +- tgui/packages/tgui/interfaces/AiAirlock.jsx | 27 +- tgui/packages/tgui/interfaces/AiRestorer.tsx | 12 +- tgui/packages/tgui/interfaces/AirAlarm.tsx | 47 +- tgui/packages/tgui/interfaces/AlertModal.tsx | 20 +- .../tgui/interfaces/AmmoWorkbench.jsx | 33 +- .../tgui/interfaces/AnomalyRefinery.jsx | 39 +- .../tgui/interfaces/AntagInfoAssaultops.tsx | 56 +- .../tgui/interfaces/AntagInfoBlob.tsx | 21 +- .../tgui/interfaces/AntagInfoChangeling.tsx | 31 +- .../tgui/interfaces/AntagInfoDemon.tsx | 3 +- .../tgui/interfaces/AntagInfoHeretic.tsx | 15 +- .../tgui/interfaces/AntagInfoMalf.tsx | 23 +- .../tgui/interfaces/AntagInfoNinja.tsx | 6 +- .../tgui/interfaces/AntagInfoTraitor.tsx | 6 +- .../tgui/interfaces/AntagInfoWizard.tsx | 6 +- tgui/packages/tgui/interfaces/Apc.jsx | 24 +- tgui/packages/tgui/interfaces/ApcControl.jsx | 22 +- .../tgui/interfaces/ApprenticeContract.tsx | 3 +- tgui/packages/tgui/interfaces/Aquarium.tsx | 9 +- .../tgui/interfaces/ArmamentStation.jsx | 23 +- .../tgui/interfaces/AtmosControlConsole.tsx | 20 +- .../tgui/interfaces/AtmosControlPanel.jsx | 9 +- tgui/packages/tgui/interfaces/AtmosFilter.tsx | 6 +- tgui/packages/tgui/interfaces/Autolathe.tsx | 47 +- .../tgui/interfaces/AutomatedAnnouncement.tsx | 12 +- .../tgui/interfaces/AuxBaseConsole.tsx | 18 +- tgui/packages/tgui/interfaces/AvatarHelp.tsx | 8 +- tgui/packages/tgui/interfaces/BankMachine.tsx | 11 +- .../tgui/interfaces/BasketballPanel.tsx | 12 +- .../packages/tgui/interfaces/Biogenerator.tsx | 40 +- .../tgui/interfaces/BlackMarketUplink.tsx | 16 +- .../tgui/interfaces/BluespaceArtillery.tsx | 4 +- .../interfaces/BluespaceArtillerySkyrat.tsx | 19 +- .../tgui/interfaces/BluespaceLocator.tsx | 9 +- .../tgui/interfaces/BluespaceSender.tsx | 14 +- .../tgui/interfaces/BluespaceVendor.tsx | 14 +- tgui/packages/tgui/interfaces/BorerChem.jsx | 3 +- .../tgui/interfaces/BorerEvolution.tsx | 2 +- tgui/packages/tgui/interfaces/BorgPanel.jsx | 6 +- tgui/packages/tgui/interfaces/BountyBoard.tsx | 20 +- tgui/packages/tgui/interfaces/BrigTimer.tsx | 3 +- tgui/packages/tgui/interfaces/CTFPanel.tsx | 3 +- .../tgui/interfaces/CameraConsole.tsx | 14 +- tgui/packages/tgui/interfaces/Canister.tsx | 34 +- tgui/packages/tgui/interfaces/Canvas.tsx | 12 +- tgui/packages/tgui/interfaces/Cargo.jsx | 55 +- .../packages/tgui/interfaces/CargoExpress.tsx | 14 +- .../tgui/interfaces/CargoHoldTerminal.tsx | 11 +- .../tgui/interfaces/CargoImportConsole.jsx | 20 +- .../tgui/interfaces/CellularEmporium.tsx | 37 +- .../tgui/interfaces/CentcomPodLauncher.jsx | 87 +- tgui/packages/tgui/interfaces/Changelog.jsx | 32 +- .../tgui/interfaces/CheckboxInput.tsx | 16 +- .../tgui/interfaces/ChemAcclimator.tsx | 3 +- .../tgui/interfaces/ChemDebugSynthesizer.tsx | 3 +- .../tgui/interfaces/ChemDispenser.tsx | 21 +- tgui/packages/tgui/interfaces/ChemFilter.tsx | 3 +- tgui/packages/tgui/interfaces/ChemHeater.jsx | 56 +- tgui/packages/tgui/interfaces/ChemMaster.tsx | 57 +- .../tgui/interfaces/ChemMixingChamber.tsx | 20 +- tgui/packages/tgui/interfaces/ChemPress.jsx | 15 +- tgui/packages/tgui/interfaces/ChemPress.tsx | 14 +- .../tgui/interfaces/ChemReactionChamber.tsx | 42 +- .../tgui/interfaces/ChemRecipeDebug.jsx | 56 +- .../tgui/interfaces/ChemSeparator.tsx | 27 +- .../tgui/interfaces/CircuitAdminPanel.tsx | 3 +- .../tgui/interfaces/CircuitSignalHandler.tsx | 2 +- .../tgui/interfaces/CivCargoHoldTerminal.jsx | 21 +- tgui/packages/tgui/interfaces/Clipboard.tsx | 18 +- .../tgui/interfaces/ClockworkResearch.tsx | 7 +- .../tgui/interfaces/ClockworkSlab.jsx | 25 +- .../tgui/interfaces/ColorBlindTester.tsx | 6 +- .../tgui/interfaces/ColorMatrixEditor.tsx | 9 +- .../tgui/interfaces/CommandReport.tsx | 21 +- .../tgui/interfaces/CommandReportConsole.jsx | 12 +- .../tgui/interfaces/CommunicationsConsole.jsx | 43 +- .../tgui/interfaces/ComponentPrinter.tsx | 13 +- tgui/packages/tgui/interfaces/CrewConsole.jsx | 2 +- .../tgui/interfaces/CrewConsoleSkyrat.jsx | 2 +- .../CrewConsoleSkyratBlueshield.jsx | 4 +- .../packages/tgui/interfaces/CrewManifest.jsx | 12 +- .../tgui/interfaces/CrossingSignal.tsx | 6 +- tgui/packages/tgui/interfaces/Cryo.jsx | 20 +- .../packages/tgui/interfaces/Crystallizer.tsx | 15 +- .../tgui/interfaces/CyborgBootDebug.jsx | 18 +- .../packages/tgui/interfaces/DecalPainter.tsx | 16 +- .../tgui/interfaces/DelamProcedure.tsx | 3 +- .../tgui/interfaces/DepartmentOrders.tsx | 24 +- .../tgui/interfaces/DestinationTagger.tsx | 6 +- .../tgui/interfaces/DestructiveAnalyzer.tsx | 3 +- .../DnaConsole/DnaConsoleEnzymes.jsx | 28 +- .../DnaConsole/DnaConsoleSequencer.jsx | 23 +- .../DnaConsole/DnaConsoleStorage.jsx | 33 +- .../tgui/interfaces/DnaConsole/DnaScanner.jsx | 26 +- .../interfaces/DnaConsole/MutationInfo.jsx | 28 +- .../tgui/interfaces/DnaConsole/index.jsx | 21 +- tgui/packages/tgui/interfaces/DnaVault.jsx | 9 +- .../packages/tgui/interfaces/DopplerArray.jsx | 27 +- .../packages/tgui/interfaces/Electrolyzer.tsx | 3 +- tgui/packages/tgui/interfaces/Electropack.jsx | 6 +- .../tgui/interfaces/ElevatorPanel.tsx | 22 +- .../interfaces/EmergencyShuttleConsole.jsx | 9 +- tgui/packages/tgui/interfaces/EmotePanel.tsx | 41 +- .../tgui/interfaces/EngravedMessage.jsx | 3 +- tgui/packages/tgui/interfaces/EventPanel.jsx | 9 +- .../packages/tgui/interfaces/ExaminePanel.jsx | 16 +- .../tgui/interfaces/ExodroneConsole.tsx | 65 +- .../tgui/interfaces/ExoscannerConsole.tsx | 28 +- .../tgui/interfaces/ExosuitControlConsole.jsx | 21 +- .../tgui/interfaces/ExosuitFabricator.tsx | 34 +- .../tgui/interfaces/ExperimentConfigure.jsx | 33 +- .../interfaces/Fabrication/DesignBrowser.tsx | 67 +- .../Fabrication/MaterialAccessBar.tsx | 33 +- .../Fabrication/MaterialCostSequence.tsx | 7 +- .../interfaces/Fabrication/MaterialIcon.tsx | 20 +- tgui/packages/tgui/interfaces/Fabricator.tsx | 34 +- tgui/packages/tgui/interfaces/Fax.tsx | 61 +- .../tgui/interfaces/FilingCabinet.tsx | 3 +- tgui/packages/tgui/interfaces/Filteriffic.jsx | 21 +- tgui/packages/tgui/interfaces/FishCatalog.tsx | 10 +- .../tgui/interfaces/FishingCalculator.tsx | 15 +- tgui/packages/tgui/interfaces/FishingRod.tsx | 3 +- tgui/packages/tgui/interfaces/Folder.tsx | 6 +- tgui/packages/tgui/interfaces/ForceEvent.tsx | 11 +- tgui/packages/tgui/interfaces/GasAnalyzer.tsx | 5 +- tgui/packages/tgui/interfaces/Gateway.jsx | 15 +- .../tgui/interfaces/GhostPoolProtection.jsx | 6 +- .../packages/tgui/interfaces/GlassBlowing.tsx | 17 +- tgui/packages/tgui/interfaces/Gps.jsx | 15 +- .../tgui/interfaces/GravityGenerator.jsx | 9 +- .../tgui/interfaces/GreyscaleModifyMenu.tsx | 17 +- .../interfaces/GulagTeleporterConsole.jsx | 9 +- .../interfaces/HighLuminosityEyesMenu.tsx | 12 +- tgui/packages/tgui/interfaces/HoloPay.tsx | 23 +- tgui/packages/tgui/interfaces/Holodeck.jsx | 3 +- tgui/packages/tgui/interfaces/Holopad.jsx | 20 +- tgui/packages/tgui/interfaces/HotkeysHelp.tsx | 10 +- .../tgui/interfaces/Hypertorus/Controls.tsx | 24 +- .../tgui/interfaces/Hypertorus/Gases.tsx | 18 +- .../tgui/interfaces/Hypertorus/Recipes.tsx | 10 +- .../interfaces/Hypertorus/Temperatures.tsx | 8 +- .../tgui/interfaces/Hypertorus/index.tsx | 3 +- tgui/packages/tgui/interfaces/HypnoChair.jsx | 3 +- tgui/packages/tgui/interfaces/IVDrip.tsx | 29 +- .../packages/tgui/interfaces/ImplantChair.jsx | 3 +- tgui/packages/tgui/interfaces/InfuserBook.tsx | 11 +- .../IntegratedCircuit/ComponentMenu.jsx | 19 +- .../IntegratedCircuit/DisplayComponent.jsx | 6 +- .../IntegratedCircuit/DisplayName.jsx | 11 +- .../IntegratedCircuit/FundamentalTypes.jsx | 22 +- .../IntegratedCircuit/ObjectComponent.jsx | 9 +- .../interfaces/IntegratedCircuit/Port.jsx | 6 +- .../IntegratedCircuit/VariableMenu.jsx | 37 +- .../interfaces/IntegratedCircuit/index.jsx | 25 +- tgui/packages/tgui/interfaces/Intellicard.jsx | 11 +- .../tgui/interfaces/InteractionMenu.tsx | 16 +- tgui/packages/tgui/interfaces/Interview.jsx | 14 +- .../tgui/interfaces/InterviewManager.jsx | 4 +- .../packages/tgui/interfaces/JobSelection.tsx | 47 +- tgui/packages/tgui/interfaces/Jukebox.jsx | 13 +- .../tgui/interfaces/LaborClaimConsole.jsx | 3 +- .../packages/tgui/interfaces/LanguageMenu.jsx | 9 +- .../tgui/interfaces/LaunchpadConsole.jsx | 15 +- .../tgui/interfaces/LaunchpadRemote.tsx | 3 +- tgui/packages/tgui/interfaces/Lawpanel.tsx | 38 +- .../packages/tgui/interfaces/LibraryAdmin.tsx | 39 +- .../tgui/interfaces/LibraryConsole.jsx | 49 +- .../tgui/interfaces/LibraryScanner.jsx | 9 +- .../tgui/interfaces/LibraryVisitor.jsx | 17 +- .../tgui/interfaces/LightController.tsx | 13 +- tgui/packages/tgui/interfaces/LightSpawn.tsx | 14 +- tgui/packages/tgui/interfaces/Limbgrower.jsx | 19 +- .../tgui/interfaces/ListInputModal.tsx | 32 +- .../tgui/interfaces/LoadoutManager.jsx | 10 +- tgui/packages/tgui/interfaces/LogViewer.tsx | 22 +- .../tgui/interfaces/LuaEditor/CallModal.jsx | 12 +- .../interfaces/LuaEditor/ChunkViewModal.jsx | 9 +- .../tgui/interfaces/LuaEditor/ListMapper.jsx | 16 +- .../tgui/interfaces/LuaEditor/Log.jsx | 8 +- .../interfaces/LuaEditor/StateSelectModal.jsx | 12 +- .../tgui/interfaces/LuaEditor/TaskManager.jsx | 9 +- .../tgui/interfaces/LuaEditor/index.jsx | 56 +- tgui/packages/tgui/interfaces/MODpaint.jsx | 13 +- tgui/packages/tgui/interfaces/MODsuit.tsx | 102 +- tgui/packages/tgui/interfaces/MafiaPanel.tsx | 43 +- .../tgui/interfaces/MassDriverControl.jsx | 9 +- tgui/packages/tgui/interfaces/MassSpec.jsx | 46 +- tgui/packages/tgui/interfaces/MatMarket.tsx | 9 +- .../tgui/interfaces/MechBayPowerConsole.jsx | 15 +- .../tgui/interfaces/Mecha/AlertPane.tsx | 36 +- .../tgui/interfaces/Mecha/ModulesPane.tsx | 84 +- tgui/packages/tgui/interfaces/Mecha/index.tsx | 29 +- .../tgui/interfaces/MechpadConsole.jsx | 13 +- .../packages/tgui/interfaces/MedicalKiosk.jsx | 12 +- .../interfaces/MedicalRecords/NoteKeeper.tsx | 23 +- .../interfaces/MedicalRecords/RecordTabs.tsx | 17 +- .../interfaces/MedicalRecords/RecordView.tsx | 34 +- .../tgui/interfaces/MedicalRecords/helpers.ts | 4 +- .../tgui/interfaces/MedicalRecords/index.tsx | 3 +- .../tgui/interfaces/MessageMonitor.tsx | 20 +- .../tgui/interfaces/MicrofusionGunControl.jsx | 67 +- tgui/packages/tgui/interfaces/Microscope.jsx | 6 +- .../tgui/interfaces/MilkingMachine.jsx | 42 +- .../tgui/interfaces/ModularShieldGen.tsx | 42 +- tgui/packages/tgui/interfaces/Mule.jsx | 19 +- tgui/packages/tgui/interfaces/NavBeacon.tsx | 9 +- .../tgui/interfaces/NetpodOutfits.tsx | 23 +- tgui/packages/tgui/interfaces/Newscaster.jsx | 46 +- tgui/packages/tgui/interfaces/NifPanel.jsx | 65 +- tgui/packages/tgui/interfaces/NifSoulPoem.jsx | 17 +- tgui/packages/tgui/interfaces/NoticeBoard.tsx | 3 +- tgui/packages/tgui/interfaces/NtnetRelay.tsx | 14 +- tgui/packages/tgui/interfaces/NtosArcade.jsx | 22 +- tgui/packages/tgui/interfaces/NtosCard.jsx | 16 +- .../tgui/interfaces/NtosCrewManifest.jsx | 3 +- .../interfaces/NtosCyborgRemoteMonitor.jsx | 29 +- .../tgui/interfaces/NtosEmojipedia.jsx | 10 +- .../tgui/interfaces/NtosGasAnalyzer.tsx | 3 +- tgui/packages/tgui/interfaces/NtosMain.jsx | 22 +- .../interfaces/NtosMessenger/ChatScreen.tsx | 30 +- .../tgui/interfaces/NtosMessenger/index.tsx | 26 +- tgui/packages/tgui/interfaces/NtosNetChat.jsx | 13 +- ...etDownloader.jsx => NtosNetDownloader.tsx} | 113 +- .../tgui/interfaces/NtosNetMonitor.jsx | 20 +- .../tgui/interfaces/NtosNewsArchive.jsx | 3 +- .../tgui/interfaces/NtosNifsoftCatalog.jsx | 26 +- tgui/packages/tgui/interfaces/NtosNotepad.tsx | 51 +- tgui/packages/tgui/interfaces/NtosPay.tsx | 22 +- .../tgui/interfaces/NtosPortraitPrinter.jsx | 3 +- tgui/packages/tgui/interfaces/NtosRadar.tsx | 9 +- tgui/packages/tgui/interfaces/NtosRecords.jsx | 10 +- .../tgui/interfaces/NtosRoboControl.jsx | 23 +- .../packages/tgui/interfaces/NtosRobotact.jsx | 54 +- .../packages/tgui/interfaces/NtosScipaper.jsx | 53 +- .../packages/tgui/interfaces/NtosShipping.tsx | 3 +- .../tgui/interfaces/NtosSkillTracker.jsx | 18 +- .../tgui/interfaces/NtosSupermatter.tsx | 5 +- .../tgui/interfaces/NtosThemeConfigure.tsx | 3 +- .../tgui/interfaces/NumberInputModal.tsx | 3 +- .../tgui/interfaces/OperatingComputer.jsx | 16 +- .../tgui/interfaces/OpposingForcePanel.jsx | 71 +- .../tgui/interfaces/Orbit/constants.ts | 6 +- .../packages/tgui/interfaces/Orbit/helpers.ts | 10 +- tgui/packages/tgui/interfaces/Orbit/index.tsx | 33 +- tgui/packages/tgui/interfaces/OreBox.tsx | 3 +- .../tgui/interfaces/OreRedemptionMachine.jsx | 21 +- tgui/packages/tgui/interfaces/OrionGame.jsx | 15 +- .../packages/tgui/interfaces/OutfitEditor.jsx | 16 +- .../tgui/interfaces/OutfitManager.jsx | 10 +- tgui/packages/tgui/interfaces/PaiCard.tsx | 31 +- .../interfaces/PaiInterface/Available.tsx | 16 +- .../interfaces/PaiInterface/Installed.tsx | 30 +- .../tgui/interfaces/PaiInterface/System.tsx | 9 +- .../tgui/interfaces/PaiInterface/constants.ts | 22 +- .../tgui/interfaces/PaiInterface/index.tsx | 12 +- tgui/packages/tgui/interfaces/PaiSubmit.tsx | 9 +- .../tgui/interfaces/PaintingAdminPanel.tsx | 9 +- .../tgui/interfaces/PaintingMachine.jsx | 12 +- .../tgui/interfaces/Pandemic/Beaker.tsx | 49 +- .../tgui/interfaces/Pandemic/Specimen.tsx | 3 +- .../tgui/interfaces/Pandemic/Symptom.tsx | 9 +- .../tgui/interfaces/Pandemic/Virus.tsx | 12 +- tgui/packages/tgui/interfaces/PaperSheet.tsx | 46 +- .../tgui/interfaces/ParticleAccelerator.jsx | 3 +- .../interfaces/ParticleEdit/EntriesBasic.tsx | 46 +- .../ParticleEdit/EntriesGenerators.tsx | 30 +- .../interfaces/ParticleEdit/Generators.tsx | 10 +- .../tgui/interfaces/ParticleEdit/Tutorial.tsx | 83 +- .../tgui/interfaces/ParticleEdit/data.ts | 16 +- .../tgui/interfaces/ParticleEdit/helpers.ts | 6 +- .../tgui/interfaces/ParticleEdit/index.tsx | 18 +- .../tgui/interfaces/PersonalCrafting.tsx | 151 ++- tgui/packages/tgui/interfaces/Photocopier.jsx | 33 +- .../tgui/interfaces/PipeDispenser.tsx | 12 +- .../tgui/interfaces/PlaneMasterDebug.tsx | 109 +- .../tgui/interfaces/PlayerTicketHistory.tsx | 36 +- .../tgui/interfaces/PortableChemMixer.tsx | 8 +- .../tgui/interfaces/PortableGenerator.jsx | 15 +- .../packages/tgui/interfaces/PortablePump.jsx | 3 +- .../tgui/interfaces/PortableTurret.jsx | 6 +- .../tgui/interfaces/PortraitPicker.jsx | 3 +- .../packages/tgui/interfaces/PowerMonitor.jsx | 23 +- .../interfaces/PreferencesMenu/AntagsPage.tsx | 50 +- .../CharacterPreferenceWindow.tsx | 31 +- .../PreferencesMenu/GamePreferenceWindow.tsx | 8 +- .../PreferencesMenu/GamePreferencesPage.tsx | 11 +- .../interfaces/PreferencesMenu/JobsPage.tsx | 34 +- .../PreferencesMenu/KeybindingsPage.tsx | 64 +- .../PreferencesMenu/LanguagesMenu.tsx | 9 +- .../interfaces/PreferencesMenu/LimbsPage.tsx | 27 +- .../interfaces/PreferencesMenu/MainPage.tsx | 78 +- .../interfaces/PreferencesMenu/PageButton.tsx | 3 +- .../interfaces/PreferencesMenu/QuirksPage.tsx | 48 +- .../ServerPreferencesFetcher.tsx | 2 +- .../PreferencesMenu/SpeciesPage.tsx | 44 +- .../interfaces/PreferencesMenu/TabbedMenu.tsx | 9 +- .../tgui/interfaces/PreferencesMenu/index.tsx | 6 +- .../tgui/interfaces/PreferencesMenu/names.tsx | 35 +- .../preferences/features/base.tsx | 66 +- .../features/character_preferences/pda.tsx | 7 +- .../character_preferences/skin_tone.tsx | 13 +- .../skyrat/brain_type.tsx | 1 + .../skyrat/character_laugh.tsx | 1 + .../skyrat/character_scream.tsx | 1 + .../skyrat/death_degradation.tsx | 1 + .../character_preferences/skyrat/genitals.tsx | 29 +- .../character_preferences/skyrat/headshot.tsx | 1 + .../skyrat/loadout_override_preference.tsx | 1 + .../skyrat/pet_owner.tsx | 1 + .../skyrat/playtime_restricted.tsx | 1 + .../skyrat/species_features.tsx | 69 +- .../character_preferences/tts_voice.tsx | 11 +- .../features/game_preferences/admin.tsx | 8 +- .../features/game_preferences/ghost.tsx | 13 +- .../features/game_preferences/runechat.tsx | 7 +- .../features/game_preferences/screentips.tsx | 9 +- .../game_preferences/skyrat/auto_dementor.tsx | 1 + .../game_preferences/skyrat/be_antag.tsx | 1 + .../game_preferences/skyrat/delete_sparks.tsx | 1 + .../game_preferences/skyrat/emote_overlay.tsx | 1 + .../game_preferences/skyrat/emote_panel.tsx | 1 + .../skyrat/erp_preferences.tsx | 8 +- .../skyrat/face_cursor_combat_mode.tsx | 1 + .../game_preferences/skyrat/ghost.tsx | 1 + .../features/game_preferences/skyrat/looc.tsx | 1 + .../skyrat/out_of_combat_fov_darkness.tsx | 1 + .../game_preferences/skyrat/ticket_ping.tsx | 1 + .../features/game_preferences/sounds.tsx | 9 +- .../features/game_preferences/tooltips.tsx | 7 +- .../features/game_preferences/ui_style.tsx | 13 +- .../preferences/features/randomization.tsx | 3 +- .../preferences/features/species_features.tsx | 23 +- .../tgui/interfaces/ProbingConsole.jsx | 6 +- .../packages/tgui/interfaces/ProcCallMenu.tsx | 9 +- .../tgui/interfaces/ProduceConsole.tsx | 22 +- .../tgui/interfaces/ProximitySensor.jsx | 3 +- tgui/packages/tgui/interfaces/Puzzgrid.tsx | 23 +- .../tgui/interfaces/QuantumConsole.tsx | 30 +- tgui/packages/tgui/interfaces/Radio.jsx | 2 +- .../tgui/interfaces/RadioactiveMicrolaser.jsx | 3 +- .../interfaces/RapidConstructionDevice.tsx | 8 +- .../tgui/interfaces/RapidPipeDispenser.tsx | 37 +- .../tgui/interfaces/RapidPlumbingDevice.tsx | 8 +- .../tgui/interfaces/RapidTilingDevice.tsx | 11 +- tgui/packages/tgui/interfaces/Reagents.jsx | 96 +- .../tgui/interfaces/RecordManifest.jsx | 6 +- tgui/packages/tgui/interfaces/Reflector.tsx | 11 +- .../tgui/interfaces/ReligiousTool.jsx | 30 +- .../tgui/interfaces/RemoteRobotControl.jsx | 6 +- .../tgui/interfaces/RequestManager.jsx | 35 +- .../RequestsConsole/MessageViewTab.tsx | 19 +- .../RequestsConsole/MessageWriteTab.tsx | 13 +- .../RequestsConsoleMainScreen.tsx | 9 +- .../interfaces/RoboticsControlConsole.jsx | 27 +- tgui/packages/tgui/interfaces/Roulette.jsx | 18 +- tgui/packages/tgui/interfaces/Safe.jsx | 8 +- tgui/packages/tgui/interfaces/ScannerGate.jsx | 3 +- tgui/packages/tgui/interfaces/Secrets.jsx | 49 +- .../SecurityRecords/CrimeWatcher.tsx | 33 +- .../SecurityRecords/RecordPrint.tsx | 20 +- .../interfaces/SecurityRecords/RecordTabs.tsx | 17 +- .../interfaces/SecurityRecords/RecordView.tsx | 23 +- .../interfaces/SecurityRecords/helpers.ts | 6 +- .../tgui/interfaces/SecurityRecords/index.tsx | 3 +- .../tgui/interfaces/SeedExtractor.tsx | 108 +- .../tgui/interfaces/SelectEquipment.jsx | 18 +- .../tgui/interfaces/SentienceFunBalloon.jsx | 9 +- .../tgui/interfaces/ServerControl.tsx | 3 +- .../tgui/interfaces/ServerControlPanel.jsx | 3 +- .../tgui/interfaces/ServerMonitor.jsx | 18 +- .../tgui/interfaces/ShuttleConsole.jsx | 30 +- .../tgui/interfaces/ShuttleManipulator.jsx | 14 +- tgui/packages/tgui/interfaces/Signalvib.jsx | 6 +- tgui/packages/tgui/interfaces/SimpleBot.tsx | 57 +- .../packages/tgui/interfaces/SkillStation.jsx | 29 +- tgui/packages/tgui/interfaces/Sleeper.jsx | 9 +- .../tgui/interfaces/SlimeBodySwapper.jsx | 3 +- tgui/packages/tgui/interfaces/SmartVend.tsx | 6 +- tgui/packages/tgui/interfaces/Smes.jsx | 22 +- .../packages/tgui/interfaces/SmokeMachine.tsx | 18 +- .../packages/tgui/interfaces/SolarControl.tsx | 31 +- tgui/packages/tgui/interfaces/Soulcatcher.jsx | 93 +- .../tgui/interfaces/SoulcatcherUser.jsx | 14 +- tgui/packages/tgui/interfaces/SpaceHeater.jsx | 18 +- .../tgui/interfaces/SparringContract.tsx | 42 +- .../packages/tgui/interfaces/SpawnersMenu.tsx | 3 +- tgui/packages/tgui/interfaces/Spellbook.tsx | 27 +- .../tgui/interfaces/StackCrafting.tsx | 21 +- .../tgui/interfaces/StackingConsole.jsx | 9 +- .../tgui/interfaces/StationAlertConsole.jsx | 14 +- .../tgui/interfaces/StationTraitsPanel.tsx | 30 +- .../packages/tgui/interfaces/StoryManager.tsx | 35 +- tgui/packages/tgui/interfaces/StripMenu.tsx | 15 +- tgui/packages/tgui/interfaces/Supermatter.tsx | 50 +- .../tgui/interfaces/SurgeryInitiator.tsx | 13 +- .../tgui/interfaces/SyndContractor.jsx | 85 +- tgui/packages/tgui/interfaces/Tank.jsx | 14 +- .../tgui/interfaces/TankCompressor.jsx | 56 +- .../tgui/interfaces/TankDispenser.jsx | 6 +- tgui/packages/tgui/interfaces/Techweb.jsx | 81 +- tgui/packages/tgui/interfaces/Telecomms.jsx | 39 +- .../tgui/interfaces/TelecommsMonitor.tsx | 16 +- tgui/packages/tgui/interfaces/Teleporter.jsx | 3 +- .../tgui/interfaces/TextInputModal.tsx | 3 +- .../tgui/interfaces/ThermoMachine.jsx | 11 +- tgui/packages/tgui/interfaces/Thermometer.jsx | 9 +- tgui/packages/tgui/interfaces/TimeClock.jsx | 3 +- tgui/packages/tgui/interfaces/Timer.tsx | 3 +- .../tgui/interfaces/TrackedPlaytime.jsx | 21 +- .../tgui/interfaces/TrainingMachine.tsx | 10 +- .../tgui/interfaces/TraitorObjectiveDebug.tsx | 64 +- tgui/packages/tgui/interfaces/TramControl.jsx | 5 +- .../tgui/interfaces/TramController.tsx | 68 +- tgui/packages/tgui/interfaces/TramPlaque.tsx | 8 +- .../tgui/interfaces/TransferValve.jsx | 3 +- .../tgui/interfaces/TrophyAdminPanel.jsx | 11 +- .../tgui/interfaces/TurbineComputer.tsx | 19 +- .../tgui/interfaces/Uplink/GenericUplink.tsx | 23 +- .../tgui/interfaces/Uplink/ObjectiveMenu.tsx | 62 +- .../Uplink/PrimaryObjectiveMenu.tsx | 3 +- .../Uplink/calculateDangerLevel.tsx | 8 +- .../packages/tgui/interfaces/Uplink/index.tsx | 43 +- .../tgui/interfaces/VaultController.tsx | 6 +- tgui/packages/tgui/interfaces/Vending.tsx | 38 +- tgui/packages/tgui/interfaces/VotePanel.tsx | 31 +- .../tgui/interfaces/WarrantConsole.tsx | 30 +- tgui/packages/tgui/interfaces/Wires.tsx | 12 +- .../tgui/interfaces/common/AccessConfig.jsx | 12 +- .../tgui/interfaces/common/AccessList.jsx | 21 +- .../tgui/interfaces/common/AtmosControls.tsx | 9 +- .../tgui/interfaces/common/AtmosHandbook.tsx | 45 +- .../tgui/interfaces/common/BeakerDisplay.tsx | 3 +- .../tgui/interfaces/common/Connections.tsx | 5 +- .../tgui/interfaces/common/EditableText.tsx | 5 +- .../tgui/interfaces/common/GasmixParser.tsx | 35 +- .../tgui/interfaces/common/InputButtons.tsx | 9 +- .../tgui/interfaces/common/JobToIcon.ts | 198 +-- .../tgui/interfaces/common/PortableAtmos.jsx | 14 +- .../tgui/interfaces/common/RecipeLookup.jsx | 25 +- .../common/StatusDisplayControls.tsx | 4 +- tgui/packages/tgui/layouts/Layout.jsx | 6 +- tgui/packages/tgui/layouts/Pane.jsx | 3 +- tgui/packages/tgui/layouts/Window.tsx | 16 +- tgui/packages/tgui/links.test.ts | 2 +- tgui/packages/tgui/renderer.ts | 2 +- tgui/packages/tgui/sanitize.ts | 2 +- tgui/packages/tgui/store.ts | 21 +- .../packages/tgui/stories/ByondUi.stories.jsx | 11 +- tgui/packages/tgui/stories/Flex.stories.jsx | 9 +- tgui/packages/tgui/stories/Input.stories.jsx | 15 +- .../tgui/stories/LabeledList.stories.jsx | 6 +- tgui/packages/tgui/stories/Popper.stories.jsx | 12 +- .../tgui/stories/ProgressBar.stories.jsx | 21 +- .../packages/tgui/stories/Storage.stories.jsx | 6 +- tgui/packages/tgui/stories/Tabs.stories.jsx | 6 +- .../tgui/styles/components/Button.scss | 12 +- .../tgui/styles/components/ProgressBar.scss | 4 +- .../tgui/styles/components/Tooltip.scss | 2 +- .../tgui/styles/interfaces/AlertModal.scss | 4 +- .../tgui/styles/interfaces/Fabricator.scss | 4 +- .../tgui/styles/interfaces/ListInput.scss | 4 +- .../tgui/styles/layouts/TitleBar.scss | 8 +- .../packages/tgui/styles/themes/abductor.scss | 4 +- tgui/packages/tgui/styles/themes/admin.scss | 16 +- .../tgui/styles/themes/cardtable.scss | 4 +- .../tgui/styles/themes/clockwork.scss | 16 +- .../tgui/styles/themes/hackerman.scss | 4 +- .../tgui/styles/themes/malfunction.scss | 4 +- tgui/packages/tgui/styles/themes/neutral.scss | 14 +- tgui/packages/tgui/styles/themes/ntOS95.scss | 20 +- tgui/packages/tgui/styles/themes/ntos.scss | 4 +- .../packages/tgui/styles/themes/ntos_cat.scss | 22 +- .../tgui/styles/themes/ntos_darkmode.scss | 10 +- .../tgui/styles/themes/ntos_lightmode.scss | 10 +- .../tgui/styles/themes/ntos_spooky.scss | 4 +- .../tgui/styles/themes/ntos_synth.scss | 18 +- .../tgui/styles/themes/ntos_terminal.scss | 18 +- tgui/packages/tgui/styles/themes/paper.scss | 4 +- tgui/packages/tgui/styles/themes/retro.scss | 6 +- .../tgui/styles/themes/spookyconsole.scss | 4 +- .../tgui/styles/themes/syndicate.scss | 4 +- tgui/packages/tgui/styles/themes/wizard.scss | 16 +- tgui/webpack.config.js | 2 +- tgui/yarn.lock | 1149 +---------------- 573 files changed, 7141 insertions(+), 4405 deletions(-) create mode 100644 tgui/.yarn/sdks/prettier/bin/prettier.cjs rename tgui/.yarn/sdks/prettier/{index.js => index.cjs} (68%) rename tgui/packages/tgui/interfaces/{NtosNetDownloader.jsx => NtosNetDownloader.tsx} (70%) diff --git a/.vscode/settings.json b/.vscode/settings.json index 07c9b0862fe..35e9fafdb33 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,15 +1,15 @@ { "eslint.nodePath": "./tgui/.yarn/sdks", "eslint.workingDirectories": ["./tgui"], - "prettier.prettierPath": "./tgui/.yarn/sdks/prettier/index.js", + "prettier.prettierPath": "./tgui/.yarn/sdks/prettier/index.cjs", "typescript.tsdk": "./tgui/.yarn/sdks/typescript/lib", - "typescript.enablePromptUseWorkspaceTsdk": true, + "typescript.enablePromptUseWorkspaceTsdk": true, "search.exclude": { "**/.yarn": true, "**/.pnp.*": true }, "editor.codeActionsOnSave": { - "source.fixAll.eslint": true + "source.fixAll.eslint": "explicit" }, "files.eol": "\n", "files.insertFinalNewline": true, diff --git a/tgui/.prettierrc.yml b/tgui/.prettierrc.yml index 1eebe6098b1..01769692264 100644 --- a/tgui/.prettierrc.yml +++ b/tgui/.prettierrc.yml @@ -1,15 +1 @@ -arrowParens: always -breakLongMethodChains: true -endOfLine: lf -importFormatting: oneline -jsxBracketSameLine: true -jsxSingleQuote: false -offsetTernaryExpressions: true -printWidth: 80 -proseWrap: preserve -quoteProps: preserve -semi: true singleQuote: true -tabWidth: 2 -trailingComma: es5 -useTabs: false diff --git a/tgui/.yarn/sdks/eslint/package.json b/tgui/.yarn/sdks/eslint/package.json index 744a7732103..b29322a1ffb 100644 --- a/tgui/.yarn/sdks/eslint/package.json +++ b/tgui/.yarn/sdks/eslint/package.json @@ -2,5 +2,8 @@ "name": "eslint", "version": "7.32.0-sdk", "main": "./lib/api.js", - "type": "commonjs" + "type": "commonjs", + "bin": { + "eslint": "./bin/eslint.js" + } } diff --git a/tgui/.yarn/sdks/prettier/bin/prettier.cjs b/tgui/.yarn/sdks/prettier/bin/prettier.cjs new file mode 100644 index 00000000000..5efad688e73 --- /dev/null +++ b/tgui/.yarn/sdks/prettier/bin/prettier.cjs @@ -0,0 +1,20 @@ +#!/usr/bin/env node + +const {existsSync} = require(`fs`); +const {createRequire} = require(`module`); +const {resolve} = require(`path`); + +const relPnpApiPath = "../../../../.pnp.cjs"; + +const absPnpApiPath = resolve(__dirname, relPnpApiPath); +const absRequire = createRequire(absPnpApiPath); + +if (existsSync(absPnpApiPath)) { + if (!process.versions.pnp) { + // Setup the environment to be able to require prettier/bin/prettier.cjs + require(absPnpApiPath).setup(); + } +} + +// Defer to the real prettier/bin/prettier.cjs your application uses +module.exports = absRequire(`prettier/bin/prettier.cjs`); diff --git a/tgui/.yarn/sdks/prettier/index.js b/tgui/.yarn/sdks/prettier/index.cjs similarity index 68% rename from tgui/.yarn/sdks/prettier/index.js rename to tgui/.yarn/sdks/prettier/index.cjs index 81f9bec5fe8..8758e367a72 100644 --- a/tgui/.yarn/sdks/prettier/index.js +++ b/tgui/.yarn/sdks/prettier/index.cjs @@ -11,10 +11,10 @@ const absRequire = createRequire(absPnpApiPath); if (existsSync(absPnpApiPath)) { if (!process.versions.pnp) { - // Setup the environment to be able to require prettier/index.js + // Setup the environment to be able to require prettier require(absPnpApiPath).setup(); } } -// Defer to the real prettier/index.js your application uses -module.exports = absRequire(`prettier/index.js`); +// Defer to the real prettier your application uses +module.exports = absRequire(`prettier`); diff --git a/tgui/.yarn/sdks/prettier/package.json b/tgui/.yarn/sdks/prettier/package.json index 0cbd71ff32d..c61f5117bac 100644 --- a/tgui/.yarn/sdks/prettier/package.json +++ b/tgui/.yarn/sdks/prettier/package.json @@ -1,6 +1,7 @@ { "name": "prettier", - "version": "0.19.0-sdk", - "main": "./index.js", - "type": "commonjs" + "version": "3.1.0-sdk", + "main": "./index.cjs", + "type": "commonjs", + "bin": "./bin/prettier.cjs" } diff --git a/tgui/.yarn/sdks/typescript/lib/tsserver.js b/tgui/.yarn/sdks/typescript/lib/tsserver.js index 0fb2ac10797..bbb1e46501b 100644 --- a/tgui/.yarn/sdks/typescript/lib/tsserver.js +++ b/tgui/.yarn/sdks/typescript/lib/tsserver.js @@ -109,6 +109,8 @@ const moduleWrapper = tsserver => { str = `zip:${str}`; } break; } + } else { + str = str.replace(/^\/?/, process.platform === `win32` ? `` : `/`); } } diff --git a/tgui/.yarn/sdks/typescript/lib/tsserverlibrary.js b/tgui/.yarn/sdks/typescript/lib/tsserverlibrary.js index e7033a81782..a68f028fe19 100644 --- a/tgui/.yarn/sdks/typescript/lib/tsserverlibrary.js +++ b/tgui/.yarn/sdks/typescript/lib/tsserverlibrary.js @@ -109,6 +109,8 @@ const moduleWrapper = tsserver => { str = `zip:${str}`; } break; } + } else { + str = str.replace(/^\/?/, process.platform === `win32` ? `` : `/`); } } diff --git a/tgui/.yarn/sdks/typescript/lib/typescript.js b/tgui/.yarn/sdks/typescript/lib/typescript.js index e14fa87beaa..b5f4db25bee 100644 --- a/tgui/.yarn/sdks/typescript/lib/typescript.js +++ b/tgui/.yarn/sdks/typescript/lib/typescript.js @@ -11,10 +11,10 @@ const absRequire = createRequire(absPnpApiPath); if (existsSync(absPnpApiPath)) { if (!process.versions.pnp) { - // Setup the environment to be able to require typescript/lib/typescript.js + // Setup the environment to be able to require typescript require(absPnpApiPath).setup(); } } -// Defer to the real typescript/lib/typescript.js your application uses -module.exports = absRequire(`typescript/lib/typescript.js`); +// Defer to the real typescript your application uses +module.exports = absRequire(`typescript`); diff --git a/tgui/.yarn/sdks/typescript/package.json b/tgui/.yarn/sdks/typescript/package.json index 6aac31b1840..656833d45b6 100644 --- a/tgui/.yarn/sdks/typescript/package.json +++ b/tgui/.yarn/sdks/typescript/package.json @@ -2,5 +2,9 @@ "name": "typescript", "version": "4.9.4-sdk", "main": "./lib/typescript.js", - "type": "commonjs" + "type": "commonjs", + "bin": { + "tsc": "./bin/tsc", + "tsserver": "./bin/tsserver" + } } diff --git a/tgui/package.json b/tgui/package.json index 9ae4f99dbca..7df2978a7f4 100644 --- a/tgui/package.json +++ b/tgui/package.json @@ -12,7 +12,7 @@ "tgui:build": "BROWSERSLIST_IGNORE_OLD_DATA=true webpack", "tgui:dev": "node --experimental-modules packages/tgui-dev-server/index.js", "tgui:lint": "eslint packages --ext .js,.cjs,.ts,.tsx", - "tgui:prettier": "prettierx --check .", + "tgui:prettier": "prettier --check .", "tgui:sonar": "eslint packages --ext .js,.cjs,.ts,.tsx -c .eslintrc-sonar.yml", "tgui:test": "jest --watch", "tgui:test-simple": "CI=true jest --color", @@ -50,7 +50,7 @@ "jest-environment-jsdom": "^29.7.0", "jsdom": "^22.1.0", "mini-css-extract-plugin": "^2.7.6", - "prettier": "npm:prettierx@0.19.0", + "prettier": "^3.1.0", "sass": "^1.69.5", "sass-loader": "^13.3.2", "style-loader": "^3.3.3", diff --git a/tgui/packages/common/collections.ts b/tgui/packages/common/collections.ts index a005da7aa16..5bfcee85884 100644 --- a/tgui/packages/common/collections.ts +++ b/tgui/packages/common/collections.ts @@ -32,12 +32,12 @@ export const filter = }; type MapFunction = { - (iterateeFn: (value: T, index: number, collection: T[]) => U): ( - collection: T[] - ) => U[]; + ( + iterateeFn: (value: T, index: number, collection: T[]) => U, + ): (collection: T[]) => U[]; ( - iterateeFn: (value: T, index: K, collection: Record) => U + iterateeFn: (value: T, index: K, collection: Record) => U, ): (collection: Record) => U[]; }; @@ -75,7 +75,7 @@ export const map: MapFunction = */ export const filterMap = ( collection: T[], - iterateeFn: (value: T) => U | undefined + iterateeFn: (value: T) => U | undefined, ): U[] => { const finalCollection: U[] = []; @@ -261,7 +261,7 @@ export const zipWith = const binarySearch = ( getKey: (value: T) => U, collection: readonly T[], - inserting: T + inserting: T, ): number => { if (collection.length === 0) { return 0; diff --git a/tgui/packages/common/color.js b/tgui/packages/common/color.js index b59d82247aa..59935931d82 100644 --- a/tgui/packages/common/color.js +++ b/tgui/packages/common/color.js @@ -30,7 +30,7 @@ export class Color { this.r - this.r * percent, this.g - this.g * percent, this.b - this.b * percent, - this.a + this.a, ); } @@ -48,7 +48,7 @@ Color.fromHex = (hex) => new Color( parseInt(hex.substr(1, 2), 16), parseInt(hex.substr(3, 2), 16), - parseInt(hex.substr(5, 2), 16) + parseInt(hex.substr(5, 2), 16), ); /** @@ -59,7 +59,7 @@ Color.lerp = (c1, c2, n) => (c2.r - c1.r) * n + c1.r, (c2.g - c1.g) * n + c1.g, (c2.b - c1.b) * n + c1.b, - (c2.a - c1.a) * n + c1.a + (c2.a - c1.a) * n + c1.a, ); /** diff --git a/tgui/packages/common/redux.test.ts b/tgui/packages/common/redux.test.ts index af4e5d4e73e..0a29a92e0ce 100644 --- a/tgui/packages/common/redux.test.ts +++ b/tgui/packages/common/redux.test.ts @@ -1,4 +1,11 @@ -import { Action, Reducer, applyMiddleware, combineReducers, createAction, createStore } from './redux'; +import { + Action, + Reducer, + applyMiddleware, + combineReducers, + createAction, + createStore, +} from './redux'; // Dummy Reducer const counterReducer: Reducer> = (state = 0, action) => { @@ -31,7 +38,7 @@ describe('Redux implementation tests', () => { test('createStore with applyMiddleware works', () => { const store = createStore( counterReducer, - applyMiddleware(loggingMiddleware) + applyMiddleware(loggingMiddleware), ); expect(store.getState()).toBe(0); }); diff --git a/tgui/packages/common/redux.ts b/tgui/packages/common/redux.ts index 7b4999d93b1..997cc1d2d68 100644 --- a/tgui/packages/common/redux.ts +++ b/tgui/packages/common/redux.ts @@ -6,7 +6,7 @@ export type Reducer = ( state: State | undefined, - action: ActionType + action: ActionType, ) => State; export type Store = { @@ -21,7 +21,7 @@ type MiddlewareAPI = { }; export type Middleware = ( - storeApi: MiddlewareAPI + storeApi: MiddlewareAPI, ) => (next: Dispatch) => Dispatch; export type Action = { @@ -33,7 +33,7 @@ export type AnyAction = Action & { }; export type Dispatch = ( - action: ActionType + action: ActionType, ) => void; type StoreEnhancer = (createStoreFunction: Function) => Function; @@ -48,7 +48,7 @@ type PreparedAction = { */ export const createStore = ( reducer: Reducer, - enhancer?: StoreEnhancer + enhancer?: StoreEnhancer, ): Store => { // Apply a store enhancer (applyMiddleware is one of them). if (enhancer) { @@ -90,14 +90,14 @@ export const applyMiddleware = ( ...middlewares: Middleware[] ): StoreEnhancer => { return ( - createStoreFunction: (reducer: Reducer, enhancer?: StoreEnhancer) => Store + createStoreFunction: (reducer: Reducer, enhancer?: StoreEnhancer) => Store, ) => { return (reducer, ...args): Store => { const store = createStoreFunction(reducer, ...args); let dispatch: Dispatch = () => { throw new Error( - 'Dispatching while constructing your middleware is not allowed.' + 'Dispatching while constructing your middleware is not allowed.', ); }; @@ -109,7 +109,7 @@ export const applyMiddleware = ( const chain = middlewares.map((middleware) => middleware(storeApi)); dispatch = chain.reduceRight( (next, middleware) => middleware(next), - store.dispatch + store.dispatch, ); return { @@ -129,7 +129,7 @@ export const applyMiddleware = ( * is also more flexible than the redux counterpart. */ export const combineReducers = ( - reducersObj: Record + reducersObj: Record, ): Reducer => { const keys = Object.keys(reducersObj); @@ -170,7 +170,7 @@ export const combineReducers = ( */ export const createAction = ( type: TAction, - prepare?: (...args: any[]) => PreparedAction + prepare?: (...args: any[]) => PreparedAction, ) => { const actionCreator = (...args: any[]) => { let action: Action & PreparedAction = { type }; diff --git a/tgui/packages/common/timer.ts b/tgui/packages/common/timer.ts index 49d36484200..1fc3e11fd30 100644 --- a/tgui/packages/common/timer.ts +++ b/tgui/packages/common/timer.ts @@ -13,7 +13,7 @@ export const debounce = any>( fn: F, time: number, - immediate = false + immediate = false, ): ((...args: Parameters) => void) => { let timeout: ReturnType | null; return (...args: Parameters) => { @@ -38,7 +38,7 @@ export const debounce = any>( */ export const throttle = any>( fn: F, - time: number + time: number, ): ((...args: Parameters) => void) => { let previouslyRun: number | null, queuedToRun: ReturnType | null; @@ -53,7 +53,7 @@ export const throttle = any>( } else { queuedToRun = setTimeout( () => invokeFn(...args), - time - (now - (previouslyRun ?? 0)) + time - (now - (previouslyRun ?? 0)), ); } }; diff --git a/tgui/packages/tgui-bench/lib/benchmark.d.ts b/tgui/packages/tgui-bench/lib/benchmark.d.ts index 7f3310005f7..3eac568d418 100644 --- a/tgui/packages/tgui-bench/lib/benchmark.d.ts +++ b/tgui/packages/tgui-bench/lib/benchmark.d.ts @@ -27,7 +27,7 @@ declare class Benchmark { static reduce( arr: T[], callback: (accumulator: K, value: T) => K, - thisArg?: any + thisArg?: any, ): K; static options: Benchmark.Options; diff --git a/tgui/packages/tgui-bench/tests/DisposalUnit.test.tsx b/tgui/packages/tgui-bench/tests/DisposalUnit.test.tsx index a3a53cf750c..757a4291a0b 100644 --- a/tgui/packages/tgui-bench/tests/DisposalUnit.test.tsx +++ b/tgui/packages/tgui-bench/tests/DisposalUnit.test.tsx @@ -12,7 +12,7 @@ const renderUi = createRenderer((dataJson: string) => { store.dispatch( backendUpdate({ data: Byond.parseJson(dataJson), - }) + }), ); return ; }); diff --git a/tgui/packages/tgui-bench/tests/Tooltip.test.tsx b/tgui/packages/tgui-bench/tests/Tooltip.test.tsx index ea43a61f0b4..9dae16f5c03 100644 --- a/tgui/packages/tgui-bench/tests/Tooltip.test.tsx +++ b/tgui/packages/tgui-bench/tests/Tooltip.test.tsx @@ -12,7 +12,7 @@ export const ListOfTooltips = () => { Tooltip #{i} - + , ); } diff --git a/tgui/packages/tgui-dev-server/dreamseeker.js b/tgui/packages/tgui-dev-server/dreamseeker.js index 2b25b155ae0..af4bfe891cb 100644 --- a/tgui/packages/tgui-dev-server/dreamseeker.js +++ b/tgui/packages/tgui-dev-server/dreamseeker.js @@ -30,7 +30,7 @@ export class DreamSeeker { + '=' + encodeURIComponent(params[key])) .join('&'); logger.log( - `topic call at ${this.client.defaults.baseURL + '/dummy?' + query}` + `topic call at ${this.client.defaults.baseURL + '/dummy?' + query}`, ); return this.client.get('/dummy?' + query); } diff --git a/tgui/packages/tgui-dev-server/link/retrace.js b/tgui/packages/tgui-dev-server/link/retrace.js index 842de228fdf..b7f4d4eacfb 100644 --- a/tgui/packages/tgui-dev-server/link/retrace.js +++ b/tgui/packages/tgui-dev-server/link/retrace.js @@ -30,7 +30,7 @@ export const loadSourceMaps = async (bundleDir) => { try { const file = basename(path).replace('.map', ''); const consumer = await new SourceMapConsumer( - JSON.parse(fs.readFileSync(path, 'utf8')) + JSON.parse(fs.readFileSync(path, 'utf8')), ); sourceMaps.push({ file, consumer }); } catch (err) { diff --git a/tgui/packages/tgui-dev-server/reloader.js b/tgui/packages/tgui-dev-server/reloader.js index c13a8afdfcf..427d1aecbd6 100644 --- a/tgui/packages/tgui-dev-server/reloader.js +++ b/tgui/packages/tgui-dev-server/reloader.js @@ -83,19 +83,19 @@ export const reloadByondCache = async (bundleDir) => { } // Get dreamseeker instances const pids = cacheDirs.map((cacheDir) => - parseInt(cacheDir.split('/cache/tmp').pop(), 10) + parseInt(cacheDir.split('/cache/tmp').pop(), 10), ); const dssPromise = DreamSeeker.getInstancesByPids(pids); // Copy assets const assets = await resolveGlob( bundleDir, - './*.+(bundle|chunk|hot-update).*' + './*.+(bundle|chunk|hot-update).*', ); for (let cacheDir of cacheDirs) { // Clear garbage const garbage = await resolveGlob( cacheDir, - './*.+(bundle|chunk|hot-update).*' + './*.+(bundle|chunk|hot-update).*', ); try { // Plant a dummy browser window file, we'll be using this to avoid world topic. For byond 515. diff --git a/tgui/packages/tgui-panel/Panel.jsx b/tgui/packages/tgui-panel/Panel.jsx index 260e1dfd6df..668fd8cbb19 100644 --- a/tgui/packages/tgui-panel/Panel.jsx +++ b/tgui/packages/tgui-panel/Panel.jsx @@ -116,7 +116,8 @@ const HoboPanel = (props) => { zIndex: 1000, }} selected={settings.visible} - onClick={() => settings.toggle()}> + onClick={() => settings.toggle()} + > Settings {(settings.visible && ) || ( diff --git a/tgui/packages/tgui-panel/audio/NowPlayingWidget.jsx b/tgui/packages/tgui-panel/audio/NowPlayingWidget.jsx index 8260ee8c233..903dacf284c 100644 --- a/tgui/packages/tgui-panel/audio/NowPlayingWidget.jsx +++ b/tgui/packages/tgui-panel/audio/NowPlayingWidget.jsx @@ -22,10 +22,10 @@ export const NowPlayingWidget = (props) => { duration = audio.meta?.duration, date = !isNaN(upload_date) ? upload_date?.substring(0, 4) + - '-' + - upload_date?.substring(4, 6) + - '-' + - upload_date?.substring(6, 8) + '-' + + upload_date?.substring(4, 6) + + '-' + + upload_date?.substring(6, 8) : upload_date; return ( @@ -38,7 +38,8 @@ export const NowPlayingWidget = (props) => { whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis', - }}> + }} + > {
diff --git a/tgui/packages/tgui-panel/chat/ChatPageSettings.jsx b/tgui/packages/tgui-panel/chat/ChatPageSettings.jsx index 2da47daa07d..d380979dbd3 100644 --- a/tgui/packages/tgui-panel/chat/ChatPageSettings.jsx +++ b/tgui/packages/tgui-panel/chat/ChatPageSettings.jsx @@ -5,7 +5,14 @@ */ import { useDispatch, useSelector } from 'tgui/backend'; -import { Button, Collapsible, Divider, Input, Section, Stack } from 'tgui/components'; +import { + Button, + Collapsible, + Divider, + Input, + Section, + Stack, +} from 'tgui/components'; import { removeChatPage, toggleAcceptedType, updateChatPage } from './actions'; import { MESSAGE_TYPES } from './constants'; import { selectCurrentChatPage } from './selectors'; @@ -25,7 +32,7 @@ export const ChatPageSettings = (props) => { updateChatPage({ pageId: page.id, name: value, - }) + }), ) } /> @@ -38,9 +45,10 @@ export const ChatPageSettings = (props) => { dispatch( removeChatPage({ pageId: page.id, - }) + }), ) - }> + } + > Remove @@ -48,7 +56,7 @@ export const ChatPageSettings = (props) => {
{MESSAGE_TYPES.filter( - (typeDef) => !typeDef.important && !typeDef.admin + (typeDef) => !typeDef.important && !typeDef.admin, ).map((typeDef) => ( { toggleAcceptedType({ pageId: page.id, type: typeDef.type, - }) + }), ) - }> + } + > {typeDef.name} ))} {MESSAGE_TYPES.filter( - (typeDef) => !typeDef.important && typeDef.admin + (typeDef) => !typeDef.important && typeDef.admin, ).map((typeDef) => ( { toggleAcceptedType({ pageId: page.id, type: typeDef.type, - }) + }), ) - }> + } + > {typeDef.name} ))} diff --git a/tgui/packages/tgui-panel/chat/ChatPanel.jsx b/tgui/packages/tgui-panel/chat/ChatPanel.jsx index 166705361fa..36e86876f50 100644 --- a/tgui/packages/tgui-panel/chat/ChatPanel.jsx +++ b/tgui/packages/tgui-panel/chat/ChatPanel.jsx @@ -26,7 +26,7 @@ export class ChatPanel extends Component { chatRenderer.mount(this.ref.current); chatRenderer.events.on( 'scrollTrackingChanged', - this.handleScrollTrackingChange + this.handleScrollTrackingChange, ); this.componentDidUpdate(); } @@ -34,7 +34,7 @@ export class ChatPanel extends Component { componentWillUnmount() { chatRenderer.events.off( 'scrollTrackingChanged', - this.handleScrollTrackingChange + this.handleScrollTrackingChange, ); } @@ -63,7 +63,8 @@ export class ChatPanel extends Component { )} diff --git a/tgui/packages/tgui-panel/chat/ChatTabs.jsx b/tgui/packages/tgui-panel/chat/ChatTabs.jsx index 04d5f25b4bf..ed3a285c204 100644 --- a/tgui/packages/tgui-panel/chat/ChatTabs.jsx +++ b/tgui/packages/tgui-panel/chat/ChatTabs.jsx @@ -19,7 +19,8 @@ const UnreadCountWidget = ({ value }) => ( lineHeight: '1.55em', backgroundColor: 'crimson', color: '#fff', - }}> + }} + > {Math.min(value, 99)} ); @@ -45,9 +46,10 @@ export const ChatTabs = (props) => { dispatch( changeChatPage({ pageId: page.id, - }) + }), ) - }> + } + > {page.name} ))} diff --git a/tgui/packages/tgui-panel/chat/middleware.js b/tgui/packages/tgui-panel/chat/middleware.js index ecafbd23641..aae219495c0 100644 --- a/tgui/packages/tgui-panel/chat/middleware.js +++ b/tgui/packages/tgui-panel/chat/middleware.js @@ -6,9 +6,25 @@ import DOMPurify from 'dompurify'; import { storage } from 'common/storage'; -import { loadSettings, updateSettings, addHighlightSetting, removeHighlightSetting, updateHighlightSetting } from '../settings/actions'; +import { + loadSettings, + updateSettings, + addHighlightSetting, + removeHighlightSetting, + updateHighlightSetting, +} from '../settings/actions'; import { selectSettings } from '../settings/selectors'; -import { addChatPage, changeChatPage, changeScrollTracking, loadChat, rebuildChat, removeChatPage, saveChatToDisk, toggleAcceptedType, updateMessageCount } from './actions'; +import { + addChatPage, + changeChatPage, + changeScrollTracking, + loadChat, + rebuildChat, + removeChatPage, + saveChatToDisk, + toggleAcceptedType, + updateMessageCount, +} from './actions'; import { MAX_PERSISTED_MESSAGES, MESSAGE_SAVE_INTERVAL } from './constants'; import { createMessage, serializeMessage } from './model'; import { chatRenderer } from './renderer'; @@ -21,7 +37,7 @@ const saveChatToStorage = async (store) => { const state = selectChat(store.getState()); const fromIndex = Math.max( 0, - chatRenderer.messages.length - MAX_PERSISTED_MESSAGES + chatRenderer.messages.length - MAX_PERSISTED_MESSAGES, ); const messages = chatRenderer.messages .slice(fromIndex) @@ -159,7 +175,7 @@ export const chatMiddleware = (store) => { const settings = selectSettings(store.getState()); chatRenderer.setHighlight( settings.highlightSettings, - settings.highlightSettingById + settings.highlightSettingById, ); return; diff --git a/tgui/packages/tgui-panel/chat/reducer.js b/tgui/packages/tgui-panel/chat/reducer.js index b727a7c1bab..e75fbd06e43 100644 --- a/tgui/packages/tgui-panel/chat/reducer.js +++ b/tgui/packages/tgui-panel/chat/reducer.js @@ -4,7 +4,16 @@ * @license MIT */ -import { addChatPage, changeChatPage, loadChat, removeChatPage, toggleAcceptedType, updateChatPage, updateMessageCount, changeScrollTracking } from './actions'; +import { + addChatPage, + changeChatPage, + loadChat, + removeChatPage, + toggleAcceptedType, + updateChatPage, + updateMessageCount, + changeScrollTracking, +} from './actions'; import { canPageAcceptType, createMainPage } from './model'; const mainPage = createMainPage(); diff --git a/tgui/packages/tgui-panel/chat/renderer.jsx b/tgui/packages/tgui-panel/chat/renderer.jsx index f2b4ac2caa6..d0c170c9354 100644 --- a/tgui/packages/tgui-panel/chat/renderer.jsx +++ b/tgui/packages/tgui-panel/chat/renderer.jsx @@ -7,7 +7,19 @@ import { EventEmitter } from 'common/events'; import { classes } from 'common/react'; import { createLogger } from 'tgui/logging'; -import { COMBINE_MAX_MESSAGES, COMBINE_MAX_TIME_WINDOW, IMAGE_RETRY_DELAY, IMAGE_RETRY_LIMIT, IMAGE_RETRY_MESSAGE_AGE, MAX_PERSISTED_MESSAGES, MAX_VISIBLE_MESSAGES, MESSAGE_PRUNE_INTERVAL, MESSAGE_TYPES, MESSAGE_TYPE_INTERNAL, MESSAGE_TYPE_UNKNOWN } from './constants'; +import { + COMBINE_MAX_MESSAGES, + COMBINE_MAX_TIME_WINDOW, + IMAGE_RETRY_DELAY, + IMAGE_RETRY_LIMIT, + IMAGE_RETRY_MESSAGE_AGE, + MAX_PERSISTED_MESSAGES, + MAX_VISIBLE_MESSAGES, + MESSAGE_PRUNE_INTERVAL, + MESSAGE_TYPES, + MESSAGE_TYPE_INTERNAL, + MESSAGE_TYPE_UNKNOWN, +} from './constants'; import { render } from 'react-dom'; import { canPageAcceptType, createMessage, isSameMessage } from './model'; import { highlightNode, linkifyNode } from './replaceInTextNode'; @@ -27,8 +39,8 @@ export const TGUI_CHAT_COMPONENTS = { // List of injectable attibute names mapped to their proper prop // We need this because attibutes don't support lowercase names export const TGUI_CHAT_ATTRIBUTES_TO_PROPS = { - 'position': 'position', - 'content': 'content', + position: 'position', + content: 'content', }; const findNearestScrollableParent = (startingNode) => { @@ -205,7 +217,7 @@ class ChatRenderer { // Must be alphanumeric (with some punctuation) allowedRegex.test(str) && // Reset lastIndex so it does not mess up the next word - ((allowedRegex.lastIndex = 0) || true) + ((allowedRegex.lastIndex = 0) || true), ); let highlightWords; let highlightRegex; @@ -245,7 +257,7 @@ class ChatRenderer { highlightRegex = new RegExp('(' + regexStr + ')', flags); } else { const pattern = `${matchWord ? '\\b' : ''}(${highlightWords.join( - '|' + '|', )})${matchWord ? '\\b' : ''}`; highlightRegex = new RegExp(pattern, flags); } @@ -406,7 +418,7 @@ class ChatRenderer { , - childNode + childNode, ); /* eslint-enable react/no-danger */ } @@ -418,7 +430,7 @@ class ChatRenderer { node, parser.highlightRegex, parser.highlightWords, - (text) => createHighlightNode(text, parser.highlightColor) + (text) => createHighlightNode(text, parser.highlightColor), ); if (highlighted && parser.highlightWholeMessage) { node.className += ' ChatMessage--highlighted'; @@ -515,7 +527,7 @@ class ChatRenderer { { const fromIndex = Math.max( 0, - this.messages.length - MAX_PERSISTED_MESSAGES + this.messages.length - MAX_PERSISTED_MESSAGES, ); if (fromIndex > 0) { this.messages = this.messages.slice(fromIndex); @@ -531,7 +543,7 @@ class ChatRenderer { // Make a copy of messages const fromIndex = Math.max( 0, - this.messages.length - MAX_PERSISTED_MESSAGES + this.messages.length - MAX_PERSISTED_MESSAGES, ); const messages = this.messages.slice(fromIndex); // Remove existing nodes diff --git a/tgui/packages/tgui-panel/chat/replaceInTextNode.js b/tgui/packages/tgui-panel/chat/replaceInTextNode.js index 753997b3b82..5062b88831b 100644 --- a/tgui/packages/tgui-panel/chat/replaceInTextNode.js +++ b/tgui/packages/tgui-panel/chat/replaceInTextNode.js @@ -149,7 +149,7 @@ export const highlightNode = ( node, regex, words, - createNode = createHighlightNode + createNode = createHighlightNode, ) => { if (!createNode) { createNode = createHighlightNode; diff --git a/tgui/packages/tgui-panel/index.jsx b/tgui/packages/tgui-panel/index.jsx index ed0f01a6e79..8ef4b8bae59 100644 --- a/tgui/packages/tgui-panel/index.jsx +++ b/tgui/packages/tgui-panel/index.jsx @@ -80,14 +80,14 @@ const setupApp = () => { Byond.winset('browseroutput', { 'is-visible': true, 'is-disabled': false, - 'pos': '0x0', - 'size': '0x0', + pos: '0x0', + size: '0x0', }); // Resize the panel to match the non-browser output Byond.winget('output').then((output) => { Byond.winset('browseroutput', { - 'size': output.size, + size: output.size, }); }); diff --git a/tgui/packages/tgui-panel/ping/reducer.js b/tgui/packages/tgui-panel/ping/reducer.js index b1e3d679cbc..49b9522c06f 100644 --- a/tgui/packages/tgui-panel/ping/reducer.js +++ b/tgui/packages/tgui-panel/ping/reducer.js @@ -6,7 +6,11 @@ import { clamp01, scale } from 'common/math'; import { pingFail, pingSuccess } from './actions'; -import { PING_MAX_FAILS, PING_ROUNDTRIP_BEST, PING_ROUNDTRIP_WORST } from './constants'; +import { + PING_MAX_FAILS, + PING_ROUNDTRIP_BEST, + PING_ROUNDTRIP_WORST, +} from './constants'; export const pingReducer = (state = {}, action) => { const { type, payload } = action; @@ -28,7 +32,7 @@ export const pingReducer = (state = {}, action) => { if (type === pingFail.type) { const { failCount = 0 } = state; const networkQuality = clamp01( - state.networkQuality - failCount / PING_MAX_FAILS + state.networkQuality - failCount / PING_MAX_FAILS, ); const nextState = { ...state, diff --git a/tgui/packages/tgui-panel/reconnect.tsx b/tgui/packages/tgui-panel/reconnect.tsx index ecfd7671692..6d3e6d9759e 100644 --- a/tgui/packages/tgui-panel/reconnect.tsx +++ b/tgui/packages/tgui-panel/reconnect.tsx @@ -21,7 +21,8 @@ export const ReconnectButton = () => { color="white" onClick={() => { Byond.command('.reconnect'); - }}> + }} + > Reconnect diff --git a/tgui/packages/tgui-panel/settings/SettingsPanel.jsx b/tgui/packages/tgui-panel/settings/SettingsPanel.jsx index 87e5d8b74e7..d803c63cb16 100644 --- a/tgui/packages/tgui-panel/settings/SettingsPanel.jsx +++ b/tgui/packages/tgui-panel/settings/SettingsPanel.jsx @@ -7,13 +7,38 @@ import { toFixed } from 'common/math'; import { useLocalState } from 'tgui/backend'; import { useDispatch, useSelector } from 'tgui/backend'; -import { Box, Button, ColorBox, Divider, Dropdown, Flex, Input, LabeledList, NumberInput, Section, Stack, Tabs, TextArea } from 'tgui/components'; +import { + Box, + Button, + ColorBox, + Divider, + Dropdown, + Flex, + Input, + LabeledList, + NumberInput, + Section, + Stack, + Tabs, + TextArea, +} from 'tgui/components'; import { ChatPageSettings } from '../chat'; import { rebuildChat, saveChatToDisk } from '../chat/actions'; import { THEMES } from '../themes'; -import { changeSettingsTab, updateSettings, addHighlightSetting, removeHighlightSetting, updateHighlightSetting } from './actions'; +import { + changeSettingsTab, + updateSettings, + addHighlightSetting, + removeHighlightSetting, + updateHighlightSetting, +} from './actions'; import { SETTINGS_TABS, FONTS, MAX_HIGHLIGHT_SETTINGS } from './constants'; -import { selectActiveTab, selectSettings, selectHighlightSettings, selectHighlightSettingById } from './selectors'; +import { + selectActiveTab, + selectSettings, + selectHighlightSettings, + selectHighlightSettingById, +} from './selectors'; export const SettingsPanel = (props) => { const activeTab = useSelector(selectActiveTab); @@ -31,9 +56,10 @@ export const SettingsPanel = (props) => { dispatch( changeSettingsTab({ tabId: tab.id, - }) + }), ) - }> + } + > {tab.name} ))} @@ -65,7 +91,7 @@ export const SettingsGeneral = (props) => { dispatch( updateSettings({ theme: value, - }) + }), ) } /> @@ -81,7 +107,7 @@ export const SettingsGeneral = (props) => { dispatch( updateSettings({ fontFamily: value, - }) + }), ) } /> @@ -92,7 +118,7 @@ export const SettingsGeneral = (props) => { dispatch( updateSettings({ fontFamily: value, - }) + }), ) } /> @@ -125,7 +151,7 @@ export const SettingsGeneral = (props) => { dispatch( updateSettings({ fontSize: value, - }) + }), ) } /> @@ -143,7 +169,7 @@ export const SettingsGeneral = (props) => { dispatch( updateSettings({ lineHeight: value, - }) + }), ) } /> @@ -221,7 +247,7 @@ const TextHighlightSetting = (props) => { dispatch( removeHighlightSetting({ id: id, - }) + }), ) } /> @@ -237,7 +263,7 @@ const TextHighlightSetting = (props) => { updateHighlightSetting({ id: id, highlightWholeMessage: !highlightWholeMessage, - }) + }), ) } /> @@ -253,7 +279,7 @@ const TextHighlightSetting = (props) => { updateHighlightSetting({ id: id, matchWord: !matchWord, - }) + }), ) } /> @@ -268,7 +294,7 @@ const TextHighlightSetting = (props) => { updateHighlightSetting({ id: id, matchCase: !matchCase, - }) + }), ) } /> @@ -285,7 +311,7 @@ const TextHighlightSetting = (props) => { updateHighlightSetting({ id: id, highlightColor: value, - }) + }), ) } /> @@ -300,7 +326,7 @@ const TextHighlightSetting = (props) => { updateHighlightSetting({ id: id, highlightText: value, - }) + }), ) } /> diff --git a/tgui/packages/tgui-panel/settings/actions.js b/tgui/packages/tgui-panel/settings/actions.js index 1550bef80ba..52febd21c9c 100644 --- a/tgui/packages/tgui-panel/settings/actions.js +++ b/tgui/packages/tgui-panel/settings/actions.js @@ -16,11 +16,11 @@ export const addHighlightSetting = createAction( 'settings/addHighlightSetting', () => ({ payload: createHighlightSetting(), - }) + }), ); export const removeHighlightSetting = createAction( - 'settings/removeHighlightSetting' + 'settings/removeHighlightSetting', ); export const updateHighlightSetting = createAction( - 'settings/updateHighlightSetting' + 'settings/updateHighlightSetting', ); diff --git a/tgui/packages/tgui-panel/settings/middleware.js b/tgui/packages/tgui-panel/settings/middleware.js index cef082213db..3d3c7744df4 100644 --- a/tgui/packages/tgui-panel/settings/middleware.js +++ b/tgui/packages/tgui-panel/settings/middleware.js @@ -6,7 +6,13 @@ import { storage } from 'common/storage'; import { setClientTheme } from '../themes'; -import { loadSettings, updateSettings, addHighlightSetting, removeHighlightSetting, updateHighlightSetting } from './actions'; +import { + loadSettings, + updateSettings, + addHighlightSetting, + removeHighlightSetting, + updateHighlightSetting, +} from './actions'; import { selectSettings } from './selectors'; import { FONTS_DISABLED } from './constants'; diff --git a/tgui/packages/tgui-panel/settings/reducer.js b/tgui/packages/tgui-panel/settings/reducer.js index 42d799fd659..17f2af380e8 100644 --- a/tgui/packages/tgui-panel/settings/reducer.js +++ b/tgui/packages/tgui-panel/settings/reducer.js @@ -4,7 +4,16 @@ * @license MIT */ -import { changeSettingsTab, loadSettings, openChatSettings, toggleSettings, updateSettings, addHighlightSetting, removeHighlightSetting, updateHighlightSetting } from './actions'; +import { + changeSettingsTab, + loadSettings, + openChatSettings, + toggleSettings, + updateSettings, + addHighlightSetting, + removeHighlightSetting, + updateHighlightSetting, +} from './actions'; import { createDefaultHighlightSetting } from './model'; import { SETTINGS_TABS, FONTS, MAX_HIGHLIGHT_SETTINGS } from './constants'; @@ -131,7 +140,7 @@ export const settingsReducer = (state = initialState, action) => { } else { delete nextState.highlightSettingById[id]; nextState.highlightSettings = nextState.highlightSettings.filter( - (sid) => sid !== id + (sid) => sid !== id, ); if (!nextState.highlightSettings.length) { nextState.highlightSettings.push(defaultHighlightSetting.id); diff --git a/tgui/packages/tgui-panel/styles/main.scss b/tgui/packages/tgui-panel/styles/main.scss index ee96a9c5a65..08e60d18ee6 100644 --- a/tgui/packages/tgui-panel/styles/main.scss +++ b/tgui/packages/tgui-panel/styles/main.scss @@ -10,7 +10,7 @@ @use '~tgui/styles/base.scss' with ( $color-bg: #202020, $color-bg-section: color.adjust(#202020, $lightness: -5%), - $color-bg-grad-spread: 0%, + $color-bg-grad-spread: 0% ); // Core styles diff --git a/tgui/packages/tgui-panel/styles/themes/light.scss b/tgui/packages/tgui-panel/styles/themes/light.scss index 1f752d51d63..19ddd3642cd 100644 --- a/tgui/packages/tgui-panel/styles/themes/light.scss +++ b/tgui/packages/tgui-panel/styles/themes/light.scss @@ -22,7 +22,7 @@ $color-fg: #000000, $color-bg: #eeeeee, $color-bg-section: #ffffff, - $color-bg-grad-spread: 0%, + $color-bg-grad-spread: 0% ); // A fat warning to anyone who wants to use this: this only half works. diff --git a/tgui/packages/tgui-say/TguiSay.tsx b/tgui/packages/tgui-say/TguiSay.tsx index b5ac871130a..9e93b395151 100644 --- a/tgui/packages/tgui-say/TguiSay.tsx +++ b/tgui/packages/tgui-say/TguiSay.tsx @@ -318,7 +318,8 @@ export class TguiSay extends Component<{}, State> { @@ -108,7 +122,8 @@ const NewscasterChannelCreation = (props) => { act('setChannelDesc', { channeldesc: desc, }) - }> + } + > Channel Description @@ -180,7 +195,8 @@ const NewscasterCommentCreation = (props) => { act('setCommentBody', { commenttext: comment, }) - }> + } + > Channel Name @@ -437,7 +453,8 @@ const NewscasterChannelSelector = (props) => { key={activeWanted.index} icon={activeWanted.active ? 'skull-crossbones' : null} textColor={activeWanted.active ? 'red' : 'grey'} - onClick={() => act('toggleWanted')}> + onClick={() => act('toggleWanted')} + > Wanted Issue ))} @@ -454,7 +471,8 @@ const NewscasterChannelSelector = (props) => { act('setChannel', { channel: channel.ID, }) - }> + } + > {channel.name} ))} @@ -464,7 +482,8 @@ const NewscasterChannelSelector = (props) => { mr={1} textColor="white" color="Green" - onClick={() => act('startCreateChannel')}> + onClick={() => act('startCreateChannel')} + > Create Channel [+] @@ -480,7 +499,7 @@ const processedText = (value) => { smartypants: true, smartLists: true, baseUrl: 'thisshouldbreakhttp', - }) + }), ), }; return textHtml; @@ -508,7 +527,7 @@ const NewscasterChannelMessages = (props) => { ); } const visibleMessages = messages.filter( - (message) => message.ID !== viewing_channel + (message) => message.ID !== viewing_channel, ); return (
@@ -572,7 +591,8 @@ const NewscasterChannelMessages = (props) => { } /> - }> + } + >
{message.censored_message ? (
diff --git a/tgui/packages/tgui/interfaces/NifPanel.jsx b/tgui/packages/tgui/interfaces/NifPanel.jsx index fa6a878f9e3..adcf8322d9f 100644 --- a/tgui/packages/tgui/interfaces/NifPanel.jsx +++ b/tgui/packages/tgui/interfaces/NifPanel.jsx @@ -1,7 +1,20 @@ // THIS IS A SKYRAT UI FILE import { useBackend, useLocalState } from '../backend'; import { Window } from '../layouts'; -import { Box, Dropdown, LabeledList, ProgressBar, Section, Button, Input, BlockQuote, Flex, Collapsible, Table, Icon } from '../components'; +import { + Box, + Dropdown, + LabeledList, + ProgressBar, + Section, + Button, + Input, + BlockQuote, + Flex, + Collapsible, + Table, + Icon, +} from '../components'; import { TableCell, TableRow } from '../components/Table'; export const NifPanel = (props) => { @@ -21,7 +34,8 @@ export const NifPanel = (props) => { width={500} height={400} resizable - theme={current_theme}> + theme={current_theme} + >
{ selected={settingsOpen} onClick={() => setSettingsOpen(!settingsOpen)} /> - }> + } + > {(settingsOpen && ) || } {(!settingsOpen && (
+ right + > {(loaded_nifsofts.length && ( {loaded_nifsofts.map((nifsoft) => ( @@ -62,7 +78,8 @@ export const NifPanel = (props) => { }) } /> - }> + } + > @@ -74,8 +91,8 @@ export const NifPanel = (props) => { {nifsoft.activation_cost === 0 ? ' No activation cost' : ' ' + - (nifsoft.activation_cost / max_power) * 100 + - '% per activation'} + (nifsoft.activation_cost / max_power) * 100 + + '% per activation'} @@ -66,7 +76,8 @@ export const NifSoulPoem = (props) => { diff --git a/tgui/packages/tgui/interfaces/NoticeBoard.tsx b/tgui/packages/tgui/interfaces/NoticeBoard.tsx index 6514e4517e7..e39a07067f8 100644 --- a/tgui/packages/tgui/interfaces/NoticeBoard.tsx +++ b/tgui/packages/tgui/interfaces/NoticeBoard.tsx @@ -27,7 +27,8 @@ export const NoticeBoard = (props) => { key={item.ref} color="black" backgroundColor="white" - style={{ padding: '2px 2px 0 2px' }}> + style={{ padding: '2px 2px 0 2px' }} + > {item.name} diff --git a/tgui/packages/tgui/interfaces/NtnetRelay.tsx b/tgui/packages/tgui/interfaces/NtnetRelay.tsx index 9acb8ec1526..6fd070d7bb8 100644 --- a/tgui/packages/tgui/interfaces/NtnetRelay.tsx +++ b/tgui/packages/tgui/interfaces/NtnetRelay.tsx @@ -1,6 +1,12 @@ import { BooleanLike } from 'common/react'; import { useBackend } from '../backend'; -import { Box, Button, ProgressBar, Section, AnimatedNumber } from '../components'; +import { + Box, + Button, + ProgressBar, + Section, + AnimatedNumber, +} from '../components'; import { Window } from '../layouts'; type Data = { @@ -33,12 +39,14 @@ export const NtnetRelay = (props) => { content={enabled ? 'ENABLED' : 'DISABLED'} onClick={() => act('toggle')} /> - }> + } + > {!dos_crashed ? ( + maxValue={dos_capacity} + > GQ {' / '} {dos_capacity} GQ diff --git a/tgui/packages/tgui/interfaces/NtosArcade.jsx b/tgui/packages/tgui/interfaces/NtosArcade.jsx index e31da8a7346..b8c9aa05109 100644 --- a/tgui/packages/tgui/interfaces/NtosArcade.jsx +++ b/tgui/packages/tgui/interfaces/NtosArcade.jsx @@ -1,6 +1,14 @@ import { resolveAsset } from '../assets'; import { useBackend } from '../backend'; -import { AnimatedNumber, Box, Button, Grid, LabeledList, ProgressBar, Section } from '../components'; +import { + AnimatedNumber, + Box, + Button, + Grid, + LabeledList, + ProgressBar, + Section, +} from '../components'; import { NtosWindow } from '../layouts'; export const NtosArcade = (props) => { @@ -24,7 +32,8 @@ export const NtosArcade = (props) => { good: [20, 31], average: [10, 20], bad: [-Infinity, 10], - }}> + }} + > {data.PlayerHitpoints}HP @@ -37,7 +46,8 @@ export const NtosArcade = (props) => { purple: [11, Infinity], violet: [3, 11], bad: [-Infinity, 3], - }}> + }} + > {data.PlayerMP}MP @@ -46,7 +56,8 @@ export const NtosArcade = (props) => {
+ } + > {data.Status}
@@ -59,7 +70,8 @@ export const NtosArcade = (props) => { good: [30, Infinity], average: [5, 30], bad: [-Infinity, 5], - }}> + }} + > HP diff --git a/tgui/packages/tgui/interfaces/NtosCard.jsx b/tgui/packages/tgui/interfaces/NtosCard.jsx index fb12f51fedb..a81f74722e6 100644 --- a/tgui/packages/tgui/interfaces/NtosCard.jsx +++ b/tgui/packages/tgui/interfaces/NtosCard.jsx @@ -1,5 +1,13 @@ import { useBackend } from '../backend'; -import { Box, Button, Dropdown, Input, NumberInput, Section, Stack } from '../components'; +import { + Box, + Button, + Dropdown, + Input, + NumberInput, + Section, + Stack, +} from '../components'; import { NtosWindow } from '../layouts'; import { AccessList } from './common/AccessList'; @@ -49,7 +57,8 @@ export const NtosCardContent = (props) => { } tooltipPosition="left" /> - }> + } + > )} @@ -121,7 +130,8 @@ const IdCardPage = (props) => { }} /> - }> + } + >
diff --git a/tgui/packages/tgui/interfaces/NtosCyborgRemoteMonitor.jsx b/tgui/packages/tgui/interfaces/NtosCyborgRemoteMonitor.jsx index b9e47051dc8..24962f2c3bb 100644 --- a/tgui/packages/tgui/interfaces/NtosCyborgRemoteMonitor.jsx +++ b/tgui/packages/tgui/interfaces/NtosCyborgRemoteMonitor.jsx @@ -1,5 +1,14 @@ import { useBackend, useSharedState } from '../backend'; -import { Box, Button, LabeledList, NoticeBox, ProgressBar, Section, Stack, Tabs } from '../components'; +import { + Box, + Button, + LabeledList, + NoticeBox, + ProgressBar, + Section, + Stack, + Tabs, +} from '../components'; import { NtosWindow } from '../layouts'; export const NtosCyborgRemoteMonitor = (props) => { @@ -47,14 +56,16 @@ export const NtosCyborgRemoteMonitorContent = (props) => { icon="robot" lineHeight="23px" selected={tab_main === 1} - onClick={() => setTab_main(1)}> + onClick={() => setTab_main(1)} + > Cyborgs setTab_main(2)}> + onClick={() => setTab_main(2)} + > Stored Log File @@ -84,7 +95,8 @@ export const NtosCyborgRemoteMonitorContent = (props) => { }) } /> - }> + } + > { : cyborg.locked_down ? 'average' : 'good' - }> + } + > {cyborg.status ? 'Not Responding' : cyborg.locked_down @@ -112,7 +125,8 @@ export const NtosCyborgRemoteMonitorContent = (props) => { : cyborg.integ <= 75 ? 'average' : 'good' - }> + } + > {cyborg.integ === 0 ? 'Hard Fault' : cyborg.integ <= 25 @@ -130,7 +144,8 @@ export const NtosCyborgRemoteMonitorContent = (props) => { : cyborg.charge <= 70 ? 'average' : 'good' - }> + } + > {typeof cyborg.charge === 'number' ? cyborg.charge + '%' : 'Not Found'} diff --git a/tgui/packages/tgui/interfaces/NtosEmojipedia.jsx b/tgui/packages/tgui/interfaces/NtosEmojipedia.jsx index 17b5780a366..1da3a91787e 100644 --- a/tgui/packages/tgui/interfaces/NtosEmojipedia.jsx +++ b/tgui/packages/tgui/interfaces/NtosEmojipedia.jsx @@ -10,8 +10,8 @@ export const NtosEmojipedia = (props) => { let filtered_emoji_list = filter ? emoji_list.filter((emoji) => { - return emoji.name.toLowerCase().includes(filter.toLowerCase()); - }) + return emoji.name.toLowerCase().includes(filter.toLowerCase()); + }) : emoji_list; if (filtered_emoji_list.length === 0) { filtered_emoji_list = emoji_list; @@ -37,7 +37,8 @@ export const NtosEmojipedia = (props) => { icon="circle-question" /> - }> + } + > {filtered_emoji_list.map((emoji) => ( { document.body.removeChild(input); resolve(); }); - }}> + }} + > {emoji.name} ))} diff --git a/tgui/packages/tgui/interfaces/NtosGasAnalyzer.tsx b/tgui/packages/tgui/interfaces/NtosGasAnalyzer.tsx index 7fa700b9c1e..caf3836e018 100644 --- a/tgui/packages/tgui/interfaces/NtosGasAnalyzer.tsx +++ b/tgui/packages/tgui/interfaces/NtosGasAnalyzer.tsx @@ -26,7 +26,8 @@ export const NtosGasAnalyzer = (props) => { ? 'Right-click on objects while holding the tablet to scan them. Right-click on the tablet to scan the current location.' : "The app will update it's gas mixture reading automatically." } - tooltipPosition="bottom"> + tooltipPosition="bottom" + > {atmozphereMode === 'click' ? 'Scanning tapped objects. Click to switch.' : 'Scanning current location. Click to switch.'} diff --git a/tgui/packages/tgui/interfaces/NtosMain.jsx b/tgui/packages/tgui/interfaces/NtosMain.jsx index 7627402b1e4..d28fb2eee9d 100644 --- a/tgui/packages/tgui/interfaces/NtosMain.jsx +++ b/tgui/packages/tgui/interfaces/NtosMain.jsx @@ -17,7 +17,7 @@ export const NtosMain = (props) => { pai, } = data; const filtered_programs = programs.filter( - (program) => program.header_program + (program) => program.header_program, ); return ( { 'NtOS Main Menu' } width={400} - height={500}> + height={500} + > {Boolean( removable_media.length || - programs.some((program) => program.header_program) + programs.some((program) => program.header_program), ) && (
@@ -99,22 +100,25 @@ export const NtosMain = (props) => { /> )} - }> + } + >
ID Name:{' '} {show_imprint ? login.IDName + - ' ' + - (proposed_login.IDName ? '(' + proposed_login.IDName + ')' : '') + ' ' + + (proposed_login.IDName + ? '(' + proposed_login.IDName + ')' + : '') : proposed_login.IDName ?? ''} Assignment:{' '} {show_imprint ? login.IDJob + - ' ' + - (proposed_login.IDJob ? '(' + proposed_login.IDJob + ')' : '') + ' ' + + (proposed_login.IDJob ? '(' + proposed_login.IDJob + ')' : '') : proposed_login.IDJob ?? ''}
@@ -166,7 +170,7 @@ const ProgramsTable = (props) => { const { programs = [] } = data; // add the program filename to this list to have it excluded from the main menu program list table const filtered_programs = programs.filter( - (program) => !program.header_program + (program) => !program.header_program, ); return ( diff --git a/tgui/packages/tgui/interfaces/NtosMessenger/ChatScreen.tsx b/tgui/packages/tgui/interfaces/NtosMessenger/ChatScreen.tsx index 6aa436fe1a2..0c1f2f89cce 100644 --- a/tgui/packages/tgui/interfaces/NtosMessenger/ChatScreen.tsx +++ b/tgui/packages/tgui/interfaces/NtosMessenger/ChatScreen.tsx @@ -1,4 +1,13 @@ -import { Stack, Section, Button, Box, Input, Modal, Tooltip, Icon } from '../../components'; +import { + Stack, + Section, + Button, + Box, + Input, + Modal, + Tooltip, + Icon, +} from '../../components'; import { Component, RefObject, createRef } from 'react'; import { NtMessage, NtMessenger, NtPicture } from './types'; import { BooleanLike } from 'common/react'; @@ -59,7 +68,7 @@ export class ChatScreen extends Component { componentDidUpdate( prevProps: ChatScreenProps, _prevState: ChatScreenState, - _snapshot: any + _snapshot: any, ) { if (prevProps.messages.length !== this.props.messages.length) { this.scrollToBottom(); @@ -192,7 +201,7 @@ export class ChatScreen extends Component { : undefined } /> - + , ); } @@ -215,7 +224,8 @@ export class ChatScreen extends Component { onClick={() => { act('PDA_selectPhoto', { uid: photo.uid }); this.setState({ selectingPhoto: false }); - }}> + }} + > @@ -279,7 +289,8 @@ export class ChatScreen extends Component { pt={1} onClick={() => act('PDA_clearPhoto')} tooltip="Remove attachment" - tooltipPosition="auto-end"> + tooltipPosition="auto-end" + > @@ -338,7 +349,8 @@ export class ChatScreen extends Component { fill fitted title={`${recipient.name} (${recipient.job})`} - scrollableRef={this.scrollRef}> + scrollableRef={this.scrollRef} + > {!!(messages.length > 0 && canReply) && ( <> @@ -366,7 +378,8 @@ export class ChatScreen extends Component { tooltipPosition="left" onClick={() => this.setState({ previewingImage: undefined })} /> - }> + } + >
@@ -411,7 +424,8 @@ const ChatMessage = (props: ChatMessageProps) => { tooltip="View image" className="NtosChatMessage__image" color="transparent" - onClick={onPreviewImage}> + onClick={onPreviewImage} + > )} diff --git a/tgui/packages/tgui/interfaces/NtosMessenger/index.tsx b/tgui/packages/tgui/interfaces/NtosMessenger/index.tsx index 819ebe00a51..990cc710742 100644 --- a/tgui/packages/tgui/interfaces/NtosMessenger/index.tsx +++ b/tgui/packages/tgui/interfaces/NtosMessenger/index.tsx @@ -1,4 +1,14 @@ -import { Box, Button, Icon, Section, Stack, Input, TextArea, Dimmer, Divider } from '../../components'; +import { + Box, + Button, + Icon, + Section, + Stack, + Input, + TextArea, + Dimmer, + Divider, +} from '../../components'; import { useBackend, useLocalState } from '../../backend'; import { createSearch } from 'common/string'; import { BooleanLike } from 'common/react'; @@ -93,11 +103,11 @@ const ContactsScreen = (props: any) => { const searchChatByName = createSearch( searchUser, - (chat: NtChat) => chat.recipient.name + chat.recipient.job + (chat: NtChat) => chat.recipient.name + chat.recipient.job, ); const searchMessengerByName = createSearch( searchUser, - (messenger: NtMessenger) => messenger.name + messenger.job + (messenger: NtMessenger) => messenger.name + messenger.job, ); const chatToButton = (chat: NtChat) => { @@ -123,7 +133,7 @@ const ContactsScreen = (props: any) => { }; const openChatsArray = sortByUnreads(Object.values(saved_chats)).filter( - searchChatByName + searchChatByName, ); const filteredChatButtons = openChatsArray @@ -134,7 +144,7 @@ const ContactsScreen = (props: any) => { .filter( ([ref, messenger]) => openChatsArray.every((chat) => chat.recipient.ref !== ref) && - searchMessengerByName(messenger) + searchMessengerByName(messenger), ) .map(([_, messenger]) => messenger) .map(messengerToButton) @@ -273,7 +283,8 @@ const ChatButton = (props: ChatButtonProps) => { fluid onClick={() => { act('PDA_viewMessages', { ref: props.chatRef }); - }}> + }} + > {hasUnreads && `[${unreadMessages <= 9 ? unreadMessages : '9+'} unread message${ unreadMessages !== 1 ? 's' : '' @@ -306,7 +317,8 @@ const SendToAllSection = (props) => { onClick={() => { act('PDA_sendEveryone', { message: message }); setmessage(''); - }}> + }} + > Send diff --git a/tgui/packages/tgui/interfaces/NtosNetChat.jsx b/tgui/packages/tgui/interfaces/NtosNetChat.jsx index 171398ab6a2..aab73f826a1 100644 --- a/tgui/packages/tgui/interfaces/NtosNetChat.jsx +++ b/tgui/packages/tgui/interfaces/NtosNetChat.jsx @@ -1,5 +1,13 @@ import { useBackend } from '../backend'; -import { Box, Button, Dimmer, Icon, Input, Section, Stack } from '../components'; +import { + Box, + Button, + Dimmer, + Icon, + Input, + Section, + Stack, +} from '../components'; import { NtosWindow } from '../layouts'; // byond defines for the program state @@ -195,7 +203,8 @@ export const NtosNetChat = (props) => { + color={client_color(client)} + > {client.name} {client !== this_client && ( diff --git a/tgui/packages/tgui/interfaces/NtosNetDownloader.jsx b/tgui/packages/tgui/interfaces/NtosNetDownloader.tsx similarity index 70% rename from tgui/packages/tgui/interfaces/NtosNetDownloader.jsx rename to tgui/packages/tgui/interfaces/NtosNetDownloader.tsx index 6d6456b7cab..c2aa0bc515c 100644 --- a/tgui/packages/tgui/interfaces/NtosNetDownloader.jsx +++ b/tgui/packages/tgui/interfaces/NtosNetDownloader.tsx @@ -1,15 +1,52 @@ -// THIS IS A SKYRAT UI FILE +import { BooleanLike } from 'common/react'; import { scale, toFixed } from 'common/math'; import { useBackend, useLocalState } from '../backend'; -import { Box, Button, Stack, Icon, LabeledList, NoticeBox, ProgressBar, Section, Tabs } from '../components'; +import { createSearch } from 'common/string'; +import { + Box, + Button, + Stack, + Icon, + Input, + LabeledList, + NoticeBox, + ProgressBar, + Section, + Tabs, +} from '../components'; import { flow } from 'common/fp'; import { filter, sortBy } from 'common/collections'; import { NtosWindow } from '../layouts'; +type Data = { + disk_size: number; + disk_used: number; + downloadcompletion: number; + downloading: BooleanLike; + downloadname: string; + downloadsize: number; + error: string; + emagged: BooleanLike; + categories: string[]; + programs: ProgramData[]; +}; + +type ProgramData = { + icon: string; + filename: string; + filedesc: string; + fileinfo: string; + category: string; + installed: BooleanLike; + compatible: BooleanLike; + size: number; + access: BooleanLike; + verifiedsource: BooleanLike; +}; + export const NtosNetDownloader = (props) => { - const { act, data } = useBackend(); + const { act, data } = useBackend(); const { - PC_device_theme, disk_size, disk_used, downloadcompletion, @@ -18,33 +55,38 @@ export const NtosNetDownloader = (props) => { downloadsize, error, emagged, - categories, - programs, + categories = [], + programs = [], } = data; - const all_categories = ['All'].concat(categories); + const all_categories = categories; const downloadpercentage = toFixed( - scale(downloadcompletion, 0, downloadsize) * 100 + scale(downloadcompletion, 0, downloadsize) * 100, ); const [selectedCategory, setSelectedCategory] = useLocalState( 'category', - all_categories[0] + categories[0], + ); + const [searchItem, setSearchItem] = useLocalState('searchItem', ''); + const search = createSearch( + searchItem, + (program) => program.filedesc, ); const items = flow([ - // This filters the list to only contain programs with category - selectedCategory !== all_categories[0] && - filter((program) => program.category === selectedCategory), - // This filters the list to only contain verified programs - !emagged && - PC_device_theme !== 'syndicate' && - filter((program) => program.verifiedsource === 1), + searchItem.length > 0 + ? // If we have a query, search everything for it. + filter(search) + : // Otherwise, show respective programs for the category. + filter((program: ProgramData) => program.category === selectedCategory), // This sorts all programs in the lists by name and compatibility sortBy( - (program) => -program.compatible, - (program) => program.filedesc + (program: ProgramData) => !program.compatible, + (program: ProgramData) => program.filedesc, ), + // This filters the list to only contain verified programs + !emagged && filter((program: ProgramData) => program.verifiedsource === 1), ])(programs); const disk_free_space = downloading - ? disk_size - toFixed(disk_used + downloadcompletion) + ? disk_size - Number(toFixed(disk_used + downloadcompletion)) : disk_size - disk_used; return ( @@ -79,11 +121,13 @@ export const NtosNetDownloader = (props) => { tooltip={`${downloadname}.prg downloaded`} /> )) - }> + } + > + maxValue={disk_size} + > {`${disk_free_space} GQ free of ${disk_size} GQ`} @@ -91,14 +135,28 @@ export const NtosNetDownloader = (props) => {
+
+ { + setSearchItem(value); + }} + /> +
- {all_categories.map((category) => ( + {categories.map((category) => ( setSelectedCategory(category)}> + onClick={() => setSelectedCategory(category)} + > {category} ))} @@ -117,14 +175,14 @@ export const NtosNetDownloader = (props) => { const Program = (props) => { const { program } = props; - const { act, data } = useBackend(); + const { act, data } = useBackend(); const { - PC_device_theme, disk_size, disk_used, downloading, downloadname, downloadcompletion, + emagged, } = data; const disk_free = disk_size - disk_used; return ( @@ -139,7 +197,8 @@ const Program = (props) => { width="48px" textAlign="right" color="label" - nowrap> + nowrap + > {program.size} GQ @@ -197,7 +256,7 @@ const Program = (props) => { {program.fileinfo} - {!program.verifiedsource && PC_device_theme !== 'syndicate' && ( + {!program.verifiedsource && ( Unverified source. Please note that Nanotrasen does not recommend download and usage of software from non-official servers. diff --git a/tgui/packages/tgui/interfaces/NtosNetMonitor.jsx b/tgui/packages/tgui/interfaces/NtosNetMonitor.jsx index 3da75dba3fa..2e9463ddc19 100644 --- a/tgui/packages/tgui/interfaces/NtosNetMonitor.jsx +++ b/tgui/packages/tgui/interfaces/NtosNetMonitor.jsx @@ -1,5 +1,14 @@ import { useBackend, useSharedState } from '../backend'; -import { Box, Button, LabeledList, NoticeBox, Icon, Section, Stack, Tabs } from '../components'; +import { + Box, + Button, + LabeledList, + NoticeBox, + Icon, + Section, + Stack, + Tabs, +} from '../components'; import { NtosWindow } from '../layouts'; export const NtosNetMonitor = (props) => { @@ -21,14 +30,16 @@ export const NtosNetMonitor = (props) => { icon="network-wired" lineHeight="23px" selected={tab_main === 1} - onClick={() => setTab_main(1)}> + onClick={() => setTab_main(1)} + > NtNet setTab_main(2)}> + onClick={() => setTab_main(2)} + > Tablets ({tablets.length}) @@ -120,7 +131,8 @@ const MainPage = (props) => { content="Clear Logs" onClick={() => act('purgelogs')} /> - }> + } + > {ntnetlogs.map((log) => ( {log.entry} diff --git a/tgui/packages/tgui/interfaces/NtosNewsArchive.jsx b/tgui/packages/tgui/interfaces/NtosNewsArchive.jsx index 60cf8501b7e..d70ee6a9380 100644 --- a/tgui/packages/tgui/interfaces/NtosNewsArchive.jsx +++ b/tgui/packages/tgui/interfaces/NtosNewsArchive.jsx @@ -25,7 +25,8 @@ export const NtosNewsArchive = (props) => { story.day + '/' + story.year - }> + } + >
{story.text}
))} diff --git a/tgui/packages/tgui/interfaces/NtosNifsoftCatalog.jsx b/tgui/packages/tgui/interfaces/NtosNifsoftCatalog.jsx index c9411e05dfe..1301131dbfd 100644 --- a/tgui/packages/tgui/interfaces/NtosNifsoftCatalog.jsx +++ b/tgui/packages/tgui/interfaces/NtosNifsoftCatalog.jsx @@ -1,14 +1,24 @@ // THIS IS A SKYRAT UI FILE import { useBackend, useSharedState } from '../backend'; import { NtosWindow } from '../layouts'; -import { BlockQuote, Button, Collapsible, Flex, Section, Tabs, LabeledList, Box, Icon } from '../components'; +import { + BlockQuote, + Button, + Collapsible, + Flex, + Section, + Tabs, + LabeledList, + Box, + Icon, +} from '../components'; export const NtosNifsoftCatalog = (props) => { const { act, data } = useBackend(); const { product_list = [], rewards_points, current_balance } = data; const [tab, setTab] = useSharedState( 'product_category', - product_list[0].name + product_list[0].name, ); const products = @@ -34,7 +44,8 @@ export const NtosNifsoftCatalog = (props) => { key={product_category.key} textAlign="center" onClick={() => setTab(product_category.name)} - selected={tab === product_category.name}> + selected={tab === product_category.name} + > {product_category.name} ))} @@ -62,7 +73,8 @@ const ProductCategory = (props) => { {' ' + product.name} } - fill={false}> + fill={false} + >
{product.desc}
@@ -77,7 +89,8 @@ const ProductCategory = (props) => { rewards_purchase: false, }) } - fluid> + fluid + > Purchase for {product.price}cr diff --git a/tgui/packages/tgui/interfaces/NtosNotepad.tsx b/tgui/packages/tgui/interfaces/NtosNotepad.tsx index 5971de0a0c3..41f5c9da6a1 100644 --- a/tgui/packages/tgui/interfaces/NtosNotepad.tsx +++ b/tgui/packages/tgui/interfaces/NtosNotepad.tsx @@ -74,7 +74,7 @@ const NtosNotepadMenuBar = (props: MenuBarProps) => { const [openOnHover, setOpenOnHover] = useLocalState('openOnHover', false); const [openMenuBar, setOpenMenuBar] = useLocalState( 'openMenuBar', - null + null, ); const onMenuItemClick = (value) => { setOpenOnHover(false); @@ -134,7 +134,8 @@ const NtosNotepadMenuBar = (props: MenuBarProps) => { entry="file" openWidth="22rem" display={} - {...itemProps}> + {...itemProps} + > @@ -144,7 +145,8 @@ const NtosNotepadMenuBar = (props: MenuBarProps) => { entry="edit" openWidth="22rem" display={} - {...itemProps}> + {...itemProps} + > @@ -154,7 +156,8 @@ const NtosNotepadMenuBar = (props: MenuBarProps) => { entry="format" openWidth="15rem" display={} - {...itemProps}> + {...itemProps} + > { entry="view" openWidth="15rem" display={} - {...itemProps}> + {...itemProps} + > { entry="help" openWidth="17rem" display={} - {...itemProps}> + {...itemProps} + > @@ -270,7 +275,7 @@ class NotePadTextArea extends Component { const textarea = this.innerRef?.current; if (!textarea) { logger.error( - 'NotePadTextArea.render(): Textarea RefObject should not be null' + 'NotePadTextArea.render(): Textarea RefObject should not be null', ); return; } @@ -278,7 +283,7 @@ class NotePadTextArea extends Component { // Javascript – execute when textarea caret is moved // https://stackoverflow.com/a/53999418/5613731 TEXTAREA_UPDATE_TRIGGERS.forEach((trigger) => - textarea.addEventListener(trigger, this) + textarea.addEventListener(trigger, this), ); // Slight hack: Keep selection when textarea loses focus so menubar actions can be used (i.e. cut, delete) textarea.onblur = this.onblur.bind(this); @@ -288,12 +293,12 @@ class NotePadTextArea extends Component { const textarea = this.innerRef?.current; if (!textarea) { logger.error( - 'NotePadTextArea.componentWillUnmount(): Textarea RefObject should not be null' + 'NotePadTextArea.componentWillUnmount(): Textarea RefObject should not be null', ); return; } TEXTAREA_UPDATE_TRIGGERS.forEach((trigger) => - textarea.removeEventListener(trigger, this) + textarea.removeEventListener(trigger, this), ); } @@ -320,7 +325,7 @@ type AboutDialogProps = { const AboutDialog = (props: AboutDialogProps) => { const { close, clientName } = props; - const paragraphStyle = { 'padding': '.5rem 1rem 0 2rem' }; + const paragraphStyle = { padding: '.5rem 1rem 0 2rem' }; return (
@@ -334,19 +339,20 @@ const AboutDialog = (props: AboutDialogProps) => { © NT Corporation. All rights reserved. - + The NtOS operating system and its user interface are protected by trademark and other pending or existing intellectual property rights in the Sol system and other regions. + }} + > This product is licensed under the NT Corporation Terms to: - {clientName} + {clientName}
@@ -366,11 +372,11 @@ export const NtosNotepad = (props) => { const { note } = data; const [documentName, setDocumentName] = useLocalState( 'documentName', - DEFAULT_DOCUMENT_NAME + DEFAULT_DOCUMENT_NAME, ); const [originalText, setOriginalText] = useLocalState( 'originalText', - note + note, ); console.log(note); const [text, setText] = useLocalState('text', note); @@ -380,15 +386,15 @@ export const NtosNotepad = (props) => { }); const [activeDialog, setActiveDialog] = useLocalState( 'activeDialog', - Dialogs.NONE + Dialogs.NONE, ); const [retryAction, setRetryAction] = useLocalState( 'activeAction', - null + null, ); const [showStatusBar, setShowStatusBar] = useLocalState( 'showStatusBar', - true + true, ); const [wordWrap, setWordWrap] = useLocalState('wordWrap', true); const handleCloseDialog = () => setActiveDialog(Dialogs.NONE); @@ -410,7 +416,7 @@ export const NtosNotepad = (props) => { }; const ensureUnsavedChangesAreHandled = ( action: () => void, - retrying = false + retrying = false, ): boolean => { // This is a guard function that throws up the "unsaved changes" dialog if the user is // attempting to do something that will make them lose data @@ -452,7 +458,8 @@ export const NtosNotepad = (props) => { + height={900} + > { + position="top" + > { + position="top" + > { + color={log.adjusted_money < 1 ? 'red' : 'green'} + > {log.adjusted_money > 1 ? '+' : ''} {log.adjusted_money} diff --git a/tgui/packages/tgui/interfaces/NtosPortraitPrinter.jsx b/tgui/packages/tgui/interfaces/NtosPortraitPrinter.jsx index 0042d05eb68..150479105a2 100644 --- a/tgui/packages/tgui/interfaces/NtosPortraitPrinter.jsx +++ b/tgui/packages/tgui/interfaces/NtosPortraitPrinter.jsx @@ -48,7 +48,8 @@ export const NtosPortraitPrinter = (props) => { height="100%" align="center" justify="center" - direction="column"> + direction="column" + > {got_paintings ? ( <> diff --git a/tgui/packages/tgui/interfaces/NtosRadar.tsx b/tgui/packages/tgui/interfaces/NtosRadar.tsx index f94e0389712..fd9a2bf9a37 100644 --- a/tgui/packages/tgui/interfaces/NtosRadar.tsx +++ b/tgui/packages/tgui/interfaces/NtosRadar.tsx @@ -52,7 +52,8 @@ export const NtosRadarContent = (props) => { position="relative" m={1.5} width={45} - height={45}> + height={45} + > @@ -91,7 +92,8 @@ const ObjectDisplay = (props) => { act('selecttarget', { ref: object.ref, }); - }}> + }} + > {object.name}
))} @@ -116,7 +118,8 @@ const TargetDisplay = (props) => { left={1.35} width={42} fontSize="30px" - textAlign="center"> + textAlign="center" + > Signal Lost
); diff --git a/tgui/packages/tgui/interfaces/NtosRecords.jsx b/tgui/packages/tgui/interfaces/NtosRecords.jsx index 06060e33b29..c190b443d05 100644 --- a/tgui/packages/tgui/interfaces/NtosRecords.jsx +++ b/tgui/packages/tgui/interfaces/NtosRecords.jsx @@ -43,10 +43,11 @@ export const NtosRecords = (props) => { ' ' + record.age + ' ' + - record.fingerprint + record.fingerprint, ) ) - }> + } + > {record.name} @@ -80,10 +81,11 @@ export const NtosRecords = (props) => { ' ' + record.mental_status + ' ' + - record.physical_status + record.physical_status, ) ) - }> + } + > {record.name} diff --git a/tgui/packages/tgui/interfaces/NtosRoboControl.jsx b/tgui/packages/tgui/interfaces/NtosRoboControl.jsx index 0ddaa852da9..29b3fadcce6 100644 --- a/tgui/packages/tgui/interfaces/NtosRoboControl.jsx +++ b/tgui/packages/tgui/interfaces/NtosRoboControl.jsx @@ -1,5 +1,14 @@ import { useBackend, useSharedState } from '../backend'; -import { Box, Button, Dropdown, LabeledList, ProgressBar, Section, Stack, Tabs } from '../components'; +import { + Box, + Button, + Dropdown, + LabeledList, + ProgressBar, + Section, + Stack, + Tabs, +} from '../components'; import { NtosWindow } from '../layouts'; const getMuleByRef = (mules, ref) => { @@ -27,14 +36,16 @@ export const NtosRoboControl = (props) => { icon="robot" lineHeight="23px" selected={tab_main === 1} - onClick={() => setTab_main(1)}> + onClick={() => setTab_main(1)} + > Bots setTab_main(2)}> + onClick={() => setTab_main(2)} + > Drones @@ -131,7 +142,8 @@ export const RobotInfo = (props) => { /> ) - }> + } + > @@ -290,7 +302,8 @@ export const DroneInfo = (props) => { title={drone.name} style={{ border: `4px solid ${color}`, - }}> + }} + > diff --git a/tgui/packages/tgui/interfaces/NtosRobotact.jsx b/tgui/packages/tgui/interfaces/NtosRobotact.jsx index 2da096bb955..50d142b56d4 100644 --- a/tgui/packages/tgui/interfaces/NtosRobotact.jsx +++ b/tgui/packages/tgui/interfaces/NtosRobotact.jsx @@ -1,5 +1,15 @@ import { useBackend, useSharedState } from '../backend'; -import { AnimatedNumber, Box, Button, Flex, LabeledList, ProgressBar, Section, Slider, Tabs } from '../components'; +import { + AnimatedNumber, + Box, + Button, + Flex, + LabeledList, + ProgressBar, + Section, + Slider, + Tabs, +} from '../components'; import { NtosWindow } from '../layouts'; export const NtosRobotact = (props) => { @@ -49,14 +59,16 @@ export const NtosRobotactContent = (props) => { icon="list" lineHeight="23px" selected={tab_main === 1} - onClick={() => setTab_main(1)}> + onClick={() => setTab_main(1)} + > Status setTab_main(2)}> + onClick={() => setTab_main(2)} + > Logs @@ -91,7 +103,8 @@ export const NtosRobotactContent = (props) => { good: [0.5, Infinity], average: [0.1, 0.5], bad: [-Infinity, 0.1], - }}> + }} + > Chassis Integrity: @@ -129,21 +142,24 @@ export const NtosRobotactContent = (props) => { icon="" lineHeight="23px" selected={tab_sub === 1} - onClick={() => setTab_sub(1)}> + onClick={() => setTab_sub(1)} + > Actions setTab_sub(2)}> + onClick={() => setTab_sub(2)} + > Upgrades setTab_sub(3)}> + onClick={() => setTab_sub(3)} + > Diagnostics @@ -165,7 +181,8 @@ export const NtosRobotactContent = (props) => { /> + label={'Stored Photos (' + printerPictures + ')'} + > diff --git a/tgui/packages/tgui/interfaces/NtosSupermatter.tsx b/tgui/packages/tgui/interfaces/NtosSupermatter.tsx index 975534d57e3..00e6556f78d 100644 --- a/tgui/packages/tgui/interfaces/NtosSupermatter.tsx +++ b/tgui/packages/tgui/interfaces/NtosSupermatter.tsx @@ -32,7 +32,8 @@ export const NtosSupermatter = (props) => { content="Refresh" onClick={() => act('PRG_refresh')} /> - }> + } + > {sm_data.map((sm) => ( @@ -54,7 +55,7 @@ export const NtosSupermatter = (props) => {
Ore diff --git a/tgui/packages/tgui/interfaces/OreRedemptionMachine.jsx b/tgui/packages/tgui/interfaces/OreRedemptionMachine.jsx index e3eb91cc6ed..8eb7bec11ce 100644 --- a/tgui/packages/tgui/interfaces/OreRedemptionMachine.jsx +++ b/tgui/packages/tgui/interfaces/OreRedemptionMachine.jsx @@ -1,6 +1,17 @@ import { createSearch, toTitleCase } from 'common/string'; import { useBackend, useLocalState, useSharedState } from '../backend'; -import { BlockQuote, Box, Button, Table, Tabs, Input, Stack, Icon, Section, LabeledList } from '../components'; +import { + BlockQuote, + Box, + Button, + Table, + Tabs, + Input, + Stack, + Icon, + Section, + LabeledList, +} from '../components'; import { Window } from '../layouts'; import { formatSiUnit } from '../format'; @@ -90,7 +101,8 @@ export const OreRedemptionMachine = (props) => { if (searchItem.length > 0) { setSearchItem(''); } - }}> + }} + > Materials { if (searchItem.length > 0) { setSearchItem(''); } - }}> + }} + > Alloys { const [compact, setCompact] = useLocalState('compact', false); const display = material_icons.find( - (mat_icon) => mat_icon.id === material.id + (mat_icon) => mat_icon.id === material.id, ); const sheet_amounts = Math.floor(material.amount); diff --git a/tgui/packages/tgui/interfaces/OrionGame.jsx b/tgui/packages/tgui/interfaces/OrionGame.jsx index b5315ed9c6f..8ab7e4c8d90 100644 --- a/tgui/packages/tgui/interfaces/OrionGame.jsx +++ b/tgui/packages/tgui/interfaces/OrionGame.jsx @@ -28,8 +28,8 @@ const variousButtonIcons = { 'Restore Hull': 'wrench', 'Fix Engine': 'rocket', 'Repair Electronics': 'server', - 'Wait': 'clock', - 'Continue': 'arrow-right', + Wait: 'clock', + Continue: 'arrow-right', 'Explore Ship': 'door-open', 'Leave the Derelict': 'arrow-right', 'Welcome aboard.': 'user-plus', @@ -41,7 +41,7 @@ const variousButtonIcons = { 'Speed Past': 'tachometer-alt', 'Go Around': 'redo', 'Oh...': 'circle', - 'Dock': 'dollar-sign', + Dock: 'dollar-sign', }; const STATUS2COMPONENT = [ @@ -129,7 +129,8 @@ const AdventureStatus = (props) => { onClick={() => act('random_kill')} /> ) - }> + } + > {settlers?.map((settler) => ( @@ -258,7 +259,8 @@ const ORION_STATUS_INSTRUCTIONS = (props) => { content="Back to Main Menu" onClick={() => act('back_to_menu')} /> - }> + } + > In the 2200's, the Orion trail was established as a dangerous yet opportunistic trail through space for those willing to risk it. Many @@ -485,7 +487,8 @@ const ORION_STATUS_MARKET = (props) => { onClick={() => act('leave_spaceport')} /> - }> + } + > diff --git a/tgui/packages/tgui/interfaces/OutfitEditor.jsx b/tgui/packages/tgui/interfaces/OutfitEditor.jsx index ae2b0825486..f7d9e039c5e 100644 --- a/tgui/packages/tgui/interfaces/OutfitEditor.jsx +++ b/tgui/packages/tgui/interfaces/OutfitEditor.jsx @@ -24,10 +24,11 @@ export const OutfitEditor = (props) => { + }} + > @@ -152,11 +155,12 @@ const OutfitSlot = (props) => { + title={currItem?.path} + > {currItem?.name || 'Empty'} diff --git a/tgui/packages/tgui/interfaces/OutfitManager.jsx b/tgui/packages/tgui/interfaces/OutfitManager.jsx index 58341fa62ba..3ad3b8b36d9 100644 --- a/tgui/packages/tgui/interfaces/OutfitManager.jsx +++ b/tgui/packages/tgui/interfaces/OutfitManager.jsx @@ -33,7 +33,8 @@ export const OutfitManager = (props) => { onClick={() => act('new')} /> - }> + } + > {outfits?.map((outfit) => ( @@ -42,14 +43,15 @@ export const OutfitManager = (props) => { grow={1} shrink={1} style={{ - 'overflow': 'hidden', + overflow: 'hidden', whiteSpace: 'nowrap', textOverflow: 'ellipsis', - }}> + }} + > @@ -98,7 +107,8 @@ const CandidateDisplay = (props: { candidate: Candidate; index: number }) => { } overflow="hidden" - title={`Candidate ${index}`}> + title={`Candidate ${index}`} + > @@ -180,7 +190,8 @@ const PaiOptions = (props) => { @@ -191,7 +202,8 @@ const PaiOptions = (props) => { icon={leash_enabled ? 'toggle-off' : 'toggle-on'} onClick={() => act('toggle_leash')} selected={leash_enabled} - tooltip="Whether or not the holoform is able to roam freely outside of its range."> + tooltip="Whether or not the holoform is able to roam freely outside of its range." + > Toggle @@ -226,7 +238,8 @@ const PaiOptions = (props) => { @@ -234,7 +247,8 @@ const PaiOptions = (props) => { @@ -257,7 +271,8 @@ const PaiOptions = (props) => { color="bad" icon="bug" mt={1} - onClick={() => act('reset_software')}> + onClick={() => act('reset_software')} + > Reset Software )} diff --git a/tgui/packages/tgui/interfaces/PaiInterface/Available.tsx b/tgui/packages/tgui/interfaces/PaiInterface/Available.tsx index 62aa90a65c5..7f9f976e096 100644 --- a/tgui/packages/tgui/interfaces/PaiInterface/Available.tsx +++ b/tgui/packages/tgui/interfaces/PaiInterface/Available.tsx @@ -1,5 +1,13 @@ import { useBackend } from 'tgui/backend'; -import { Box, Button, Icon, ProgressBar, Section, Table, Tooltip } from 'tgui/components'; +import { + Box, + Button, + Icon, + ProgressBar, + Section, + Table, + Tooltip, +} from 'tgui/components'; import { SOFTWARE_DESC } from './constants'; import { PaiData } from './types'; @@ -12,7 +20,8 @@ export const AvailableDisplay = () => { buttons={} fill scrollable - title="Available Software"> + title="Available Software" + > ); @@ -99,7 +108,8 @@ const ListItem = (props) => { disabled={ram < cost || purchased} onClick={() => act('buy', { selection: name })} tooltip={SOFTWARE_DESC[name]} - tooltipPosition="bottom-start"> + tooltipPosition="bottom-start" + > diff --git a/tgui/packages/tgui/interfaces/PaiInterface/Installed.tsx b/tgui/packages/tgui/interfaces/PaiInterface/Installed.tsx index d18a87ab9be..2a2ac7b2b19 100644 --- a/tgui/packages/tgui/interfaces/PaiInterface/Installed.tsx +++ b/tgui/packages/tgui/interfaces/PaiInterface/Installed.tsx @@ -80,7 +80,8 @@ const SoftwareButtons = (props) => { disabled={door_jack} icon="plug" onClick={() => act(currentSelection, { mode: DOOR_JACK.Cable })} - tooltip="Drops a cable. Insert into a compatible airlock."> + tooltip="Drops a cable. Insert into a compatible airlock." + > Extend Cable @@ -105,14 +108,16 @@ const SoftwareButtons = (props) => { @@ -123,19 +128,22 @@ const SoftwareButtons = (props) => { @@ -145,7 +153,8 @@ const SoftwareButtons = (props) => { ); @@ -154,7 +163,8 @@ const SoftwareButtons = (props) => { ); diff --git a/tgui/packages/tgui/interfaces/PaiInterface/System.tsx b/tgui/packages/tgui/interfaces/PaiInterface/System.tsx index 4528c94f37e..d31ded46966 100644 --- a/tgui/packages/tgui/interfaces/PaiInterface/System.tsx +++ b/tgui/packages/tgui/interfaces/PaiInterface/System.tsx @@ -74,19 +74,22 @@ const SystemInfo = (props) => { disabled={!master_dna} icon="dna" onClick={() => act('check dna')} - tooltip="Verifies your master's DNA. Must be carried in hand."> + tooltip="Verifies your master's DNA. Must be carried in hand." + > Verify } fill - title="System Info"> + title="System Info" + > {master_name || 'None.'} diff --git a/tgui/packages/tgui/interfaces/PaiInterface/constants.ts b/tgui/packages/tgui/interfaces/PaiInterface/constants.ts index f8ca45cda87..9e81ec91b1f 100644 --- a/tgui/packages/tgui/interfaces/PaiInterface/constants.ts +++ b/tgui/packages/tgui/interfaces/PaiInterface/constants.ts @@ -24,17 +24,17 @@ export enum HOST_SCAN { } export const ICON_MAP = { - 'angry': 'angry', - 'cat': 'cat', + angry: 'angry', + cat: 'cat', 'extremely-happy': 'grin-beam', - 'face': 'grin-alt', - 'happy': 'smile', - 'laugh': 'grin-tears', - 'null': 'meh', - 'off': 'meh-blank', - 'sad': 'sad-cry', - 'sunglasses': 'sun', - 'what': 'frown-open', + face: 'grin-alt', + happy: 'smile', + laugh: 'grin-tears', + null: 'meh', + off: 'meh-blank', + sad: 'sad-cry', + sunglasses: 'sun', + what: 'frown-open', } as const; export enum PHOTO_MODE { @@ -60,7 +60,7 @@ export const SOFTWARE_DESC = { 'Medical HUD': `Allows you to view medical status using an overlay HUD.`, 'Music Synthesizer': `Synthesizes instruments, plays sounds and imported songs.`, - 'Newscaster': `A tool that allows you to broadcast news to other crew + Newscaster: `A tool that allows you to broadcast news to other crew members.`, 'Photography Module': `A portable camera module. Engage, then click to shoot. Includes a printer and lenses.`, diff --git a/tgui/packages/tgui/interfaces/PaiInterface/index.tsx b/tgui/packages/tgui/interfaces/PaiInterface/index.tsx index 3cdbc127e39..a2a2bba368a 100644 --- a/tgui/packages/tgui/interfaces/PaiInterface/index.tsx +++ b/tgui/packages/tgui/interfaces/PaiInterface/index.tsx @@ -41,25 +41,29 @@ const TabDisplay = (props) => { setTab(PAI_TAB.System)} - selected={tab === PAI_TAB.System}> + selected={tab === PAI_TAB.System} + > System setTab(PAI_TAB.Directive)} - selected={tab === PAI_TAB.Directive}> + selected={tab === PAI_TAB.Directive} + > Directives setTab(PAI_TAB.Installed)} - selected={tab === PAI_TAB.Installed}> + selected={tab === PAI_TAB.Installed} + > Installed setTab(PAI_TAB.Available)} - selected={tab === PAI_TAB.Available}> + selected={tab === PAI_TAB.Available} + > Download diff --git a/tgui/packages/tgui/interfaces/PaiSubmit.tsx b/tgui/packages/tgui/interfaces/PaiSubmit.tsx index 3528cb52ae8..ca72f584b83 100644 --- a/tgui/packages/tgui/interfaces/PaiSubmit.tsx +++ b/tgui/packages/tgui/interfaces/PaiSubmit.tsx @@ -119,14 +119,16 @@ const ButtonsDisplay = (props) => { @@ -138,7 +140,8 @@ const ButtonsDisplay = (props) => { description, name, }) - }> + } + > SUBMIT diff --git a/tgui/packages/tgui/interfaces/PaintingAdminPanel.tsx b/tgui/packages/tgui/interfaces/PaintingAdminPanel.tsx index 05175c9e501..481e393fa2c 100644 --- a/tgui/packages/tgui/interfaces/PaintingAdminPanel.tsx +++ b/tgui/packages/tgui/interfaces/PaintingAdminPanel.tsx @@ -40,7 +40,8 @@ export const PaintingAdminPanel = (props) => { title="Painting Information" buttons={ - }> + } + > { onClick={() => { setChosenPaintingRef(null); act('delete', { ref: chosenPainting.ref }); - }}> + }} + > Delete diff --git a/tgui/packages/tgui/interfaces/PaintingMachine.jsx b/tgui/packages/tgui/interfaces/PaintingMachine.jsx index f5217145d98..4d827de27f0 100644 --- a/tgui/packages/tgui/interfaces/PaintingMachine.jsx +++ b/tgui/packages/tgui/interfaces/PaintingMachine.jsx @@ -9,12 +9,12 @@ export const PaintingMachine = (props) => { const [selectedPDA] = useSharedState( 'pdaSelection', - pdaTypes[Object.keys(pdaTypes)[0]] + pdaTypes[Object.keys(pdaTypes)[0]], ); const [selectedTrim] = useSharedState( 'trimSelection', - cardTrims[Object.keys(cardTrims)[0]] + cardTrims[Object.keys(cardTrims)[0]], ); return ( @@ -43,7 +43,8 @@ export const PaintingMachine = (props) => { }} /> - }> + } + > { tooltipPosition="left" /> - }> + } + > { const [selectedOption, setSelectedOption] = useSharedState( stateKey, - options[Object.keys(options)[0]] + options[Object.keys(options)[0]], ); return ( diff --git a/tgui/packages/tgui/interfaces/Pandemic/Beaker.tsx b/tgui/packages/tgui/interfaces/Pandemic/Beaker.tsx index 802967bd2cd..583f98d28f9 100644 --- a/tgui/packages/tgui/interfaces/Pandemic/Beaker.tsx +++ b/tgui/packages/tgui/interfaces/Pandemic/Beaker.tsx @@ -1,6 +1,13 @@ import { capitalizeFirst } from 'common/string'; import { useBackend } from 'tgui/backend'; -import { Button, LabeledList, NoticeBox, ProgressBar, Section, Stack } from 'tgui/components'; +import { + Button, + LabeledList, + NoticeBox, + ProgressBar, + Section, + Stack, +} from 'tgui/components'; import { Data } from './types'; /** Displays loaded container info, if it exists */ @@ -53,7 +60,8 @@ export const BeakerDisplay = (props) => { onClick={() => act('eject_beaker')} /> - }> + } + > {content} ); @@ -88,9 +96,9 @@ const Info = (props) => { minValue={0} maxValue={beaker.capacity} ranges={{ - 'good': [beaker.capacity * 0.85, beaker.capacity], - 'average': [beaker.capacity * 0.25, beaker.capacity * 0.85], - 'bad': [0, beaker.capacity * 0.25], + good: [beaker.capacity * 0.85, beaker.capacity], + average: [beaker.capacity * 0.25, beaker.capacity * 0.85], + bad: [0, beaker.capacity * 0.25], }} /> @@ -114,21 +122,22 @@ const Antibodies = (props) => { {!resistances.length ? 'None' : resistances.map((resistance) => { - return ( - - ); - })} + return ( + + ); + })} ); diff --git a/tgui/packages/tgui/interfaces/Pandemic/Specimen.tsx b/tgui/packages/tgui/interfaces/Pandemic/Specimen.tsx index 267672f445a..e65bcd9ac76 100644 --- a/tgui/packages/tgui/interfaces/Pandemic/Specimen.tsx +++ b/tgui/packages/tgui/interfaces/Pandemic/Specimen.tsx @@ -44,7 +44,8 @@ const Buttons = (props) => { setTab(index)} - key={index}> + key={index} + > {virus.name} ); diff --git a/tgui/packages/tgui/interfaces/Pandemic/Symptom.tsx b/tgui/packages/tgui/interfaces/Pandemic/Symptom.tsx index 738fd255b48..ec3a92e3bbf 100644 --- a/tgui/packages/tgui/interfaces/Pandemic/Symptom.tsx +++ b/tgui/packages/tgui/interfaces/Pandemic/Symptom.tsx @@ -1,4 +1,11 @@ -import { Collapsible, LabeledList, NoticeBox, Section, Stack, Tooltip } from 'tgui/components'; +import { + Collapsible, + LabeledList, + NoticeBox, + Section, + Stack, + Tooltip, +} from 'tgui/components'; import { getColor } from './helpers'; import { Threshold } from './types'; diff --git a/tgui/packages/tgui/interfaces/Pandemic/Virus.tsx b/tgui/packages/tgui/interfaces/Pandemic/Virus.tsx index d21da7892df..016297432c3 100644 --- a/tgui/packages/tgui/interfaces/Pandemic/Virus.tsx +++ b/tgui/packages/tgui/interfaces/Pandemic/Virus.tsx @@ -1,6 +1,13 @@ import { capitalizeFirst, decodeHtmlEntities } from 'common/string'; import { useBackend } from 'tgui/backend'; -import { Box, Input, LabeledList, Section, Stack, Tooltip } from 'tgui/components'; +import { + Box, + Input, + LabeledList, + Section, + Stack, + Tooltip, +} from 'tgui/components'; import { getColor } from './helpers'; import { Data } from './types'; @@ -94,7 +101,8 @@ const Traits = (props) => { + label="Transmissibility" + > {transmission} diff --git a/tgui/packages/tgui/interfaces/PaperSheet.tsx b/tgui/packages/tgui/interfaces/PaperSheet.tsx index ea858583f30..86ab67ab7a3 100644 --- a/tgui/packages/tgui/interfaces/PaperSheet.tsx +++ b/tgui/packages/tgui/interfaces/PaperSheet.tsx @@ -198,7 +198,7 @@ class PaperSheetStamper extends Component { const radians = Math.atan2( currentWidth + stampWidth / 2 - e.pageX, - currentHeight + stampHeight - e.pageY + currentHeight + stampHeight - e.pageY, ); const rotate = rotating @@ -311,7 +311,7 @@ export class PrimaryView extends Component { const [inputFieldData, setInputFieldData] = useLocalState( 'inputFieldData', - {} + {}, ); const [textAreaText, setTextAreaText] = useLocalState('textAreaText', ''); @@ -356,7 +356,8 @@ export class PrimaryView extends Component { + color={tooManyCharacters ? 'bad' : 'default'} + > {`${usedCharacters} / ${max_length}`} - }> + } + >