deploy: 6b9e764a67af07c652ed08a1af5204bfbac8c5ac

This commit is contained in:
everestmcarthur 2026-08-01 19:45:14 +00:00
parent 3f05a9673e
commit 6aae79ff84
3 changed files with 7 additions and 9 deletions

View file

@ -203,18 +203,16 @@
"category": "Moderation & Appearance",
"status": "revived",
"accent": "#5865F2",
"tagline": "Configurable buttons on the YouBar - up to 2 at a time, in your chosen order.",
"note": "Fork of Purple-EyeZ's YouBar+. Fixed a startup race condition: the original did a single one-shot component lookup during onLoad and silently gave up for the rest of the session if it ran before the target had registered in Metro yet (a real risk on a cold app start) - restarting Discord just got lucky on a re-roll. This port polls for the component instead of looking it up once. Also replaced the original's two independent on/off toggles with a real slot-based system: 2 ordered slots, each set to None, Direct Messages, or Settings.",
"howItWorks": "The YouBar is the row near your avatar/status at the top of the app. This plugin patches its notification button area to also render up to 2 extra icon buttons, each pulled from one of 2 configurable slots. Each slot cycles between None, Direct Messages (jumps to your DMs), and Settings (opens user settings) - tap a slot in the plugin's settings to cycle it. Slot order controls left-to-right button order, and each slot is independent, so you can run just one button, both, or neither. Both slots default to Direct Messages then Settings, matching the original plugin's default look.",
"tagline": "Adds DM and/or Settings buttons to the YouBar.",
"note": "Fork of Purple-EyeZ's YouBar+. Fixed a startup race condition where the button patch could silently never apply for an entire session - the original did a single one-shot lookup for YouBarNotificationsButton at onLoad and gave up permanently if it wasn't registered in Metro yet, which restarting Discord only fixed by luck. Now retries until the component shows up.",
"howItWorks": "The YouBar is the row near your avatar/status at the top of the app. This plugin patches its notification button area to also render a DM button and/or a Settings button, each independently toggleable. DM jumps straight to your DMs; Settings opens user settings.",
"features": [
"Up to 2 buttons on the YouBar, each independently configurable",
"Choices per slot: None, Direct Messages, Settings",
"Slot order controls left-to-right button order",
"Independent toggles for the DM and Settings buttons",
"Settings changes apply immediately, no restart needed",
"Startup race condition fixed - polls for the target component instead of a single one-shot lookup"
],
"commands": [],
"limitations": "Only wires up to actions with a confirmed, still-working lookup (jump to DMs, open Settings) - no additional slot choices were added beyond what could be verified against a real findByProps target.",
"limitations": "Depends on YouBarNotificationsButton keeping a similar render shape - guarded so a mismatch just means no extra buttons, not a crash.",
"pageUrl": "https://rp.jarviscli.dev/you-bar-plus/",
"installUrl": "https://rp.jarviscli.dev/you-bar-plus/install/",
"sourceUrl": "https://github.com/everestmcarthur/revenge-plugins/tree/main/plugins/you-bar-plus",

View file

@ -1 +1 @@
(function(f,b,c,d,e,v,g,E,S){"use strict";function w(t,n,r,o){try{return r()}catch(a){return o.error(`[${t}] Failed to apply the "${n}" patch, that surface will be skipped: ${a}`),function(){}}}function N(t,n,r){const o=Object.entries(r).map(function([a,s]){return w(t,a,s,n)});return function(){return o.forEach(function(a){return a()})}}function P(t,n,r=100){let o=!1,a;const s=t();return s?(n(s),{cancel(){}}):(a=setInterval(function(){if(o)return;const i=t();i&&(o=!0,clearInterval(a),n(i))},r),{cancel(){o=!0,a&&clearInterval(a)}})}const p=["none","dms","settings"],I={none:"None",dms:"Direct Messages",settings:"Settings"};let h=function(){};function T(){let t=function(){};const n=P(function(){return d.findByTypeName("YouBarNotificationsButton")},function(r){t=Y(r)});return function(){n.cancel(),t()}}function Y(t){const n=d.findByProps("openUserSettings"),r=d.findByProps("transitionToGuild"),o={dms:g.getAssetIDByName("ChatIcon"),settings:g.getAssetIDByName("SettingsIcon")},a=function(s){s==="dms"?r?.transitionToGuild?.("@me"):s==="settings"&&n?.openUserSettings?.()};return v.instead("type",t,function(s,i){try{const[,D]=e.React.useReducer(function(l){return~l},0);h=function(){return D()};const u=i(...s);if(!u?.props?.children)return u;const L=u.props.children.type,B=u.props.children.props,m=[c.storage.slot1,c.storage.slot2];return e.React.createElement(e.React.Fragment,null,m.map(function(l,H){return l==="none"?null:e.React.createElement(L,{key:`you-bar-plus-${H}`,variant:B?.variant||"tertiary",size:B?.size||"sm",icon:o[l],onPress:function(){return a(l)}})}),u)}catch{return i(...s)}})}const{ScrollView:F,View:O}=e.ReactNative;function U({children:t}){return e.React.createElement(F,{style:{flex:1}},t,e.React.createElement(O,{style:{height:24}}))}const{View:_,Text:A}=e.ReactNative;function V({children:t,style:n}){return e.React.createElement(_,{style:[{marginHorizontal:16,marginVertical:8,padding:10,borderRadius:8,borderWidth:1,borderColor:"rgba(128,128,128,0.25)"},n]},e.React.createElement(A,{style:{fontSize:12.5,lineHeight:18,opacity:.75}},t))}const{FormSection:$,FormRow:k}=S.Forms;function x(t){const n=p.indexOf(t);return p[(n+1)%p.length]}function y({label:t,slotKey:n}){const r=c.storage[n];return e.React.createElement(k,{label:t,subLabel:I[r],onPress:function(){c.storage[n]=x(r),h()}})}function z(){return E.useProxy(c.storage),e.React.useEffect(function(){return function(){return h()}},[]),e.React.createElement(U,null,e.React.createElement(V,null,"YouBar+ adds up to 2 buttons to the YouBar - the row with your avatar and status near the top of the app. Tap a slot below to cycle it through None, Direct Messages, and Settings; the first slot renders on the left. Fork of Purple-EyeZ's YouBar+, ported to Revenge's Vendetta-compat API with a fix for a startup race that could silently skip the button patch for an entire session."),e.React.createElement($,{title:"Buttons"},e.React.createElement(y,{label:"First button",slotKey:"slot1"}),e.React.createElement(y,{label:"Second button",slotKey:"slot2"})))}let R=function(){};var C={onLoad:function(){c.storage.slot1??="dms",c.storage.slot2??="settings",R=N("YouBar+",b.logger,{"YouBar buttons":T})},onUnload:function(){return R()},settings:z};return f.default=C,Object.defineProperty(f,"__esModule",{value:!0}),f})({},vendetta,vendetta.plugin,vendetta.metro,vendetta.metro.common,vendetta.patcher,vendetta.ui.assets,vendetta.storage,vendetta.ui.components);
(function(d,B,a,h,e,R,g,b,w){"use strict";function S(t,n,o,i){try{return o()}catch(r){return i.error(`[${t}] Failed to apply the "${n}" patch, that surface will be skipped: ${r}`),function(){}}}function E(t,n,o){const i=Object.entries(o).map(function([r,c]){return S(t,r,c,n)});return function(){return i.forEach(function(r){return r()})}}function P(t,n,o=100){let i=!1,r;const c=t();return c?(n(c),{cancel(){}}):(r=setInterval(function(){if(i)return;const u=t();u&&(i=!0,clearInterval(r),n(u))},o),{cancel(){i=!0,r&&clearInterval(r)}})}let l=function(){};function I(){let t=function(){};const n=P(function(){return h.findByTypeName("YouBarNotificationsButton")},function(o){t=D(o)});return function(){n.cancel(),t()}}function D(t){const n=h.findByProps("openUserSettings"),o=h.findByProps("transitionToGuild"),i=g.getAssetIDByName("ChatIcon"),r=g.getAssetIDByName("SettingsIcon");return R.instead("type",t,function(c,u){try{const[,k]=e.React.useReducer(function(x){return~x},0);l=function(){return k()};const s=u(...c);if(!s?.props?.children)return s;const v=s.props.children.type,f=s.props.children.props;return e.React.createElement(e.React.Fragment,null,a.storage.showDMButton&&e.React.createElement(v,{variant:f?.variant||"tertiary",size:f?.size||"sm",icon:i,onPress:function(){return o?.transitionToGuild?.("@me")}}),a.storage.showSettingsButton&&e.React.createElement(v,{variant:f?.variant||"tertiary",size:f?.size||"sm",icon:r,onPress:function(){return n?.openUserSettings?.()}}),s)}catch{return u(...c)}})}const{ScrollView:F,View:M}=e.ReactNative;function V({children:t}){return e.React.createElement(F,{style:{flex:1}},t,e.React.createElement(M,{style:{height:24}}))}const{View:Y,Text:z}=e.ReactNative;function N({children:t,style:n}){return e.React.createElement(Y,{style:[{marginHorizontal:16,marginVertical:8,padding:10,borderRadius:8,borderWidth:1,borderColor:"rgba(128,128,128,0.25)"},n]},e.React.createElement(z,{style:{fontSize:12.5,lineHeight:18,opacity:.75}},t))}const{FormSection:$,FormSwitchRow:p}=w.Forms;function C(){return b.useProxy(a.storage),e.React.useEffect(function(){return function(){return l()}},[]),e.React.createElement(V,null,e.React.createElement(N,null,"Fork of Purple-EyeZ's YouBar+, ported to Revenge's Vendetta-compat API with a fix for a startup race that could silently skip the button patch for an entire session."),e.React.createElement($,{title:"Buttons"},e.React.createElement(p,{label:"Direct Messages button",subLabel:"Show the DM button in the YouBar",value:!!a.storage.showDMButton,onValueChange:function(t){a.storage.showDMButton=t,l()}}),e.React.createElement(p,{label:"Settings button",subLabel:"Show the Settings button in the YouBar",value:!!a.storage.showSettingsButton,onValueChange:function(t){a.storage.showSettingsButton=t,l()}})))}let y=function(){};var T={onLoad:function(){a.storage.showDMButton??=!1,a.storage.showSettingsButton??=!0,y=E("YouBar+",B.logger,{"YouBar buttons":I})},onUnload:function(){return y()},settings:C};return d.default=T,Object.defineProperty(d,"__esModule",{value:!0}),d})({},vendetta,vendetta.plugin,vendetta.metro,vendetta.metro.common,vendetta.patcher,vendetta.ui.assets,vendetta.storage,vendetta.ui.components);

View file

@ -1 +1 @@
{"name":"YouBar+","description":"Adds up to 2 configurable buttons (Direct Messages, Settings, or none) to the YouBar, in whatever order you pick.","authors":[{"name":"everestmcarthur"},{"name":"Purple_Ξye™"}],"main":"index.js","hash":"0732a112d0498fa94fd83b7336564c149f03e957ed6d2164920e8d0b3a6e9fe7"}
{"name":"YouBar+","description":"Adds up to 2 configurable buttons (Direct Messages, Settings, or none) to the YouBar, in whatever order you pick.","authors":[{"name":"everestmcarthur"},{"name":"Purple_Ξye™"}],"main":"index.js","hash":"550fed53c2a80274c85f2ae075eb52784a60be0e455a42a38ea29ffa559c7f51"}