From 6417b451baad4e27e364e0ebc51ef48e0b77e586 Mon Sep 17 00:00:00 2001 From: everestmcarthur Date: Sat, 1 Aug 2026 19:04:49 +0000 Subject: [PATCH] deploy: 7723e299a6112fee4da4ccf5ff15b1777fb4a463 --- plugins-data.json | 17 ++++++++++------- rose-utils/install/index.js | 4 ++-- rose-utils/install/manifest.json | 2 +- server-drawer/install/index.js | 2 +- server-drawer/install/manifest.json | 2 +- 5 files changed, 15 insertions(+), 12 deletions(-) diff --git a/plugins-data.json b/plugins-data.json index d5e6f8b..23fbc26 100644 --- a/plugins-data.json +++ b/plugins-data.json @@ -143,8 +143,8 @@ "category": "Moderation & Appearance", "status": "revived", "accent": "#F97316", - "tagline": "Turns the Quest Dock into an expandable server grid, with smarter folders.", - "note": "Fork of kmmiio99o's ServerDrawer. One lookup (useMobileQuestDock) was missing an optional-chaining guard - if that lookup came back empty, the whole onLoad threw and every patch after it in the sequence never got applied, not just that one surface. Fixed, plus every patch call is now wrapped so a single bad lookup only skips its own surface. Folder options (auto-collapse, hide preview icons) are adapted from fres621's BetterFolders - its icon-hiding half patched a \"GuildContainer\" component that no longer exists anywhere in current Discord builds (confirmed against decompiled source), and only applied to the native server rail anyway, which this plugin already replaces - so it's been rebuilt as a feature of the drawer's own folders instead.", + "tagline": "An expandable server grid with DMs, smarter folders, and mark-all-read built in.", + "note": "Fork of kmmiio99o's ServerDrawer. One lookup (useMobileQuestDock) was missing an optional-chaining guard - if that lookup came back empty, the whole onLoad threw and every patch after it in the sequence never got applied, not just that one surface. Fixed, plus every patch call is now wrapped so a single bad lookup only skips its own surface. Folder options (auto-collapse, hide preview icons) are adapted from fres621's BetterFolders - its icon-hiding half patched a \"GuildContainer\" component that no longer exists anywhere in current Discord builds (confirmed against decompiled source), and only applied to the native server rail anyway, which this plugin already replaces - so it's been rebuilt as a feature of the drawer's own folders instead. Two more bugs fixed after real device testing: guild icons that never loaded (GuildStore lookups weren't reactive to guild data streaming in after connect, so most servers just showed a bare unread dot with no icon) and taps in the drawer not navigating anywhere (several lookups - transitionToGuild, the create/join action, the root nav ref - were resolved once at plugin-load time, before Discord had necessarily required those modules yet, same class of bug as YouBar+'s startup race). Both fixed; DMs also moved from a leftover sidebar icon into the drawer itself, and a mark-all-servers-as-read button was added.", "howItWorks": "Hijacks the Quest Dock - the strip Discord normally uses for daily quests, right above the tab bar - and puts a grid of your servers there instead. Tap it to expand, tap a server to jump to it, long-press for the usual context menu (mark as read, notification settings, leave, etc). A + button opens Discord's own create/join-server modal. Optionally hides the left server rail down to a single DMs icon, since your servers now live in the drawer instead.", "features": [ "Tap-to-expand server grid with folders, unread badges, and mention counts", @@ -153,10 +153,12 @@ "Optional: collapse the left server rail to a single DMs icon", "Toggle unread badges independently", "Auto-collapse other open folders when you open a new one", - "Optional plain folder icon instead of the 4-server preview when collapsed" + "Optional plain folder icon instead of the 4-server preview when collapsed", + "DMs tile in the drawer instead of a separate sidebar icon", + "Mark every channel in every server as read in one tap" ], "commands": [], - "limitations": "Depends on several internal Quest Dock lookups (11 in total) - each is individually guarded, so a future Discord rename degrades one surface at a time instead of breaking the whole plugin. Drawer position (left/right/top) is planned but not in this build yet - it currently only replaces the Quest Dock's native bottom position.", + "limitations": "Depends on several internal Quest Dock lookups (11 in total) - each is individually guarded, so a future Discord rename degrades one surface at a time instead of breaking the whole plugin. Drawer position (left/right/top) is still planned but not in this build yet - it currently only replaces the Quest Dock's native bottom position.", "pageUrl": "https://rp.jarviscli.dev/server-drawer/", "installUrl": "https://rp.jarviscli.dev/server-drawer/install/", "sourceUrl": "https://github.com/everestmcarthur/revenge-plugins/tree/main/plugins/server-drawer", @@ -387,8 +389,8 @@ "category": "Utility", "status": "revived", "accent": "#F0637E", - "tagline": "A grab-bag of independent utilities - Spotify listen-along, a Tenor fix, colorful channels, and more.", - "note": "Fork of nexpid's NexxUtils. Fixed the reported \"render is not a function in SpotifyPlayButton\" crash - Discord converted it from a class component to a function component, confirmed against decompiled current-build source, so patching .prototype.render no longer worked. Also fixed six other lookups across the plugin that had the same unguarded pattern that crashed FPTE's whole bundle at load time - any one of them failing would have taken the entire plugin down, not just one module.", + "tagline": "Spotify listen-along, a Tenor fix, colorful channels, and more - now actually working.", + "note": "Fork of nexpid's NexxUtils. Fixed the reported \"render is not a function in SpotifyPlayButton\" crash - Discord converted it from a class component to a function component, confirmed against decompiled current-build source, so patching .prototype.render no longer worked. Also fixed six other lookups across the plugin that had the same unguarded pattern that crashed FPTE's whole bundle at load time - any one of them failing would have taken the entire plugin down, not just one module. A more serious bug was found and fixed after real device testing: opening RoseUtils' own settings screen crashed outright with \"Cannot convert undefined value to object\". Root cause, confirmed by reading the compiled bundle directly: this repo's SWC build config lowers class syntax to plain functions for compatibility, but doesn't also handle the separate class-fields transform, so every field initializer on the internal Module class (errors, patches, started, listeners) was silently dropped from the compiled output - every module was missing all four. Fixed by assigning them in the constructor body instead, which every build target handles the same way. Also added a new module: Enforce Developer Mode, which keeps Discord's Developer Mode switched on since it tends to reset itself on Revenge.", "howItWorks": "Each utility is its own independently toggleable module: Spotify listen-along buttons on activities, a fix for Tenor GIFs downloading as videos, an invite-to-listen-along button in the chat attachment menu, a fun \"minimod\" that shows member timeouts in chat, and colorful/NSFW-tagged channel icons. Every module tracks its own errors and shows a one-tap \"copy report\" row if something goes wrong, so a problem in one module is easy to report without digging through logs. The original's Material-Design component reskin (Switch/Toast/Alert) wasn't ported - it depends on react-native-reanimated, which isn't part of this build, and it was already disabled by default upstream due to known issues.", "features": [ "Spotify listen-along buttons on activities (fixed)", @@ -396,7 +398,8 @@ "Send-a-Spotify-invite button in the attachment menu", "Minimod: shows member timeouts in chat", "Colorful, NSFW-tagged channel icons", - "Per-module error tracking with one-tap copy for bug reports" + "Per-module error tracking with one-tap copy for bug reports", + "Enforce Developer Mode - keeps it on since it resets itself on Revenge-based clients" ], "commands": [], "limitations": "The Material-Design component reskin from the original isn't included (needs react-native-reanimated). Each module was fixed and defensively guarded, but only the specific reported crash was verified against live decompiled source - the rest are guarded, not individually confirmed working on-device.", diff --git a/rose-utils/install/index.js b/rose-utils/install/index.js index a38c4c0..2e6ad17 100644 --- a/rose-utils/install/index.js +++ b/rose-utils/install/index.js @@ -1,4 +1,4 @@ -(function(v,g,o,a,c,H,h,S,b,R){"use strict";function T(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function N(e,t){for(var n=0;nn&&(r.message.communicationDisabled=!0)}))},onStop(){}}});const ge=o.findByStoreName("ThemeStore"),he=o.find(function(e){return e?.default?.internal?.resolveSemanticColor})?.default?.internal?.resolveSemanticColor??o.find(function(e){return e?.meta?.resolveSemanticColor})?.meta?.resolveSemanticColor??function(){};function V(e,t=ge?.theme){if(e)try{return he(t,e)}catch{return}}const{View:be,Text:ye}=a.ReactNative,W={destructive:{bg:"#F23F42",fg:"#FFFFFF"},default:{bg:"#4E5058",fg:"#FFFFFF"}};function pe({variant:e="default",children:t}){const n=W[e]??W.default;return a.React.createElement(be,{style:{backgroundColor:n.bg,borderRadius:4,paddingHorizontal:4,paddingVertical:1,marginLeft:4,alignSelf:"center"}},a.React.createElement(ye,{style:{color:n.fg,fontSize:10,fontWeight:"700",textTransform:"uppercase"}},t))}var ve="f47fd463dcaac61e.png",Se="f944dbd033a60207.png",Re="88eacd3588829ded.png",we="4d1aef97fe869aaf.png",Ee="3a73d84a21043a5e.png",ke="8b628d7e3fc05957.png",me="cb7a2c9b3fb9561c.png",Fe="11d89273b5bd6cc6.png",$e="ea31146eb15fdde7.png",Ae="b0d124bd12658047.png",Ce="cb8b45023e70bb61.png",Te="a738efc867a225ee.png",Ne="cba17334eeaf3198.png",Ie="fead9e69933db668.png",Le="fead9e69933db668.png",Be="d6a4e512cdcf1078.png",xe="9901722947705011.png",Pe=function(e){return e.Lock="Lock",e.Warning="Warning",e.Controller="Controller",e}(Pe||{});function De(e,t){if(e==="Lock")return t?$e:Fe;if(e==="Warning")return t?xe:Be;if(e==="Controller")return Re}const Ue={Lock:["#f0b232","STATUS_WARNING"],Warning:["#f23f43","STATUS_DANGER"],Controller:["#23a55a","STATUS_POSITIVE"]},Me=[{name:"Announcements",kind:"Lock",base:ve},{name:"Announcements",kind:"Warning",base:Se},{name:"Text",kind:"Lock",base:Te},{name:"Text",kind:"Warning",base:Ne},{name:"Text",kind:"Controller",base:Ce},{name:"Voice",kind:"Lock",base:Ie},{name:"Voice",kind:"Warning",base:Le},{name:"Forum",kind:"Lock",base:we},{name:"Forum",kind:"Warning",base:Ee},{name:"Stage",kind:"Lock",bottom:!0,base:Ae},{name:"Stage",kind:"Warning",bottom:!0,base:0},{name:"Image",kind:"Lock",bottom:!0,base:ke},{name:"Image",kind:"Warning",bottom:!0,base:me}],O=o.findByName("ChannelInfo",!1),j=o.findByProps("BaseChannelIcon");var _e=new d({id:"colorful-channels",label:"Colorful Channels",meta:{sublabel:"Gives channel icons with symbols colors to make them more aesthetically pleasing",category:u.Useful},settings:{nsfwTag:{label:"NSFW tag",subLabel:"Adds a red NSFW tag next to channel names",type:"toggle",default:!0},colorIcons:{label:"Colored icon symbols",subLabel:"Turns locked channel symbols yellow, NSFW channel symbols red",type:"toggle",default:!0},colorIconsFallback:{label:"Fallback colors for colored icon symbols",subLabel:"Uses yellow, red and green colors regardless of theme",type:"toggle",default:!1}},handlers:{onStart(){var e=this;this.storage.options.nsfwTag&&O&&this.patches.add(c.after("default",O,function([{channel:t}],n){return a.React.createElement(a.React.Fragment,{},t?.nsfw_&&a.React.createElement(pe,{variant:"destructive"},"nsfw"),n)})),this.storage.options.colorIcons&&j?.BaseChannelIcon&&this.patches.add(c.after("BaseChannelIcon",j,function([{source:t,style:n}],r){try{const i=typeof t?.original=="number"?b.getAssetByID(t.original)?.name:typeof t=="number"?b.getAssetByID(t)?.name:null;if(!i)return;const s=Me.find(function(G){return i===`${G.name}${G.kind}Icon`});if(!s)return;const[l,A]=Ue[s.kind],C=De(s.kind,s.bottom),f=r?.props?.color?.replace(/-/g,"_")?.toUpperCase(),Ze=f&&R.semanticColors?.[f]?V(R.semanticColors[f]):void 0,z=a.ReactNative.StyleSheet.flatten([n,r?.props?.style,{width:18,height:18,tintColor:Ze}]),et=e.storage.options.colorIconsFallback?l:V(R.semanticColors?.[A])??l;return a.React.createElement(a.ReactNative.View,{},a.React.createElement(a.ReactNative.Image,{style:z,source:s.base}),a.React.createElement(a.ReactNative.View,{style:{position:"absolute",right:0,bottom:0}},a.React.createElement(a.ReactNative.Image,{style:{...z,tintColor:et},source:C})))}catch{return}}))},onStop(){}}}),F=[te,ne,ue,fe,_e];const{ScrollView:Ve,View:We}=a.ReactNative;function Oe({children:e}){return a.React.createElement(Ve,{style:{flex:1}},e,a.React.createElement(We,{style:{height:24}}))}const{View:je,Text:Ye}=a.ReactNative;function ze({children:e,style:t}){return a.React.createElement(je,{style:[{marginHorizontal:16,marginVertical:8,padding:10,borderRadius:8,borderWidth:1,borderColor:"rgba(128,128,128,0.25)"},t]},a.React.createElement(Ye,{style:{fontSize:12.5,lineHeight:18,opacity:.75}},e))}const{FormSection:Ge,FormSwitchRow:Y,FormRow:$}=S.Forms;function He(e,t){return typeof e.subLabel=="function"?e.subLabel(t):e.subLabel}function Ke({module:e,settingKey:t}){const n=e.settings[t];if(n.predicate&&!n.predicate.call(e))return null;const r=e.storage.options[t],i=He(n,r),s=!e.storage.enabled;return n.type==="toggle"?a.React.createElement(Y,{label:n.label,subLabel:i,value:!!r,disabled:s,onValueChange:function(l){e.storage.options[t]=l,e.restart()}}):n.type==="button"?a.React.createElement($,{label:n.label,subLabel:i,disabled:s,onPress:function(){return n.action.call(e)}}):a.React.createElement($,{label:n.label,subLabel:[i,r].filter(Boolean).join(" - "),disabled:s,onPress:function(){const l=n.choices.indexOf(r);e.storage.options[t]=n.choices[(l+1)%n.choices.length],e.restart()}})}function Je({module:e}){e.useRefresh();const t=Object.entries(e.errors);return a.React.createElement(Ge,{title:e.label},a.React.createElement(Y,{label:"Enabled",subLabel:e.meta.sublabel,value:!!e.storage.enabled,onValueChange:function(){return e.toggle()}}),e.storage.enabled&&Object.keys(e.settings).map(function(n){return a.React.createElement(Ke,{key:n,module:e,settingKey:n})}),t.length>0&&a.React.createElement($,{label:`${t.length} error${t.length===1?"":"s"} - tap to copy`,onPress:function(){const n=t.map(function([r,i]){return`[${e.label}] ${r} +(function(S,g,o,a,u,H,h,R,b,w){"use strict";function C(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function N(e,t){for(var n=0;nn&&(r.message.communicationDisabled=!0)}))},onStop(){}}});const he=o.findByStoreName("ThemeStore"),be=o.find(function(e){return e?.default?.internal?.resolveSemanticColor})?.default?.internal?.resolveSemanticColor??o.find(function(e){return e?.meta?.resolveSemanticColor})?.meta?.resolveSemanticColor??function(){};function O(e,t=he?.theme){if(e)try{return be(t,e)}catch{return}}const{View:ye,Text:pe}=a.ReactNative,V={destructive:{bg:"#F23F42",fg:"#FFFFFF"},default:{bg:"#4E5058",fg:"#FFFFFF"}};function ve({variant:e="default",children:t}){const n=V[e]??V.default;return a.React.createElement(ye,{style:{backgroundColor:n.bg,borderRadius:4,paddingHorizontal:4,paddingVertical:1,marginLeft:4,alignSelf:"center"}},a.React.createElement(pe,{style:{color:n.fg,fontSize:10,fontWeight:"700",textTransform:"uppercase"}},t))}var Se="f47fd463dcaac61e.png",Re="f944dbd033a60207.png",we="88eacd3588829ded.png",Ee="4d1aef97fe869aaf.png",ke="3a73d84a21043a5e.png",me="8b628d7e3fc05957.png",$e="cb7a2c9b3fb9561c.png",Fe="11d89273b5bd6cc6.png",Te="ea31146eb15fdde7.png",Ae="b0d124bd12658047.png",Ce="cb8b45023e70bb61.png",Ne="a738efc867a225ee.png",Ie="cba17334eeaf3198.png",Be="fead9e69933db668.png",Le="fead9e69933db668.png",De="d6a4e512cdcf1078.png",xe="9901722947705011.png",Pe=function(e){return e.Lock="Lock",e.Warning="Warning",e.Controller="Controller",e}(Pe||{});function Me(e,t){if(e==="Lock")return t?Te:Fe;if(e==="Warning")return t?xe:De;if(e==="Controller")return we}const Ue={Lock:["#f0b232","STATUS_WARNING"],Warning:["#f23f43","STATUS_DANGER"],Controller:["#23a55a","STATUS_POSITIVE"]},_e=[{name:"Announcements",kind:"Lock",base:Se},{name:"Announcements",kind:"Warning",base:Re},{name:"Text",kind:"Lock",base:Ne},{name:"Text",kind:"Warning",base:Ie},{name:"Text",kind:"Controller",base:Ce},{name:"Voice",kind:"Lock",base:Be},{name:"Voice",kind:"Warning",base:Le},{name:"Forum",kind:"Lock",base:Ee},{name:"Forum",kind:"Warning",base:ke},{name:"Stage",kind:"Lock",bottom:!0,base:Ae},{name:"Stage",kind:"Warning",bottom:!0,base:0},{name:"Image",kind:"Lock",bottom:!0,base:me},{name:"Image",kind:"Warning",bottom:!0,base:$e}],W=o.findByName("ChannelInfo",!1),j=o.findByProps("BaseChannelIcon");var Oe=new d({id:"colorful-channels",label:"Colorful Channels",meta:{sublabel:"Gives channel icons with symbols colors to make them more aesthetically pleasing",category:c.Useful},settings:{nsfwTag:{label:"NSFW tag",subLabel:"Adds a red NSFW tag next to channel names",type:"toggle",default:!0},colorIcons:{label:"Colored icon symbols",subLabel:"Turns locked channel symbols yellow, NSFW channel symbols red",type:"toggle",default:!0},colorIconsFallback:{label:"Fallback colors for colored icon symbols",subLabel:"Uses yellow, red and green colors regardless of theme",type:"toggle",default:!1}},handlers:{onStart(){var e=this;this.storage.options.nsfwTag&&W&&this.patches.add(u.after("default",W,function([{channel:t}],n){return a.React.createElement(a.React.Fragment,{},t?.nsfw_&&a.React.createElement(ve,{variant:"destructive"},"nsfw"),n)})),this.storage.options.colorIcons&&j?.BaseChannelIcon&&this.patches.add(u.after("BaseChannelIcon",j,function([{source:t,style:n}],r){try{const i=typeof t?.original=="number"?b.getAssetByID(t.original)?.name:typeof t=="number"?b.getAssetByID(t)?.name:null;if(!i)return;const s=_e.find(function(G){return i===`${G.name}${G.kind}Icon`});if(!s)return;const[l,T]=Ue[s.kind],A=Me(s.kind,s.bottom),f=r?.props?.color?.replace(/-/g,"_")?.toUpperCase(),nt=f&&w.semanticColors?.[f]?O(w.semanticColors[f]):void 0,z=a.ReactNative.StyleSheet.flatten([n,r?.props?.style,{width:18,height:18,tintColor:nt}]),at=e.storage.options.colorIconsFallback?l:O(w.semanticColors?.[T])??l;return a.React.createElement(a.ReactNative.View,{},a.React.createElement(a.ReactNative.Image,{style:z,source:s.base}),a.React.createElement(a.ReactNative.View,{style:{position:"absolute",right:0,bottom:0}},a.React.createElement(a.ReactNative.Image,{style:{...z,tintColor:at},source:A})))}catch{return}}))},onStop(){}}});const Ve=o.findByProps("DeveloperMode","DarkSidebar");var We=new d({id:"enforce-developer-mode",label:"Enforce Developer Mode",meta:{sublabel:"Keeps Developer Mode switched on - it tends to reset itself on Revenge-based clients",category:c.Fixes},handlers:{onStart(){const e=Ve?.DeveloperMode;if(!e?.getSetting||!e?.updateSetting)return;const t=function(){try{e.getSetting()||e.updateSetting(!0)}catch{}};t(),this.patches.add(p("USER_SETTINGS_PROTO_UPDATE",t))},onStop(){}}}),$=[ne,ae,de,ge,Oe,We];const{ScrollView:je,View:Ye}=a.ReactNative;function ze({children:e}){return a.React.createElement(je,{style:{flex:1}},e,a.React.createElement(Ye,{style:{height:24}}))}const{View:Ge,Text:He}=a.ReactNative;function Ke({children:e,style:t}){return a.React.createElement(Ge,{style:[{marginHorizontal:16,marginVertical:8,padding:10,borderRadius:8,borderWidth:1,borderColor:"rgba(128,128,128,0.25)"},t]},a.React.createElement(He,{style:{fontSize:12.5,lineHeight:18,opacity:.75}},e))}const{FormSection:Je,FormSwitchRow:Y,FormRow:F}=R.Forms;function qe(e,t){return typeof e.subLabel=="function"?e.subLabel(t):e.subLabel}function Qe({module:e,settingKey:t}){const n=e.settings[t];if(n.predicate&&!n.predicate.call(e))return null;const r=e.storage.options[t],i=qe(n,r),s=!e.storage.enabled;return n.type==="toggle"?a.React.createElement(Y,{label:n.label,subLabel:i,value:!!r,disabled:s,onValueChange:function(l){e.storage.options[t]=l,e.restart()}}):n.type==="button"?a.React.createElement(F,{label:n.label,subLabel:i,disabled:s,onPress:function(){return n.action.call(e)}}):a.React.createElement(F,{label:n.label,subLabel:[i,r].filter(Boolean).join(" - "),disabled:s,onPress:function(){const l=n.choices.indexOf(r);e.storage.options[t]=n.choices[(l+1)%n.choices.length],e.restart()}})}function Xe({module:e}){e.useRefresh();const t=Object.entries(e.errors);return a.React.createElement(Je,{title:e.label},a.React.createElement(Y,{label:"Enabled",subLabel:e.meta.sublabel,value:!!e.storage.enabled,onValueChange:function(){return e.toggle()}}),e.storage.enabled&&Object.keys(e.settings).map(function(n){return a.React.createElement(Qe,{key:n,module:e,settingKey:n})}),t.length>0&&a.React.createElement(F,{label:`${t.length} error${t.length===1?"":"s"} - tap to copy`,onPress:function(){const n=t.map(function([r,i]){return`[${e.label}] ${r} ${i}`}).join(` -`);a.clipboard.setString(n),h.showToast("Copied - paste this when reporting the issue",void 0)}}))}const qe=[u.Useful,u.Fixes,u.Fun];function Qe(){return a.React.createElement(Oe,null,a.React.createElement(ze,null,"RoseUtils is a collection of small, independent utilities - toggle whichever ones you want. Fork of nexpid's NexxUtils, with fixes for lookups that broke on newer Discord versions. If a module shows an error below, tap it to copy the details for a bug report."),qe.flatMap(function(e){return F.filter(function(t){return t.meta.category===e}).map(function(t){return a.React.createElement(Je,{key:t.id,module:t})})}))}var Xe={onLoad(){y.modules??={};for(const e of F)try{e.storage.enabled&&e.start()}catch(t){g.logger.error(`[RoseUtils] Failed to start "${e.label}" on load: ${t}`)}},onUnload(){for(const e of F)try{e.stop()}catch(t){g.logger.error(`[RoseUtils] Failed to stop "${e.label}" cleanly: ${t}`)}},settings:Qe};return v.default=Xe,Object.defineProperty(v,"__esModule",{value:!0}),v})({},vendetta,vendetta.metro,vendetta.metro.common,vendetta.patcher,vendetta.plugin,vendetta.ui.toasts,vendetta.ui.components,vendetta.ui.assets,vendetta.ui); +`);a.clipboard.setString(n),h.showToast("Copied - paste this when reporting the issue",void 0)}}))}const Ze=[c.Useful,c.Fixes,c.Fun];function et(){return a.React.createElement(ze,null,a.React.createElement(Ke,null,"RoseUtils is a collection of small, independent utilities - toggle whichever ones you want. Fork of nexpid's NexxUtils, with fixes for lookups that broke on newer Discord versions. If a module shows an error below, tap it to copy the details for a bug report."),Ze.flatMap(function(e){return $.filter(function(t){return t.meta.category===e}).map(function(t){return a.React.createElement(Xe,{key:t.id,module:t})})}))}var tt={onLoad(){y.modules??={};for(const e of $)try{e.storage.enabled&&e.start()}catch(t){g.logger.error(`[RoseUtils] Failed to start "${e.label}" on load: ${t}`)}},onUnload(){for(const e of $)try{e.stop()}catch(t){g.logger.error(`[RoseUtils] Failed to stop "${e.label}" cleanly: ${t}`)}},settings:et};return S.default=tt,Object.defineProperty(S,"__esModule",{value:!0}),S})({},vendetta,vendetta.metro,vendetta.metro.common,vendetta.patcher,vendetta.plugin,vendetta.ui.toasts,vendetta.ui.components,vendetta.ui.assets,vendetta.ui); diff --git a/rose-utils/install/manifest.json b/rose-utils/install/manifest.json index 97b2cac..d7aa4a7 100644 --- a/rose-utils/install/manifest.json +++ b/rose-utils/install/manifest.json @@ -1 +1 @@ -{"name":"RoseUtils","description":"A small collection of independent utilities - Spotify listen-along, a Tenor download fix, colorful channel icons, and more. Fork of nexpid's NexxUtils.","authors":[{"name":"everestmcarthur"},{"name":"nexpid"}],"main":"index.js","hash":"f38420b78e1d622085a482a51db142f592c4e093a8c77c429734adfcddaa7ad6"} \ No newline at end of file +{"name":"RoseUtils","description":"A small collection of independent utilities - Spotify listen-along, a Tenor download fix, colorful channel icons, and more. Fork of nexpid's NexxUtils.","authors":[{"name":"everestmcarthur"},{"name":"nexpid"}],"main":"index.js","hash":"54b0f23d30bed6575a7bf8fac7d58655e055c31a05225b49d6e2ee06b545d8f0"} \ No newline at end of file diff --git a/server-drawer/install/index.js b/server-drawer/install/index.js index 33277f6..4353378 100644 --- a/server-drawer/install/index.js +++ b/server-drawer/install/index.js @@ -1 +1 @@ -(function(V,de,d,s,u,n,o,X,H,ce,ze){"use strict";function qe(e){const t=s.findByProps("useIsMobileQuestDockRendered");if(!t?.useIsMobileQuestDockRendered)return!1;const r=t.useIsMobileQuestDockRendered;return t.useIsMobileQuestDockRendered=function(...i){return r.apply(this,i),!0},e.push(function(){t.useIsMobileQuestDockRendered=r}),!0}function Xe(e){const t=s.findByProps("useIsMobileQuestDockRenderedBase");if(!t?.useIsMobileQuestDockRenderedBase)return!1;const r=t.useIsMobileQuestDockRenderedBase;return t.useIsMobileQuestDockRenderedBase=function(...i){return r.apply(this,i),!0},e.push(function(){t.useIsMobileQuestDockRenderedBase=r}),!0}function Je(e){const t=s.findByProps("useMobileQuestDock");if(!t?.useMobileQuestDock)return!1;const r=t.useMobileQuestDock;return t.useMobileQuestDock=function(...i){return r.apply(this,i)||{id:"server-drawer",config:{quest_content_type:0,assets:{questBarHeroVideo:null,questBarHero:null},features:[]},userStatus:{enrolledAt:"2099-01-01",claimedAt:null},benefits:{rewards:[]},guildId:"0",tasks:[]}},e.push(function(){t.useMobileQuestDock=r}),!0}const Ke="[ServerDrawer]";function Ye(e){const t=s.findByProps("getQuestAsset");if(!t?.getQuestAsset)return console.log(Ke,"WARN: getQuestAsset not found"),!1;const r=t.getQuestAsset;return t.getQuestAsset=function(...i){try{return r.apply(this,i)}catch{return{url:null,isAnimated:!1}}},e.push(function(){t.getQuestAsset=r}),!0}const Ze=s.findByStoreName("GuildStore"),$e=s.findByProps("colors","unsafe_rawColors")?.colors;function fe({id:e,size:t=48}){const r=Ze?.getGuild(e);if(!r)return null;const i=t>=40?16:8;return r.icon?n.createElement(o.Image,{source:{uri:`https://cdn.discordapp.com/icons/${r.id}/${r.icon}.png?size=${t*2}`},style:{width:t,height:t,borderRadius:i}}):n.createElement(o.View,{style:[he.fallback,{width:t,height:t,borderRadius:i,backgroundColor:$e?.BG_ACCENT??"#5865f2"}]},n.createElement(o.Text,{style:[he.letter,{fontSize:Math.max(10,t*.4)}]},r.name?.split(" ").map(function(l){return l[0]}).join("").slice(0,2).toUpperCase()||"?"))}const he=o.StyleSheet.create({fallback:{alignItems:"center",justifyContent:"center"},letter:{color:"#fff",fontWeight:"700"}}),Ne=s.findByStoreName("ThemeStore"),et=s.find(function(e){return e?.default?.internal?.resolveSemanticColor})?.default?.internal?.resolveSemanticColor??s.find(function(e){return e?.meta?.resolveSemanticColor})?.meta?.resolveSemanticColor??function(){};function tt(e,t=Ne?.theme){if(e)try{return et(t,e)}catch{return}}const pe=s.findByProps("TextStyleSheet")?.TextStyleSheet,ge=s.findByProps("triggerHapticFeedback","HapticFeedbackTypes");function Q(e,t){return tt(e)??t}const D=12,J=12,ye=42,K=220,me=4,F=16,M=20,be={tension:200,friction:20};function nt({visible:e,items:t,title:r,anchorX:i,anchorY:l,onClose:c}){const{width:h,height:k}=o.Dimensions.get("window"),R=(r?J+20+me:0)+t.length*ye;let m=i,g=l+48+10;m+K>h-D&&(m=h-K-D),mk-D&&(g=l-R-10),g0?n.createElement(o.View,{style:x.outline},n.createElement(o.View,{style:x.badge},n.createElement(o.Text,{style:x.text},t>99?"99+":String(t)))):r?n.createElement(o.View,{style:x.dotOutline},n.createElement(o.View,{style:x.dot})):null:null}function Se({node:e,onPick:t}){const r=n.useRef(null),i=n.useRef(new o.Animated.Value(1)).current,l=function(){return o.Animated.spring(i,{toValue:.85,useNativeDriver:!0}).start()},c=function(){return o.Animated.spring(i,{toValue:1,useNativeDriver:!0}).start()},[h,k]=n.useState({visible:!1,items:[],title:"",x:0,y:0}),R=n.useCallback(function(){const B=e.id,a=ot?.getGuild?.(B),b=s.find(function(y){return y?.default?.name==="getGuildsBarGuildMenuItems"})?.default??s.find(function(y){return typeof y?.default=="function"&&y.default.length<=2&&/guild/i.test(y.default.name??"")})?.default;if(!a||!b)return;const se=rt?.getGuildsTree?.()?.version,I=b(B,se);if(!I?.length)return;const P=r.current;P?.measure&&P.measure(function(y,ie,le,G,T,E){k({visible:!0,items:I.map(function(C){return{label:C.label??C.title??"Unknown",action:C.action,danger:C.variant==="destructive",iconSource:C.iconSource,IconComponent:C.IconComponent}}),title:a.name,x:T,y:E})})},[e.id]),m=n.useCallback(function(){Ce?.triggerHapticFeedback?.(Ce.HapticFeedbackTypes.IMPACT_MEDIUM),R()},[R]),g=e.id;return n.createElement(n.Fragment,null,n.createElement(o.Pressable,{onPressIn:l,onPressOut:c,onPress:function(){return t(g)},onLongPress:m,delayLongPress:500},n.createElement(o.View,{ref:r,style:we.outer,collapsable:!1},n.createElement(o.Animated.View,{style:[we.icon,{transform:[{scale:i}]}]},n.createElement(fe,{id:g})),n.createElement(st,{guildId:g}))),n.createElement(nt,{visible:h.visible,items:h.items,title:h.title,anchorX:h.x,anchorY:h.y,onClose:function(){return k(function(B){return{...B,visible:!1}})}}))}const we=o.StyleSheet.create({outer:{width:L,height:L},icon:{width:L,height:L,borderRadius:16,overflow:"hidden"}}),x=o.StyleSheet.create({outline:{position:"absolute",bottom:-3,right:-3,minWidth:23,minHeight:23,borderRadius:12,backgroundColor:"#1a1a2e",alignItems:"center",justifyContent:"center"},badge:{minWidth:19,height:19,borderRadius:9,backgroundColor:"#ed4245",alignItems:"center",justifyContent:"center",paddingHorizontal:5},text:{color:"#fff",fontSize:10,fontWeight:"700",lineHeight:19},dotOutline:{position:"absolute",bottom:-2,right:-2,width:14,height:14,borderRadius:7,backgroundColor:"#1a1a2e",alignItems:"center",justifyContent:"center"},dot:{width:10,height:10,borderRadius:5,backgroundColor:"#ed4245"}}),it=s.findByProps("useStateFromStores");s.findByProps("colors","unsafe_rawColors")?.colors;const ke=s.findByStoreName("ExpandedGuildFolderStore");function lt(e){return it?.useStateFromStores?.([ke],function(){const t=ke?.getExpandedFolders?.();return t instanceof Set?t.has(e):!1},[e])??!1}const ut=s.findByProps("toggleGuildFolderExpand"),at=s.findByProps("useStateFromStores"),Re=s.findByStoreName("GuildReadStateStore"),S=48,Z=16,dt=[{top:6,left:6},{top:6,right:6},{bottom:6,left:6},{bottom:6,right:6}],Be=ce.getAssetIDByName("FolderIcon");function De(e){return e==null?"#5865f2":`#${e.toString(16).padStart(6,"0")}`}function ct({node:e}){const t=at?.useStateFromStores?.([Re],function(){let r=0;for(const i of e.children)r+=Re?.getMentionCount?.(i.id)??0;return r},[e.children])??0;return t>0?n.createElement(o.View,{style:N.outline},n.createElement(o.View,{style:N.badge},n.createElement(o.Text,{style:N.text},t>99?"99+":String(t)))):null}function ft({node:e}){X.useProxy(d.storage);const t=De(e.color);return n.createElement(o.View,{style:_.outer},n.createElement(o.View,{style:[_.icon,{backgroundColor:t}]},d.storage.hideFolderIcons?n.createElement(o.View,{style:_.plainIcon},n.createElement(o.Image,{source:Be,style:$.folderImg,tintColor:"#fff"})):e.children.slice(0,4).map(function(r,i){return n.createElement(o.View,{key:r.id,style:[_.cell,dt[i]]},n.createElement(fe,{id:r.id,size:Z}))})),n.createElement(ct,{node:e}))}const _=o.StyleSheet.create({outer:{width:S,height:S},icon:{width:S,height:S,borderRadius:16,overflow:"hidden"},cell:{position:"absolute",width:Z,height:Z,borderRadius:8,overflow:"hidden"},plainIcon:{width:S,height:S,alignItems:"center",justifyContent:"center"}});function ht({children:e}){const t=n.useRef(new o.Animated.Value(0)).current;return n.useEffect(function(){o.Animated.timing(t,{toValue:1,duration:180,useNativeDriver:!0}).start()},[]),n.createElement(o.Animated.View,{style:{opacity:t}},e)}function pt({node:e,onPick:t}){const r=lt(e.id),i=function(){ut?.toggleGuildFolderExpand?.(e.id)};return r?n.createElement(n.Fragment,null,n.createElement(o.Pressable,{onPress:i},n.createElement(o.View,{style:[$.openIcon,{backgroundColor:De(e.color)}]},n.createElement(o.Image,{source:Be,style:$.folderImg,tintColor:"#fff"}))),e.children.map(function(l){return n.createElement(ht,{key:l.id},n.createElement(Se,{node:l,onPick:t}))})):n.createElement(o.Pressable,{onPress:i},n.createElement(ft,{node:e}))}const $=o.StyleSheet.create({openIcon:{width:S,height:S,borderRadius:16,alignItems:"center",justifyContent:"center"},folderImg:{width:24,height:24}}),N=o.StyleSheet.create({outline:{position:"absolute",bottom:-3,right:-3,minWidth:23,minHeight:23,borderRadius:12,backgroundColor:"#1a1a2e",alignItems:"center",justifyContent:"center"},badge:{minWidth:19,height:19,borderRadius:9,backgroundColor:"#ed4245",alignItems:"center",justifyContent:"center",paddingHorizontal:5},text:{color:"#fff",fontSize:10,fontWeight:"700",lineHeight:19}}),gt=s.findByProps("useStateFromStores"),Ie=s.findByStoreName("SortedGuildStore"),yt=s.findByProps("getRootNavigationRef"),W=s.findByProps("triggerHapticFeedback","HapticFeedbackTypes"),Pe=s.findByProps("transitionToGuild"),mt=s.find(function(e){return typeof e?.handleCreateJoinGuildPress=="function"}),Fe=s.find(function(e){return e?.CirclePlusIcon})?.CirclePlusIcon,xe=s.findByProps("colors","unsafe_rawColors")?.unsafe_rawColors,bt=xe?.GREEN_360,Ae=xe?.WHITE,Et=s.find(function(e){return e?.QuestDockExternalCoordinationContext}),Ge=Et?.QuestDockExternalCoordinationContext,Te=s.find(function(e){return e?.QuestDockMode?.COLLAPSED!=null})?.QuestDockMode,j=48,v=6,Ct=12;function St(){const e=n.useRef(new o.Animated.Value(1)).current,t=n.useCallback(function(){o.Animated.spring(e,{toValue:.9,useNativeDriver:!0}).start()},[e]),r=n.useCallback(function(){o.Animated.spring(e,{toValue:1,useNativeDriver:!0}).start()},[e]),i=n.useCallback(function(){W?.triggerHapticFeedback?.(W.HapticFeedbackTypes.SOFT),mt?.handleCreateJoinGuildPress?.()},[]);return n.createElement(o.Pressable,{onPress:i,onPressIn:t,onPressOut:r},n.createElement(o.Animated.View,{style:[U.createJoin,{transform:[{scale:e}]}]},Fe?n.createElement(Fe,{size:"md",color:Ae}):n.createElement(o.Text,{style:U.createJoinFallback},"+")))}function Ve({gestureContext:e}){const t=n.useCallback(function(a){W?.triggerHapticFeedback(W.HapticFeedbackTypes.SOFT),Pe?.transitionToGuild?Pe.transitionToGuild(a,null):yt?.getRootNavigationRef()?.navigate("guilds",{guildId:a})},[]),r=gt?.useStateFromStores?.([Ie],function(){return(Ie?.getGuildsTree()?.root?.children||[]).filter(function(a){return a.type!=="root"})})??[],i=e?n.useContext(e):null,l=i?.minExpandedContentHeight,c=n.useCallback(function(a){if(!l)return;const b=a.nativeEvent.layout.height;l.get()!==b&&l.set(b)},[l]),h=(Ge?n.useContext(Ge):null)?.setRestingQuestDockMode,k=i?.questDockWrapperSpecs;n.useEffect(function(){if(!h||!Te||!k)return;const a=o.BackHandler.addEventListener("hardwareBackPress",function(){return(k.get()?.height??56)>80?(h(Te.COLLAPSED),!0):!1});return function(){return a.remove()}},[h,k]);const{width:R}=o.Dimensions.get("window"),m=Math.max(3,Math.floor((R-Ct*2+v)/(j+v))),g=m*j+(m-1)*v,B=Math.max(0,(R-g)/2);return n.createElement(o.View,{style:U.alignTop},n.createElement(o.View,{style:[U.grid,{paddingHorizontal:B,gap:v}],onLayout:c},r.map(function(a){return a.type==="folder"?n.createElement(pt,{key:a.id,node:a,onPick:t}):n.createElement(Se,{key:a.id,node:a,onPick:t})}),n.createElement(St,null)))}const U=o.StyleSheet.create({alignTop:{flex:1,justifyContent:"flex-start",alignItems:"flex-start"},grid:{flexDirection:"row",flexWrap:"wrap",paddingTop:4,paddingBottom:16},createJoin:{width:j,height:j,borderRadius:16,backgroundColor:bt,alignItems:"center",justifyContent:"center"},createJoinFallback:{color:Ae,fontSize:28,fontWeight:"700",lineHeight:30}}),ee=new Map;let w=null,z=!1;function He(e,t,r){ee.set(e,{replacement:t,extraProps:r})}function wt(e){if(z)return;if(w=u.React.createElement,!w){console.warn("[ServerDrawer] React.createElement is null, skipping patch");return}const t=function(r,i,...l){if(!w)return u.React.createElement(r,i,...l);const c=ee.get(r);if(c){const h=c.extraProps?{...i,...c.extraProps}:i;return w.call(u.React,c.replacement,h,...l)}return w.call(u.React,r,i,...l)};Object.assign(t,w),u.React.createElement=t,z=!0,e.push(function(){z&&w&&(u.React.createElement=w,z=!1),ee.clear()})}const te="[ServerDrawer]";let ne=null;function Qe(){return ne||(ne=s.find(function(e){return e?.QuestDockGestureContext})?.QuestDockGestureContext??null),ne}function kt(e){const t=s.find(function(i){return i?.type?.displayName==="QuestDockContentExpanded"||i?.type?.name==="QuestDockContentExpanded"});if(!t?.type)return console.log(te,"WARN: QuestDockContentExpanded not found (will retry)"),!1;const r=t.type;return He(r,Ve,{gestureContext:Qe()}),t.type=function(){return u.React.createElement(Ve,{gestureContext:Qe()})},e.push(function(){t.type=r}),console.log(te,"PATCH: QuestDockContentExpanded replaced"),!0}function A(e,t){const r=s.find(function(c){return c?.type?.displayName===e||c?.type?.name===e});if(!r?.type)return console.log(te,`WARN: ${e} not found`),!1;const i=r.type,l=i;return r.type=function(){return null},l&&(Object.defineProperties(r.type,Object.getOwnPropertyDescriptors(l)),r.type.displayName=e),t.push(function(){r.type=i}),!0}const Rt="[ServerDrawer]",Bt=ce.getAssetIDByName("ChatIcon"),Me=s.findByProps("triggerHapticFeedback","HapticFeedbackTypes"),Le=s.findByProps("selectPrivateChannel"),Dt=s.findByName("SelectedChannelStore"),It=s.findByProps("useStateFromStores"),Pt=It?.useStateFromStores,oe=s.findByProps("getGuildId"),re=s.findByProps("colors","unsafe_rawColors")?.colors,Ft=s.findByProps("ME"),xt=Ft?.ME??"/channels/@me";function At(){if(Me?.triggerHapticFeedback(Me.HapticFeedbackTypes.SOFT),Le?.selectPrivateChannel){const e=Dt?.getLastSelectedChannelId?.();Le.selectPrivateChannel(e)}}function Gt(){try{return oe?Pt([oe],function(){const e=oe?.getGuildId?.();return e==null||e===xt}):!1}catch{return!1}}function Oe(){const e=Gt(),t=e?re?.WHITE??"#fff":re?.INTERACTIVE_NORMAL??"#80848e";return n.createElement(o.Pressable,{onPress:At,style:{flex:1,alignItems:"center",justifyContent:"center"}},e?n.createElement(o.View,{style:{position:"absolute",left:0,top:"25%",width:4,height:"50%",borderRadius:2,backgroundColor:re?.WHITE??"#fff"}}):null,n.createElement(o.Image,{source:Bt,style:{width:28,height:28,tintColor:t}}))}function Tt(){const e=s.findByName("GuildsBar");if(e)return{default:e};let t=s.find(function(r){try{return r?.default?.type?.name==="GuildsBar"}catch{return!1}});return t?.default||(t=s.find(function(r){try{return r?.default?.displayName==="GuildsBar"}catch{return!1}}),t?.default)?t:null}function Vt(e){const t=Tt();if(!t?.default)return console.log(Rt,"WARN: GuildsBar not found"),!1;const r=t.default;return He(r,Oe),t.default=function(){return n.createElement(Oe)},t.default.displayName="GuildsBar",e.push(function(){t.default=r}),!0}function Ht(e){const t=s.findByStoreName("ExpandedGuildFolderStore");if(!t?.getExpandedFolders)return!1;const r=function({folderId:i}){if(!d.storage.autoCollapseFolders||i==null)return;const l=t.getExpandedFolders();if(!(!(l instanceof Set)||!l.has(i)))for(const c of l)c!==i&&u.FluxDispatcher.dispatch({type:"TOGGLE_GUILD_FOLDER_EXPAND",folderId:c})};return u.FluxDispatcher.subscribe("TOGGLE_GUILD_FOLDER_EXPAND",r),e.push(function(){return u.FluxDispatcher.unsubscribe("TOGGLE_GUILD_FOLDER_EXPAND",r)}),!0}const{ScrollView:Qt,View:Mt}=u.ReactNative;function Lt({children:e}){return u.React.createElement(Qt,{style:{flex:1}},e,u.React.createElement(Mt,{style:{height:24}}))}const{View:Ot,Text:_t}=u.ReactNative;function _e({children:e,style:t}){return u.React.createElement(Ot,{style:[{marginHorizontal:16,marginVertical:8,padding:10,borderRadius:8,borderWidth:1,borderColor:"rgba(128,128,128,0.25)"},t]},u.React.createElement(_t,{style:{fontSize:12.5,lineHeight:18,opacity:.75}},e))}const{FormSection:We,FormSwitchRow:q}=ze.Forms;function Wt(){return X.useProxy(d.storage),u.React.createElement(Lt,null,u.React.createElement(_e,null,"Server Drawer takes over the Quest Dock (the strip above the tab bar) to show your servers as a grid instead - tap to expand, long-press a server for its usual context menu, and use the + button to create or join a server through Discord's own modal."),u.React.createElement(We,{title:"Layout"},u.React.createElement(q,{label:"Hide the left server rail",subLabel:"Replaces it with a single DMs icon since your servers now live in the drawer",value:d.storage.hideGuildsBar!==!1,onValueChange:function(e){d.storage.hideGuildsBar=e,Ue()}}),u.React.createElement(q,{label:"Unread badges",subLabel:"Show mention counts and unread dots on server icons in the drawer",value:d.storage.showUnreadBadges!==!1,onValueChange:function(e){d.storage.showUnreadBadges=e}})),u.React.createElement(We,{title:"Folders"},u.React.createElement(q,{label:"Auto-collapse other folders",subLabel:"Opening a folder collapses any other folder that was already open",value:!!d.storage.autoCollapseFolders,onValueChange:function(e){d.storage.autoCollapseFolders=e}}),u.React.createElement(q,{label:"Hide icons in collapsed folders",subLabel:"Show a plain folder icon instead of a 4-server preview",value:!!d.storage.hideFolderIcons,onValueChange:function(e){d.storage.hideFolderIcons=e}})),u.React.createElement(_e,null,"The folder options above are ported from fres621's BetterFolders - its other half (hiding icons in the native left server rail) patched a component that no longer exists in current Discord builds, so it's been rebuilt here instead, where it actually applies to what you see."))}let f=[];function p(e,t){try{return t()}catch(r){return de.logger.error(`[ServerDrawer] "${e}" patch threw, skipping: ${r}`),!1}}function je(){const e=[];wt(f),p("questDockRender",function(){return qe(f)})&&e.push("questDockRender"),p("questDockBase",function(){return Xe(f)})&&e.push("questDockBase"),p("mobileQuestDock",function(){return Je(f)})&&e.push("mobileQuestDock"),p("getQuestAsset",function(){return Ye(f)})&&e.push("getQuestAsset"),p("expanded",function(){return kt(f)})&&e.push("expanded"),p("collapsed",function(){return A("QuestDockContentCollapsed",f)})&&e.push("collapsed"),p("enrolledHeader",function(){return A("QuestDockEnrolledHeader",f)})&&e.push("enrolledHeader"),p("unenrolledHeader",function(){return A("QuestDockUnenrolledHeader",f)})&&e.push("unenrolledHeader"),p("enrolledBody",function(){return A("QuestDockEnrolledBody",f)})&&e.push("enrolledBody"),p("unenrolledBody",function(){return A("QuestDockUnenrolledBody",f)})&&e.push("unenrolledBody"),d.storage.hideGuildsBar&&p("hideGuildsBar",function(){return Vt(f)})&&e.push("hideGuildsBar"),p("autoCollapseFolders",function(){return Ht(f)})&&e.push("autoCollapseFolders"),de.logger.log(`[ServerDrawer] onLoad done - ${e.length}/12 patches applied (${e.join(", ")||"none"})`)}function ve(){for(const e of f)try{e()}catch{}f=[]}function Ue(){ve(),je()}var jt={onLoad:function(){d.storage.hideGuildsBar??=!0,d.storage.showUnreadBadges??=!0,d.storage.autoCollapseFolders??=!1,d.storage.hideFolderIcons??=!1,je()},onUnload:function(){return ve()},settings:Wt};return V.default=jt,V.restart=Ue,Object.defineProperty(V,"__esModule",{value:!0}),V})({},vendetta,vendetta.plugin,vendetta.metro,vendetta.metro.common,window.React,vendetta.metro.common.ReactNative,vendetta.storage,vendetta.ui,vendetta.ui.assets,vendetta.ui.components); +(function(Q,de,d,s,u,n,o,K,M,Y,Z,Je){"use strict";function Ke(e){const t=s.findByProps("useIsMobileQuestDockRendered");if(!t?.useIsMobileQuestDockRendered)return!1;const r=t.useIsMobileQuestDockRendered;return t.useIsMobileQuestDockRendered=function(...i){return r.apply(this,i),!0},e.push(function(){t.useIsMobileQuestDockRendered=r}),!0}function Ye(e){const t=s.findByProps("useIsMobileQuestDockRenderedBase");if(!t?.useIsMobileQuestDockRenderedBase)return!1;const r=t.useIsMobileQuestDockRenderedBase;return t.useIsMobileQuestDockRenderedBase=function(...i){return r.apply(this,i),!0},e.push(function(){t.useIsMobileQuestDockRenderedBase=r}),!0}function Ze(e){const t=s.findByProps("useMobileQuestDock");if(!t?.useMobileQuestDock)return!1;const r=t.useMobileQuestDock;return t.useMobileQuestDock=function(...i){return r.apply(this,i)||{id:"server-drawer",config:{quest_content_type:0,assets:{questBarHeroVideo:null,questBarHero:null},features:[]},userStatus:{enrolledAt:"2099-01-01",claimedAt:null},benefits:{rewards:[]},guildId:"0",tasks:[]}},e.push(function(){t.useMobileQuestDock=r}),!0}const $e="[ServerDrawer]";function Ne(e){const t=s.findByProps("getQuestAsset");if(!t?.getQuestAsset)return console.log($e,"WARN: getQuestAsset not found"),!1;const r=t.getQuestAsset;return t.getQuestAsset=function(...i){try{return r.apply(this,i)}catch{return{url:null,isAnimated:!1}}},e.push(function(){t.getQuestAsset=r}),!0}function k(e){let t,r=!1;return function(){if(r)return t;const i=e();return i!=null&&(t=i,r=!0),i??void 0}}const fe=s.findByStoreName("GuildStore"),et=s.findByProps("useStateFromStores"),tt=s.findByProps("colors","unsafe_rawColors")?.colors;function he({id:e,size:t=48}){const r=et?.useStateFromStores?.([fe],function(){return fe?.getGuild?.(e)},[e])??null;if(!r)return null;const i=t>=40?16:8;return r.icon?n.createElement(o.Image,{source:{uri:`https://cdn.discordapp.com/icons/${r.id}/${r.icon}.png?size=${t*2}`},style:{width:t,height:t,borderRadius:i}}):n.createElement(o.View,{style:[pe.fallback,{width:t,height:t,borderRadius:i,backgroundColor:tt?.BG_ACCENT??"#5865f2"}]},n.createElement(o.Text,{style:[pe.letter,{fontSize:Math.max(10,t*.4)}]},r.name?.split(" ").map(function(l){return l[0]}).join("").slice(0,2).toUpperCase()||"?"))}const pe=o.StyleSheet.create({fallback:{alignItems:"center",justifyContent:"center"},letter:{color:"#fff",fontWeight:"700"}}),nt=s.findByStoreName("ThemeStore"),ot=s.find(function(e){return e?.default?.internal?.resolveSemanticColor})?.default?.internal?.resolveSemanticColor??s.find(function(e){return e?.meta?.resolveSemanticColor})?.meta?.resolveSemanticColor??function(){};function rt(e,t=nt?.theme){if(e)try{return ot(t,e)}catch{return}}const ge=s.findByProps("TextStyleSheet")?.TextStyleSheet,ye=s.findByProps("triggerHapticFeedback","HapticFeedbackTypes");function L(e,t){return rt(e)??t}const I=12,$=12,me=42,N=220,be=4,A=16,O=20,Ce={tension:200,friction:20};function st({visible:e,items:t,title:r,anchorX:i,anchorY:l,onClose:a}){const{width:f,height:y}=o.Dimensions.get("window"),R=(r?$+20+be:0)+t.length*me;let C=i,m=l+48+10;C+N>f-I&&(C=f-N-I),Cy-I&&(m=l-R-10),m0?n.createElement(o.View,{style:T.outline},n.createElement(o.View,{style:T.badge},n.createElement(o.Text,{style:T.text},t>99?"99+":String(t)))):r?n.createElement(o.View,{style:T.dotOutline},n.createElement(o.View,{style:T.dot})):null:null}function ke({node:e,onPick:t}){const r=n.useRef(null),i=n.useRef(new o.Animated.Value(1)).current,l=function(){return o.Animated.spring(i,{toValue:.85,useNativeDriver:!0}).start()},a=function(){return o.Animated.spring(i,{toValue:1,useNativeDriver:!0}).start()},[f,y]=n.useState({visible:!1,items:[],title:"",x:0,y:0}),R=n.useCallback(function(){const D=e.id,c=it?.getGuild?.(D),p=s.find(function(b){return b?.default?.name==="getGuildsBarGuildMenuItems"})?.default??s.find(function(b){return typeof b?.default=="function"&&b.default.length<=2&&/guild/i.test(b.default.name??"")})?.default;if(!c||!p)return;const x=lt?.getGuildsTree?.()?.version,P=p(D,x);if(!P?.length)return;const F=r.current;F?.measure&&F.measure(function(b,le,ue,H,V,S){y({visible:!0,items:P.map(function(E){return{label:E.label??E.title??"Unknown",action:E.action,danger:E.variant==="destructive",iconSource:E.iconSource,IconComponent:E.IconComponent}}),title:c.name,x:V,y:S})})},[e.id]),C=n.useCallback(function(){Ee?.triggerHapticFeedback?.(Ee.HapticFeedbackTypes.IMPACT_MEDIUM),R()},[R]),m=e.id;return n.createElement(n.Fragment,null,n.createElement(o.Pressable,{onPressIn:l,onPressOut:a,onPress:function(){return t(m)},onLongPress:C,delayLongPress:500},n.createElement(o.View,{ref:r,style:we.outer,collapsable:!1},n.createElement(o.Animated.View,{style:[we.icon,{transform:[{scale:i}]}]},n.createElement(he,{id:m})),n.createElement(ut,{guildId:m}))),n.createElement(st,{visible:f.visible,items:f.items,title:f.title,anchorX:f.x,anchorY:f.y,onClose:function(){return y(function(D){return{...D,visible:!1}})}}))}const we=o.StyleSheet.create({outer:{width:_,height:_},icon:{width:_,height:_,borderRadius:16,overflow:"hidden"}}),T=o.StyleSheet.create({outline:{position:"absolute",bottom:-3,right:-3,minWidth:23,minHeight:23,borderRadius:12,backgroundColor:"#1a1a2e",alignItems:"center",justifyContent:"center"},badge:{minWidth:19,height:19,borderRadius:9,backgroundColor:"#ed4245",alignItems:"center",justifyContent:"center",paddingHorizontal:5},text:{color:"#fff",fontSize:10,fontWeight:"700",lineHeight:19},dotOutline:{position:"absolute",bottom:-2,right:-2,width:14,height:14,borderRadius:7,backgroundColor:"#1a1a2e",alignItems:"center",justifyContent:"center"},dot:{width:10,height:10,borderRadius:5,backgroundColor:"#ed4245"}}),at=s.findByProps("useStateFromStores");s.findByProps("colors","unsafe_rawColors")?.colors;const Be=s.findByStoreName("ExpandedGuildFolderStore");function ct(e){return at?.useStateFromStores?.([Be],function(){const t=Be?.getExpandedFolders?.();return t instanceof Set?t.has(e):!1},[e])??!1}const dt=s.findByProps("toggleGuildFolderExpand"),ft=s.findByProps("useStateFromStores"),Re=s.findByStoreName("GuildReadStateStore"),w=48,te=16,ht=[{top:6,left:6},{top:6,right:6},{bottom:6,left:6},{bottom:6,right:6}],De=Y.getAssetIDByName("FolderIcon");function Ie(e){return e==null?"#5865f2":`#${e.toString(16).padStart(6,"0")}`}function pt({node:e}){const t=ft?.useStateFromStores?.([Re],function(){let r=0;for(const i of e.children)r+=Re?.getMentionCount?.(i.id)??0;return r},[e.children])??0;return t>0?n.createElement(o.View,{style:oe.outline},n.createElement(o.View,{style:oe.badge},n.createElement(o.Text,{style:oe.text},t>99?"99+":String(t)))):null}function gt({node:e}){K.useProxy(d.storage);const t=Ie(e.color);return n.createElement(o.View,{style:v.outer},n.createElement(o.View,{style:[v.icon,{backgroundColor:t}]},d.storage.hideFolderIcons?n.createElement(o.View,{style:v.plainIcon},n.createElement(o.Image,{source:De,style:ne.folderImg,tintColor:"#fff"})):e.children.slice(0,4).map(function(r,i){return n.createElement(o.View,{key:r.id,style:[v.cell,ht[i]]},n.createElement(he,{id:r.id,size:te}))})),n.createElement(pt,{node:e}))}const v=o.StyleSheet.create({outer:{width:w,height:w},icon:{width:w,height:w,borderRadius:16,overflow:"hidden"},cell:{position:"absolute",width:te,height:te,borderRadius:8,overflow:"hidden"},plainIcon:{width:w,height:w,alignItems:"center",justifyContent:"center"}});function yt({children:e}){const t=n.useRef(new o.Animated.Value(0)).current;return n.useEffect(function(){o.Animated.timing(t,{toValue:1,duration:180,useNativeDriver:!0}).start()},[]),n.createElement(o.Animated.View,{style:{opacity:t}},e)}function mt({node:e,onPick:t}){const r=ct(e.id),i=function(){dt?.toggleGuildFolderExpand?.(e.id)};return r?n.createElement(n.Fragment,null,n.createElement(o.Pressable,{onPress:i},n.createElement(o.View,{style:[ne.openIcon,{backgroundColor:Ie(e.color)}]},n.createElement(o.Image,{source:De,style:ne.folderImg,tintColor:"#fff"}))),e.children.map(function(l){return n.createElement(yt,{key:l.id},n.createElement(ke,{node:l,onPick:t}))})):n.createElement(o.Pressable,{onPress:i},n.createElement(gt,{node:e}))}const ne=o.StyleSheet.create({openIcon:{width:w,height:w,borderRadius:16,alignItems:"center",justifyContent:"center"},folderImg:{width:24,height:24}}),oe=o.StyleSheet.create({outline:{position:"absolute",bottom:-3,right:-3,minWidth:23,minHeight:23,borderRadius:12,backgroundColor:"#1a1a2e",alignItems:"center",justifyContent:"center"},badge:{minWidth:19,height:19,borderRadius:9,backgroundColor:"#ed4245",alignItems:"center",justifyContent:"center",paddingHorizontal:5},text:{color:"#fff",fontSize:10,fontWeight:"700",lineHeight:19}}),W=48,bt=Y.getAssetIDByName("ChatIcon"),Pe=s.findByProps("triggerHapticFeedback","HapticFeedbackTypes"),Fe=s.findByProps("selectPrivateChannel"),Ct=s.findByName("SelectedChannelStore"),St=s.findByProps("useStateFromStores"),xe=s.findByProps("getGuildId"),Et=s.findByProps("colors","unsafe_rawColors")?.colors;function kt(){if(Pe?.triggerHapticFeedback(Pe.HapticFeedbackTypes.SOFT),Fe?.selectPrivateChannel){const e=Ct?.getLastSelectedChannelId?.();Fe.selectPrivateChannel(e)}}function wt(){const e=St?.useStateFromStores?.([xe],function(){return xe?.getGuildId?.()==null})??!1;return n.createElement(o.Pressable,{onPress:kt,style:Ae.outer},n.createElement(o.View,{style:[Ae.icon,{backgroundColor:e?Et?.BG_ACCENT??"#5865f2":"rgba(128,128,128,0.24)"}]},n.createElement(o.Image,{source:bt,style:{width:24,height:24,tintColor:"#fff"}})))}const Ae=o.StyleSheet.create({outer:{width:W,height:W},icon:{width:W,height:W,borderRadius:16,alignItems:"center",justifyContent:"center"}}),Te=48,Bt=Y.getAssetIDByName("CheckmarkLargeIcon"),Ge=s.findByStoreName("GuildStore"),He=s.findByStoreName("GuildChannelStore"),Rt=k(function(){return s.findByProps("triggerHapticFeedback","HapticFeedbackTypes")}),Dt=k(function(){return s.findByProps("bulkAck","ackChannel")}),It=k(function(){return s.findByProps("ReadStateTypes","UnreadSetting")?.ReadStateTypes});function Pt(){const e=Dt(),t=It();if(!e?.bulkAck||t?.CHANNEL==null||!Ge?.getGuilds||!He?.getChannels){Z.showToast("Couldn't find Discord's read-state action - this may be unavailable on your version.",void 0);return}const r=[];for(const i of Object.keys(Ge.getGuilds())){const l=He.getChannels(i)??{};for(const a of Object.values(l))if(Array.isArray(a))for(const f of a){const y=f?.channel;y?.id&&r.push({channelId:y.id,readStateType:t.CHANNEL,messageId:y.lastMessageId??null})}}if(r.length===0){Z.showToast("Nothing to mark as read.",void 0);return}e.bulkAck(r),Z.showToast(`Marked ${r.length} channel${r.length===1?"":"s"} as read`,void 0)}function Ft(){const e=n.useCallback(function(){const t=Rt();t?.triggerHapticFeedback?.(t.HapticFeedbackTypes.SOFT),Pt()},[]);return n.createElement(o.Pressable,{onPress:e,style:xt.outer},n.createElement(o.Image,{source:Bt,style:{width:24,height:24,tintColor:"#80848e"}}))}const xt=o.StyleSheet.create({outer:{width:Te,height:Te,alignItems:"center",justifyContent:"center"}}),At=s.findByProps("useStateFromStores"),Ve=s.findByStoreName("SortedGuildStore"),Tt=k(function(){return s.findByProps("getRootNavigationRef")}),Qe=k(function(){return s.findByProps("triggerHapticFeedback","HapticFeedbackTypes")}),Gt=k(function(){return s.findByProps("transitionToGuild")}),Ht=k(function(){return s.find(function(e){return typeof e?.handleCreateJoinGuildPress=="function"})}),Vt=k(function(){return s.find(function(e){return e?.CirclePlusIcon})?.CirclePlusIcon}),Qt=k(function(){return s.findByProps("colors","unsafe_rawColors")?.unsafe_rawColors}),Mt=s.find(function(e){return e?.QuestDockExternalCoordinationContext}),Me=Mt?.QuestDockExternalCoordinationContext,Le=s.find(function(e){return e?.QuestDockMode?.COLLAPSED!=null})?.QuestDockMode,U=48,z=6,Lt=12;function Ot(){const e=n.useRef(new o.Animated.Value(1)).current,t=n.useCallback(function(){o.Animated.spring(e,{toValue:.9,useNativeDriver:!0}).start()},[e]),r=n.useCallback(function(){o.Animated.spring(e,{toValue:1,useNativeDriver:!0}).start()},[e]),i=n.useCallback(function(){const f=Qe();f?.triggerHapticFeedback?.(f.HapticFeedbackTypes.SOFT),Ht()?.handleCreateJoinGuildPress?.()},[]),l=Vt(),a=Qt();return n.createElement(o.Pressable,{onPress:i,onPressIn:t,onPressOut:r},n.createElement(o.Animated.View,{style:[q.createJoin,{backgroundColor:a?.GREEN_360,transform:[{scale:e}]}]},l?n.createElement(l,{size:"md",color:a?.WHITE}):n.createElement(o.Text,{style:[q.createJoinFallback,{color:a?.WHITE}]},"+")))}function Oe({gestureContext:e}){const t=n.useCallback(function(c){const p=Qe();p?.triggerHapticFeedback?.(p.HapticFeedbackTypes.SOFT);const x=Gt();x?.transitionToGuild?x.transitionToGuild(c):Tt()?.getRootNavigationRef?.()?.navigate("guilds",{guildId:c})},[]),r=At?.useStateFromStores?.([Ve],function(){return(Ve?.getGuildsTree()?.root?.children||[]).filter(function(c){return c.type!=="root"})})??[],i=e?n.useContext(e):null,l=i?.minExpandedContentHeight,a=n.useCallback(function(c){if(!l)return;const p=c.nativeEvent.layout.height;l.get()!==p&&l.set(p)},[l]),f=(Me?n.useContext(Me):null)?.setRestingQuestDockMode,y=i?.questDockWrapperSpecs;n.useEffect(function(){if(!f||!Le||!y)return;const c=o.BackHandler.addEventListener("hardwareBackPress",function(){return(y.get()?.height??56)>80?(f(Le.COLLAPSED),!0):!1});return function(){return c.remove()}},[f,y]);const{width:R}=o.Dimensions.get("window"),C=Math.max(3,Math.floor((R-Lt*2+z)/(U+z))),m=C*U+(C-1)*z,D=Math.max(0,(R-m)/2);return n.createElement(o.View,{style:q.alignTop},n.createElement(o.View,{style:[q.grid,{paddingHorizontal:D,gap:z}],onLayout:a},n.createElement(wt,null),r.map(function(c){return c.type==="folder"?n.createElement(mt,{key:c.id,node:c,onPick:t}):n.createElement(ke,{key:c.id,node:c,onPick:t})}),n.createElement(Ot,null),n.createElement(Ft,null)))}const q=o.StyleSheet.create({alignTop:{flex:1,justifyContent:"flex-start",alignItems:"flex-start"},grid:{flexDirection:"row",flexWrap:"wrap",paddingTop:4,paddingBottom:16},createJoin:{width:U,height:U,borderRadius:16,alignItems:"center",justifyContent:"center"},createJoinFallback:{fontSize:28,fontWeight:"700",lineHeight:30}}),re=new Map;let B=null,X=!1;function _e(e,t,r){re.set(e,{replacement:t,extraProps:r})}function _t(e){if(X)return;if(B=u.React.createElement,!B){console.warn("[ServerDrawer] React.createElement is null, skipping patch");return}const t=function(r,i,...l){if(!B)return u.React.createElement(r,i,...l);const a=re.get(r);if(a){const f=a.extraProps?{...i,...a.extraProps}:i;return B.call(u.React,a.replacement,f,...l)}return B.call(u.React,r,i,...l)};Object.assign(t,B),u.React.createElement=t,X=!0,e.push(function(){X&&B&&(u.React.createElement=B,X=!1),re.clear()})}const se="[ServerDrawer]";let ie=null;function je(){return ie||(ie=s.find(function(e){return e?.QuestDockGestureContext})?.QuestDockGestureContext??null),ie}function jt(e){const t=s.find(function(i){return i?.type?.displayName==="QuestDockContentExpanded"||i?.type?.name==="QuestDockContentExpanded"});if(!t?.type)return console.log(se,"WARN: QuestDockContentExpanded not found (will retry)"),!1;const r=t.type;return _e(r,Oe,{gestureContext:je()}),t.type=function(){return u.React.createElement(Oe,{gestureContext:je()})},e.push(function(){t.type=r}),console.log(se,"PATCH: QuestDockContentExpanded replaced"),!0}function G(e,t){const r=s.find(function(a){return a?.type?.displayName===e||a?.type?.name===e});if(!r?.type)return console.log(se,`WARN: ${e} not found`),!1;const i=r.type,l=i;return r.type=function(){return null},l&&(Object.defineProperties(r.type,Object.getOwnPropertyDescriptors(l)),r.type.displayName=e),t.push(function(){r.type=i}),!0}const vt="[ServerDrawer]";function ve(){return null}function Wt(){const e=s.findByName("GuildsBar");if(e)return{default:e};let t=s.find(function(r){try{return r?.default?.type?.name==="GuildsBar"}catch{return!1}});return t?.default||(t=s.find(function(r){try{return r?.default?.displayName==="GuildsBar"}catch{return!1}}),t?.default)?t:null}function Ut(e){const t=Wt();if(!t?.default)return console.log(vt,"WARN: GuildsBar not found"),!1;const r=t.default;return _e(r,ve),t.default=function(){return n.createElement(ve)},t.default.displayName="GuildsBar",e.push(function(){t.default=r}),!0}function zt(e){const t=s.findByStoreName("ExpandedGuildFolderStore");if(!t?.getExpandedFolders)return!1;const r=function({folderId:i}){if(!d.storage.autoCollapseFolders||i==null)return;const l=t.getExpandedFolders();if(!(!(l instanceof Set)||!l.has(i)))for(const a of l)a!==i&&u.FluxDispatcher.dispatch({type:"TOGGLE_GUILD_FOLDER_EXPAND",folderId:a})};return u.FluxDispatcher.subscribe("TOGGLE_GUILD_FOLDER_EXPAND",r),e.push(function(){return u.FluxDispatcher.unsubscribe("TOGGLE_GUILD_FOLDER_EXPAND",r)}),!0}const{ScrollView:qt,View:Xt}=u.ReactNative;function Jt({children:e}){return u.React.createElement(qt,{style:{flex:1}},e,u.React.createElement(Xt,{style:{height:24}}))}const{View:Kt,Text:Yt}=u.ReactNative;function We({children:e,style:t}){return u.React.createElement(Kt,{style:[{marginHorizontal:16,marginVertical:8,padding:10,borderRadius:8,borderWidth:1,borderColor:"rgba(128,128,128,0.25)"},t]},u.React.createElement(Yt,{style:{fontSize:12.5,lineHeight:18,opacity:.75}},e))}const{FormSection:Ue,FormSwitchRow:J}=Je.Forms;function Zt(){return K.useProxy(d.storage),u.React.createElement(Jt,null,u.React.createElement(We,null,"Server Drawer takes over the Quest Dock (the strip above the tab bar) to show your servers as a grid instead - tap to expand, long-press a server for its usual context menu, the chat bubble jumps to DMs, the + button creates or joins a server through Discord's own modal, and the check button marks every channel in every server as read."),u.React.createElement(Ue,{title:"Layout"},u.React.createElement(J,{label:"Hide the left server rail",subLabel:"Your servers and DMs already live in the drawer, so the rail is redundant",value:d.storage.hideGuildsBar!==!1,onValueChange:function(e){d.storage.hideGuildsBar=e,Xe()}}),u.React.createElement(J,{label:"Unread badges",subLabel:"Show mention counts and unread dots on server icons in the drawer",value:d.storage.showUnreadBadges!==!1,onValueChange:function(e){d.storage.showUnreadBadges=e}})),u.React.createElement(Ue,{title:"Folders"},u.React.createElement(J,{label:"Auto-collapse other folders",subLabel:"Opening a folder collapses any other folder that was already open",value:!!d.storage.autoCollapseFolders,onValueChange:function(e){d.storage.autoCollapseFolders=e}}),u.React.createElement(J,{label:"Hide icons in collapsed folders",subLabel:"Show a plain folder icon instead of a 4-server preview",value:!!d.storage.hideFolderIcons,onValueChange:function(e){d.storage.hideFolderIcons=e}})),u.React.createElement(We,null,"The folder options above are ported from fres621's BetterFolders - its other half (hiding icons in the native left server rail) patched a component that no longer exists in current Discord builds, so it's been rebuilt here instead, where it actually applies to what you see."))}let h=[];function g(e,t){try{return t()}catch(r){return de.logger.error(`[ServerDrawer] "${e}" patch threw, skipping: ${r}`),!1}}function ze(){const e=[];_t(h),g("questDockRender",function(){return Ke(h)})&&e.push("questDockRender"),g("questDockBase",function(){return Ye(h)})&&e.push("questDockBase"),g("mobileQuestDock",function(){return Ze(h)})&&e.push("mobileQuestDock"),g("getQuestAsset",function(){return Ne(h)})&&e.push("getQuestAsset"),g("expanded",function(){return jt(h)})&&e.push("expanded"),g("collapsed",function(){return G("QuestDockContentCollapsed",h)})&&e.push("collapsed"),g("enrolledHeader",function(){return G("QuestDockEnrolledHeader",h)})&&e.push("enrolledHeader"),g("unenrolledHeader",function(){return G("QuestDockUnenrolledHeader",h)})&&e.push("unenrolledHeader"),g("enrolledBody",function(){return G("QuestDockEnrolledBody",h)})&&e.push("enrolledBody"),g("unenrolledBody",function(){return G("QuestDockUnenrolledBody",h)})&&e.push("unenrolledBody"),d.storage.hideGuildsBar&&g("hideGuildsBar",function(){return Ut(h)})&&e.push("hideGuildsBar"),g("autoCollapseFolders",function(){return zt(h)})&&e.push("autoCollapseFolders"),de.logger.log(`[ServerDrawer] onLoad done - ${e.length}/12 patches applied (${e.join(", ")||"none"})`)}function qe(){for(const e of h)try{e()}catch{}h=[]}function Xe(){qe(),ze()}var $t={onLoad:function(){d.storage.hideGuildsBar??=!0,d.storage.showUnreadBadges??=!0,d.storage.autoCollapseFolders??=!1,d.storage.hideFolderIcons??=!1,ze()},onUnload:function(){return qe()},settings:Zt};return Q.default=$t,Q.restart=Xe,Object.defineProperty(Q,"__esModule",{value:!0}),Q})({},vendetta,vendetta.plugin,vendetta.metro,vendetta.metro.common,window.React,vendetta.metro.common.ReactNative,vendetta.storage,vendetta.ui,vendetta.ui.assets,vendetta.ui.toasts,vendetta.ui.components); diff --git a/server-drawer/install/manifest.json b/server-drawer/install/manifest.json index 23a8ede..474fcba 100644 --- a/server-drawer/install/manifest.json +++ b/server-drawer/install/manifest.json @@ -1 +1 @@ -{"name":"ServerDrawer","description":"Replaces the Quest Dock with a server grid drawer above the YouBar - tap to expand, long-press a server for its context menu, plus a one-tap create/join button.","authors":[{"name":"everestmcarthur"},{"name":"kmmiio99o"},{"name":"fres"}],"main":"index.js","vendetta":{"icon":"ServerIcon"},"hash":"16050115ca69a6df56c2ba681967b0a113ea2f9bb6ff911431a97493d8223d75"} \ No newline at end of file +{"name":"ServerDrawer","description":"Replaces the Quest Dock with a server grid drawer above the YouBar - tap to expand, long-press a server for its context menu, plus a one-tap create/join button.","authors":[{"name":"everestmcarthur"},{"name":"kmmiio99o"},{"name":"fres"}],"main":"index.js","vendetta":{"icon":"ServerIcon"},"hash":"c4faaed1ba1d9ba08a56168d07c43f02b23af1ec7fdc449fb55de5eb37604ce9"} \ No newline at end of file