this repo has no description

Merge branch 'develop' of https://github.com/moonlight-mod/moonlight into settings

Changed files
+35 -1
packages
core-extensions
src
moonbase
+2
packages/core-extensions/src/moonbase/types.ts
··· 6 6 "M5 6.99902V18.999C5 20.101 5.897 20.999 7 20.999H17C18.103 20.999 19 20.101 19 18.999V6.99902H5ZM11 17H9V11H11V17ZM15 17H13V11H15V17Z"; 7 7 export const CircleXIconSVG = 8 8 "M7.02799 0.333252C3.346 0.333252 0.361328 3.31792 0.361328 6.99992C0.361328 10.6819 3.346 13.6666 7.02799 13.6666C10.71 13.6666 13.6947 10.6819 13.6947 6.99992C13.6947 3.31792 10.7093 0.333252 7.02799 0.333252ZM10.166 9.19525L9.22333 10.1379L7.02799 7.94325L4.83266 10.1379L3.89 9.19525L6.08466 6.99992L3.88933 4.80459L4.832 3.86259L7.02733 6.05792L9.22266 3.86259L10.1653 4.80459L7.97066 6.99992L10.166 9.19525Z"; 9 + export const DangerIconSVG = 10 + "M12 23a11 11 0 1 0 0-22 11 11 0 0 0 0 22Zm1.44-15.94L13.06 14a1.06 1.06 0 0 1-2.12 0l-.38-6.94a1 1 0 0 1 1-1.06h.88a1 1 0 0 1 1 1.06Zm-.19 10.69a1.25 1.25 0 1 1-2.5 0 1.25 1.25 0 0 1 2.5 0Z"; 9 11 10 12 export type MoonbaseNatives = { 11 13 fetchRepositories(
+33 -1
packages/core-extensions/src/moonbase/ui/index.tsx
··· 1 1 import WebpackRequire from "@moonlight-mod/types/discord/require"; 2 - import { DownloadIconSVG, ExtensionState, TrashIconSVG } from "../types"; 2 + import { 3 + DangerIconSVG, 4 + DownloadIconSVG, 5 + ExtensionState, 6 + TrashIconSVG 7 + } from "../types"; 3 8 import { ExtensionLoadSource } from "types/src"; 4 9 import info from "./info"; 5 10 import settings from "./settings"; ··· 28 33 29 34 const DownloadIcon = spacepack.findByCode(DownloadIconSVG)[0].exports.default; 30 35 const TrashIcon = spacepack.findByCode(TrashIconSVG)[0].exports.default; 36 + const DangerIcon = 37 + spacepack.findByCode(DangerIconSVG)[0].exports.CircleExclamationPointIcon; 31 38 32 39 const PanelButton = 33 40 spacepack.findByCode("Masks.PANEL_BUTTON")[0].exports.default; 34 41 35 42 function ExtensionCard({ id }: { id: string }) { 36 43 const [tab, setTab] = React.useState(ExtensionPage.Info); 44 + const [restartNeeded, setRestartNeeded] = React.useState(false); 45 + 37 46 const { ext, enabled, busy, update } = Flux.useStateFromStores( 38 47 [MoonbaseSettingsStore], 39 48 () => { ··· 125 134 /> 126 135 )} 127 136 137 + {restartNeeded && ( 138 + <PanelButton 139 + icon={() => ( 140 + <DangerIcon 141 + color={CommonComponents.tokens.colors.STATUS_DANGER} 142 + /> 143 + )} 144 + tooltipText="You will need to reload/restart your client for this extension to work properly." 145 + /> 146 + )} 147 + 128 148 <Switch 129 149 checked={enabled} 130 150 onChange={() => { 151 + setRestartNeeded(true); 131 152 MoonbaseSettingsStore.setExtensionEnabled(id, !enabled); 132 153 }} 133 154 /> ··· 199 220 } 200 221 201 222 return function Moonbase() { 223 + const { Text } = require("common_components"); 224 + 202 225 const { extensions } = Flux.useStateFromStoresObject( 203 226 [MoonbaseSettingsStore], 204 227 () => { ··· 214 237 215 238 return ( 216 239 <> 240 + <Text 241 + style={{ 242 + "margin-bottom": "16px" 243 + }} 244 + variant="heading-lg/semibold" 245 + tag="h2" 246 + > 247 + Moonbase 248 + </Text> 217 249 {sorted.map((ext) => ( 218 250 <ExtensionCard id={ext.id} key={ext.id} /> 219 251 ))}