Replies: 2 comments 2 replies
-
Transparent background for secondary windowsFixes context menus having black background. Probably also allows other windows to be transparent. File: Original codefunction _(){return"windows"===m.Config.PLATFORM?n.BackgroundTransparent:n.None} Patched codefunction _(){return n.BackgroundTransparent} |
Beta Was this translation helpful? Give feedback.
2 replies
-
Main menuShould allow to merge the menus into one while removing less useful menu items. File: Original codeconst gc=e=>{const{title:t,parentalFeature:n,menuItems:r,bIsAnyMenuOpen:l,onShow:i,onHide:s,children:c}=e,m=(0,a._T)(e,["title","parentalFeature","menuItems","bIsAnyMenuOpen","onShow","onHide","children"]);return o.createElement(Ts,Object.assign({title:`${t} Root Menu`,className:dc().RootMenuButton},m,{parentalFeature:n,disabledClass:dc().Disabled,disabledItemClass:dc().DisabledItem,onShow:i,onHide:s,bIsAnyMenuOpen:l,menuItems:r}),c)},hc=e=>{const{bOSX:t}=e,n=(0,E.SZ)((()=>(0,r.gV)().BIsOfflineMode())),a=(0,E.SZ)((()=>rs.P.secureComputer)),l=(0,_c.L)(),i=[{name:"#Menu_ChangeAccount",steamURL:"steam://changeuser",visible:a},{name:"#Menu_SignOut",steamURL:"steam://signout"},{name:"#Menu_GoOnline",onClick:()=>{SteamClient.User.GoOnline()},visible:!l&&n},{name:"#Menu_GoOffline",onClick:()=>{SteamClient.User.GoOffline()},visible:!l&&!n},{name:"Separator1",visible:!t},{name:"#Menu_CheckForSteamUpdates",dialog:"CheckForUpdates",visible:!t},{name:"Separator2"},{name:"#Menu_BackupRestore",onClick:e=>{(0,pc.II)((0,_e.GetOwningWindowForEvent)(e))}},{name:"Separator3",parentalFeature:c.k_EParentalBlockAlways,visible:!t},{name:"#Menu_Settings",steamURL:"steam://oldsettings",parentalFeature:c.k_EParentalBlockAlways,visible:!t&&!1},{name:"#Menu_Settings",steamURL:"steam://settings",parentalFeature:c.k_EParentalBlockAlways,visible:!t},{name:"Separator4",parentalFeature:c.k_EParentalBlockAlways,visible:!t},{name:"#Menu_Exit",steamURL:"steam://exit",visible:!t}];return o.createElement(Is,{menuItems:i})},Sc=e=>{const{bOSX:t}=e,n=(0,a._T)(e,["bOSX"]),r=t?(0,he.Localize)("#Menu_Account"):o.createElement("div",{className:dc().SteamButton},o.createElement(or.SteamLogo,{className:dc().Logo}),(0,he.Localize)("#Menu_Steam"));return o.createElement(o.Fragment,null,o.createElement(gc,Object.assign({title:"Steam",menuContent:o.createElement(hc,{bOSX:t})},n),r))},bc=e=>{const{bOSX:t}=e,n=(0,jo.u1)(),a=(0,jo.WX)(),r=sc(),l=cc(),i=(0,Z.rV)().bSmallMode;let s=(0,g.IsSteamChina)();const c=[{name:"#Menu_Library",steamURL:"steam://open/library/view/home"},{name:"#Menu_HiddenGames",steamURL:"steam://open/library/collection/hidden"},{name:"#Menu_Soundtracks",steamURL:"steam://open/library/view/soundtracks",visible:!s},{name:"#Menu_Downloads",steamURL:"steam://open/downloads"},{name:"Separator1"},{name:"#Menu_SmallMode",steamURL:"steam://open/minigameslist",visible:!t&&!i},{name:"#Menu_LargeMode",steamURL:"steam://open/largegameslist",visible:!t&&i},{name:"#Menu_BigPictureMode",steamURL:"steam://open/bigpicture",visible:!s},{name:"Separator2",visible:n&&!s},{name:"#Menu_StartVR",onClick:r,visible:n&&!a&&!s},{name:"#Menu_ExitVR",onClick:l,visible:n&&a&&!s},{name:"Separator3"},{name:"#Menu_FriendsChat",steamURL:"steam://open/friends",parentalFeature:4},{name:"#Menu_Players",steamURL:"steam://friends/players",parentalFeature:4},{name:"#Menu_OldPlayers",steamURL:"steam://friends/oldplayers",parentalFeature:4,visible:!1},{name:"#Menu_Servers",steamURL:"steam://open/servers",visible:!s},{name:"#Menu_OldServers",steamURL:"steam://open/oldservers",visible:!1},{name:"#Menu_Screenshots",steamURL:"steam://open/screenshots"},{name:"#Menu_Inventory",steamURL:"steam://open/inventory",visible:!s},{name:"#Menu_NewForYou",steamURL:"steam://open/newforyou",visible:!s}];return o.createElement(Is,{menuItems:c})},vc=e=>{const{bOSX:t}=e,n=(0,a._T)(e,["bOSX"]);return o.createElement(gc,Object.assign({title:"View",menuContent:o.createElement(bc,{bOSX:t})},n),(0,he.Localize)("#Menu_View"))},Ec=e=>{const t=(0,ce.Wm)("m_ePersonaState")==e.personaState;return o.createElement("div",{className:dc().Icon},t&&o.createElement(or.Checkmark,null))},Cc=e=>o.createElement("div",{className:dc().StatusEntry},o.createElement(Ec,{personaState:e.personaState}),o.createElement("div",null,(0,he.Localize)(e.name))),wc=e=>{const t=(0,ce.bK)(),n=(0,E.SZ)((()=>t.filter((e=>e.persona.is_online)))),a=[{name:(0,he.Localize)("#Menu_ViewFriendsList",n.length),steamURL:"steam://open/friends"},{name:"Separator1"},{name:"#Menu_AddFriend",steamURL:"steam://friends/add"},{name:"#Menu_EditProfile",steamURL:"steam://url/SteamIDEditPage"},{name:"Separator2"},{name:"#Menu_Status_Online",steamURL:"steam://friends/status/online",children:o.createElement(Cc,{name:"#Menu_Status_Online",personaState:1})},{name:"#Menu_Status_Away",steamURL:"steam://friends/status/away",children:o.createElement(Cc,{name:"#Menu_Status_Away",personaState:3})},{name:"#Menu_Status_Invisible",steamURL:"steam://friends/status/invisible",children:o.createElement(Cc,{name:"#Menu_Status_Invisible",personaState:7})},{name:"#Menu_Status_Offline",steamURL:"steam://friends/status/offline",children:o.createElement(Cc,{name:"#Menu_Status_Offline",personaState:0})}];return o.createElement(Is,{menuItems:a})},yc=e=>{const{bOSX:t}=e,n=(0,a._T)(e,["bOSX"]);return o.createElement(gc,Object.assign({title:"Friends",parentalFeature:4,menuContent:o.createElement(wc,null)},n),(0,he.Localize)("#Menu_Friends"))},fc=e=>{const{bOSX:t}=e,n=(0,a._T)(e,["bOSX"]),r=[{name:"#Menu_ViewLibrary",steamURL:"steam://open/library/view/home"},{name:"Separator1"},{name:"#Menu_ActivateRetail",onClick:o.useCallback((e=>{(0,uc.F)((0,_e.GetOwningWindowForEvent)(e))}),[])},{name:"#Menu_RedeemWallet",steamURL:"steam://url/RedeemWalletVoucher",parentalFeature:1},{name:"#Menu_ManageGifts",steamURL:"steam://url/ManageGiftsPage",parentalFeature:1},{name:"#Menu_AddNonSteam",steamURL:"steam://AddNonSteamGame"}];return(0,g.IsSteamChina)()?null:o.createElement(gc,Object.assign({title:"Games",menuItems:r},n),(0,he.Localize)("#Menu_Games"))},kc=e=>{const{bOSX:t}=e,n=(0,a._T)(e,["bOSX"]);return t?o.createElement(gc,Object.assign({title:"Window",menuItems:[{name:"#Menu_SmallMode",steamURL:"steam://open/minigameslist"}]},n),(0,he.Localize)("#Menu_Window")):null},Lc=e=>{const{bOSX:t}=e,n=(0,a._T)(e,["bOSX"]);let r=(0,g.IsSteamChina)();const l=[{name:"#Menu_Support",steamURL:"steam://url/HelpFrontPage"},{name:"Separator1"},{name:"#Menu_PrivacyPolicy",steamURL:"steam://url/PrivacyPolicy"},{name:"#Menu_LegalInfo",steamURL:"steam://url/LegalInformation",visible:!r},{name:r?"#Menu_SSA_China":"#Menu_SSA",steamURL:"steam://url/SSA"},{name:"Separator2"},{name:"#Menu_SystemReport",dialog:"SystemReport",visible:(0,Ji.m4)()},{name:"#Menu_SystemInfo",dialog:"SystemInfo"},{name:"#Menu_SRSI_Diagnostics",dialog:"RuntimeInfo",visible:"linux"===g.Config.PLATFORM},{name:"Separator3"},{name:"#Menu_About",dialog:"AboutSteam"}];return o.createElement(gc,Object.assign({title:"Help",menuItems:l},n),(0,he.Localize)("#Menu_Help"))},Bc=e=>{const{className:t,bOSX:n}=e,r=(0,a._T)(e,["className","bOSX"]),[l,i]=o.useState(!1),s=()=>{i(!0)},c=()=>{i(!1)};return o.createElement("div",Object.assign({className:(0,U.default)(dc().RootMenuBar,t)},r),o.createElement(Sc,{bIsAnyMenuOpen:l,onShow:s,onHide:c,bOSX:n}),o.createElement(vc,{bIsAnyMenuOpen:l,onShow:s,onHide:c,bOSX:n}),o.createElement(yc,{bIsAnyMenuOpen:l,onShow:s,onHide:c,bOSX:n}),o.createElement(fc,{bIsAnyMenuOpen:l,onShow:s,onHide:c,bOSX:n}),o.createElement(kc,{bIsAnyMenuOpen:l,onShow:s,onHide:c,bOSX:n}),o.createElement(Lc,{bIsAnyMenuOpen:l,onShow:s,onHide:c,bOSX:n}))}; |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We might have to also patch JavaScript code for more complex changes.
This discussion is for JS patch ideas and for evaluating if we want to implement that eventually.
Beta Was this translation helpful? Give feedback.
All reactions