vd-plugins/BetterBetterChatGesturesV3/index.js

2 lines
15 KiB
JavaScript
Raw Normal View History

(function(P,g,e,w,t,S,z,p,m,c){"use strict";var y={Failed:p.getAssetIDByName("Small"),Delete:p.getAssetIDByName("ic_message_delete"),Copy:p.getAssetIDByName("toast_copy_link"),Open:p.getAssetIDByName("ic_leave_stage"),Clipboard:p.getAssetIDByName("pending-alert"),Clock:p.getAssetIDByName("clock"),Forum:p.getAssetIDByName("ic_forum_channel"),Settings:{Toasts:{Settings:p.getAssetIDByName("ic_selection_checked_24px"),Failed:p.getAssetIDByName("ic_close_circle_24px")},Initial:p.getAssetIDByName("coffee"),Update:p.getAssetIDByName("discover"),Locale:p.getAssetIDByName("ic_locale_24px"),External:p.getAssetIDByName("ic_raised_hand_list"),Edit:p.getAssetIDByName("ic_edit_24px"),Reply:p.getAssetIDByName("ic_reply_24px"),Keyboard:p.getAssetIDByName("ic_keyboard_24px")}},b={shadow:function(a=.1){return{shadowColor:"#000",shadowOffset:{width:1,height:4},shadowOpacity:a,shadowRadius:4.65,elevation:8}},displayToast:function(a,r){e.toasts.open({content:r=="clipboard"?`Copied ${a} to clipboard.`:a,source:r=="clipboard"?y.Clipboard:y.Settings.Initial})}},A={plugin:{source:"https://github.com/MYSTRAVIL/vendetta-plugins"},author:{profile:{"Rosie<3":"https://github.com/acquitelol"}}};const{TouchableOpacity:v,View:N,Image:q,Text:L,Animated:C}=S.General,H=g.findByProps("transitionToGuild"),_=g.findByStoreName("UserStore"),X=g.findByProps("showUserProfile"),R=e.stylesheet.createThemedStyleSheet({container:{marginTop:25,marginLeft:"5%",marginBottom:-15,flexDirection:"row"},textContainer:{paddingLeft:15,paddingTop:5,flexDirection:"column",flexWrap:"wrap",...b.shadow()},image:{width:75,height:75,borderRadius:10,...b.shadow()},mainText:{opacity:.975,letterSpacing:.25},header:{color:m.semanticColors.HEADER_PRIMARY,fontFamily:e.constants.Fonts.DISPLAY_BOLD,fontSize:25,letterSpacing:.25},subHeader:{color:m.semanticColors.HEADER_SECONDARY,fontSize:12.75}});function J({name:a,authors:r}){const s=e.React.useRef(new C.Value(1)).current,n=function(){return C.spring(s,{toValue:1.1,duration:10,useNativeDriver:!0}).start()},i=function(){return C.spring(s,{toValue:1,duration:250,useNativeDriver:!0}).start()},l=function(){return X.showUserProfile({userId:_.getCurrentUser().id})},d={transform:[{scale:s}]};return e.React.createElement(e.React.Fragment,null,e.React.createElement(N,{style:R.container},e.React.createElement(v,{onPress:l,onPressIn:n,onPressOut:i},e.React.createElement(C.View,{style:d},e.React.createElement(q,{style:[R.image],source:{uri:_?.getCurrentUser()?.getAvatarURL()?.replace("webp","png")}}))),e.React.createElement(N,{style:R.textContainer},e.React.createElement(v,{onPress:function(){return H.openURL(A.plugin.source)}},e.React.createElement(L,{style:[R.mainText,R.header]},a)),e.React.createElement(N,{style:{flexDirection:"row"}},e.React.createElement(L,{style:[R.mainText,R.subHeader]},"A project by"),r.map(function(u,o,h){return e.React.createElement(v,{onPress:function(){return H.openURL(A.author.profile[u.name]??"https://github.com/")}},e.React.createElement(L,{style:[R.mainText,R.subHeader,{paddingLeft:4,fontFamily:e.constants.Fonts.DISPLAY_BOLD,flexDirection:"row"}]},u.name,o<h.length-1?",":null))})))))}const{View:Q,Text:Z}=S.General,K=e.stylesheet.createThemedStyleSheet({text:{color:m.semanticColors.HEADER_SECONDARY,paddingLeft:"5.5%",paddingRight:10,marginBottom:10,letterSpacing:.25,fontFamily:e.constants.Fonts.PRIMARY_BOLD,fontSize:12}});function V({label:a,children:r}){return e.React.createElement(Q,{style:{marginTop:10}},e.React.createElement(Z,{style:[K.text,K.optionText]},a.toUpperCase()),r)}const{FormRow:f,FormSwitch:M,FormDivider:I,FormInput:ee,FormText:te}=S.Forms,{ScrollView:ae,View:x,Text:re}=S.General,T=e.stylesheet.createThemedStyleSheet({icon:{color:m.semanticColors.INTERACTIVE_NORMAL},item:{color:m.semanticColors.TEXT_MUTED,fontFamily:e.constants.Fonts.PRIMARY_MEDIUM},container:{width:"90%",marginLeft:"5%",borderRadius:10,backgroundColor:m.semanticColors.BACKGROUND_MOBILE_SECONDARY,...b.shadow()},subheaderText:{color:m.semanticColors.HEADER_SECONDARY,textAlign:"center",margin:10,marginBottom:50,letterSpacing:.25,fontFamily