2020-10-20 23:25:34 +02:00
/ * *
* @ name EditUsers
2021-03-05 13:26:41 +01:00
* @ author DevilBro
2020-10-20 23:25:34 +02:00
* @ authorId 278543574059057154
2022-09-24 17:31:12 +02:00
* @ version 4.6 . 9
2021-03-05 13:26:41 +01:00
* @ description Allows you to locally edit Users
2020-10-20 23:25:34 +02:00
* @ invite Jx3TjNS
2020-11-19 16:45:36 +01:00
* @ donate https : //www.paypal.me/MircoWittrien
* @ patreon https : //www.patreon.com/MircoWittrien
2021-03-09 15:10:55 +01:00
* @ website https : //mwittrien.github.io/
* @ source https : //github.com/mwittrien/BetterDiscordAddons/tree/master/Plugins/EditUsers/
2021-03-10 09:17:37 +01:00
* @ updateUrl https : //mwittrien.github.io/BetterDiscordAddons/Plugins/EditUsers/EditUsers.plugin.js
2020-10-20 23:25:34 +02:00
* /
2018-10-11 10:21:26 +02:00
2020-09-19 20:49:33 +02:00
module . exports = ( _ => {
2022-09-01 14:40:11 +02:00
const changeLog = {
2022-09-02 12:37:10 +02:00
2020-09-19 20:49:33 +02:00
} ;
2020-11-13 19:47:44 +01:00
2022-02-05 21:14:17 +01:00
return ! window . BDFDB _Global || ( ! window . BDFDB _Global . loaded && ! window . BDFDB _Global . started ) ? class {
2022-09-01 14:55:22 +02:00
constructor ( meta ) { for ( let key in meta ) this [ key ] = meta [ key ] ; }
getName ( ) { return this . name ; }
getAuthor ( ) { return this . author ; }
getVersion ( ) { return this . version ; }
getDescription ( ) { return ` The Library Plugin needed for ${ this . name } is missing. Open the Plugin Settings to download it. \n \n ${ this . description } ` ; }
2021-02-01 17:13:13 +01:00
downloadLibrary ( ) {
require ( "request" ) . get ( "https://mwittrien.github.io/BetterDiscordAddons/Library/0BDFDB.plugin.js" , ( e , r , b ) => {
2021-03-05 13:14:18 +01:00
if ( ! e && b && r . statusCode == 200 ) require ( "fs" ) . writeFile ( require ( "path" ) . join ( BdApi . Plugins . folder , "0BDFDB.plugin.js" ) , b , _ => BdApi . showToast ( "Finished downloading BDFDB Library" , { type : "success" } ) ) ;
2021-03-06 14:59:48 +01:00
else BdApi . alert ( "Error" , "Could not download BDFDB Library Plugin. Try again later or download it manually from GitHub: https://mwittrien.github.io/downloader/?library" ) ;
2021-02-01 17:13:13 +01:00
} ) ;
}
2020-09-19 20:49:33 +02:00
2021-01-06 12:38:36 +01:00
load ( ) {
2020-11-19 16:51:14 +01:00
if ( ! window . BDFDB _Global || ! Array . isArray ( window . BDFDB _Global . pluginQueue ) ) window . BDFDB _Global = Object . assign ( { } , window . BDFDB _Global , { pluginQueue : [ ] } ) ;
2020-09-19 20:49:33 +02:00
if ( ! window . BDFDB _Global . downloadModal ) {
window . BDFDB _Global . downloadModal = true ;
2022-09-01 14:55:22 +02:00
BdApi . showConfirmationModal ( "Library Missing" , ` The Library Plugin needed for ${ this . name } is missing. Please click "Download Now" to install it. ` , {
2020-09-19 20:49:33 +02:00
confirmText : "Download Now" ,
cancelText : "Cancel" ,
onCancel : _ => { delete window . BDFDB _Global . downloadModal ; } ,
2020-09-20 08:15:13 +02:00
onConfirm : _ => {
delete window . BDFDB _Global . downloadModal ;
2021-02-01 17:13:13 +01:00
this . downloadLibrary ( ) ;
2020-09-20 08:15:13 +02:00
}
2020-09-19 20:49:33 +02:00
} ) ;
}
2022-09-01 14:55:22 +02:00
if ( ! window . BDFDB _Global . pluginQueue . includes ( this . name ) ) window . BDFDB _Global . pluginQueue . push ( this . name ) ;
2020-10-09 21:09:35 +02:00
}
2021-01-06 12:38:36 +01:00
start ( ) { this . load ( ) ; }
stop ( ) { }
getSettingsPanel ( ) {
2020-11-28 23:12:09 +01:00
let template = document . createElement ( "template" ) ;
2022-09-01 14:55:22 +02:00
template . innerHTML = ` <div style="color: var(--header-primary); font-size: 16px; font-weight: 300; white-space: pre; line-height: 22px;">The Library Plugin needed for ${ this . name } is missing. \n Please click <a style="font-weight: 500;">Download Now</a> to install it.</div> ` ;
2021-02-01 17:13:13 +01:00
template . content . firstElementChild . querySelector ( "a" ) . addEventListener ( "click" , this . downloadLibrary ) ;
2020-11-28 23:12:09 +01:00
return template . content . firstElementChild ;
}
2020-10-09 21:09:35 +02:00
} : ( ( [ Plugin , BDFDB ] ) => {
2021-05-20 16:44:45 +02:00
var changedUsers = { } ;
2020-09-19 20:49:33 +02:00
2020-10-09 21:09:35 +02:00
return class EditUsers extends Plugin {
2021-01-06 12:38:36 +01:00
onLoad ( ) {
2020-09-19 20:49:33 +02:00
this . defaults = {
2021-05-20 16:44:45 +02:00
types : {
servers : { value : true , description : "Servers" } ,
dms : { value : true , description : "Direct Messages" } ,
} ,
places : {
contextMenu : { value : true , description : "User ContextMenu" } ,
chatTextarea : { value : true , description : "Chat Textarea" } ,
chatWindow : { value : true , description : "Messages" } ,
reactions : { value : true , description : "Reactions" } ,
mentions : { value : true , description : "Mentions" } ,
memberList : { value : true , description : "Member List" } ,
voiceChat : { value : true , description : "Voice Channels" } ,
recentDms : { value : true , description : "Direct Message Notifications" } ,
dmsList : { value : true , description : "Direct Message List" } ,
dmHeader : { value : true , description : "Direct Message Header" } ,
dmCalls : { value : true , description : "Calls/ScreenShares" } ,
typing : { value : true , description : "Typing List" } ,
friendList : { value : true , description : "Friend List" } ,
inviteList : { value : true , description : "Invite List" } ,
activity : { value : true , description : "Activity Page" } ,
userPopout : { value : true , description : "User Popouts" } ,
userProfile : { value : true , description : "User Profile Modal" } ,
2021-06-09 21:43:27 +02:00
mutualFriends : { value : true , description : "Mutual Friends" } ,
2021-06-25 20:59:24 +02:00
autocompletes : { value : true , description : "Autocomplete Menu" } ,
2021-05-20 16:44:45 +02:00
guildSettings : { value : true , description : "Server Settings" } ,
quickSwitcher : { value : true , description : "Quick Switcher" } ,
searchPopout : { value : true , description : "Search Popout" } ,
userAccount : { value : true , description : "Your Account Information" } ,
appTitle : { value : true , description : "Discord App Title (DMs)" }
2020-09-19 20:49:33 +02:00
}
} ;
2020-02-07 15:16:40 +01:00
2020-09-19 20:49:33 +02:00
this . patchedModules = {
before : {
2022-05-26 15:01:24 +02:00
HeaderBarContainer : "default" ,
2022-10-24 10:42:20 +02:00
ChannelTextAreaEditor : "render" ,
2020-09-19 20:49:33 +02:00
AutocompleteUserResult : "render" ,
2022-10-13 12:17:00 +02:00
UserThemedBanner : "default" ,
2021-11-09 17:02:30 +01:00
UserBanner : "default" ,
2022-09-24 17:31:12 +02:00
UserBannerMask : "default" ,
2022-08-08 14:42:09 +02:00
UserPopoutAvatar : "UserPopoutAvatar" ,
2022-09-15 14:42:08 +02:00
UserThemePopoutHeader : "default" ,
2022-08-31 13:02:40 +02:00
UsernameSection : "default" ,
2021-06-25 16:06:39 +02:00
UserPopoutInfo : "UserPopoutInfo" ,
2021-06-09 20:46:48 +02:00
UserProfileModal : "default" ,
2021-06-25 20:17:49 +02:00
UserProfileModalHeader : "default" ,
2020-09-19 20:49:33 +02:00
UserInfo : "default" ,
2021-06-11 23:07:17 +02:00
NowPlayingItem : "default" ,
2020-09-19 20:49:33 +02:00
VoiceUser : "render" ,
2021-06-02 17:21:12 +02:00
RTCConnectionVoiceUsers : "default" ,
2020-09-19 20:49:33 +02:00
Account : "render" ,
2021-03-03 11:20:00 +01:00
Message : "default" ,
2020-11-21 17:44:54 +01:00
MessageUsername : "default" ,
2020-09-19 20:49:33 +02:00
MessageContent : "type" ,
2021-07-29 00:36:40 +02:00
ThreadMessageAccessoryMessage : "default" ,
2020-10-29 17:23:26 +01:00
ReactorsComponent : "render" ,
2020-10-27 16:25:26 +01:00
ChannelReply : "default" ,
2020-09-19 20:49:33 +02:00
MemberListItem : "render" ,
2021-03-20 12:25:14 +01:00
AuditLogs : "render" ,
2021-09-11 19:35:49 +02:00
GuildSettingsAuditLogEntry : "render" ,
2020-09-19 20:49:33 +02:00
GuildSettingsEmoji : "render" ,
MemberCard : "render" ,
SettingsInvites : "render" ,
GuildSettingsBans : "render" ,
InvitationCard : "render" ,
PrivateChannel : "render" ,
PrivateChannelRecipientsInvitePopout : "render" ,
QuickSwitchUserResult : "render" ,
SearchPopoutComponent : "render" ,
PrivateChannelCallParticipants : "render" ,
ChannelCall : "render" ,
2022-03-19 19:01:43 +01:00
ChannelCallGrid : "default" ,
HorizontalVideoParticipants : "default" ,
2020-09-19 20:49:33 +02:00
PictureInPictureVideo : "default" ,
UserSummaryItem : "render"
} ,
after : {
ChannelCallHeader : "default" ,
AutocompleteUserResult : "render" ,
DiscordTag : "default" ,
NameTag : "default" ,
2022-09-21 15:35:57 +02:00
FocusRing : "FocusRing" ,
2022-08-31 13:02:40 +02:00
UserPopoutExperimentWrapper : "default" ,
2021-06-25 16:06:39 +02:00
UserPopoutContainer : "type" ,
2022-08-31 13:02:40 +02:00
UsernameSection : "default" ,
2021-06-25 16:06:39 +02:00
UserPopoutInfo : "UserPopoutInfo" ,
2021-06-09 21:43:27 +02:00
MutualFriends : "default" ,
2020-09-19 20:49:33 +02:00
VoiceUser : "render" ,
2021-11-03 17:58:40 +01:00
ParticipantsForSelectedParticipant : "default" ,
2020-09-19 20:49:33 +02:00
PrivateChannelEmptyMessage : "default" ,
2022-04-08 11:20:49 +02:00
PanelTitle : "default" ,
2020-10-07 10:20:55 +02:00
MessageUsername : "default" ,
2020-09-19 20:49:33 +02:00
MessageContent : "type" ,
2020-12-04 19:51:18 +01:00
ReactorsComponent : "render" ,
2021-11-24 01:03:16 +01:00
UserMention : "default" ,
2021-02-24 17:32:17 +01:00
RichUserMention : "UserMention" ,
2020-10-27 16:25:26 +01:00
ChannelReply : "default" ,
2020-09-19 20:49:33 +02:00
MemberListItem : "render" ,
InvitationCard : "render" ,
InviteModalUserRow : "default" ,
TypingUsers : "render" ,
DirectMessage : "render" ,
RTCConnection : "render" ,
PrivateChannel : "render" ,
2022-08-29 15:04:18 +02:00
QuickSwitcherConnected : "default" ,
2020-09-19 20:49:33 +02:00
QuickSwitchUserResult : "render" ,
IncomingCallModal : "default"
}
} ;
2020-12-07 19:42:24 +01:00
this . patchPriority = 3 ;
2020-09-19 20:49:33 +02:00
this . css = `
2021-06-30 15:11:47 +02:00
$ { BDFDB . dotCN . messageavatar } {
background - size : cover ;
object - fit : cover ;
}
2020-09-19 20:49:33 +02:00
$ { BDFDB . dotCNS . chat + BDFDB . dotCN . messageusername } : hover > span [ style *= "color" ] ,
2021-07-29 00:36:40 +02:00
$ { BDFDB . dotCN . voicedetailschannel } : hover > span [ style *= "color" ] ,
$ { BDFDB . dotCN . messageswelcomethreadcreator } : hover > span [ style *= "color" ] {
2020-09-19 20:49:33 +02:00
text - decoration : underline ;
}
$ { BDFDB . dotCNS . dmchannel + BDFDB . dotCN . bottag } {
margin - left : 4 px ;
}
2021-07-03 15:16:45 +02:00
$ { BDFDB . dotCNS . peoplesuser + BDFDB . dotCN . peoplesdiscriminator } {
2020-09-19 20:49:33 +02:00
display : none ;
}
2021-07-03 15:16:45 +02:00
$ { BDFDB . dotCNS . peoplesuserhovered + BDFDB . dotCN . peoplesdiscriminator } {
2020-09-19 20:49:33 +02:00
display : block ;
}
2020-10-20 22:48:48 +02:00
$ { BDFDB . dotCN . messagemarkup } span [ style *= "linear-gradient" ] code . inline ,
$ { BDFDB . dotCN . messagemarkup } span [ style *= "linear-gradient" ] blockquote ,
$ { BDFDB . dotCN . messagemarkup } span [ style *= "linear-gradient" ] $ { BDFDB . dotCN . spoilertext } {
color : var ( -- text - normal ) ;
}
2020-09-19 20:49:33 +02:00
` ;
2020-02-07 15:16:40 +01:00
}
2020-09-19 20:49:33 +02:00
2021-06-12 16:04:20 +02:00
onStart ( ) {
2020-02-07 15:16:40 +01:00
let observer = new MutationObserver ( _ => { this . changeAppTitle ( ) ; } ) ;
2020-11-19 16:51:14 +01:00
BDFDB . ObserverUtils . connect ( this , document . head . querySelector ( "title" ) , { name : "appTitleObserver" , instance : observer } , { childList : true } ) ;
2022-05-26 15:01:24 +02:00
2022-09-27 16:53:10 +02:00
BDFDB . PatchUtils . patch ( this , BDFDB . LibraryStores . RelationshipStore , "getName" , { after : e => {
2022-08-03 00:12:47 +02:00
if ( e . methodArguments [ 2 ] && changedUsers [ e . methodArguments [ 2 ] . id ] && changedUsers [ e . methodArguments [ 2 ] . id ] . name ) return changedUsers [ e . methodArguments [ 2 ] . id ] . name ;
} } ) ;
2022-09-27 16:53:10 +02:00
BDFDB . PatchUtils . patch ( this , BDFDB . LibraryStores . StageChannelParticipantStore , "getMutableParticipants" , { after : e => {
2022-05-26 15:01:24 +02:00
if ( BDFDB . ArrayUtils . is ( e . returnValue ) ) for ( let i in e . returnValue ) {
if ( e . returnValue [ i ] && e . returnValue [ i ] . user && changedUsers [ e . returnValue [ i ] . user . id ] ) e . returnValue [ i ] = Object . assign ( { } , e . returnValue [ i ] , { user : this . getUserData ( e . returnValue [ i ] . user . id ) } ) ;
}
} } ) ;
2020-02-07 15:16:40 +01:00
2021-01-14 16:27:13 +01:00
BDFDB . PatchUtils . patch ( this , BDFDB . LibraryModules . MessageAuthorUtils , [ "default" , "getMessageAuthor" ] , { after : e => {
2021-07-29 00:36:40 +02:00
if ( this . settings . places . chatWindow && e . methodArguments [ 0 ] && e . methodArguments [ 0 ] . author && changedUsers [ e . methodArguments [ 0 ] . author . id ] && this . shouldChangeInChat ( e . methodArguments [ 0 ] . channel _id ) ) {
2021-01-07 14:25:35 +01:00
let data = changedUsers [ e . methodArguments [ 0 ] . author . id ] ;
2021-10-18 19:00:51 +02:00
if ( data ) {
2022-09-27 16:53:10 +02:00
let member = BDFDB . LibraryStores . GuildMemberStore . getMember ( ( BDFDB . LibraryStores . ChannelStore . getChannel ( e . methodArguments [ 0 ] . channel _id ) || { } ) . guild _id , e . methodArguments [ 0 ] . author . id ) ;
2021-04-23 12:01:44 +02:00
let color1 = data . color1 && data . useRoleColor && member && member . colorString || data . color1 ;
2021-10-18 19:00:51 +02:00
color1 = color1 && BDFDB . ColorUtils . convert ( BDFDB . ObjectUtils . is ( color1 ) ? color1 [ 0 ] : color1 , "HEX" ) ;
e . returnValue = Object . assign ( { } , e . returnValue , {
2021-11-03 16:21:25 +01:00
nick : this . getUserNick ( e . methodArguments [ 0 ] . author . id , member && member . nick ) || e . returnValue . nick ,
2021-10-18 19:00:51 +02:00
guildMemberAvatar : ( data . removeIcon || data . url ) ? null : e . returnValue . guildMemberAvatar ,
colorString : color1 || e . returnValue . colorString
} ) ;
2021-01-07 14:25:35 +01:00
}
}
} } ) ;
2020-09-11 19:31:36 +02:00
let searchGroupData = BDFDB . ObjectUtils . get ( BDFDB . ModuleUtils . findByName ( "SearchPopoutComponent" , false ) , "exports.GroupData" ) ;
2020-02-07 15:16:40 +01:00
if ( BDFDB . ObjectUtils . is ( searchGroupData ) ) {
2020-09-11 19:31:36 +02:00
BDFDB . PatchUtils . patch ( this , searchGroupData . FILTER _FROM , "component" , { after : e => {
2020-02-07 15:16:40 +01:00
if ( typeof e . returnValue . props . renderResult == "function" ) {
let renderResult = e . returnValue . props . renderResult ;
e . returnValue . props . renderResult = ( ... args ) => {
let result = renderResult ( ... args ) ;
this . processSearchPopoutUserResult ( { instance : { props : e . methodArguments [ 0 ] } , returnvalue : result } ) ;
return result ;
2020-12-04 19:51:18 +01:00
} ;
2019-01-25 11:27:52 +01:00
}
2020-02-07 15:16:40 +01:00
} } ) ;
2020-09-11 19:31:36 +02:00
BDFDB . PatchUtils . patch ( this , searchGroupData . FILTER _MENTIONS , "component" , { after : e => {
2020-02-07 15:16:40 +01:00
if ( typeof e . returnValue . props . renderResult == "function" ) {
let renderResult = e . returnValue . props . renderResult ;
e . returnValue . props . renderResult = ( ... args ) => {
let result = renderResult ( ... args ) ;
this . processSearchPopoutUserResult ( { instance : { props : e . methodArguments [ 0 ] } , returnvalue : result } ) ;
return result ;
2020-12-04 19:51:18 +01:00
} ;
2019-01-25 11:27:52 +01:00
}
2020-02-07 15:16:40 +01:00
} } ) ;
}
2022-08-29 15:04:18 +02:00
BDFDB . PatchUtils . patch ( this , BDFDB . LibraryModules . QuerySearchUtils , [ "queryDMUsers" , "queryFriends" ] , { after : e => {
if ( ! e . methodArguments [ 0 ] . query ) return ;
2022-09-27 20:05:55 +02:00
for ( let id in changedUsers ) if ( changedUsers [ id ] && changedUsers [ id ] . name && changedUsers [ id ] . name . toLocaleLowerCase ( ) . indexOf ( e . methodArguments [ 0 ] . query . toLocaleLowerCase ( ) ) > - 1 && ! e . returnValue . find ( n => n . record && n . record . id == id && n . type == BDFDB . DiscordConstants . AutocompleterResultTypes . USER ) ) {
2022-09-27 16:53:10 +02:00
let user = BDFDB . LibraryStores . UserStore . getUser ( id ) ;
2022-08-29 15:04:18 +02:00
if ( user ) e . returnValue . push ( {
comparator : user . username ,
record : user ,
score : 10 ,
sortable : user . username . toLocaleLowerCase ( ) ,
2022-09-27 20:05:55 +02:00
type : BDFDB . DiscordConstants . AutocompleterResultTypes . USER
2022-08-29 15:04:18 +02:00
} ) ;
}
} } ) ;
BDFDB . PatchUtils . patch ( this , BDFDB . LibraryModules . QuerySearchUtils , "queryGuildUsers" , { after : e => {
if ( ! e . methodArguments [ 0 ] . query ) return ;
2022-09-27 20:05:55 +02:00
for ( let id in changedUsers ) if ( changedUsers [ id ] && changedUsers [ id ] . name && changedUsers [ id ] . name . toLocaleLowerCase ( ) . indexOf ( e . methodArguments [ 0 ] . query . toLocaleLowerCase ( ) ) > - 1 && ! e . returnValue . find ( n => n . record && n . record . id == id && n . type == BDFDB . DiscordConstants . AutocompleterResultTypes . USER ) ) {
2022-09-27 16:53:10 +02:00
let user = BDFDB . LibraryStores . UserStore . getUser ( id ) ;
let member = user && e . methodArguments [ 0 ] . guildId && BDFDB . LibraryStores . GuildMemberStore . getMember ( e . methodArguments [ 0 ] . guildId , id ) ;
2022-08-29 15:04:18 +02:00
if ( user ) e . returnValue . push ( {
comparator : member && member . nick ? member . nick . toLocaleLowerCase ( ) : user . username . toLocaleLowerCase ( ) ,
record : user ,
2021-06-25 20:59:24 +02:00
score : 0 ,
2022-09-27 20:05:55 +02:00
type : BDFDB . DiscordConstants . AutocompleterResultTypes . USER
2022-08-29 15:04:18 +02:00
} ) ;
}
} } ) ;
BDFDB . PatchUtils . patch ( this , BDFDB . LibraryModules . QuerySearchUtils , "queryChannelUsers" , { after : e => {
if ( ! e . methodArguments [ 0 ] . query ) return ;
2022-09-27 20:05:55 +02:00
for ( let id in changedUsers ) if ( changedUsers [ id ] && changedUsers [ id ] . name && changedUsers [ id ] . name . toLocaleLowerCase ( ) . indexOf ( e . methodArguments [ 0 ] . query . toLocaleLowerCase ( ) ) > - 1 && ! e . returnValue . find ( n => n . record && n . record . id == id && n . type == BDFDB . DiscordConstants . AutocompleterResultTypes . USER ) ) {
2022-09-27 16:53:10 +02:00
let user = BDFDB . LibraryStores . UserStore . getUser ( id ) ;
let member = user && e . methodArguments [ 0 ] . channelId && BDFDB . LibraryStores . GuildMemberStore . getMember ( ( BDFDB . LibraryStores . ChannelStore . getChannel ( e . methodArguments [ 0 ] . channelId ) || { } ) . guild _id , id ) ;
2022-08-29 15:04:18 +02:00
if ( user ) e . returnValue . push ( {
comparator : member && member . nick ? member . nick . toLocaleLowerCase ( ) : user . username . toLocaleLowerCase ( ) ,
record : user ,
score : 0 ,
2022-09-27 20:05:55 +02:00
type : BDFDB . DiscordConstants . AutocompleterResultTypes . USER
2022-08-29 15:04:18 +02:00
} ) ;
2020-09-26 18:37:56 +02:00
}
} } ) ;
2020-02-07 15:16:40 +01:00
2021-06-01 17:25:52 +02:00
BDFDB . PatchUtils . patch ( this , BDFDB . LibraryModules . IconUtils , "getUserBannerURL" , { instead : e => {
2022-08-14 12:44:51 +02:00
let data = changedUsers [ e . methodArguments [ 0 ] . id ] ;
if ( data ) {
if ( data . removeBanner ) return null ;
else if ( data . banner ) return data . banner ;
2021-06-01 17:25:52 +02:00
}
return e . callOriginalMethod ( ) ;
} } ) ;
2022-08-14 12:44:51 +02:00
BDFDB . PatchUtils . patch ( this , BDFDB . LibraryModules . MemberDisplayUtils , "getDisplayProfile" , { after : e => {
2022-08-26 12:12:45 +02:00
if ( ! e . returnValue ) return ;
2022-08-14 12:44:51 +02:00
let data = changedUsers [ e . methodArguments [ 0 ] ] ;
if ( data && ( data . banner || data . removeBanner ) ) {
e . returnValue = new BDFDB . DiscordObjects . DisplayProfile ( e . returnValue , e . returnValue ) ;
if ( data . removeBanner ) e . returnValue . banner = null ;
else if ( data . banner ) e . returnValue . banner = data . banner ;
}
} } ) ;
2022-09-27 16:53:10 +02:00
BDFDB . PatchUtils . patch ( this , BDFDB . LibraryStores . PresenceStore , "findActivity" , { after : e => {
2021-06-25 16:06:39 +02:00
let data = changedUsers [ e . methodArguments [ 0 ] ] ;
if ( data && ( data . removeStatus || data . status || data . statusEmoji ) && ( e . returnValue && e . returnValue . type === BDFDB . DiscordConstants . ActivityTypes . CUSTOM _STATUS || ! e . returnValue && e . methodArguments [ 1 ] && e . methodArguments [ 1 ] . toString ( ) . indexOf ( "type===" ) > - 1 && e . methodArguments [ 1 ] . toString ( ) . indexOf ( "CUSTOM_STATUS" ) > - 1 ) ) return this . createCustomStatus ( changedUsers [ e . methodArguments [ 0 ] ] ) ;
2021-06-12 16:04:20 +02:00
} } ) ;
2020-02-07 15:16:40 +01:00
this . forceUpdateAll ( ) ;
2018-10-11 10:21:26 +02:00
}
2020-09-19 20:49:33 +02:00
2021-01-06 12:38:36 +01:00
onStop ( ) {
2020-02-07 15:16:40 +01:00
this . forceUpdateAll ( ) ;
}
2019-06-16 19:30:24 +02:00
2020-09-19 20:49:33 +02:00
getSettingsPanel ( collapseStates = { } ) {
2021-04-23 12:01:44 +02:00
let settingsPanel ;
return settingsPanel = BDFDB . PluginUtils . createSettingsPanel ( this , {
collapseStates : collapseStates ,
children : _ => {
let settingsItems = [ ] ;
2021-05-20 16:44:45 +02:00
settingsItems . push ( BDFDB . ReactUtils . createElement ( BDFDB . LibraryComponents . SettingsPanelList , {
title : "Change Users in:" ,
children : Object . keys ( this . defaults . places ) . map ( key => BDFDB . ReactUtils . createElement ( BDFDB . LibraryComponents . SettingsSaveItem , {
type : "Switch" ,
plugin : this ,
keys : [ "places" , key ] ,
label : this . defaults . places [ key ] . description ,
value : this . settings . places [ key ]
} ) )
} ) ) ;
settingsItems . push ( BDFDB . ReactUtils . createElement ( BDFDB . LibraryComponents . SettingsPanelList , {
title : "Change Users in the Chat Window (Messages, Reactions, Mentions, etc.) in:" ,
children : Object . keys ( this . defaults . types ) . map ( key => BDFDB . ReactUtils . createElement ( BDFDB . LibraryComponents . SettingsSaveItem , {
2021-04-23 12:01:44 +02:00
type : "Switch" ,
plugin : this ,
2021-05-20 16:44:45 +02:00
keys : [ "types" , key ] ,
label : this . defaults . types [ key ] . description ,
value : this . settings . types [ key ]
2021-04-23 12:01:44 +02:00
} ) )
} ) ) ;
2021-05-20 16:44:45 +02:00
2021-04-28 09:07:55 +02:00
settingsItems . push ( BDFDB . ReactUtils . createElement ( BDFDB . LibraryComponents . SettingsLabel , {
label : "Changed Users:"
} ) ) ;
2021-04-23 12:01:44 +02:00
settingsItems . push ( BDFDB . ReactUtils . createElement ( BDFDB . LibraryComponents . SettingsItem , {
type : "Button" ,
color : BDFDB . LibraryComponents . Button . Colors . RED ,
2021-04-28 09:07:55 +02:00
label : BDFDB . ReactUtils . createElement ( BDFDB . LibraryComponents . Flex , {
2022-09-27 16:53:10 +02:00
children : ! Object . keys ( changedUsers ) . length ? BDFDB . LanguageUtils . LanguageStrings . NONE : Object . keys ( changedUsers ) . filter ( BDFDB . LibraryStores . UserStore . getUser ) . map ( id => BDFDB . ReactUtils . createElement ( BDFDB . LibraryComponents . TooltipContainer , {
2021-04-28 09:07:55 +02:00
text : this . getUserData ( id ) . username ,
2022-09-30 16:50:38 +02:00
children : BDFDB . ReactUtils . createElement ( BDFDB . LibraryComponents . Avatars . Avatar , {
2021-04-28 09:07:55 +02:00
className : BDFDB . disCN . listavatar ,
src : this . getUserAvatar ( id ) ,
2022-09-30 16:50:38 +02:00
size : BDFDB . LibraryComponents . Avatars . Sizes . SIZE _32 ,
2022-09-27 16:53:10 +02:00
onClick : _ => this . openUserSettingsModal ( BDFDB . LibraryStores . UserStore . getUser ( id ) )
2021-04-28 09:07:55 +02:00
} )
} ) )
} ) ,
2021-04-23 12:01:44 +02:00
onClick : _ => {
BDFDB . ModalUtils . confirm ( this , this . labels . confirm _resetall , _ => {
BDFDB . DataUtils . remove ( this , "users" ) ;
2021-04-28 09:07:55 +02:00
BDFDB . PluginUtils . refreshSettingsPanel ( this , settingsPanel , collapseStates ) ;
2021-04-23 12:01:44 +02:00
this . forceUpdateAll ( ) ;
} ) ;
} ,
children : BDFDB . LanguageUtils . LanguageStrings . RESET
} ) ) ;
return settingsItems ;
}
} ) ;
2020-09-19 20:49:33 +02:00
}
2019-01-26 22:45:19 +01:00
2021-01-06 12:38:36 +01:00
onSettingsClosed ( ) {
2020-09-19 20:49:33 +02:00
if ( this . SettingsUpdated ) {
delete this . SettingsUpdated ;
this . forceUpdateAll ( ) ;
}
2020-07-12 17:40:01 +02:00
}
2020-02-07 15:16:40 +01:00
2021-01-06 12:38:36 +01:00
forceUpdateAll ( ) {
2020-09-19 20:49:33 +02:00
changedUsers = BDFDB . DataUtils . load ( this , "users" ) ;
2022-02-24 23:26:44 +01:00
2020-09-19 20:49:33 +02:00
this . changeAppTitle ( ) ;
BDFDB . PatchUtils . forceAllUpdates ( this ) ;
2022-05-26 15:01:24 +02:00
BDFDB . DiscordUtils . rerenderAll ( ) ;
2018-12-22 22:34:45 +01:00
}
2020-02-07 15:16:40 +01:00
2022-02-12 18:18:12 +01:00
onDMContextMenu ( e ) {
2022-02-21 20:16:44 +01:00
if ( e . instance . props . user ) {
2022-02-24 23:26:44 +01:00
if ( this . settings . places . contextMenu ) {
let userName = this . getUserData ( e . instance . props . user . id ) . username ;
if ( userName != e . instance . props . user . username ) {
let [ muteChildren , muteIndex ] = BDFDB . ContextMenuUtils . findItem ( e . returnvalue , { id : "mute-channel" } ) ;
if ( muteIndex > - 1 ) muteChildren [ muteIndex ] . props . label = BDFDB . LanguageUtils . LanguageStringsFormat ( "MUTE_CHANNEL" , ` @ ${ userName } ` ) ;
let [ unmuteChildren , unmuteIndex ] = BDFDB . ContextMenuUtils . findItem ( e . returnvalue , { id : "unmute-channel" } ) ;
if ( unmuteIndex > - 1 ) unmuteChildren [ unmuteIndex ] . props . label = BDFDB . LanguageUtils . LanguageStringsFormat ( "UNMUTE_CHANNEL" , ` @ ${ userName } ` ) ;
}
}
2022-02-21 20:16:44 +01:00
let [ children , index ] = BDFDB . ContextMenuUtils . findItem ( e . returnvalue , { id : "devmode-copy-id" , group : true } ) ;
children . splice ( index > - 1 ? index : children . length , 0 , BDFDB . ContextMenuUtils . createItem ( BDFDB . LibraryComponents . MenuItems . MenuGroup , {
children : this . createContextMenuEntry ( e . instance . props . user )
} ) ) ;
}
2022-02-12 18:18:12 +01:00
}
2020-09-19 20:49:33 +02:00
onUserContextMenu ( e ) {
2022-02-28 21:05:45 +01:00
if ( e . instance . props . channel && e . instance . props . channel . isDM ( ) ) {
2022-09-27 16:53:10 +02:00
const user = BDFDB . LibraryStores . UserStore . getUser ( e . instance . props . channel . getRecipientId ( ) ) ;
2022-02-28 21:05:45 +01:00
if ( user && this . settings . places . contextMenu && e . subType == "useMuteChannelItem" ) {
let userName = this . getUserData ( user . id ) . username ;
if ( userName != user . username ) {
let [ muteChildren , muteIndex ] = BDFDB . ContextMenuUtils . findItem ( e . returnvalue , { id : "mute-channel" } ) ;
if ( muteIndex > - 1 ) muteChildren [ muteIndex ] . props . label = BDFDB . LanguageUtils . LanguageStringsFormat ( "MUTE_CHANNEL" , ` @ ${ userName } ` ) ;
let [ unmuteChildren , unmuteIndex ] = BDFDB . ContextMenuUtils . findItem ( e . returnvalue , { id : "unmute-channel" } ) ;
if ( unmuteIndex > - 1 ) unmuteChildren [ unmuteIndex ] . props . label = BDFDB . LanguageUtils . LanguageStringsFormat ( "UNMUTE_CHANNEL" , ` @ ${ userName } ` ) ;
}
}
}
2020-09-19 20:49:33 +02:00
if ( e . instance . props . user ) {
2022-02-24 23:26:44 +01:00
if ( this . settings . places . contextMenu && e . subType == "useUserManagementItems" ) {
let userName = this . getUserData ( e . instance . props . user . id ) . username ;
if ( userName != e . instance . props . user . username ) {
let [ timeoutChildren , timeoutIndex ] = BDFDB . ContextMenuUtils . findItem ( e . returnvalue , { id : "timeout" } ) ;
if ( timeoutIndex > - 1 ) timeoutChildren [ timeoutIndex ] . props . label = BDFDB . LanguageUtils . LanguageStringsFormat ( "DISABLE_GUILD_COMMUNICATION_FOR_USER" , userName ) ;
let [ removeTimeoutChildren , removeTimeoutIndex ] = BDFDB . ContextMenuUtils . findItem ( e . returnvalue , { id : "removetimeout" } ) ;
if ( removeTimeoutIndex > - 1 ) removeTimeoutChildren [ removeTimeoutIndex ] . props . label = BDFDB . LanguageUtils . LanguageStringsFormat ( "ENABLE_GUILD_COMMUNICATION_FOR_USER" , userName ) ;
let [ kickChildren , kickIndex ] = BDFDB . ContextMenuUtils . findItem ( e . returnvalue , { id : "kick" } ) ;
if ( kickIndex > - 1 ) kickChildren [ kickIndex ] . props . label = BDFDB . LanguageUtils . LanguageStringsFormat ( "KICK_USER" , userName ) ;
let [ banChildren , banIndex ] = BDFDB . ContextMenuUtils . findItem ( e . returnvalue , { id : "ban" } ) ;
if ( banIndex > - 1 ) banChildren [ banIndex ] . props . label = BDFDB . LanguageUtils . LanguageStringsFormat ( "BAN_USER" , userName ) ;
}
2020-09-19 20:49:33 +02:00
}
2022-02-28 21:05:45 +01:00
if ( e . subType == "useBlockUserItem" ) {
2022-02-21 20:16:44 +01:00
if ( e . returnvalue . length ) e . returnvalue . push ( BDFDB . ContextMenuUtils . createItem ( BDFDB . LibraryComponents . MenuItems . MenuSeparator , { } ) ) ;
e . returnvalue . push ( this . createContextMenuEntry ( e . instance . props . user ) ) ;
}
2020-09-19 20:49:33 +02:00
}
2019-02-07 22:54:50 +01:00
}
2020-09-19 20:49:33 +02:00
2022-02-21 20:16:44 +01:00
createContextMenuEntry ( user ) {
return BDFDB . ContextMenuUtils . createItem ( BDFDB . LibraryComponents . MenuItems . MenuItem , {
label : this . labels . context _localusersettings ,
id : BDFDB . ContextMenuUtils . createItemId ( this . name , "settings-submenu" ) ,
children : BDFDB . ContextMenuUtils . createItem ( BDFDB . LibraryComponents . MenuItems . MenuGroup , {
children : [
BDFDB . ContextMenuUtils . createItem ( BDFDB . LibraryComponents . MenuItems . MenuItem , {
label : this . labels . submenu _usersettings ,
id : BDFDB . ContextMenuUtils . createItemId ( this . name , "settings-change" ) ,
action : _ => this . openUserSettingsModal ( user )
} ) ,
BDFDB . ContextMenuUtils . createItem ( BDFDB . LibraryComponents . MenuItems . MenuItem , {
label : this . labels . submenu _resetsettings ,
id : BDFDB . ContextMenuUtils . createItemId ( this . name , "settings-reset" ) ,
2022-09-30 14:18:20 +02:00
color : BDFDB . DiscordConstants . MenuItemColors . DANGER ,
2022-02-21 20:16:44 +01:00
disabled : ! changedUsers [ user . id ] ,
action : event => {
let remove = _ => {
BDFDB . DataUtils . remove ( this , "users" , user . id ) ;
this . forceUpdateAll ( true ) ;
} ;
if ( event . shiftKey ) remove ( ) ;
else BDFDB . ModalUtils . confirm ( this , this . labels . confirm _reset , remove ) ;
}
} )
]
} )
} ) ;
}
2022-10-24 10:42:20 +02:00
processChannelTextAreaEditor ( e ) {
2022-10-01 14:25:51 +02:00
if ( ! e . instance . props . disabled && e . instance . props . channel && e . instance . props . channel . isDM ( ) && ( e . instance . props . type == BDFDB . DiscordConstants . ChannelTextAreaTypes . NORMAL || e . instance . props . type == BDFDB . DiscordConstants . ChannelTextAreaTypes . NORMAL _WITH _ACTIVITY ) && this . settings . places . chatTextarea ) {
2022-09-27 16:53:10 +02:00
let user = BDFDB . LibraryStores . UserStore . getUser ( e . instance . props . channel . recipients [ 0 ] ) ;
2020-09-19 20:49:33 +02:00
if ( user ) e . instance . props . placeholder = BDFDB . LanguageUtils . LanguageStringsFormat ( "TEXTAREA_PLACEHOLDER" , ` @ ${ changedUsers [ user . id ] && changedUsers [ user . id ] . name || user . username } ` ) ;
2020-02-07 15:16:40 +01:00
}
2019-02-07 22:54:50 +01:00
}
2020-09-19 20:49:33 +02:00
processAutocompleteUserResult ( e ) {
2021-05-20 16:44:45 +02:00
if ( e . instance . props . user && this . settings . places . autocompletes ) {
2020-09-19 20:49:33 +02:00
if ( ! e . returnvalue ) {
e . instance . props . user = this . getUserData ( e . instance . props . user . id ) ;
let data = changedUsers [ e . instance . props . user . id ] ;
if ( data && data . name ) e . instance . props . nick = data . name ;
}
else {
2021-06-25 20:59:24 +02:00
if ( typeof e . returnvalue . props . children == "function" ) {
let childrenRender = e . returnvalue . props . children ;
2021-07-05 16:33:10 +02:00
e . returnvalue . props . children = BDFDB . TimeUtils . suppress ( ( ... args ) => {
2021-06-25 20:59:24 +02:00
let children = childrenRender ( ... args ) ;
let userName = BDFDB . ReactUtils . findChild ( children , { name : "AutocompleteRowHeading" } ) ;
if ( userName ) this . changeUserColor ( userName , e . instance . props . user . id ) ;
return children ;
2022-02-11 14:43:01 +01:00
} , "Error in Children Render of AutocompleteUserResult!" , this ) ;
2021-06-25 20:59:24 +02:00
}
2020-09-19 20:49:33 +02:00
}
2020-06-28 09:41:02 +02:00
}
}
2020-09-19 20:49:33 +02:00
processHeaderBarContainer ( e ) {
2022-09-27 14:48:10 +02:00
let channel = BDFDB . LibraryStores . ChannelStore . getChannel ( e . instance . props . channelId ) ;
2021-05-20 16:44:45 +02:00
if ( channel && channel . isDM ( ) && this . settings . places . dmHeader ) {
2022-09-02 11:18:50 +02:00
let userName = BDFDB . ReactUtils . findChild ( e . instance , { props : [ [ "className" , BDFDB . disCN . channelheadercursorpointer ] ] } ) ;
2020-09-19 20:49:33 +02:00
if ( userName ) {
let recipientId = channel . getRecipientId ( ) ;
userName . props . children = this . getUserData ( recipientId ) . username ;
this . changeUserColor ( userName , recipientId ) ;
}
2020-02-07 15:16:40 +01:00
}
2019-03-28 13:56:12 +01:00
}
2020-09-19 20:49:33 +02:00
processChannelCallHeader ( e ) {
2022-08-03 00:12:47 +02:00
if ( e . instance . props . channel && this . settings . places . dmHeader && e . instance . props . channel . isDM ( ) ) {
let userName = BDFDB . ReactUtils . findChild ( e . returnvalue , { name : "Title" } ) ;
if ( userName ) {
let recipientId = e . instance . props . channel . getRecipientId ( ) ;
if ( changedUsers [ recipientId ] ) {
userName . props . children = this . getUserData ( recipientId ) . username ;
this . changeUserColor ( userName , recipientId ) ;
2022-05-28 19:56:39 +02:00
}
2020-09-19 20:49:33 +02:00
}
2020-07-07 01:36:52 +02:00
}
2020-09-19 20:49:33 +02:00
}
processDiscordTag ( e ) {
this . processNameTag ( e ) ;
}
processNameTag ( e ) {
2021-02-24 17:32:17 +01:00
if ( e . returnvalue && e . instance . props . user && ( e . instance . props . className || e . instance . props . usernameClass ) ) {
2020-09-19 20:49:33 +02:00
let change = false , guildId = null ;
let tagClass = "" ;
2022-07-11 14:51:22 +02:00
if ( e . instance . props . className ) {
if ( e . instance . props . className . indexOf ( BDFDB . disCN . userpopoutheadertagnonickname ) > - 1 ) {
2021-05-20 16:44:45 +02:00
change = this . settings . places . userPopout ;
2022-09-27 16:53:10 +02:00
guildId = BDFDB . LibraryStores . SelectedGuildStore . getGuildId ( ) ;
2021-05-30 17:50:07 +02:00
tagClass = BDFDB . disCNS . userpopoutheaderbottag + BDFDB . disCN . bottagnametag ;
2022-07-11 14:51:22 +02:00
}
2022-08-31 13:02:40 +02:00
else if ( e . instance . props . className . indexOf ( BDFDB . disCN . userpopoutusernametagnonickname ) > - 1 ) {
change = this . settings . places . userPopout ;
2022-09-27 16:53:10 +02:00
guildId = BDFDB . LibraryStores . SelectedGuildStore . getGuildId ( ) ;
2022-08-31 13:02:40 +02:00
tagClass = BDFDB . disCNS . userpopoutusernamebottag + BDFDB . disCN . bottagnametag ;
}
2022-07-11 14:51:22 +02:00
else if ( e . instance . props . className . indexOf ( BDFDB . disCN . guildsettingsinviteusername ) > - 1 ) {
2021-05-20 16:44:45 +02:00
change = this . settings . places . guildSettings ;
2022-07-11 14:51:22 +02:00
}
else if ( e . instance . props . className . indexOf ( BDFDB . disCN . peoplesdiscordtag ) > - 1 ) {
2021-05-20 16:44:45 +02:00
change = this . settings . places . friendList ;
2020-09-19 20:49:33 +02:00
tagClass = BDFDB . disCN . bottagnametag ;
2022-07-11 14:51:22 +02:00
}
2020-09-19 20:49:33 +02:00
}
2022-07-11 14:51:22 +02:00
if ( e . instance . props . usernameClass ) {
if ( e . instance . props . usernameClass . indexOf ( BDFDB . disCN . messagereactionsmodalusername ) > - 1 ) {
2022-09-27 16:53:10 +02:00
change = this . settings . places . reactions && ! BDFDB . LibraryStores . GuildMemberStore . getNick ( BDFDB . LibraryStores . SelectedGuildStore . getGuildId ( ) , e . instance . props . user . id ) ;
2022-07-11 14:51:22 +02:00
}
else if ( e . instance . props . usernameClass . indexOf ( BDFDB . disCN . userprofileusername ) > - 1 ) {
2021-06-11 23:07:17 +02:00
change = this . settings . places . userProfile ;
2022-09-27 16:53:10 +02:00
guildId = BDFDB . LibraryStores . SelectedGuildStore . getGuildId ( ) ;
2021-06-11 23:07:17 +02:00
tagClass = BDFDB . disCNS . userprofilebottag + BDFDB . disCN . bottagnametag ;
2022-07-11 14:51:22 +02:00
}
2020-09-19 20:49:33 +02:00
}
if ( change ) {
2020-11-19 16:51:14 +01:00
let userName = BDFDB . ReactUtils . findChild ( e . returnvalue , { props : [ [ "className" , BDFDB . disCN . username ] ] } ) ;
2022-04-21 18:31:14 +02:00
if ( userName ) this . changeUserColor ( userName , e . instance . props . user . id ) ;
2020-09-19 20:49:33 +02:00
if ( tagClass ) this . injectBadge ( e . returnvalue . props . children , e . instance . props . user . id , guildId , 2 , {
tagClass : tagClass ,
useRem : e . instance . props . useRemSizes ,
inverted : e . instance . props . invertBotTagColor
} ) ;
}
2018-12-22 23:41:25 +01:00
}
2018-12-22 22:34:45 +01:00
}
2019-01-26 22:45:19 +01:00
2021-07-29 00:36:40 +02:00
processFocusRing ( e ) {
if ( e . returnvalue && e . returnvalue . props . className ) {
let change , userId , nameClass , modify = { } ;
if ( this . settings . places . chatWindow && e . returnvalue . props . className . indexOf ( BDFDB . disCN . messageswelcomethreadcreator ) > - 1 ) {
change = true ;
userId = BDFDB . ReactUtils . findValue ( e . returnvalue . _owner , "userId" , { up : true } ) ;
}
if ( change && userId ) {
if ( changedUsers [ userId ] ) {
let name = nameClass ? BDFDB . ReactUtils . findChild ( e . returnvalue , { props : [ [ "className" , nameClass ] ] } ) : e . returnvalue ;
if ( name ) {
if ( changedUsers [ userId ] . name ) name . props . children = changedUsers [ userId ] . name ;
this . changeUserColor ( name , userId , modify ) ;
}
}
}
}
}
2022-10-13 12:17:00 +02:00
processUserThemedBanner ( e ) {
2022-09-24 17:31:12 +02:00
this . processUserBanner ( e ) ;
}
processUserBanner ( e ) {
2022-09-03 16:19:40 +02:00
if ( e . instance . props . user && changedUsers [ e . instance . props . user . id ] ) {
2022-09-24 17:31:12 +02:00
if ( changedUsers [ e . instance . props . user . id ] . removeBanner ) {
e . instance . props . bannerSrc = null ;
e . instance . props . displayProfile . banner = null ;
}
else if ( changedUsers [ e . instance . props . user . id ] . banner ) {
e . instance . props . bannerSrc = changedUsers [ e . instance . props . user . id ] . banner ;
e . instance . props . displayProfile . banner = changedUsers [ e . instance . props . user . id ] . banner ;
}
2022-09-03 16:19:40 +02:00
}
}
2022-09-24 17:31:12 +02:00
processUserBannerMask ( e ) {
2022-08-08 14:42:09 +02:00
if ( e . instance . props . user && changedUsers [ e . instance . props . user . id ] ) {
2022-09-24 17:31:12 +02:00
if ( changedUsers [ e . instance . props . user . id ] . removeBanner ) e . instance . props . isPremium = false ;
else if ( changedUsers [ e . instance . props . user . id ] . banner ) e . instance . props . isPremium = true ;
2022-08-08 14:42:09 +02:00
}
}
processUserPopoutAvatar ( e ) {
2022-09-24 17:31:12 +02:00
this . processUserThemePopoutHeader ( e ) ;
2022-09-15 14:42:08 +02:00
}
processUserThemePopoutHeader ( e ) {
if ( this . settings . places . userPopout && e . instance . props . user && changedUsers [ e . instance . props . user . id ] ) e . instance . props . user = this . getUserData ( e . instance . props . user . id , true , true ) ;
2022-08-08 14:42:09 +02:00
if ( e . instance . props . displayProfile && e . instance . props . user && changedUsers [ e . instance . props . user . id ] ) {
if ( changedUsers [ e . instance . props . user . id ] . removeBanner ) e . instance . props . displayProfile . banner = null ;
else if ( changedUsers [ e . instance . props . user . id ] . banner ) e . instance . props . displayProfile . banner = changedUsers [ e . instance . props . user . id ] . banner ;
}
2022-07-24 15:03:53 +02:00
}
2022-08-31 13:02:40 +02:00
processUserPopoutExperimentWrapper ( e ) {
if ( e . returnvalue . props . user && this . settings . places . userPopout && changedUsers [ e . returnvalue . props . user . id ] ) e . returnvalue . props . user = this . getUserData ( e . returnvalue . props . user . id , true , true ) ;
}
2021-06-25 16:06:39 +02:00
processUserPopoutContainer ( e ) {
if ( e . returnvalue . props . user && this . settings . places . userPopout && changedUsers [ e . returnvalue . props . user . id ] ) e . returnvalue . props . user = this . getUserData ( e . returnvalue . props . user . id , true , true ) ;
2021-06-03 18:32:06 +02:00
}
2021-11-09 17:02:30 +01:00
2022-08-31 13:02:40 +02:00
processUsernameSection ( e ) {
if ( e . instance . props . user && this . settings . places . userPopout ) {
let data = changedUsers [ e . instance . props . user . id ] ;
if ( ! data ) return ;
if ( ! e . returnvalue ) {
let nickname = this . getUserNick ( e . instance . props . user . id , e . instance . props . nickname ) ;
e . instance . props . nickname = nickname ? nickname : null ;
}
else {
if ( data . color1 || data . tag ) {
let [ children , index ] = BDFDB . ReactUtils . findParent ( e . returnvalue , { props : [ [ "className" , BDFDB . disCN . userpopoutusernamenickname ] ] } ) ;
if ( index > - 1 ) {
this . changeUserColor ( children [ index ] , e . instance . props . user . id ) ;
if ( ! BDFDB . ArrayUtils . is ( children [ index ] . props . children ) ) children [ index ] . props . children = [ children [ index ] . props . children ] . flat ( 10 ) ;
2022-09-27 16:53:10 +02:00
this . injectBadge ( children [ index ] . props . children , e . instance . props . user . id , BDFDB . LibraryStores . SelectedGuildStore . getGuildId ( ) , 2 , {
2022-08-31 13:02:40 +02:00
tagClass : BDFDB . disCNS . userpopoutheaderbottag + BDFDB . disCN . bottagnametag ,
inverted : typeof e . instance . getMode == "function" && e . instance . getMode ( ) !== "Normal"
} ) ;
}
}
}
}
}
2021-06-03 18:32:06 +02:00
processUserPopoutInfo ( e ) {
if ( e . instance . props . user && this . settings . places . userPopout ) {
let data = changedUsers [ e . instance . props . user . id ] ;
2021-06-25 16:06:39 +02:00
if ( ! data ) return ;
if ( ! e . returnvalue ) {
2021-12-07 17:02:18 +01:00
let nickname = this . getUserNick ( e . instance . props . user . id , e . instance . props . nickname ) ;
e . instance . props . nickname = nickname ? nickname : null ;
2021-06-25 16:06:39 +02:00
}
else {
2022-04-21 18:31:14 +02:00
if ( data . color1 || data . tag ) {
2021-06-25 16:06:39 +02:00
let [ children , index ] = BDFDB . ReactUtils . findParent ( e . returnvalue , { props : [ [ "className" , BDFDB . disCN . userpopoutheadernickname ] ] } ) ;
if ( index > - 1 ) {
2022-04-21 18:31:14 +02:00
this . changeUserColor ( children [ index ] , e . instance . props . user . id ) ;
2021-06-25 16:06:39 +02:00
if ( ! BDFDB . ArrayUtils . is ( children [ index ] . props . children ) ) children [ index ] . props . children = [ children [ index ] . props . children ] . flat ( 10 ) ;
2022-09-27 16:53:10 +02:00
this . injectBadge ( children [ index ] . props . children , e . instance . props . user . id , BDFDB . LibraryStores . SelectedGuildStore . getGuildId ( ) , 2 , {
2021-06-25 16:06:39 +02:00
tagClass : BDFDB . disCNS . userpopoutheaderbottag + BDFDB . disCN . bottagnametag ,
inverted : typeof e . instance . getMode == "function" && e . instance . getMode ( ) !== "Normal"
} ) ;
}
2020-02-08 18:50:11 +01:00
}
2020-02-07 15:16:40 +01:00
}
2019-10-02 09:53:39 +02:00
}
2018-10-11 10:21:26 +02:00
}
2019-01-26 22:45:19 +01:00
2021-06-09 20:46:48 +02:00
processUserProfileModal ( e ) {
2021-06-12 16:04:20 +02:00
if ( e . instance . props . user && this . settings . places . userProfile ) e . instance . props . user = this . getUserData ( e . instance . props . user . id ) ;
}
2021-06-25 20:17:49 +02:00
processUserProfileModalHeader ( e ) {
if ( e . instance . props . user && this . settings . places . userProfile ) e . instance . props . user = this . getUserData ( e . instance . props . user . id ) ;
}
2021-06-09 21:43:27 +02:00
processMutualFriends ( e ) {
if ( this . settings . places . mutualFriends ) {
let [ children , index ] = BDFDB . ReactUtils . findParent ( e . returnvalue , { name : "FriendRow" } ) ;
if ( index > - 1 ) for ( let row of children ) if ( row && row . props && row . props . user ) row . props . user = this . getUserData ( row . props . user . id ) ;
}
}
2020-09-19 20:49:33 +02:00
processUserInfo ( e ) {
2021-05-20 16:44:45 +02:00
if ( e . instance . props . user && this . settings . places . friendList ) {
2020-09-19 20:49:33 +02:00
e . instance . props . user = this . getUserData ( e . instance . props . user . id ) ;
if ( BDFDB . ReactUtils . isValidElement ( e . instance . props . subText ) ) {
let data = changedUsers [ e . instance . props . user . id ] ;
if ( data && ( data . removeStatus || data . status || data . statusEmoji ) ) {
2021-01-23 22:15:48 +01:00
e . instance . props . subText . props . activities = [ ] . concat ( e . instance . props . subText . props . activities ) . filter ( n => n && n . type != BDFDB . DiscordConstants . ActivityTypes . CUSTOM _STATUS ) ;
2020-09-19 20:49:33 +02:00
let activity = this . createCustomStatus ( data ) ;
if ( activity ) e . instance . props . subText . props . activities . unshift ( activity ) ;
}
2020-02-17 13:16:17 +01:00
}
}
}
2019-01-26 22:45:19 +01:00
2021-06-11 23:07:17 +02:00
processNowPlayingItem ( e ) {
2022-04-16 19:22:30 +02:00
if ( this . settings . places . activity ) {
let [ children , index ] = BDFDB . ReactUtils . findParent ( e . instance , { name : "NowPlayingHeader" } ) ;
if ( index > - 1 ) for ( let child of children ) if ( child && child . props && child . props . party ) {
if ( child . type && child . type . displayName == "NowPlayingHeader" ) {
const type = child . type ;
child . type = ( ... args ) => {
const returnValue = type ( ... args ) ;
if ( BDFDB . ObjectUtils . get ( returnValue , "props.priorityUser.user.username" ) == returnValue . props . title ) {
returnValue . props . title = BDFDB . ReactUtils . createElement ( "span" , { children : returnValue . props . title } ) ;
this . changeUserColor ( returnValue . props . title , returnValue . props . priorityUser . user . id ) ;
}
return returnValue ;
} ;
}
child . props . party = Object . assign ( { } , child . props . party ) ;
if ( child . props . party . partiedMembers ) for ( let i in child . props . party . partiedMembers ) if ( child . props . party . partiedMembers [ i ] ) child . props . party . partiedMembers [ i ] = this . getUserData ( child . props . party . partiedMembers [ i ] . id ) ;
if ( child . props . party . priorityMembers ) for ( let i in child . props . party . priorityMembers ) if ( child . props . party . priorityMembers [ i ] ) child . props . party . priorityMembers [ i ] = Object . assign ( { } , child . props . party . priorityMembers [ i ] , { user : this . getUserData ( child . props . party . priorityMembers [ i ] . user . id ) } ) ;
if ( child . props . party . voiceChannels ) for ( let i in child . props . party . voiceChannels ) if ( child . props . party . voiceChannels [ i ] ) child . props . party . voiceChannels [ i ] = Object . assign ( { } , child . props . party . voiceChannels [ i ] , { members : [ ] . concat ( child . props . party . voiceChannels [ i ] . members ) . map ( user => this . getUserData ( user . id ) ) } ) ;
2020-09-19 20:49:33 +02:00
}
2020-02-08 10:24:25 +01:00
}
}
2021-06-02 17:21:12 +02:00
2020-09-19 20:49:33 +02:00
processVoiceUser ( e ) {
2021-05-20 16:44:45 +02:00
if ( e . instance . props . user && this . settings . places . voiceChat ) {
2020-09-19 20:49:33 +02:00
if ( ! e . returnvalue ) {
e . instance . props . user = this . getUserData ( e . instance . props . user . id ) ;
let data = changedUsers [ e . instance . props . user . id ] ;
2021-04-23 12:01:44 +02:00
if ( data && data . name ) {
2022-09-27 16:53:10 +02:00
let member = BDFDB . LibraryStores . GuildMemberStore . getMember ( BDFDB . LibraryStores . SelectedGuildStore . getGuildId ( ) , e . instance . props . user . id ) ;
2021-11-03 17:58:40 +01:00
e . instance . props . nick = this . getUserNick ( e . instance . props . user . id , e . instance . props . nick ) || e . instance . props . nick ;
2021-04-23 12:01:44 +02:00
}
2020-09-19 20:49:33 +02:00
}
else {
let userName = BDFDB . ReactUtils . findChild ( e . returnvalue , { props : [ [ "className" , BDFDB . disCN . voicename ] ] } ) ;
if ( userName ) this . changeUserColor ( userName , e . instance . props . user . id , { modify : e . instance . props } ) ;
}
2020-02-07 15:16:40 +01:00
}
}
2019-09-04 12:34:02 +02:00
2021-06-02 17:21:12 +02:00
processRTCConnectionVoiceUsers ( e ) {
if ( e . instance . props . voiceStates && this . settings . places . voiceChat ) for ( let i in e . instance . props . voiceStates ) {
let data = changedUsers [ e . instance . props . voiceStates [ i ] . user . id ] ;
if ( data ) {
e . instance . props . voiceStates [ i ] = Object . assign ( { } , e . instance . props . voiceStates [ i ] ) ;
e . instance . props . voiceStates [ i ] . user = this . getUserData ( e . instance . props . voiceStates [ i ] . user . id ) ;
2021-11-03 17:58:40 +01:00
e . instance . props . voiceStates [ i ] . nick = this . getUserNick ( e . instance . props . voiceStates [ i ] . user . id , e . instance . props . voiceStates [ i ] . member . nick ) || e . instance . props . voiceStates [ i ] . nick ;
2021-06-02 17:21:12 +02:00
}
}
}
2022-04-08 11:20:49 +02:00
2020-09-19 20:49:33 +02:00
processAccount ( e ) {
2021-05-20 16:44:45 +02:00
if ( e . instance . props . currentUser && this . settings . places . userAccount ) {
2020-09-19 20:49:33 +02:00
let data = changedUsers [ e . instance . props . currentUser . id ] ;
if ( ! e . returnvalue ) {
e . instance . props . currentUser = this . getUserData ( e . instance . props . currentUser . id ) ;
if ( data && ( data . removeStatus || data . status || data . statusEmoji ) ) e . instance . props . customStatusActivity = this . createCustomStatus ( data ) ;
}
2022-04-08 11:20:49 +02:00
}
}
processPanelTitle ( e ) {
if ( this . settings . places . userAccount ) {
let data = changedUsers [ BDFDB . UserUtils . me . id ] ;
let user = data && this . getUserData ( BDFDB . UserUtils . me . id ) ;
if ( user && e . instance . props . children == user . username ) {
2022-04-21 18:31:14 +02:00
if ( data . color1 ) this . changeUserColor ( e . returnvalue , BDFDB . UserUtils . me . id ) ;
2018-12-25 16:52:37 +01:00
}
}
}
2019-01-26 22:45:19 +01:00
2020-09-19 20:49:33 +02:00
processPrivateChannelEmptyMessage ( e ) {
2021-05-20 16:44:45 +02:00
if ( e . instance . props . channel && e . instance . props . channel . isDM ( ) && this . settings . places . chatWindow ) {
2020-09-19 20:49:33 +02:00
let recipientId = e . instance . props . channel . getRecipientId ( ) ;
let name = this . getUserData ( recipientId ) . username ;
let avatar = BDFDB . ReactUtils . findChild ( e . returnvalue . props . children , { props : "src" } ) ;
if ( avatar ) avatar . props . src = this . getUserAvatar ( recipientId ) ;
2021-07-05 21:57:00 +02:00
let userName = BDFDB . ReactUtils . findChild ( e . returnvalue . props . children , { name : "EmptyMessageHeader" } ) ;
2020-09-19 20:49:33 +02:00
if ( userName ) {
userName . props . children = BDFDB . ReactUtils . createElement ( "span" , { children : name } ) ;
this . changeUserColor ( userName . props . children , recipientId ) ;
}
userName = BDFDB . ReactUtils . findChild ( e . returnvalue . props . children , { name : "strong" } ) ;
if ( userName ) {
userName . props . children = "@" + name ;
this . changeUserColor ( userName , recipientId ) ;
}
2019-02-16 12:58:25 +01:00
}
2018-12-22 22:34:45 +01:00
}
2020-09-19 20:49:33 +02:00
processMessage ( e ) {
2021-05-20 16:44:45 +02:00
if ( this . settings . places . chatWindow ) {
2020-09-19 20:49:33 +02:00
let header = e . instance . props . childrenHeader ;
2021-07-29 00:36:40 +02:00
if ( header && header . props && header . props . message && this . shouldChangeInChat ( header . props . message . channel _id ) ) {
2020-09-19 20:49:33 +02:00
let data = changedUsers [ header . props . message . author . id ] ;
if ( data ) {
2022-09-27 16:53:10 +02:00
let color1 = data . color1 && data . useRoleColor && ( BDFDB . LibraryStores . GuildMemberStore . getMember ( ( BDFDB . LibraryStores . ChannelStore . getChannel ( header . props . message . channel _id ) || { } ) . guild _id , header . props . message . author . id ) || { } ) . colorString || data . color1 ;
2020-11-22 19:03:36 +01:00
let message = new BDFDB . DiscordObjects . Message ( Object . assign ( { } , header . props . message , { author : this . getUserData ( header . props . message . author . id , true , false , header . props . message . author ) } ) ) ;
2020-10-06 11:39:26 +02:00
if ( color1 ) message . colorString = BDFDB . ColorUtils . convert ( BDFDB . ObjectUtils . is ( color1 ) ? color1 [ 0 ] : color1 , "HEX" ) ;
2020-09-19 20:49:33 +02:00
header . props . message = message ;
}
2020-02-29 20:02:20 +01:00
}
2020-09-19 20:49:33 +02:00
let content = e . instance . props . childrenMessageContent ;
2021-07-29 00:36:40 +02:00
if ( content && content . type && content . type . type && content . props . message && this . shouldChangeInChat ( content . props . message . channel _id ) ) {
2020-09-19 20:49:33 +02:00
let data = changedUsers [ content . props . message . author . id ] ;
2020-10-06 11:39:26 +02:00
if ( data ) {
2022-09-27 16:53:10 +02:00
let messageColor = data . color2 || ( BDFDB . ObjectUtils . get ( BDFDB . BDUtils . getPlugin ( "BetterRoleColors" , true ) , "settings.modules.chat" ) && ( data . color1 && data . useRoleColor && ( BDFDB . LibraryStores . GuildMemberStore . getMember ( ( BDFDB . LibraryStores . ChannelStore . getChannel ( content . props . message . channel _id ) || { } ) . guild _id , content . props . message . author . id ) || { } ) . colorString || data . color1 ) ) ;
2020-10-06 11:39:26 +02:00
if ( messageColor ) {
2020-11-22 19:03:36 +01:00
let message = new BDFDB . DiscordObjects . Message ( Object . assign ( { } , content . props . message , { author : this . getUserData ( content . props . message . author . id , true , false , content . props . message . author ) } ) ) ;
2020-10-06 11:39:26 +02:00
message . colorString = BDFDB . ColorUtils . convert ( BDFDB . ObjectUtils . is ( messageColor ) ? messageColor [ 0 ] : messageColor , "HEX" ) ;
content . props . message = message ;
}
2020-09-19 20:49:33 +02:00
}
2020-02-29 20:02:20 +01:00
}
2020-10-27 16:25:26 +01:00
let repliedMessage = e . instance . props . childrenRepliedMessage ;
2021-07-29 00:36:40 +02:00
if ( repliedMessage && repliedMessage . props && repliedMessage . props . children && repliedMessage . props . children . props && repliedMessage . props . children . props . referencedMessage && repliedMessage . props . children . props . referencedMessage . message && this . shouldChangeInChat ( repliedMessage . props . children . props . referencedMessage . message . channel _id ) ) {
2020-10-27 16:25:26 +01:00
let referenceMessage = repliedMessage . props . children . props . referencedMessage . message ;
let data = changedUsers [ referenceMessage . author . id ] ;
if ( data ) {
2022-09-27 16:53:10 +02:00
let color1 = data . color1 && data . useRoleColor && ( BDFDB . LibraryStores . GuildMemberStore . getMember ( ( BDFDB . LibraryStores . ChannelStore . getChannel ( referenceMessage . channel _id ) || { } ) . guild _id , header . props . message . author . id ) || { } ) . colorString || data . color1 ;
2020-11-22 19:03:36 +01:00
let message = new BDFDB . DiscordObjects . Message ( Object . assign ( { } , referenceMessage , { author : this . getUserData ( referenceMessage . author . id , true , false , referenceMessage . author ) } ) ) ;
2020-10-27 16:25:26 +01:00
if ( color1 ) message . colorString = BDFDB . ColorUtils . convert ( BDFDB . ObjectUtils . is ( color1 ) ? color1 [ 0 ] : color1 , "HEX" ) ;
repliedMessage . props . children . props . referencedMessage = Object . assign ( { } , repliedMessage . props . children . props . referencedMessage , { message : message } ) ;
}
}
2020-02-10 08:59:57 +01:00
}
}
2020-09-19 20:49:33 +02:00
2020-10-07 10:20:55 +02:00
processMessageUsername ( e ) {
2021-07-29 00:36:40 +02:00
if ( ! e . instance . props . message || ! this . settings . places . chatWindow || ! this . shouldChangeInChat ( e . instance . props . message . channel _id ) ) return ;
2021-06-11 23:07:17 +02:00
const author = e . instance . props . userOverride || e . instance . props . message . author ;
let data = changedUsers [ author . id ] ;
if ( ! data ) return ;
if ( ! e . returnvalue ) {
2022-09-27 16:53:10 +02:00
let color1 = data . color1 && data . useRoleColor && ( BDFDB . LibraryStores . GuildMemberStore . getMember ( ( BDFDB . LibraryStores . ChannelStore . getChannel ( e . instance . props . message . channel _id ) || { } ) . guild _id , author . id ) || { } ) . colorString || data . color1 ;
2021-06-11 23:07:17 +02:00
color1 = color1 && BDFDB . ColorUtils . convert ( BDFDB . ObjectUtils . is ( color1 ) ? color1 [ 0 ] : color1 , "HEX" ) ;
if ( e . instance . props . userOverride ) e . instance . props . userOverride = this . getUserData ( author . id )
else {
let message = new BDFDB . DiscordObjects . Message ( Object . assign ( { } , e . instance . props . message , { author : this . getUserData ( author . id , true , false , author ) } ) ) ;
if ( color1 ) message . colorString = color1 ;
2020-11-21 17:44:54 +01:00
e . instance . props . message = message ;
}
2022-09-27 16:53:10 +02:00
let member = BDFDB . LibraryStores . GuildMemberStore . getMember ( ( BDFDB . LibraryStores . ChannelStore . getChannel ( e . instance . props . message . channel _id ) || { } ) . guild _id , author . id ) ;
2021-06-11 23:07:17 +02:00
e . instance . props . author = Object . assign ( { } , e . instance . props . author , {
2021-11-03 16:21:25 +01:00
nick : this . getUserNick ( e . instance . props . author . id , member && member . nick ) || e . instance . props . author . nick ,
2021-10-18 19:00:51 +02:00
guildMemberAvatar : ( data . removeIcon || data . url ) ? null : e . instance . props . author . guildMemberAvatar ,
2021-06-11 23:07:17 +02:00
colorString : color1 || e . instance . props . author . colorString
} ) ;
}
else if ( e . returnvalue . props . children ) {
2022-04-21 18:31:14 +02:00
if ( data . color1 ) {
2021-06-11 23:07:17 +02:00
let messageUsername = BDFDB . ReactUtils . findChild ( e . returnvalue . props . children , { name : "Popout" , props : [ [ "className" , BDFDB . disCN . messageusername ] ] } ) ;
if ( messageUsername ) {
if ( messageUsername . props && typeof messageUsername . props . children == "function" ) {
let renderChildren = messageUsername . props . children ;
2021-07-05 16:33:10 +02:00
messageUsername . props . children = BDFDB . TimeUtils . suppress ( ( ... args ) => {
2021-06-11 23:07:17 +02:00
let renderedChildren = renderChildren ( ... args ) ;
2022-09-27 14:48:10 +02:00
this . changeUserColor ( renderedChildren , author . id , { guildId : ( BDFDB . LibraryStores . ChannelStore . getChannel ( e . instance . props . message . channel _id ) || { } ) . guild _id } ) ;
2021-06-11 23:07:17 +02:00
return renderedChildren ;
2022-02-11 14:43:01 +01:00
} , "Error in Children Render of MessageUsername!" , this ) ;
2020-02-27 11:53:07 +01:00
}
2022-09-27 14:48:10 +02:00
else this . changeUserColor ( messageUsername , author . id , { guildId : ( BDFDB . LibraryStores . ChannelStore . getChannel ( e . instance . props . message . channel _id ) || { } ) . guild _id } ) ;
2020-02-07 15:16:40 +01:00
}
}
2022-05-26 15:01:24 +02:00
let [ children , index ] = BDFDB . ReactUtils . findParent ( e . returnvalue , { name : "Popout" } ) ;
2022-09-27 14:48:10 +02:00
if ( index > - 1 ) this . injectBadge ( children , author . id , ( BDFDB . LibraryStores . ChannelStore . getChannel ( e . instance . props . message . channel _id ) || { } ) . guild _id , e . instance . props . compact ? index : ( index + 1 ) , {
2021-06-11 23:07:17 +02:00
tagClass : e . instance . props . compact ? BDFDB . disCN . messagebottagcompact : BDFDB . disCN . messagebottagcozy ,
useRem : true
} ) ;
2020-02-07 15:16:40 +01:00
}
2018-10-11 10:21:26 +02:00
}
2020-09-19 20:49:33 +02:00
processMessageContent ( e ) {
2021-07-29 00:36:40 +02:00
if ( e . instance . props . message && this . settings . places . chatWindow && this . shouldChangeInChat ( e . instance . props . message . channel _id ) ) {
2020-09-19 20:49:33 +02:00
if ( ! e . returnvalue ) {
2022-09-27 13:19:16 +02:00
if ( ! BDFDB . DiscordConstants . MessageTypeGroups . USER _MESSAGE . has ( message . type ) ) {
2020-11-22 19:03:36 +01:00
let message = new BDFDB . DiscordObjects . Message ( Object . assign ( { } , e . instance . props . message , { author : this . getUserData ( e . instance . props . message . author . id , true , false , e . instance . props . message . author ) } ) ) ;
2020-09-19 20:49:33 +02:00
let data = changedUsers [ e . instance . props . message . author . id ] ;
if ( data ) {
2022-09-27 16:53:10 +02:00
let color1 = data . color1 && data . useRoleColor && ( BDFDB . LibraryStores . GuildMemberStore . getMember ( ( BDFDB . LibraryStores . ChannelStore . getChannel ( e . instance . props . message . channel _id ) || { } ) . guild _id , e . instance . props . message . author . id ) || { } ) . colorString || data . color1 ;
2020-10-06 11:39:26 +02:00
if ( color1 ) message . colorString = BDFDB . ColorUtils . convert ( BDFDB . ObjectUtils . is ( color1 ) ? color1 [ 0 ] : color1 , "HEX" ) ;
2020-09-19 20:49:33 +02:00
}
e . instance . props . message = message ;
2020-10-27 15:46:46 +01:00
if ( e . instance . props . children ) e . instance . props . children . props . message = e . instance . props . message ;
2020-02-07 15:16:40 +01:00
}
}
2021-05-17 19:35:13 +02:00
else if ( e . instance . props . message . state != BDFDB . DiscordConstants . MessageStates . SEND _FAILED ) {
2020-09-19 20:49:33 +02:00
let data = changedUsers [ e . instance . props . message . author . id ] ;
2022-09-27 16:53:10 +02:00
let messageColor = data && ( data . color2 || ( BDFDB . ObjectUtils . get ( BDFDB . BDUtils . getPlugin ( "BetterRoleColors" , true ) , "settings.modules.chat" ) && ( data . color1 && data . useRoleColor && ( BDFDB . LibraryStores . GuildMemberStore . getMember ( ( BDFDB . LibraryStores . ChannelStore . getChannel ( e . instance . props . message . channel _id ) || { } ) . guild _id , e . instance . props . message . author . id ) || { } ) . colorString || data . color1 ) ) ) ;
2020-10-20 21:57:17 +02:00
if ( messageColor ) {
if ( BDFDB . ObjectUtils . is ( messageColor ) ) e . returnvalue . props . children = BDFDB . ReactUtils . createElement ( BDFDB . LibraryComponents . TextGradientElement , {
gradient : BDFDB . ColorUtils . createGradient ( messageColor ) ,
children : e . returnvalue . props . children
} ) ;
2021-01-21 15:32:35 +01:00
else e . returnvalue . props . children = BDFDB . ReactUtils . createElement ( "span" , {
style : Object . assign ( { } , e . returnvalue . props . style , { color : BDFDB . ColorUtils . convert ( messageColor , "RGBA" ) } ) ,
children : e . returnvalue . props . children
} ) ;
2020-10-20 21:57:17 +02:00
}
2020-09-19 20:49:33 +02:00
}
2020-02-07 15:16:40 +01:00
}
2018-12-30 09:50:26 +01:00
}
2020-09-19 20:49:33 +02:00
2021-07-29 00:36:40 +02:00
processThreadMessageAccessoryMessage ( e ) {
if ( e . instance . props . message && this . settings . places . chatWindow && this . shouldChangeInChat ( e . instance . props . message . channel _id ) ) e . instance . props . message = new BDFDB . DiscordObjects . Message ( Object . assign ( { } , e . instance . props . message , { author : this . getUserData ( e . instance . props . message . author . id ) } ) ) ;
}
2020-10-29 00:15:33 +01:00
processReactorsComponent ( e ) {
2021-07-29 00:36:40 +02:00
if ( this . settings . places . reactions && BDFDB . ArrayUtils . is ( e . instance . props . reactors ) && this . shouldChangeInChat ( e . instance . props . channel . id ) ) {
2020-12-04 19:51:18 +01:00
if ( ! e . returnvalue ) {
2022-09-27 16:53:10 +02:00
for ( let i in e . instance . props . reactors ) if ( ! BDFDB . LibraryStores . GuildMemberStore . getNick ( e . instance . props . guildId , e . instance . props . reactors [ i ] . id ) ) e . instance . props . reactors [ i ] = this . getUserData ( e . instance . props . reactors [ i ] . id , true , false , e . instance . props . reactors [ i ] ) ;
2020-12-04 19:51:18 +01:00
}
else {
let renderRow = e . returnvalue . props . renderRow ;
e . returnvalue . props . renderRow = ( ... args ) => {
let row = renderRow ( ... args ) ;
if ( row && row . props && row . props . user && changedUsers [ row . props . user . id ] ) {
let type = row . type ;
row . type = ( ... args2 ) => {
let result = type ( ... args2 ) ;
2022-09-27 16:53:10 +02:00
let nickName = BDFDB . LibraryStores . GuildMemberStore . getNick ( row . props . guildId , row . props . user . id ) && BDFDB . ReactUtils . findChild ( result , { props : [ [ "className" , BDFDB . disCN . messagereactionsmodalnickname ] ] } ) ;
2020-12-04 19:51:18 +01:00
if ( nickName ) {
if ( changedUsers [ row . props . user . id ] . name ) BDFDB . ReactUtils . setChild ( nickName , changedUsers [ row . props . user . id ] . name ) ;
this . changeUserColor ( nickName , row . props . user . id ) ;
}
return result ;
} ;
}
return row ;
} ;
}
2020-07-07 01:36:52 +02:00
}
}
2020-09-19 20:49:33 +02:00
2021-02-24 17:32:17 +01:00
processUserMention ( e ) {
2021-07-29 00:36:40 +02:00
if ( e . instance . props . userId && this . settings . places . mentions && changedUsers [ e . instance . props . userId ] && this . shouldChangeInChat ( e . instance . props . channelId ) ) {
2021-05-20 16:44:45 +02:00
if ( typeof e . returnvalue . props . children == "function" ) {
let renderChildren = e . returnvalue . props . children ;
2021-07-05 16:33:10 +02:00
e . returnvalue . props . children = BDFDB . TimeUtils . suppress ( ( ... args ) => {
2021-05-20 16:44:45 +02:00
let children = renderChildren ( ... args ) ;
this . changeMention ( BDFDB . ReactUtils . findChild ( children , { name : "Mention" } ) , changedUsers [ e . instance . props . userId ] ) ;
return children ;
2022-02-11 14:43:01 +01:00
} , "Error in Children Render of UserMention!" , this ) ;
2021-05-20 16:44:45 +02:00
}
else this . changeMention ( BDFDB . ReactUtils . findChild ( e . returnvalue , { name : "Mention" } ) , changedUsers [ e . instance . props . userId ] ) ;
2020-12-04 22:16:16 +01:00
}
}
2021-02-24 17:32:17 +01:00
processRichUserMention ( e ) {
2021-07-29 00:36:40 +02:00
if ( e . instance . props . id && this . settings . places . mentions && changedUsers [ e . instance . props . id ] && this . shouldChangeInChat ( e . instance . props . channel && e . instance . props . channel . id ) ) {
2020-12-04 22:16:16 +01:00
let data = changedUsers [ e . instance . props . id ] ;
2021-01-13 18:54:21 +01:00
let tooltipChildren = BDFDB . ObjectUtils . get ( e , "returnvalue.props.text.props.children" ) ;
if ( tooltipChildren ) {
if ( tooltipChildren [ 0 ] && tooltipChildren [ 0 ] . props && tooltipChildren [ 0 ] . props . user ) tooltipChildren [ 0 ] . props . user = this . getUserData ( tooltipChildren [ 0 ] . props . user . id ) ;
if ( data . name && typeof tooltipChildren [ 1 ] == "string" ) tooltipChildren [ 1 ] = data . name ;
}
if ( data . name || data . color1 ) {
if ( typeof e . returnvalue . props . children == "function" ) {
let renderChildren = e . returnvalue . props . children ;
2021-07-05 16:33:10 +02:00
e . returnvalue . props . children = BDFDB . TimeUtils . suppress ( ( ... args ) => {
2021-01-13 18:54:21 +01:00
let children = renderChildren ( ... args ) ;
this . changeMention ( children , data ) ;
return children ;
2022-02-11 14:43:01 +01:00
} , "Error in Children Render of RichUserMention!" , this ) ;
2020-09-19 20:49:33 +02:00
}
2021-01-13 18:54:21 +01:00
else this . changeMention ( e . returnvalue , data ) ;
2020-02-07 19:46:33 +01:00
}
}
}
2020-12-04 22:16:16 +01:00
2020-12-04 22:29:17 +01:00
changeMention ( mention , data ) {
2021-05-20 16:44:45 +02:00
if ( ! mention ) return ;
2020-12-04 22:16:16 +01:00
if ( data . name ) {
2021-07-29 00:36:40 +02:00
const changeMentionName = ( child , name ) => {
if ( ! child ) return ;
if ( BDFDB . ArrayUtils . is ( child ) ) for ( let i in child ) {
if ( typeof child [ i ] == "string" && child [ i ] [ 0 ] == "@" ) {
if ( child [ i ] == "@" ) child [ parseInt ( i ) + 1 ] = data . name ;
else child [ i ] = "@" + data . name ;
}
else changeMentionName ( child [ i ] ) ;
}
else if ( child . props && typeof child . props . children == "string" && child . props . children [ 0 ] == "@" ) child . props . children = "@" + data . name ;
2022-04-16 19:22:30 +02:00
else if ( child . props && child . props . children ) changeMentionName ( child . props . children ) ;
2020-12-04 22:16:16 +01:00
} ;
2021-07-29 00:36:40 +02:00
changeMentionName ( mention ) ;
2020-12-04 22:16:16 +01:00
}
2022-05-26 15:01:24 +02:00
if ( data . color1 ) {
mention . props . color = BDFDB . ColorUtils . convert ( BDFDB . ObjectUtils . is ( data . color1 ) ? data . color1 [ 0 ] : data . color1 , "INT" ) ;
if ( mention . props . children && mention . props . children . props ) mention . props . children . props . color = mention . props . color ;
}
2020-12-04 22:16:16 +01:00
}
2019-01-26 22:45:19 +01:00
2020-10-27 16:25:26 +01:00
processChannelReply ( e ) {
2021-07-29 00:36:40 +02:00
if ( e . instance . props . reply && e . instance . props . reply . message && this . settings . places . chatWindow && this . shouldChangeInChat ( e . instance . props . reply . message . channel _id ) ) {
2020-10-27 16:25:26 +01:00
if ( ! e . returnvalue ) {
let message = new BDFDB . DiscordObjects . Message ( Object . assign ( { } , e . instance . props . reply . message , { author : this . getUserData ( e . instance . props . reply . message . author . id ) } ) ) ;
let data = changedUsers [ e . instance . props . reply . message . author . id ] ;
if ( data ) {
2022-09-27 16:53:10 +02:00
let color1 = data . color1 && data . useRoleColor && ( BDFDB . LibraryStores . GuildMemberStore . getMember ( ( BDFDB . LibraryStores . ChannelStore . getChannel ( e . instance . props . reply . message . channel _id ) || { } ) . guild _id , e . instance . props . reply . message . author . id ) || { } ) . colorString || data . color1 ;
2020-10-27 16:25:26 +01:00
if ( color1 ) message . colorString = BDFDB . ColorUtils . convert ( BDFDB . ObjectUtils . is ( color1 ) ? color1 [ 0 ] : color1 , "HEX" ) ;
}
e . instance . props . reply = Object . assign ( { } , e . instance . props . reply , { message : message } ) ;
}
else {
let userName = BDFDB . ReactUtils . findChild ( e . returnvalue , { props : [ [ "className" , BDFDB . disCN . messagereplyname ] ] } ) ;
if ( userName ) this . changeUserColor ( userName , e . instance . props . reply . message . author . id ) ;
}
}
}
2020-09-19 20:49:33 +02:00
processMemberListItem ( e ) {
2021-07-29 00:36:40 +02:00
if ( e . instance . props . user && this . settings . places . memberList && this . shouldChangeInChat ( ) ) {
2020-09-19 20:49:33 +02:00
if ( ! e . returnvalue ) {
e . instance . props . user = this . getUserData ( e . instance . props . user . id ) ;
let data = changedUsers [ e . instance . props . user . id ] ;
if ( data ) {
2021-04-23 12:01:44 +02:00
if ( data . name ) {
2022-09-27 16:53:10 +02:00
let member = BDFDB . LibraryStores . GuildMemberStore . getMember ( e . instance . props . channel . guild _id , e . instance . props . user . id ) ;
2021-11-03 15:57:22 +01:00
e . instance . props . nick = this . getUserNick ( e . instance . props . user . id , member && member . nick ) ;
2021-04-23 12:01:44 +02:00
}
2020-09-19 20:49:33 +02:00
if ( data . removeStatus || data . status || data . statusEmoji ) {
2021-01-23 22:15:48 +01:00
e . instance . props . activities = [ ] . concat ( e . instance . props . activities ) . filter ( n => n . type != BDFDB . DiscordConstants . ActivityTypes . CUSTOM _STATUS ) ;
2020-09-19 20:49:33 +02:00
let activity = this . createCustomStatus ( data ) ;
if ( activity ) e . instance . props . activities . unshift ( activity ) ;
}
2020-02-17 13:16:17 +01:00
}
}
2020-09-19 20:49:33 +02:00
else {
2022-07-11 15:48:16 +02:00
this . changeUserColor ( e . returnvalue . props . name , e . instance . props . user . id , { e : e , guildId : e . instance . props . channel . guild _id } ) ;
2022-09-27 16:53:10 +02:00
this . injectBadge ( BDFDB . ObjectUtils . get ( e . returnvalue , "props.decorators.props.children" ) , e . instance . props . user . id , BDFDB . LibraryStores . SelectedGuildStore . getGuildId ( ) , 2 , {
2020-09-19 20:49:33 +02:00
tagClass : BDFDB . disCN . bottagmember
} ) ;
}
2019-10-17 11:36:34 +02:00
}
2019-03-27 19:18:10 +01:00
}
2019-01-26 22:45:19 +01:00
2021-03-20 12:25:14 +01:00
processAuditLogs ( e ) {
2022-02-21 20:16:44 +01:00
if ( e . instance . props . logs && this . settings . places . guildSettings ) {
2021-03-20 12:25:14 +01:00
if ( ! BDFDB . PatchUtils . isPatched ( this , e . instance , "renderUserQuickSelectItem" ) ) BDFDB . PatchUtils . patch ( this , e . instance , "renderUserQuickSelectItem" , { after : e2 => { if ( e2 . methodArguments [ 0 ] && e2 . methodArguments [ 0 ] . user && changedUsers [ e2 . methodArguments [ 0 ] . user . id ] ) {
let userName = BDFDB . ReactUtils . findChild ( e2 . returnValue , { props : [ [ "children" , e2 . methodArguments [ 0 ] . label ] ] } ) ;
if ( userName ) {
if ( changedUsers [ e2 . methodArguments [ 0 ] . user . id ] . name ) userName . props . children = changedUsers [ e2 . methodArguments [ 0 ] . user . id ] . name ;
this . changeUserColor ( userName , e2 . methodArguments [ 0 ] . user . id ) ;
}
2022-02-11 14:43:01 +01:00
let avatar = BDFDB . ReactUtils . findChild ( e2 . returnValue , { props : [ [ "className" , BDFDB . disCN . auditlogpopoutavatar ] ] } ) ;
2021-03-20 12:25:14 +01:00
if ( avatar ) avatar . props . src = this . getUserAvatar ( e2 . methodArguments [ 0 ] . user . id ) ;
2022-10-25 17:22:33 +02:00
} } } , { noCache : true } ) ;
2021-03-20 12:25:14 +01:00
}
}
2021-09-11 19:35:49 +02:00
processGuildSettingsAuditLogEntry ( e ) {
2021-05-20 16:44:45 +02:00
if ( e . instance . props . log && this . settings . places . guildSettings ) {
2020-09-19 20:49:33 +02:00
if ( e . instance . props . log . user ) e . instance . props . log . user = this . getUserData ( e . instance . props . log . user . id ) ;
if ( e . instance . props . log . target && e . instance . props . log . targetType == "USER" ) e . instance . props . log . target = this . getUserData ( e . instance . props . log . target . id ) ;
}
2020-02-07 15:16:40 +01:00
}
2019-09-04 12:34:02 +02:00
2020-09-19 20:49:33 +02:00
processGuildSettingsEmoji ( e ) {
2021-05-20 16:44:45 +02:00
if ( BDFDB . ArrayUtils . is ( e . instance . props . emojis ) && this . settings . places . guildSettings ) {
2020-09-19 20:49:33 +02:00
e . instance . props . emojis = [ ] . concat ( e . instance . props . emojis ) ;
for ( let i in e . instance . props . emojis ) e . instance . props . emojis [ i ] = Object . assign ( { } , e . instance . props . emojis [ i ] , { user : this . getUserData ( e . instance . props . emojis [ i ] . user . id ) } ) ;
}
2019-08-19 11:17:57 +02:00
}
2019-09-04 12:34:02 +02:00
2020-09-19 20:49:33 +02:00
processMemberCard ( e ) {
2021-05-20 16:44:45 +02:00
if ( e . instance . props . user && this . settings . places . guildSettings ) e . instance . props . user = this . getUserData ( e . instance . props . user . id ) ;
2020-09-19 20:49:33 +02:00
}
2019-09-04 12:34:02 +02:00
2020-09-19 20:49:33 +02:00
processSettingsInvites ( e ) {
2021-05-20 16:44:45 +02:00
if ( BDFDB . ObjectUtils . is ( e . instance . props . invites ) && this . settings . places . guildSettings ) {
2020-09-19 20:49:33 +02:00
e . instance . props . invites = Object . assign ( { } , e . instance . props . invites ) ;
for ( let id in e . instance . props . invites ) e . instance . props . invites [ id ] = new BDFDB . DiscordObjects . Invite ( Object . assign ( { } , e . instance . props . invites [ id ] , { inviter : this . getUserData ( e . instance . props . invites [ id ] . inviter . id ) } ) ) ;
}
2019-01-06 19:56:17 +01:00
}
2019-01-26 22:45:19 +01:00
2020-09-19 20:49:33 +02:00
processGuildSettingsBans ( e ) {
2021-05-20 16:44:45 +02:00
if ( BDFDB . ObjectUtils . is ( e . instance . props . bans ) && this . settings . places . guildSettings ) {
2020-09-19 20:49:33 +02:00
e . instance . props . bans = Object . assign ( { } , e . instance . props . bans ) ;
for ( let id in e . instance . props . bans ) e . instance . props . bans [ id ] = Object . assign ( { } , e . instance . props . bans [ id ] , { user : this . getUserData ( e . instance . props . bans [ id ] . user . id ) } ) ;
}
2019-08-19 11:17:57 +02:00
}
2019-01-26 22:45:19 +01:00
2020-09-19 20:49:33 +02:00
processInvitationCard ( e ) {
2021-05-20 16:44:45 +02:00
if ( e . instance . props . user && this . settings . places . inviteList ) {
2020-09-19 20:49:33 +02:00
if ( ! e . returnvalue ) e . instance . props . user = this . getUserData ( e . instance . props . user . id ) ;
else {
let userName = BDFDB . ReactUtils . findChild ( e . returnvalue , { props : [ [ "className" , BDFDB . disCN . invitemodalinviterowname ] ] } ) ;
if ( userName ) this . changeUserColor ( userName , e . instance . props . user . id ) ;
}
2019-08-19 11:17:57 +02:00
}
2018-12-25 11:53:15 +01:00
}
2020-02-07 15:16:40 +01:00
2020-09-19 20:49:33 +02:00
processPrivateChannelRecipientsInvitePopout ( e ) {
2021-05-20 16:44:45 +02:00
if ( BDFDB . ArrayUtils . is ( e . instance . props . results ) && this . settings . places . inviteList ) {
2020-09-19 20:49:33 +02:00
for ( let result of e . instance . props . results ) result . user = this . getUserData ( result . user . id ) ;
}
2019-01-06 19:56:17 +01:00
}
2019-09-04 12:34:02 +02:00
2020-09-19 20:49:33 +02:00
processInviteModalUserRow ( e ) {
2021-05-20 16:44:45 +02:00
if ( e . instance . props . user && this . settings . places . inviteList ) {
2020-09-19 20:49:33 +02:00
let userName = BDFDB . ReactUtils . findChild ( e . returnvalue , { props : [ [ "className" , BDFDB . disCN . searchpopoutddmaddnickname ] ] } ) ;
if ( userName ) this . changeUserColor ( userName , e . instance . props . user . id ) ;
}
2020-02-07 15:16:40 +01:00
}
2019-01-26 22:45:19 +01:00
2020-09-19 20:49:33 +02:00
processTypingUsers ( e ) {
2021-05-20 16:44:45 +02:00
if ( BDFDB . ObjectUtils . is ( e . instance . props . typingUsers ) && Object . keys ( e . instance . props . typingUsers ) . length && this . settings . places . typing ) {
2022-09-27 16:53:10 +02:00
let users = Object . keys ( e . instance . props . typingUsers ) . filter ( id => id != BDFDB . UserUtils . me . id ) . filter ( id => ! BDFDB . LibraryStores . RelationshipStore . isBlocked ( id ) ) . map ( id => BDFDB . LibraryStores . UserStore . getUser ( id ) ) . filter ( user => user ) ;
2020-09-19 20:49:33 +02:00
if ( users . length ) {
let typingText = BDFDB . ReactUtils . findChild ( e . returnvalue , { props : [ [ "className" , BDFDB . disCN . typingtext ] ] } ) ;
if ( typingText && BDFDB . ArrayUtils . is ( typingText . props . children ) ) for ( let child of typingText . props . children ) if ( child . type == "strong" ) {
let userId = ( users . shift ( ) || { } ) . id ;
if ( userId ) {
let data = changedUsers [ userId ] ;
if ( data && data . name ) child . props . children = data . name ;
this . changeUserColor ( child , userId ) ;
}
2020-02-07 15:16:40 +01:00
}
}
2019-01-06 19:56:17 +01:00
}
2019-01-02 09:58:59 +01:00
}
2019-01-26 22:45:19 +01:00
2020-09-19 20:49:33 +02:00
processDirectMessage ( e ) {
2021-05-20 16:44:45 +02:00
if ( e . instance . props . channel && e . instance . props . channel . isDM ( ) && this . settings . places . recentDms ) {
2020-09-19 20:49:33 +02:00
let recipientId = e . instance . props . channel . getRecipientId ( ) ;
2021-11-03 15:57:22 +01:00
if ( ! recipientId || ! changedUsers [ recipientId ] ) return ;
2022-02-24 23:26:44 +01:00
e . instance . props . channelName = this . getUserData ( recipientId ) . username ;
2020-11-11 00:45:03 +01:00
let avatar = BDFDB . ReactUtils . findChild ( e . returnvalue , { filter : c => c && c . props && ! isNaN ( parseInt ( c . props . id ) ) } ) ;
if ( avatar && typeof avatar . props . children == "function" ) {
let childrenRender = avatar . props . children ;
2021-07-05 16:33:10 +02:00
avatar . props . children = BDFDB . TimeUtils . suppress ( ( ... args ) => {
2020-11-11 00:45:03 +01:00
let renderedChildren = childrenRender ( ... args ) ;
if ( renderedChildren && renderedChildren . props ) renderedChildren . props . icon = this . getUserAvatar ( recipientId ) ;
return renderedChildren ;
2022-02-11 14:43:01 +01:00
} , "Error in Avatar Render of DirectMessage!" , this ) ;
2020-11-11 00:45:03 +01:00
}
2020-02-17 13:16:17 +01:00
}
2019-08-19 11:17:57 +02:00
}
2021-11-12 16:30:05 +01:00
2020-09-19 20:49:33 +02:00
processPrivateChannel ( e ) {
2021-05-20 16:44:45 +02:00
if ( e . instance . props . user && this . settings . places . dmsList && changedUsers [ e . instance . props . user . id ] ) {
2020-09-19 20:49:33 +02:00
if ( ! e . returnvalue ) {
2020-05-08 09:03:38 +02:00
let data = changedUsers [ e . instance . props . user . id ] ;
2021-04-01 13:10:47 +02:00
if ( data . removeStatus || data . status || data . statusEmoji ) {
2021-01-23 22:15:48 +01:00
e . instance . props . activities = [ ] . concat ( e . instance . props . activities ) . filter ( n => n . type != BDFDB . DiscordConstants . ActivityTypes . CUSTOM _STATUS ) ;
2021-04-01 13:10:47 +02:00
let activity = this . createCustomStatus ( changedUsers [ e . instance . props . user . id ] ) ;
2020-09-19 20:49:33 +02:00
if ( activity ) e . instance . props . activities . unshift ( activity ) ;
}
}
else {
2022-02-25 16:12:53 +01:00
let wrapper = e . returnvalue && e . returnvalue . props . children && e . returnvalue . props . children . props && typeof e . returnvalue . props . children . props . children == "function" ? e . returnvalue . props . children : e . returnvalue ;
if ( typeof wrapper . props . children == "function" ) {
let childrenRender = wrapper . props . children ;
wrapper . props . children = BDFDB . TimeUtils . suppress ( ( ... args ) => {
2021-11-12 16:30:05 +01:00
let children = childrenRender ( ... args ) ;
this . _processPrivateChannel ( e . instance , children ) ;
return children ;
2022-02-11 14:43:01 +01:00
} , "Error in Children Render of PrivateChannel!" , this ) ;
2021-11-12 16:30:05 +01:00
}
2022-02-25 16:12:53 +01:00
else this . _processPrivateChannel ( e . instance , wrapper ) ;
2020-02-07 15:16:40 +01:00
}
2019-08-19 11:17:57 +02:00
}
2019-01-12 15:07:06 +01:00
}
2019-09-04 12:34:02 +02:00
2021-11-12 16:30:05 +01:00
_processPrivateChannel ( instance , returnvalue ) {
2022-02-11 14:43:01 +01:00
const wrapper = returnvalue . props . avatar ? returnvalue : BDFDB . ReactUtils . findChild ( returnvalue , { props : [ "avatar" ] } ) ;
2022-02-11 15:49:25 +01:00
if ( ! wrapper ) return ;
2022-02-11 14:43:01 +01:00
wrapper . props . name = BDFDB . ReactUtils . createElement ( "span" , { children : this . getUserData ( instance . props . user . id ) . username } ) ;
this . changeUserColor ( wrapper . props . name , instance . props . user . id , { modify : BDFDB . ObjectUtils . extract ( Object . assign ( { } , instance . props , instance . state ) , "hovered" , "selected" , "hasUnreadMessages" , "muted" ) } ) ;
if ( wrapper . props . avatar ) wrapper . props . avatar . props . src = this . getUserAvatar ( instance . props . user . id ) ;
wrapper . props . decorators = [ wrapper . props . decorators ] . flat ( 10 ) ;
this . injectBadge ( wrapper . props . decorators , instance . props . user . id , null , 1 ) ;
2021-11-12 16:30:05 +01:00
}
2022-08-29 15:04:18 +02:00
processQuickSwitcherConnected ( e ) {
2022-09-27 20:05:55 +02:00
if ( e . returnvalue && e . returnvalue . props && e . returnvalue . props . query && ( ! e . returnvalue . props . queryMode || e . returnvalue . props . queryMode == BDFDB . DiscordConstants . AutocompleterResultTypes . USER ) ) {
for ( let id in changedUsers ) if ( changedUsers [ id ] && changedUsers [ id ] . name && changedUsers [ id ] . name . toLocaleLowerCase ( ) . indexOf ( e . returnvalue . props . query . toLocaleLowerCase ( ) ) > - 1 && ! e . returnvalue . props . results . find ( n => n . record && n . record . id == id && n . type == BDFDB . DiscordConstants . AutocompleterResultTypes . USER ) ) {
2022-09-27 16:53:10 +02:00
let user = BDFDB . LibraryStores . UserStore . getUser ( id ) ;
2022-08-29 15:04:18 +02:00
if ( user ) e . returnvalue . props . results . splice ( 1 , 0 , {
comparator : ` ${ user . username } # ${ user . discriminator } ` ,
record : user ,
score : 30000 ,
2022-09-27 20:05:55 +02:00
type : BDFDB . DiscordConstants . AutocompleterResultTypes . USER
2022-08-29 15:04:18 +02:00
} ) ;
}
}
}
2020-09-19 20:49:33 +02:00
processQuickSwitchUserResult ( e ) {
2021-05-20 16:44:45 +02:00
if ( e . instance . props . user && this . settings . places . quickSwitcher ) {
2020-09-19 20:49:33 +02:00
if ( ! e . returnvalue ) e . instance . props . user = this . getUserData ( e . instance . props . user . id ) ;
else {
2020-11-19 16:51:14 +01:00
let userName = BDFDB . ReactUtils . findChild ( e . returnvalue , { props : [ [ "className" , BDFDB . disCN . quickswitchresultmatch ] ] } ) ;
2020-09-19 20:49:33 +02:00
if ( userName ) {
let data = changedUsers [ e . instance . props . user . id ] ;
if ( data && data . name ) userName . props . children = data . name ;
this . changeUserColor ( userName , e . instance . props . user . id , { modify : BDFDB . ObjectUtils . extract ( e . instance . props , "focused" , "unread" , "mentions" ) } ) ;
}
}
}
2019-08-19 11:17:57 +02:00
}
2019-01-26 22:45:19 +01:00
2020-09-19 20:49:33 +02:00
processSearchPopoutComponent ( e ) {
2021-05-20 16:44:45 +02:00
if ( BDFDB . ArrayUtils . is ( BDFDB . ObjectUtils . get ( e , "instance.props.resultsState.autocompletes" ) ) && this . settings . places . searchPopout ) {
2020-09-19 20:49:33 +02:00
for ( let autocomplete of e . instance . props . resultsState . autocompletes ) if ( autocomplete && BDFDB . ArrayUtils . is ( autocomplete . results ) ) for ( let result of autocomplete . results ) if ( result . user ) result . user = this . getUserData ( result . user . id ) ;
2019-08-19 11:17:57 +02:00
}
2019-04-23 08:09:58 +02:00
}
2020-09-19 20:49:33 +02:00
processSearchPopoutUserResult ( e ) {
2021-05-20 16:44:45 +02:00
if ( e . instance . props . result && e . instance . props . result . user && this . settings . places . searchPopout ) {
2020-11-19 16:51:14 +01:00
let userName = BDFDB . ReactUtils . findChild ( e . returnvalue , { props : [ [ "className" , BDFDB . disCN . searchpopoutdisplayednick ] ] } ) ;
2020-08-11 11:11:04 +02:00
if ( userName ) {
2020-09-19 20:49:33 +02:00
let data = changedUsers [ e . instance . props . result . user . id ] ;
2020-08-11 11:11:04 +02:00
if ( data && data . name ) userName . props . children = data . name ;
2020-09-19 20:49:33 +02:00
this . changeUserColor ( userName , e . instance . props . result . user . id ) ;
2020-02-07 15:16:40 +01:00
}
2021-09-27 21:25:41 +02:00
let avatar = BDFDB . ReactUtils . findChild ( e . returnvalue , { props : [ [ "className" , BDFDB . disCN . searchpopoutdisplayavatar ] ] } ) ;
if ( avatar ) avatar . props . src = this . getUserAvatar ( e . instance . props . result . user . id ) ;
2019-08-19 11:17:57 +02:00
}
2019-04-23 08:09:58 +02:00
}
2020-09-19 20:49:33 +02:00
processIncomingCallModal ( e ) {
2021-05-20 16:44:45 +02:00
if ( e . instance . props . channel && this . settings . places . dmCalls ) {
2022-09-27 16:53:10 +02:00
let user = BDFDB . LibraryStores . UserStore . getUser ( e . instance . props . channel . id ) ;
2020-09-19 20:49:33 +02:00
if ( ! user ) {
2022-09-27 14:48:10 +02:00
let channel = BDFDB . LibraryStores . ChannelStore . getChannel ( e . instance . props . channel . id ) ;
2022-09-27 16:53:10 +02:00
if ( channel && channel . isDM ( ) ) user = BDFDB . LibraryStores . UserStore . getUser ( channel . recipients [ 0 ] ) ;
2020-06-28 09:41:02 +02:00
}
2020-09-19 20:49:33 +02:00
if ( user ) {
2020-11-19 16:51:14 +01:00
let userName = BDFDB . ReactUtils . findChild ( e . returnvalue , { props : [ [ "className" , BDFDB . disCN . callincomingtitle ] ] } ) ;
2020-09-19 20:49:33 +02:00
if ( userName ) {
let data = changedUsers [ user . id ] ;
if ( data && data . name ) userName . props . children = data . name ;
this . changeUserColor ( userName , user . id ) ;
}
2021-02-02 10:49:58 +01:00
let avatar = BDFDB . ReactUtils . findChild ( e . returnvalue , { name : "CallAvatar" } ) ;
2020-09-19 20:49:33 +02:00
if ( avatar ) avatar . props . src = this . getUserAvatar ( user . id ) ;
}
}
}
processRTCConnection ( e ) {
2021-05-20 16:44:45 +02:00
if ( e . instance . props . channel && e . instance . props . channel . isDM ( ) && this . settings . places . recentDms && typeof e . returnvalue . props . children == "function" ) {
2020-09-19 20:49:33 +02:00
let recipientId = e . instance . props . channel . getRecipientId ( ) ;
let renderChildren = e . returnvalue . props . children ;
2021-07-05 16:33:10 +02:00
e . returnvalue . props . children = BDFDB . TimeUtils . suppress ( ( ... args ) => {
2020-09-19 20:49:33 +02:00
let renderedChildren = renderChildren ( ... args ) ;
let userName = BDFDB . ReactUtils . findChild ( renderedChildren , { name : "PanelSubtext" } ) ;
if ( userName ) {
userName . props . children = "@" + this . getUserData ( recipientId ) . username ;
this . changeUserColor ( userName , recipientId ) ;
}
return renderedChildren ;
2022-02-11 14:43:01 +01:00
} , "Error in Children Render of RTCConnection!" , this ) ;
2020-09-19 20:49:33 +02:00
}
2020-06-23 16:19:17 +02:00
}
2020-09-19 20:49:33 +02:00
processPrivateChannelCallParticipants ( e ) {
2021-05-20 16:44:45 +02:00
if ( BDFDB . ArrayUtils . is ( e . instance . props . participants ) && this . settings . places . dmCalls ) {
2021-11-03 17:58:40 +01:00
e . instance . props . participants = [ ] . concat ( e . instance . props . participants ) ;
for ( let i in e . instance . props . participants ) if ( e . instance . props . participants [ i ] && e . instance . props . participants [ i ] . user ) e . instance . props . participants [ i ] = Object . assign ( { } , e . instance . props . participants [ i ] , { user : this . getUserData ( e . instance . props . participants [ i ] . user . id ) } ) ;
}
}
processParticipantsForSelectedParticipant ( e ) {
if ( this . settings . places . voiceChat ) {
let popout = BDFDB . ReactUtils . findChild ( e . returnvalue , { name : "Popout" } ) ;
if ( popout && typeof popout . props . children == "function" ) {
let renderChildren = popout . props . children ;
popout . props . children = BDFDB . TimeUtils . suppress ( ( ... args ) => {
let renderedChildren = renderChildren ( ... args ) ;
for ( let viewer of renderedChildren . props . children ) viewer . props . src = this . getUserAvatar ( viewer . key ) ;
return renderedChildren ;
} ) ;
}
if ( popout && typeof popout . props . renderPopout == "function" ) {
let renderPopout = popout . props . renderPopout ;
popout . props . renderPopout = BDFDB . TimeUtils . suppress ( ( ... args ) => {
let renderedPopout = renderPopout ( ... args ) ;
renderedPopout . props . users = [ ] . concat ( renderedPopout . props . users ) ;
for ( let i in renderedPopout . props . users ) if ( renderedPopout . props . users [ i ] ) renderedPopout . props . users [ i ] = this . getUserData ( renderedPopout . props . users [ i ] . id ) ;
return renderedPopout ;
} ) ;
}
}
}
2022-03-19 19:01:43 +01:00
processChannelCall ( e ) {
2021-11-03 17:58:40 +01:00
if ( BDFDB . ArrayUtils . is ( e . instance . props . participants ) && this . settings . places . voiceChat ) {
e . instance . props . participants = [ ] . concat ( e . instance . props . participants ) ;
for ( let i in e . instance . props . participants ) if ( e . instance . props . participants [ i ] && e . instance . props . participants [ i ] . user ) e . instance . props . participants [ i ] = Object . assign ( { } , e . instance . props . participants [ i ] , { user : this . getUserData ( e . instance . props . participants [ i ] . user . id ) } ) ;
2020-09-19 20:49:33 +02:00
}
2020-02-07 15:16:40 +01:00
}
2020-09-19 20:49:33 +02:00
2022-03-19 19:01:43 +01:00
processChannelCallGrid ( e ) {
this . processChannelCall ( e ) ;
}
processHorizontalVideoParticipants ( e ) {
this . processChannelCall ( e ) ;
2020-03-28 15:08:45 +01:00
}
2020-09-19 20:49:33 +02:00
processPictureInPictureVideo ( e ) {
if ( e . instance . props . backgroundKey ) {
2022-09-27 16:53:10 +02:00
let user = BDFDB . LibraryStores . UserStore . getUser ( e . instance . props . backgroundKey ) ;
2020-09-19 20:49:33 +02:00
if ( user ) {
e . instance . props . title = this . getUserData ( user . id ) . username ;
let videoBackground = BDFDB . ReactUtils . findChild ( e . instance . props . children , { name : "VideoBackground" } ) ;
if ( videoBackground && videoBackground . props . src ) videoBackground . props . src = this . getUserAvatar ( user . id ) ;
}
2020-06-28 09:41:02 +02:00
}
}
2019-09-04 12:34:02 +02:00
2020-09-19 20:49:33 +02:00
processUserSummaryItem ( e ) {
if ( BDFDB . ArrayUtils . is ( e . instance . props . users ) ) {
for ( let i in e . instance . props . users ) if ( e . instance . props . users [ i ] ) e . instance . props . users [ i ] = this . getUserData ( e . instance . props . users [ i ] . id ) ;
}
2020-02-29 20:02:20 +01:00
}
2021-01-06 12:38:36 +01:00
changeAppTitle ( ) {
2022-09-27 20:19:49 +02:00
let channel = BDFDB . LibraryStores . ChannelStore . getChannel ( BDFDB . LibraryStores . SelectedChannelStore . getChannelId ( ) ) ;
2020-09-19 20:49:33 +02:00
let title = document . head . querySelector ( "title" ) ;
2022-04-21 19:42:18 +02:00
if ( title && channel && channel . isDM ( ) && ( document . location . href || "" ) . indexOf ( channel . id ) > - 1 ) {
2022-09-27 16:53:10 +02:00
let user = BDFDB . LibraryStores . UserStore . getUser ( channel . recipients [ 0 ] ) ;
2021-05-20 16:44:45 +02:00
if ( user ) BDFDB . DOMUtils . setText ( title , "@" + this . getUserData ( user . id , this . settings . places . appTitle ) . username ) ;
2020-09-19 20:49:33 +02:00
}
2020-02-07 15:16:40 +01:00
}
2020-09-19 20:49:33 +02:00
2021-07-29 00:36:40 +02:00
shouldChangeInChat ( channelId ) {
2021-05-20 16:44:45 +02:00
if ( this . settings . types . servers && this . settings . types . dms ) return true ;
2022-09-27 20:19:49 +02:00
let channel = BDFDB . LibraryStores . ChannelStore . getChannel ( channelId || BDFDB . LibraryStores . SelectedChannelStore . getChannelId ( ) ) ;
2021-01-13 18:54:21 +01:00
let isDm = channel && ( channel . isDM ( ) || channel . isGroupDM ( ) ) ;
2021-05-20 16:44:45 +02:00
if ( channel && ( this . settings . types . servers && ! isDm || this . settings . types . dms && isDm ) ) return true ;
2021-01-13 18:54:21 +01:00
return false ;
}
2020-09-19 20:49:33 +02:00
changeUserColor ( child , userId , options = { } ) {
2022-07-11 14:51:22 +02:00
if ( ! BDFDB . ReactUtils . isValidElement ( child ) ) return ;
let data = changedUsers [ userId ] || { } ;
if ( data . color1 ) {
let childProp = child . props . children ? "children" : "text" ;
2022-09-27 16:53:10 +02:00
let color1 = data . color1 && data . useRoleColor && options . guildId && ( BDFDB . LibraryStores . GuildMemberStore . getMember ( options . guildId , userId ) || { } ) . colorString || data . color1 ;
2022-07-11 14:51:22 +02:00
let fontColor = options . modify && ! ( data . useRoleColor && options . guildId ) ? this . chooseColor ( color1 , options . modify ) : color1 ;
let fontGradient = BDFDB . ObjectUtils . is ( fontColor ) ;
if ( BDFDB . ObjectUtils . is ( child . props . style ) ) delete child . props . style . color ;
2022-09-27 16:53:10 +02:00
if ( child . props [ childProp ] . props && BDFDB . LibraryStores . AccessibilityStore . roleStyle != "dot" ) delete child . props [ childProp ] . props . color ;
2022-07-11 14:51:22 +02:00
child . props [ childProp ] = BDFDB . ReactUtils . createElement ( "span" , {
style : {
color : fontGradient ? BDFDB . ColorUtils . convert ( fontColor [ 0 ] , "RGBA" ) : BDFDB . ColorUtils . convert ( fontColor , "RGBA" )
} ,
children : fontGradient ? BDFDB . ReactUtils . createElement ( BDFDB . LibraryComponents . TextGradientElement , {
gradient : BDFDB . ColorUtils . createGradient ( fontColor ) ,
children : child . props [ childProp ]
} ) : child . props [ childProp ]
} ) ;
2020-02-07 15:16:40 +01:00
}
}
2019-01-26 22:45:19 +01:00
2020-09-19 20:49:33 +02:00
chooseColor ( color , config = { } ) {
if ( color ) {
if ( BDFDB . ObjectUtils . is ( config ) ) {
if ( config . mentions || config . focused || config . hovered || config . selected || config . unread || config . hasUnreadMessages || config . speaking ) color = BDFDB . ColorUtils . change ( color , 0.5 ) ;
else if ( config . muted || config . locked ) color = BDFDB . ColorUtils . change ( color , - 0.5 ) ;
}
return color ;
2019-01-25 11:27:52 +01:00
}
2020-09-19 20:49:33 +02:00
return null ;
2020-02-07 15:16:40 +01:00
}
2020-09-19 20:49:33 +02:00
2020-10-29 17:23:26 +01:00
getUserData ( userId , change = true , keepName = false , fallbackData ) {
2022-09-27 16:53:10 +02:00
let user = BDFDB . LibraryStores . UserStore . getUser ( userId ) ;
2020-11-22 19:03:36 +01:00
if ( ! user && BDFDB . ObjectUtils . is ( fallbackData ) || user && BDFDB . ObjectUtils . is ( fallbackData ) && user . username != fallbackData . username ) user = fallbackData ;
2020-09-19 20:49:33 +02:00
if ( ! user ) return new BDFDB . DiscordObjects . User ( { } ) ;
let data = change && changedUsers [ user . id ] ;
if ( data ) {
let newUserObject = { } , nativeObject = new BDFDB . DiscordObjects . User ( user ) ;
for ( let key in nativeObject ) newUserObject [ key ] = nativeObject [ key ] ;
newUserObject . tag = nativeObject . tag ;
newUserObject . createdAt = nativeObject . createdAt ;
newUserObject . username = ! keepName && data . name || nativeObject . username ;
newUserObject . usernameNormalized = ! keepName && data . name && data . name . toLowerCase ( ) || nativeObject . usernameNormalized ;
if ( data . removeIcon ) {
newUserObject . avatar = null ;
newUserObject . avatarURL = null ;
2021-11-09 17:02:30 +01:00
newUserObject . getAvatarSource = _ => null ;
2021-06-01 17:25:52 +02:00
newUserObject . getAvatarURL = _ => null ;
2021-10-18 19:00:51 +02:00
newUserObject . guildMemberAvatars = { } ;
2020-09-19 20:49:33 +02:00
}
else if ( data . url ) {
newUserObject . avatar = data . url ;
newUserObject . avatarURL = data . url ;
2021-11-09 17:02:30 +01:00
newUserObject . getAvatarSource = _ => data . url ;
2021-06-01 17:25:52 +02:00
newUserObject . getAvatarURL = _ => data . url ;
2021-10-18 19:00:51 +02:00
newUserObject . guildMemberAvatars = { } ;
2021-06-01 17:25:52 +02:00
}
if ( data . removeBanner ) {
newUserObject . banner = null ;
newUserObject . bannerURL = null ;
2021-11-09 17:02:30 +01:00
newUserObject . getBannerSource = _ => null ;
2021-06-01 17:25:52 +02:00
newUserObject . getBannerURL = _ => null ;
}
else if ( data . banner ) {
newUserObject . banner = data . banner ;
newUserObject . bannerURL = data . banner ;
2021-11-09 17:02:30 +01:00
newUserObject . getBannerSource = _ => data . banner ;
2021-06-01 17:25:52 +02:00
newUserObject . getBannerURL = _ => data . banner ;
2020-09-19 20:49:33 +02:00
}
return newUserObject ;
2019-01-25 11:27:52 +01:00
}
2020-09-19 20:49:33 +02:00
return new BDFDB . DiscordObjects . User ( user ) ;
2019-01-25 11:27:52 +01:00
}
2020-09-19 20:49:33 +02:00
2021-11-03 15:57:22 +01:00
getUserNick ( userId , nick , change = true ) {
2022-09-27 16:53:10 +02:00
let user = BDFDB . LibraryStores . UserStore . getUser ( userId ) ;
2021-11-03 15:57:22 +01:00
if ( ! user ) return "" ;
let data = change && changedUsers [ user . id ] ;
if ( data ) return ( data . useServerNick && nick || data . name && [ data . name , data . showServerNick && nick && ` ( ${ nick } ) ` || data . showAccountName && user . username && ` ( ${ user . username } ) ` ] . filter ( n => n ) . join ( " " ) ) || nick || "" ;
return "" ;
}
2020-09-19 20:49:33 +02:00
getUserAvatar ( userId , change = true ) {
2022-09-27 16:53:10 +02:00
let user = BDFDB . LibraryStores . UserStore . getUser ( userId ) ;
2020-09-19 20:49:33 +02:00
if ( ! user ) return "" ;
let data = change && changedUsers [ user . id ] ;
if ( data ) {
if ( data . removeIcon ) return "" ;
else if ( data . url ) return data . url ;
}
return BDFDB . LibraryModules . IconUtils . getUserAvatarURL ( user ) ;
2020-02-07 15:16:40 +01:00
}
2020-09-19 20:49:33 +02:00
injectBadge ( children , userId , guildId , insertIndex , config = { } ) {
if ( ! BDFDB . ArrayUtils . is ( children ) || ! userId ) return ;
let data = changedUsers [ userId ] ;
if ( data && data . tag ) {
2022-09-27 16:53:10 +02:00
let memberColor = data . ignoreTagColor && ( BDFDB . LibraryStores . GuildMemberStore . getMember ( guildId , userId ) || { } ) . colorString ;
2020-09-19 20:49:33 +02:00
let fontColor = ! config . inverted ? data . color4 : ( memberColor || data . color3 ) ;
let backgroundColor = ! config . inverted ? ( memberColor || data . color3 ) : data . color4 ;
let fontGradient = BDFDB . ObjectUtils . is ( fontColor ) ;
children . splice ( insertIndex , 0 , BDFDB . ReactUtils . createElement ( BDFDB . LibraryComponents . BotTag , {
className : config . tagClass ,
useRemSizes : config . useRem ,
invertColor : config . inverted ,
style : {
background : BDFDB . ObjectUtils . is ( backgroundColor ) ? BDFDB . ColorUtils . createGradient ( backgroundColor ) : BDFDB . ColorUtils . convert ( backgroundColor , "RGBA" ) ,
color : fontGradient ? BDFDB . ColorUtils . convert ( fontColor [ 0 ] , "RGBA" ) : BDFDB . ColorUtils . convert ( fontColor , "RGBA" )
} ,
tag : fontGradient ? BDFDB . ReactUtils . createElement ( BDFDB . LibraryComponents . TextGradientElement , {
gradient : BDFDB . ColorUtils . createGradient ( fontColor ) ,
children : data . tag
} ) : data . tag
} ) ) ;
}
2020-02-07 15:16:40 +01:00
}
2020-09-19 20:49:33 +02:00
createCustomStatus ( data ) {
return ! BDFDB . ObjectUtils . is ( data ) || data . removeStatus ? null : {
created _at : ( new Date ( ) ) . getTime ( ) . toString ( ) ,
emoji : data . statusEmoji ,
id : "custom" ,
name : "Custom Status" ,
state : data . status ,
2021-01-23 22:15:48 +01:00
type : BDFDB . DiscordConstants . ActivityTypes . CUSTOM _STATUS
2020-09-19 20:49:33 +02:00
}
2020-02-17 13:16:17 +01:00
}
2019-01-26 22:45:19 +01:00
2020-09-19 20:49:33 +02:00
openUserSettingsModal ( user ) {
let data = changedUsers [ user . id ] || { } ;
2021-01-29 19:48:09 +01:00
let newData = Object . assign ( { } , data ) ;
2022-09-27 16:53:10 +02:00
let member = BDFDB . LibraryStores . GuildMemberStore . getMember ( BDFDB . LibraryStores . SelectedGuildStore . getGuildId ( ) , user . id ) || { } ;
let activity = BDFDB . LibraryStores . PresenceStore . getApplicationActivity ( user . id ) ;
2020-09-19 20:49:33 +02:00
2021-06-01 17:25:52 +02:00
let avatarInput , bannerInput , statusEmojiInput , statusInput , colorPicker3 , colorPicker4 ;
2021-01-29 19:48:09 +01:00
2020-09-19 20:49:33 +02:00
BDFDB . ModalUtils . open ( this , {
2021-06-01 17:25:52 +02:00
size : "LARGE" ,
2020-12-21 19:56:36 +01:00
header : this . labels . modal _header ,
2021-01-23 18:50:24 +01:00
subHeader : member . nick || user . username ,
2020-09-19 20:49:33 +02:00
children : [
BDFDB . ReactUtils . createElement ( BDFDB . LibraryComponents . ModalComponents . ModalTabContent , {
2020-12-21 19:56:36 +01:00
tab : this . labels . modal _tabheader1 ,
2020-09-19 20:49:33 +02:00
children : [
2021-04-23 12:01:44 +02:00
BDFDB . ReactUtils . createElement ( "div" , {
2021-11-03 15:57:22 +01:00
className : BDFDB . disCN . marginbottom8 ,
2021-04-23 12:01:44 +02:00
children : [
BDFDB . ReactUtils . createElement ( BDFDB . LibraryComponents . Flex , {
className : BDFDB . disCN . marginbottom8 ,
align : BDFDB . LibraryComponents . Flex . Align . CENTER ,
direction : BDFDB . LibraryComponents . Flex . Direction . HORIZONTAL ,
2021-11-03 15:57:22 +01:00
children : BDFDB . ReactUtils . createElement ( BDFDB . LibraryComponents . FormComponents . FormTitle , {
className : BDFDB . disCN . marginreset ,
tag : BDFDB . LibraryComponents . FormComponents . FormTitle . Tags . H5 ,
children : this . labels . modal _username
} )
2021-04-23 12:01:44 +02:00
} ) ,
BDFDB . ReactUtils . createElement ( BDFDB . LibraryComponents . TextInput , {
value : data . name ,
placeholder : member . nick || user . username ,
autoFocus : true ,
2021-11-03 15:57:22 +01:00
onChange : value => newData . name = value
} )
]
} ) ,
BDFDB . ReactUtils . createElement ( BDFDB . LibraryComponents . Flex , {
className : BDFDB . disCN . marginbottom20 ,
justify : BDFDB . LibraryComponents . Flex . Justify . END ,
align : BDFDB . LibraryComponents . Flex . Align . CENTER ,
direction : BDFDB . LibraryComponents . Flex . Direction . HORIZONTAL ,
children : [
BDFDB . ReactUtils . createElement ( BDFDB . LibraryComponents . SettingsItem , {
type : "Switch" ,
margin : 0 ,
grow : 0 ,
label : this . labels . modal _showaccountname ,
tag : BDFDB . LibraryComponents . FormComponents . FormTitle . Tags . H5 ,
value : data . showAccountName ,
onChange : value => newData . showAccountName = value
} ) ,
BDFDB . ReactUtils . createElement ( BDFDB . LibraryComponents . SettingsItem , {
type : "Switch" ,
margin : 0 ,
grow : 0 ,
label : this . labels . modal _showservernick ,
tag : BDFDB . LibraryComponents . FormComponents . FormTitle . Tags . H5 ,
value : data . showServerNick ,
onChange : value => newData . showServerNick = value
} ) ,
BDFDB . ReactUtils . createElement ( BDFDB . LibraryComponents . SettingsItem , {
type : "Switch" ,
margin : 0 ,
grow : 0 ,
label : this . labels . modal _useservernick ,
tag : BDFDB . LibraryComponents . FormComponents . FormTitle . Tags . H5 ,
value : data . useServerNick ,
onChange : value => newData . useServerNick = value
2021-04-23 12:01:44 +02:00
} )
]
2020-09-19 20:49:33 +02:00
} ) ,
BDFDB . ReactUtils . createElement ( BDFDB . LibraryComponents . FormComponents . FormItem , {
2020-12-21 19:56:36 +01:00
title : this . labels . modal _usertag ,
2021-01-29 19:48:09 +01:00
className : BDFDB . disCN . marginbottom20 ,
2020-09-19 20:49:33 +02:00
children : BDFDB . ReactUtils . createElement ( BDFDB . LibraryComponents . TextInput , {
2021-01-29 19:48:09 +01:00
value : data . tag ,
2021-11-03 15:57:22 +01:00
onChange : value => newData . tag = value
2020-09-19 20:49:33 +02:00
} )
} ) ,
BDFDB . ReactUtils . createElement ( "div" , {
className : BDFDB . disCN . marginbottom20 ,
children : [
BDFDB . ReactUtils . createElement ( BDFDB . LibraryComponents . Flex , {
className : BDFDB . disCN . marginbottom8 ,
align : BDFDB . LibraryComponents . Flex . Align . CENTER ,
direction : BDFDB . LibraryComponents . Flex . Direction . HORIZONTAL ,
children : [
BDFDB . ReactUtils . createElement ( BDFDB . LibraryComponents . FormComponents . FormTitle , {
className : BDFDB . disCN . marginreset ,
tag : BDFDB . LibraryComponents . FormComponents . FormTitle . Tags . H5 ,
2020-12-21 19:56:36 +01:00
children : this . labels . modal _useravatar
2020-09-19 20:49:33 +02:00
} ) ,
BDFDB . ReactUtils . createElement ( BDFDB . LibraryComponents . SettingsItem , {
type : "Switch" ,
2020-10-14 21:08:41 +02:00
margin : 0 ,
2020-09-19 20:49:33 +02:00
grow : 0 ,
label : BDFDB . LanguageUtils . LanguageStrings . REMOVE ,
tag : BDFDB . LibraryComponents . FormComponents . FormTitle . Tags . H5 ,
value : data . removeIcon ,
2021-01-29 19:48:09 +01:00
onChange : value => {
newData . removeIcon = value ;
if ( value ) {
delete avatarInput . props . success ;
delete avatarInput . props . errorMessage ;
avatarInput . props . disabled = true ;
BDFDB . ReactUtils . forceUpdate ( avatarInput ) ;
}
else {
avatarInput . props . disabled = false ;
2021-11-03 15:57:22 +01:00
this . checkUrl ( avatarInput . props . value , avatarInput ) . then ( returnValue => newData . url = returnValue ) ;
2020-09-19 20:49:33 +02:00
}
2020-02-17 13:16:17 +01:00
}
2020-02-18 11:39:32 +01:00
} )
2020-09-19 20:49:33 +02:00
]
} ) ,
BDFDB . ReactUtils . createElement ( BDFDB . LibraryComponents . TextInput , {
success : ! data . removeIcon && data . url ,
maxLength : 100000000000000000000 ,
value : data . url ,
placeholder : BDFDB . UserUtils . getAvatar ( user . id ) ,
disabled : data . removeIcon ,
2021-01-29 19:48:09 +01:00
ref : instance => { if ( instance ) avatarInput = instance ; } ,
2020-09-19 20:49:33 +02:00
onChange : ( value , instance ) => {
2021-11-03 15:57:22 +01:00
this . checkUrl ( value , instance ) . then ( returnValue => newData . url = returnValue ) ;
2020-09-19 20:49:33 +02:00
}
} )
]
} ) ,
2021-06-01 17:25:52 +02:00
BDFDB . ReactUtils . createElement ( "div" , {
className : BDFDB . disCN . marginbottom20 ,
children : [
BDFDB . ReactUtils . createElement ( BDFDB . LibraryComponents . Flex , {
className : BDFDB . disCN . marginbottom8 ,
align : BDFDB . LibraryComponents . Flex . Align . CENTER ,
direction : BDFDB . LibraryComponents . Flex . Direction . HORIZONTAL ,
children : [
BDFDB . ReactUtils . createElement ( BDFDB . LibraryComponents . FormComponents . FormTitle , {
className : BDFDB . disCN . marginreset ,
tag : BDFDB . LibraryComponents . FormComponents . FormTitle . Tags . H5 ,
children : BDFDB . LanguageUtils . LanguageStrings . USER _SETTINGS _PROFILE _BANNER
} ) ,
BDFDB . ReactUtils . createElement ( BDFDB . LibraryComponents . SettingsItem , {
type : "Switch" ,
margin : 0 ,
grow : 0 ,
label : BDFDB . LanguageUtils . LanguageStrings . REMOVE ,
tag : BDFDB . LibraryComponents . FormComponents . FormTitle . Tags . H5 ,
2022-08-26 12:12:45 +02:00
value : data . removeBanner ,
2021-06-01 17:25:52 +02:00
onChange : value => {
newData . removeBanner = value ;
if ( value ) {
delete bannerInput . props . success ;
delete bannerInput . props . errorMessage ;
bannerInput . props . disabled = true ;
BDFDB . ReactUtils . forceUpdate ( bannerInput ) ;
}
else {
bannerInput . props . disabled = false ;
2021-11-03 15:57:22 +01:00
this . checkUrl ( bannerInput . props . value , bannerInput ) . then ( returnValue => newData . banner = returnValue ) ;
2021-06-01 17:25:52 +02:00
}
}
} )
]
} ) ,
BDFDB . ReactUtils . createElement ( BDFDB . LibraryComponents . TextInput , {
success : ! data . removeBanner && data . banner ,
maxLength : 100000000000000000000 ,
value : data . banner ,
placeholder : BDFDB . UserUtils . getBanner ( user . id ) ,
ref : instance => { if ( instance ) bannerInput = instance ; } ,
onChange : ( value , instance ) => {
2021-11-03 15:57:22 +01:00
this . checkUrl ( value , instance ) . then ( returnValue => newData . banner = returnValue ) ;
2021-06-01 17:25:52 +02:00
}
} )
]
} ) ,
2020-09-19 20:49:33 +02:00
BDFDB . ReactUtils . createElement ( "div" , {
className : BDFDB . disCN . marginbottom20 ,
children : [
BDFDB . ReactUtils . createElement ( BDFDB . LibraryComponents . Flex , {
className : BDFDB . disCN . marginbottom8 ,
align : BDFDB . LibraryComponents . Flex . Align . CENTER ,
direction : BDFDB . LibraryComponents . Flex . Direction . HORIZONTAL ,
children : [
BDFDB . ReactUtils . createElement ( BDFDB . LibraryComponents . FormComponents . FormTitle , {
className : BDFDB . disCN . marginreset ,
tag : BDFDB . LibraryComponents . FormComponents . FormTitle . Tags . H5 ,
children : BDFDB . LanguageUtils . LanguageStrings . CUSTOM _STATUS
2020-02-18 11:39:32 +01:00
} ) ,
2020-09-19 20:49:33 +02:00
BDFDB . ReactUtils . createElement ( BDFDB . LibraryComponents . SettingsItem , {
type : "Switch" ,
2020-10-14 21:08:41 +02:00
margin : 0 ,
2020-09-19 20:49:33 +02:00
grow : 0 ,
label : BDFDB . LanguageUtils . LanguageStrings . REMOVE ,
tag : BDFDB . LibraryComponents . FormComponents . FormTitle . Tags . H5 ,
value : data . removeStatus ,
2021-01-29 19:48:09 +01:00
onChange : value => {
newData . removeStatus = value ;
statusInput . props . disabled = value ;
BDFDB . ReactUtils . forceUpdate ( statusInput ) ;
2020-02-18 11:39:32 +01:00
}
2020-09-19 20:49:33 +02:00
} )
]
} ) ,
BDFDB . ReactUtils . createElement ( "div" , {
className : BDFDB . disCN . emojiinputcontainer ,
children : [
BDFDB . ReactUtils . createElement ( "div" , {
className : BDFDB . disCN . emojiinputbuttoncontainer ,
children : BDFDB . ReactUtils . createElement ( BDFDB . LibraryComponents . EmojiPickerButton , {
emoji : data . statusEmoji ,
2021-01-29 19:48:09 +01:00
allowManagedEmojis : true ,
2021-06-23 20:38:27 +02:00
allowManagedEmojisUsage : true ,
2021-01-29 19:48:09 +01:00
ref : instance => { if ( instance ) statusEmojiInput = instance ; } ,
2021-11-03 15:57:22 +01:00
onSelect : value => newData . statusEmoji = value
2020-09-19 20:49:33 +02:00
} )
} ) ,
BDFDB . ReactUtils . createElement ( BDFDB . LibraryComponents . TextInput , {
inputClassName : BDFDB . disCN . emojiinput ,
maxLength : 100000000000000000000 ,
value : data . status ,
2021-01-23 22:15:48 +01:00
placeholder : activity && activity . type == BDFDB . DiscordConstants . ActivityTypes . CUSTOM _STATUS && activity . state || "" ,
2021-01-29 19:48:09 +01:00
disabled : data . removeStatus ,
ref : instance => { if ( instance ) statusInput = instance ; } ,
2021-11-03 15:57:22 +01:00
onChange : value => newData . status = value
2020-09-19 20:49:33 +02:00
} ) ,
BDFDB . ReactUtils . createElement ( BDFDB . LibraryComponents . Button , {
size : BDFDB . LibraryComponents . Button . Sizes . NONE ,
look : BDFDB . LibraryComponents . Button . Looks . BLANK ,
className : BDFDB . disCN . emojiinputclearbutton ,
children : BDFDB . ReactUtils . createElement ( BDFDB . LibraryComponents . SvgIcon , {
className : BDFDB . disCN . emojiinputclearicon ,
name : BDFDB . LibraryComponents . SvgIcon . Names . CLOSE _CIRCLE
} ) ,
2021-01-29 19:48:09 +01:00
onClick : _ => {
newData . status = "" ;
newData . statusEmoji = null ;
statusInput . props . value = "" ;
delete statusEmojiInput . props . emoji ;
BDFDB . ReactUtils . forceUpdate ( statusInput , statusEmojiInput ) ;
2020-09-19 20:49:33 +02:00
}
} )
]
} )
]
2020-02-07 15:16:40 +01:00
} )
2020-09-19 20:49:33 +02:00
]
} ) ,
BDFDB . ReactUtils . createElement ( BDFDB . LibraryComponents . ModalComponents . ModalTabContent , {
2020-12-21 19:56:36 +01:00
tab : this . labels . modal _tabheader2 ,
2020-09-19 20:49:33 +02:00
children : [
BDFDB . ReactUtils . createElement ( BDFDB . LibraryComponents . FormComponents . FormItem , {
2020-12-21 19:56:36 +01:00
title : this . labels . modal _colorpicker1 ,
2020-09-19 20:49:33 +02:00
className : BDFDB . disCN . marginbottom20 ,
children : BDFDB . ReactUtils . createElement ( BDFDB . LibraryComponents . ColorSwatches , {
color : data . color1 ,
2021-11-03 15:57:22 +01:00
onColorChange : value => newData . color1 = value
2020-09-19 20:49:33 +02:00
} )
} ) ,
BDFDB . ReactUtils . createElement ( BDFDB . LibraryComponents . FormComponents . FormItem , {
2020-12-21 19:56:36 +01:00
title : this . labels . modal _colorpicker2 ,
2020-09-19 20:49:33 +02:00
className : BDFDB . disCN . marginbottom20 ,
children : BDFDB . ReactUtils . createElement ( BDFDB . LibraryComponents . ColorSwatches , {
color : data . color2 ,
2021-11-03 15:57:22 +01:00
onColorChange : value => newData . color2 = value
2020-09-19 20:49:33 +02:00
} )
2020-10-06 11:39:26 +02:00
} ) ,
BDFDB . ReactUtils . createElement ( BDFDB . LibraryComponents . SettingsItem , {
type : "Switch" ,
2020-10-14 21:08:41 +02:00
margin : 20 ,
2020-12-21 19:56:36 +01:00
label : this . labels . modal _userolecolor ,
2020-10-06 11:39:26 +02:00
tag : BDFDB . LibraryComponents . FormComponents . FormTitle . Tags . H5 ,
2021-01-29 19:48:09 +01:00
value : data . useRoleColor ,
2021-11-03 15:57:22 +01:00
onChange : value => newData . useRoleColor = value
2020-02-07 15:16:40 +01:00
} )
2020-09-19 20:49:33 +02:00
]
} ) ,
BDFDB . ReactUtils . createElement ( BDFDB . LibraryComponents . ModalComponents . ModalTabContent , {
2020-12-21 19:56:36 +01:00
tab : this . labels . modal _tabheader3 ,
2020-09-19 20:49:33 +02:00
children : [
BDFDB . ReactUtils . createElement ( BDFDB . LibraryComponents . FormComponents . FormItem , {
2020-12-21 19:56:36 +01:00
title : this . labels . modal _colorpicker3 ,
2020-09-19 20:49:33 +02:00
className : BDFDB . disCN . marginbottom20 ,
children : BDFDB . ReactUtils . createElement ( BDFDB . LibraryComponents . ColorSwatches , {
color : data . color3 ,
2021-01-29 19:48:09 +01:00
disabled : data . ignoreTagColor ,
ref : instance => { if ( instance ) colorPicker3 = instance ; } ,
2021-11-03 15:57:22 +01:00
onColorChange : value => newData . color3 = value
2020-09-19 20:49:33 +02:00
} )
} ) ,
BDFDB . ReactUtils . createElement ( BDFDB . LibraryComponents . FormComponents . FormItem , {
2020-12-21 19:56:36 +01:00
title : this . labels . modal _colorpicker4 ,
2020-09-19 20:49:33 +02:00
className : BDFDB . disCN . marginbottom20 ,
children : BDFDB . ReactUtils . createElement ( BDFDB . LibraryComponents . ColorSwatches , {
color : data . color4 ,
2021-01-29 19:48:09 +01:00
disabled : data . ignoreTagColor ,
ref : instance => { if ( instance ) colorPicker4 = instance ; } ,
2021-11-03 15:57:22 +01:00
onColorChange : value => newData . color4 = value
2020-09-19 20:49:33 +02:00
} )
} ) ,
BDFDB . ReactUtils . createElement ( BDFDB . LibraryComponents . SettingsItem , {
type : "Switch" ,
2020-10-14 21:08:41 +02:00
margin : 20 ,
2020-12-21 19:56:36 +01:00
label : this . labels . modal _ignoretagcolor ,
2020-09-19 20:49:33 +02:00
tag : BDFDB . LibraryComponents . FormComponents . FormTitle . Tags . H5 ,
value : data . ignoreTagColor ,
2021-01-29 19:48:09 +01:00
onChange : value => {
newData . ignoreTagColor = value ;
colorPicker3 . props . disabled = value ;
colorPicker4 . props . disabled = value ;
BDFDB . ReactUtils . forceUpdate ( colorPicker3 , colorPicker4 ) ;
2020-09-19 20:49:33 +02:00
}
2020-02-07 15:16:40 +01:00
} )
2020-09-19 20:49:33 +02:00
]
} )
] ,
buttons : [ {
contents : BDFDB . LanguageUtils . LanguageStrings . SAVE ,
color : "BRAND" ,
close : true ,
2021-01-29 19:48:09 +01:00
onClick : _ => {
newData . url = ! newData . removeIcon ? newData . url : "" ;
newData . status = ! newData . removeStatus ? newData . status : "" ;
newData . statusEmoji = ! newData . removeStatus ? newData . statusEmoji : null ;
2020-02-07 15:16:40 +01:00
2020-09-19 20:49:33 +02:00
let changed = false ;
2021-01-29 19:48:09 +01:00
if ( Object . keys ( newData ) . every ( key => newData [ key ] == null || newData [ key ] == false ) && ( changed = true ) ) {
BDFDB . DataUtils . remove ( this , "users" , user . id ) ;
}
else if ( ! BDFDB . equals ( newData , data ) && ( changed = true ) ) {
BDFDB . DataUtils . save ( newData , this , "users" , user . id ) ;
}
2020-09-19 20:49:33 +02:00
if ( changed ) this . forceUpdateAll ( ) ;
}
} ]
} ) ;
2020-02-07 15:16:40 +01:00
}
2020-09-19 20:49:33 +02:00
checkUrl ( url , instance ) {
2021-01-29 19:48:09 +01:00
return new Promise ( callback => {
BDFDB . TimeUtils . clear ( instance . checkTimeout ) ;
url = url && url . trim ( ) ;
if ( ! url || instance . props . disabled ) {
delete instance . props . success ;
delete instance . props . errorMessage ;
callback ( "" ) ;
BDFDB . ReactUtils . forceUpdate ( instance ) ;
}
else instance . checkTimeout = BDFDB . TimeUtils . timeout ( _ => {
2022-01-11 18:13:34 +01:00
BDFDB . LibraryRequires . request ( url , { agentOptions : { rejectUnauthorized : false } } , ( error , response , result ) => {
2021-01-29 19:48:09 +01:00
delete instance . checkTimeout ;
if ( instance . props . disabled ) {
delete instance . props . success ;
delete instance . props . errorMessage ;
callback ( "" ) ;
}
else if ( response && response . headers [ "content-type" ] && response . headers [ "content-type" ] . indexOf ( "image" ) != - 1 ) {
instance . props . success = true ;
delete instance . props . errorMessage ;
callback ( url ) ;
}
else {
delete instance . props . success ;
instance . props . errorMessage = this . labels . modal _invalidurl ;
callback ( "" ) ;
}
BDFDB . ReactUtils . forceUpdate ( instance ) ;
} ) ;
} , 1000 ) ;
} ) ;
2020-02-07 15:16:40 +01:00
}
2020-07-26 17:02:25 +02:00
2021-01-06 12:38:36 +01:00
setLabelsByLanguage ( ) {
2020-09-19 20:49:33 +02:00
switch ( BDFDB . LanguageUtils . getLanguage ( ) . id ) {
2020-12-21 19:56:36 +01:00
case "bg" : // Bulgarian
2020-09-19 20:49:33 +02:00
return {
2020-12-22 20:38:51 +01:00
confirm _reset : "Наистина ли искате да нулирате този потребител?" ,
confirm _resetall : "Наистина ли искате да нулирате всички потребители?" ,
2020-12-21 19:56:36 +01:00
context _localusersettings : "Локални потребителски настройки" ,
2020-12-22 20:38:51 +01:00
modal _colorpicker1 : "Име Цвят" ,
2022-04-21 18:31:14 +02:00
modal _colorpicker2 : "Цвят на съобщението" ,
2020-12-22 20:38:51 +01:00
modal _colorpicker3 : "Цвят на маркера" ,
2020-12-21 19:56:36 +01:00
modal _colorpicker4 : "Цвят на шрифта" ,
modal _header : "Локални потребителски настройки" ,
2020-12-22 20:38:51 +01:00
modal _ignoretagcolor : "Използвайте Цвят на ролята" ,
2020-12-21 19:56:36 +01:00
modal _invalidurl : "Невалиден адрес" ,
2021-11-03 15:57:22 +01:00
modal _showaccountname : "Покажи име" ,
2021-06-01 17:25:52 +02:00
modal _showservernick : "Показване на псевдонима" ,
2020-12-21 19:56:36 +01:00
modal _tabheader1 : "Потребител" ,
2020-12-22 20:38:51 +01:00
modal _tabheader2 : "Име Цвят" ,
modal _tabheader3 : "Цвят на маркера" ,
modal _useravatar : "Аватар" ,
2020-12-21 19:56:36 +01:00
modal _username : "Локално потребителско име" ,
2020-12-22 20:38:51 +01:00
modal _userolecolor : "Н е презаписвайте цвета на ролята" ,
2020-12-21 19:56:36 +01:00
modal _usertag : "Етикет" ,
2021-04-23 12:01:44 +02:00
modal _useservernick : "Н е презаписвайте псевдонимите" ,
2020-12-21 19:56:36 +01:00
submenu _resetsettings : "Нулиране на потребителя" ,
submenu _usersettings : "Промяна на настройките"
2020-09-19 20:49:33 +02:00
} ;
2021-06-01 17:25:52 +02:00
case "cs" : // Czech
return {
confirm _reset : "Opravdu chcete tohoto uživatele resetovat?" ,
confirm _resetall : "Opravdu chcete resetovat všechny uživatele?" ,
context _localusersettings : "Místní nastavení uživatele" ,
modal _colorpicker1 : "Název Barva" ,
2022-04-21 18:31:14 +02:00
modal _colorpicker2 : "Barva zprávy" ,
2021-06-01 17:25:52 +02:00
modal _colorpicker3 : "Barva značky" ,
modal _colorpicker4 : "Barva fontu" ,
modal _header : "Místní nastavení uživatele" ,
modal _ignoretagcolor : "Použijte barvu role" ,
modal _invalidurl : "Neplatná URL" ,
2021-11-03 15:57:22 +01:00
modal _showaccountname : "Zobrazit jméno" ,
2021-06-01 17:25:52 +02:00
modal _showservernick : "Zobrazit přezdívku" ,
modal _tabheader1 : "Uživatel" ,
modal _tabheader2 : "Název Barva" ,
modal _tabheader3 : "Barva značky" ,
modal _useravatar : "Avatar" ,
modal _username : "Místní uživatelské jméno" ,
modal _userolecolor : "Nepřepisujte barvu role" ,
modal _usertag : "Štítek" ,
modal _useservernick : "Nepřepisujte přezdívky" ,
submenu _resetsettings : "Obnovit uživatele" ,
submenu _usersettings : "Změnit nastavení"
} ;
2020-12-21 19:56:36 +01:00
case "da" : // Danish
2020-09-19 20:49:33 +02:00
return {
2020-12-22 20:38:51 +01:00
confirm _reset : "Er du sikker på, at du vil nulstille denne bruger?" ,
confirm _resetall : "Er du sikker på, at du vil nulstille alle brugere?" ,
2020-12-21 19:56:36 +01:00
context _localusersettings : "Lokale brugerindstillinger" ,
modal _colorpicker1 : "Navnfarve" ,
2022-04-21 18:31:14 +02:00
modal _colorpicker2 : "Beskedfarve" ,
2020-12-22 20:38:51 +01:00
modal _colorpicker3 : "Tagfarve" ,
2020-12-21 19:56:36 +01:00
modal _colorpicker4 : "Skriftfarve" ,
modal _header : "Lokale brugerindstillinger" ,
2020-12-22 20:38:51 +01:00
modal _ignoretagcolor : "Brug rollefarve" ,
2020-12-21 19:56:36 +01:00
modal _invalidurl : "Ugyldig URL" ,
2021-11-03 15:57:22 +01:00
modal _showaccountname : "Vis navn" ,
2021-06-01 17:25:52 +02:00
modal _showservernick : "Vis kaldenavn" ,
2020-12-21 19:56:36 +01:00
modal _tabheader1 : "Bruger" ,
modal _tabheader2 : "Navnfarve" ,
2020-12-22 20:38:51 +01:00
modal _tabheader3 : "Tagfarve" ,
modal _useravatar : "Avatar" ,
2020-12-21 19:56:36 +01:00
modal _username : "Lokalt brugernavn" ,
2020-12-22 20:38:51 +01:00
modal _userolecolor : "Overskriv ikke rollefarven" ,
modal _usertag : "Tag" ,
2021-04-23 12:01:44 +02:00
modal _useservernick : "Overskriv ikke kælenavne" ,
2020-12-21 19:56:36 +01:00
submenu _resetsettings : "Nulstil bruger" ,
submenu _usersettings : "Ændre indstillinger"
2020-09-19 20:49:33 +02:00
} ;
2020-12-21 19:56:36 +01:00
case "de" : // German
2020-09-19 20:49:33 +02:00
return {
2020-12-22 20:38:51 +01:00
confirm _reset : "Möchtest du diesen Benutzer wirklich zurücksetzen?" ,
confirm _resetall : "Möchtest du wirklich alle Benutzer zurücksetzen?" ,
2020-12-21 19:56:36 +01:00
context _localusersettings : "Lokale Benutzereinstellungen" ,
modal _colorpicker1 : "Namensfarbe" ,
2022-04-21 18:31:14 +02:00
modal _colorpicker2 : "Nachrichtenfarbe" ,
2020-12-22 20:38:51 +01:00
modal _colorpicker3 : "Etikettarbe" ,
2020-12-21 19:56:36 +01:00
modal _colorpicker4 : "Schriftfarbe" ,
modal _header : "Lokale Benutzereinstellungen" ,
modal _ignoretagcolor : "Rollenfarbe verwenden" ,
modal _invalidurl : "Ungültige URL" ,
2021-11-03 15:57:22 +01:00
modal _showaccountname : "Name anzeigen" ,
2021-06-01 17:25:52 +02:00
modal _showservernick : "Nicknamen anzeigen" ,
2020-12-21 19:56:36 +01:00
modal _tabheader1 : "Benutzer" ,
modal _tabheader2 : "Namensfarbe" ,
modal _tabheader3 : "Etikettfarbe" ,
modal _useravatar : "Benutzerbild" ,
modal _username : "Lokaler Benutzername" ,
modal _userolecolor : "Rollenfarbe nicht überschreiben" ,
modal _usertag : "Etikett" ,
2021-04-23 12:01:44 +02:00
modal _useservernick : "Nicknamen nicht überschreiben" ,
2020-12-21 19:56:36 +01:00
submenu _resetsettings : "Benutzer zurücksetzen" ,
submenu _usersettings : "Einstellungen ändern"
2020-09-19 20:49:33 +02:00
} ;
2020-12-21 19:56:36 +01:00
case "el" : // Greek
2020-09-19 20:49:33 +02:00
return {
2021-11-03 15:57:22 +01:00
confirm _reset : "Είστε βέβαιοι ότι θέλετε ν α επαναφέρετε αυτόν τον χρήστη," ,
confirm _resetall : "Είστε βέβαιοι ότι θέλετε ν α επαναφέρετε όλους τους χρήστες," ,
2020-12-22 20:38:51 +01:00
context _localusersettings : "Ρυθμίσεις τοπικού χρήστη" ,
2020-12-21 19:56:36 +01:00
modal _colorpicker1 : "Χρώμα ονόματος" ,
2022-04-21 18:31:14 +02:00
modal _colorpicker2 : "Χρώμα μηνύματος" ,
2020-12-21 19:56:36 +01:00
modal _colorpicker3 : "Χρώμα ετικέτας" ,
modal _colorpicker4 : "Χρώμα γραμματοσειράς" ,
2020-12-22 20:38:51 +01:00
modal _header : "Ρυθμίσεις τοπικού χρήστη" ,
modal _ignoretagcolor : "Χρησιμοποιήστε το χρώμα του ρόλου" ,
modal _invalidurl : "Μη έγκυρη διεύθυνση URL" ,
2021-11-03 15:57:22 +01:00
modal _showaccountname : "Εμφάνιση ονόματος" ,
2021-06-01 17:25:52 +02:00
modal _showservernick : "Εμφάνιση ψευδωνύμου" ,
2020-12-21 19:56:36 +01:00
modal _tabheader1 : "Χρήστης" ,
modal _tabheader2 : "Χρώμα ονόματος" ,
modal _tabheader3 : "Χρώμα ετικέτας" ,
2020-12-22 20:38:51 +01:00
modal _useravatar : "Άβαταρ" ,
2020-12-21 19:56:36 +01:00
modal _username : "Τοπικό όνομα χρήστη" ,
2020-12-22 20:38:51 +01:00
modal _userolecolor : "Μην αντικαθιστάτε το χρώμα του ρόλου" ,
modal _usertag : "Ετικέτα" ,
2021-04-23 12:01:44 +02:00
modal _useservernick : "Μην αντικαθιστάτε ψευδώνυμα" ,
2020-12-21 19:56:36 +01:00
submenu _resetsettings : "Επαναφορά χρήστη" ,
submenu _usersettings : "Αλλαξε ρυθμίσεις"
2020-09-19 20:49:33 +02:00
} ;
2020-12-21 19:56:36 +01:00
case "es" : // Spanish
2020-09-19 20:49:33 +02:00
return {
2020-12-22 20:38:51 +01:00
confirm _reset : "¿Está seguro de que desea restablecer este usuario?" ,
confirm _resetall : "¿Está seguro de que desea restablecer a todos los usuarios?" ,
2020-12-21 19:56:36 +01:00
context _localusersettings : "Configuración de usuario local" ,
modal _colorpicker1 : "Color del nombre" ,
2022-04-21 18:31:14 +02:00
modal _colorpicker2 : "Color del mensaje" ,
2020-12-22 20:38:51 +01:00
modal _colorpicker3 : "Color de etiqueta" ,
2020-12-21 19:56:36 +01:00
modal _colorpicker4 : "Color de fuente" ,
modal _header : "Configuración de usuario local" ,
2020-12-22 20:38:51 +01:00
modal _ignoretagcolor : "Usar color de rol" ,
2020-12-21 19:56:36 +01:00
modal _invalidurl : "URL invalida" ,
2021-11-03 15:57:22 +01:00
modal _showaccountname : "Mostrar nombre" ,
2021-06-01 17:25:52 +02:00
modal _showservernick : "Mostrar apodo" ,
2020-12-21 19:56:36 +01:00
modal _tabheader1 : "Usuario" ,
modal _tabheader2 : "Color del nombre" ,
2020-12-22 20:38:51 +01:00
modal _tabheader3 : "Color de etiqueta" ,
modal _useravatar : "Avatar" ,
2020-12-21 19:56:36 +01:00
modal _username : "Nombre de usuario local" ,
2020-12-22 20:38:51 +01:00
modal _userolecolor : "No sobrescriba el color de la función" ,
2020-12-21 19:56:36 +01:00
modal _usertag : "Etiqueta" ,
2021-04-23 12:01:44 +02:00
modal _useservernick : "No sobrescriba los apodos" ,
2020-12-21 19:56:36 +01:00
submenu _resetsettings : "Restablecer usuario" ,
submenu _usersettings : "Cambiar ajustes"
2020-09-19 20:49:33 +02:00
} ;
2020-12-21 19:56:36 +01:00
case "fi" : // Finnish
2020-09-19 20:49:33 +02:00
return {
2020-12-22 20:38:51 +01:00
confirm _reset : "Haluatko varmasti nollata tämän käyttäjän?" ,
confirm _resetall : "Haluatko varmasti nollata kaikki käyttäjät?" ,
2020-12-21 19:56:36 +01:00
context _localusersettings : "Paikalliset käyttäjäasetukset" ,
modal _colorpicker1 : "Nimen väri" ,
2022-04-21 18:31:14 +02:00
modal _colorpicker2 : "Viestin väri" ,
2020-12-22 20:38:51 +01:00
modal _colorpicker3 : "Tagin väri" ,
2020-12-21 19:56:36 +01:00
modal _colorpicker4 : "Fontin väri" ,
modal _header : "Paikalliset käyttäjäasetukset" ,
2020-12-22 20:38:51 +01:00
modal _ignoretagcolor : "Käytä rooliväriä" ,
2020-12-21 19:56:36 +01:00
modal _invalidurl : "Virheellinen URL" ,
2021-11-03 15:57:22 +01:00
modal _showaccountname : "Näytä nimi" ,
2021-06-01 17:25:52 +02:00
modal _showservernick : "Näytä lempinimi" ,
2020-12-21 19:56:36 +01:00
modal _tabheader1 : "Käyttäjä" ,
modal _tabheader2 : "Nimen väri" ,
2020-12-22 20:38:51 +01:00
modal _tabheader3 : "Tagin väri" ,
modal _useravatar : "Hahmo" ,
modal _username : "Paikallinen käyttäjätunnus" ,
modal _userolecolor : "Älä korvaa roolin väriä" ,
modal _usertag : "Tag" ,
2021-04-23 12:01:44 +02:00
modal _useservernick : "Älä korvaa lempinimiä" ,
2020-12-21 19:56:36 +01:00
submenu _resetsettings : "Nollaa käyttäjä" ,
submenu _usersettings : "Vaihda asetuksia"
2020-09-19 20:49:33 +02:00
} ;
2020-12-21 19:56:36 +01:00
case "fr" : // French
2020-09-19 20:49:33 +02:00
return {
2020-12-22 20:38:51 +01:00
confirm _reset : "Êtes-vous sûr de vouloir réinitialiser cet utilisateur?" ,
confirm _resetall : "Voulez-vous vraiment réinitialiser tous les utilisateurs?" ,
context _localusersettings : "Paramètres locaux de l'utilisateur" ,
2020-12-21 19:56:36 +01:00
modal _colorpicker1 : "Couleur du nom" ,
2022-04-21 18:31:14 +02:00
modal _colorpicker2 : "Couleur du message" ,
2020-12-21 19:56:36 +01:00
modal _colorpicker3 : "Couleur de l'étiquette" ,
modal _colorpicker4 : "Couleur de la police" ,
2020-12-22 20:38:51 +01:00
modal _header : "Paramètres locaux de l'utilisateur" ,
modal _ignoretagcolor : "Utiliser la couleur du rôle" ,
2020-12-21 19:56:36 +01:00
modal _invalidurl : "URL invalide" ,
2021-11-03 15:57:22 +01:00
modal _showaccountname : "Afficher le nom" ,
2021-06-01 17:25:52 +02:00
modal _showservernick : "Afficher le surnom" ,
2020-12-21 19:56:36 +01:00
modal _tabheader1 : "Utilisateur" ,
modal _tabheader2 : "Couleur du nom" ,
modal _tabheader3 : "Couleur de l'étiquette" ,
2020-12-22 20:38:51 +01:00
modal _useravatar : "Avatar" ,
modal _username : "Nom local d'utilisateur" ,
modal _userolecolor : "Ne pas écraser la couleur du rôle" ,
modal _usertag : "Marque" ,
2021-04-23 12:01:44 +02:00
modal _useservernick : "Ne pas écraser les surnoms" ,
2020-12-21 19:56:36 +01:00
submenu _resetsettings : "Réinitialiser l'utilisateur" ,
submenu _usersettings : "Modifier les paramètres"
2020-09-19 20:49:33 +02:00
} ;
2021-06-01 17:25:52 +02:00
case "hi" : // Hindi
return {
confirm _reset : "क्या आप वाकई इस उपयोगकर्ता को रीसेट करना चाहते हैं?" ,
confirm _resetall : "क्या आप वाकई सभी उपयोगकर्ताओं को रीसेट करना चाहते हैं?" ,
context _localusersettings : "स्थानीय उपयोगकर्ता सेटिंग्स" ,
modal _colorpicker1 : "नाम रंग" ,
2022-04-21 18:31:14 +02:00
modal _colorpicker2 : "संदेश रंग" ,
2021-06-01 17:25:52 +02:00
modal _colorpicker3 : "टैग रंग" ,
modal _colorpicker4 : "लिपि का रंग" ,
modal _header : "स्थानीय उपयोगकर्ता सेटिंग्स" ,
modal _ignoretagcolor : "भूमिका रंग का प्रयोग करें" ,
modal _invalidurl : "असामान्य यूआरएल" ,
2021-11-03 15:57:22 +01:00
modal _showaccountname : "नाम दिखाएं" ,
2021-06-01 17:25:52 +02:00
modal _showservernick : "उपनाम दिखाएं" ,
modal _tabheader1 : "उपयोगकर्ता" ,
modal _tabheader2 : "नाम रंग" ,
modal _tabheader3 : "टैग रंग" ,
modal _useravatar : "अवतार" ,
modal _username : "स्थानीय उपयोगकर्ता नाम" ,
modal _userolecolor : "भूमिका रंग को अधिलेखित न करें" ,
modal _usertag : "टैग" ,
modal _useservernick : "उपनामों को अधिलेखित न करें" ,
submenu _resetsettings : "उपयोगकर्ता को रीसेट करें" ,
submenu _usersettings : "सेटिंग्स परिवर्तित करना"
} ;
2020-12-21 19:56:36 +01:00
case "hr" : // Croatian
2020-09-19 20:49:33 +02:00
return {
2020-12-22 20:38:51 +01:00
confirm _reset : "Jeste li sigurni da želite resetirati ovog korisnika?" ,
confirm _resetall : "Jeste li sigurni da želite resetirati sve korisnike?" ,
context _localusersettings : "Postavke lokalnog korisnika" ,
modal _colorpicker1 : "Naziv Boja" ,
2022-04-21 18:31:14 +02:00
modal _colorpicker2 : "Boja poruke" ,
2020-12-22 20:38:51 +01:00
modal _colorpicker3 : "Oznaka u boji" ,
2020-12-21 19:56:36 +01:00
modal _colorpicker4 : "Boja fonta" ,
2020-12-22 20:38:51 +01:00
modal _header : "Postavke lokalnog korisnika" ,
modal _ignoretagcolor : "Koristite boju uloga" ,
2020-12-21 19:56:36 +01:00
modal _invalidurl : "Neispravna poveznica" ,
2021-11-03 15:57:22 +01:00
modal _showaccountname : "Prikaži ime" ,
2021-06-01 17:25:52 +02:00
modal _showservernick : "Prikaži nadimak" ,
2020-12-21 19:56:36 +01:00
modal _tabheader1 : "Korisnik" ,
2020-12-22 20:38:51 +01:00
modal _tabheader2 : "Naziv Boja" ,
modal _tabheader3 : "Oznaka u boji" ,
modal _useravatar : "Avatar" ,
2020-12-21 19:56:36 +01:00
modal _username : "Lokalno korisničko ime" ,
2020-12-22 20:38:51 +01:00
modal _userolecolor : "Nemojte prebrisati boju uloge" ,
2020-12-21 19:56:36 +01:00
modal _usertag : "Označiti" ,
2021-04-23 12:01:44 +02:00
modal _useservernick : "Ne prepisujte nadimke" ,
2020-12-21 19:56:36 +01:00
submenu _resetsettings : "Resetiraj korisnika" ,
submenu _usersettings : "Promijeniti postavke"
2020-09-19 20:49:33 +02:00
} ;
2020-12-21 19:56:36 +01:00
case "hu" : // Hungarian
2020-09-19 20:49:33 +02:00
return {
2020-12-22 20:38:51 +01:00
confirm _reset : "Biztosan vissza akarja állítani ezt a felhasználót?" ,
confirm _resetall : "Biztosan vissza akarja állítani az összes felhasználót?" ,
2020-12-21 19:56:36 +01:00
context _localusersettings : "Helyi felhasználói beállítások" ,
modal _colorpicker1 : "Név színe" ,
2022-04-21 18:31:14 +02:00
modal _colorpicker2 : "Üzenet színe" ,
2020-12-21 19:56:36 +01:00
modal _colorpicker3 : "Címke színe" ,
modal _colorpicker4 : "Betű szín" ,
modal _header : "Helyi felhasználói beállítások" ,
2020-12-22 20:38:51 +01:00
modal _ignoretagcolor : "Használja a Szerepszínt" ,
2020-12-21 19:56:36 +01:00
modal _invalidurl : "Érvénytelen URL" ,
2021-11-03 15:57:22 +01:00
modal _showaccountname : "Név megjelenítése" ,
2021-06-01 17:25:52 +02:00
modal _showservernick : "Becenév megjelenítése" ,
2020-12-21 19:56:36 +01:00
modal _tabheader1 : "Felhasználó" ,
modal _tabheader2 : "Név színe" ,
modal _tabheader3 : "Címke színe" ,
2020-12-22 20:38:51 +01:00
modal _useravatar : "Avatar" ,
2020-12-21 19:56:36 +01:00
modal _username : "Helyi felhasználónév" ,
2020-12-22 20:38:51 +01:00
modal _userolecolor : "Ne írja felül a Szerepszínt" ,
2020-12-21 19:56:36 +01:00
modal _usertag : "Címke" ,
2021-04-23 12:01:44 +02:00
modal _useservernick : "Ne írja felül a beceneveket" ,
2020-12-21 19:56:36 +01:00
submenu _resetsettings : "Felhasználó visszaállítása" ,
submenu _usersettings : "Beállítások megváltoztatása"
2020-09-19 20:49:33 +02:00
} ;
2020-12-21 19:56:36 +01:00
case "it" : // Italian
2020-09-19 20:49:33 +02:00
return {
2020-12-22 20:38:51 +01:00
confirm _reset : "Sei sicuro di voler reimpostare questo utente?" ,
confirm _resetall : "Sei sicuro di voler reimpostare tutti gli utenti?" ,
2020-12-21 19:56:36 +01:00
context _localusersettings : "Impostazioni utente locale" ,
2022-04-21 18:31:14 +02:00
modal _colorpicker1 : "Colore nome" ,
modal _colorpicker2 : "Colore messaggio" ,
2020-12-22 20:38:51 +01:00
modal _colorpicker3 : "Colore tag" ,
2020-12-21 19:56:36 +01:00
modal _colorpicker4 : "Colore del carattere" ,
modal _header : "Impostazioni utente locale" ,
2020-12-22 20:38:51 +01:00
modal _ignoretagcolor : "Usa colore ruolo" ,
2020-12-21 19:56:36 +01:00
modal _invalidurl : "URL non valido" ,
2021-11-03 15:57:22 +01:00
modal _showaccountname : "Mostra nome" ,
2021-06-01 17:25:52 +02:00
modal _showservernick : "Mostra soprannome" ,
2020-12-21 19:56:36 +01:00
modal _tabheader1 : "Utente" ,
2020-12-22 20:38:51 +01:00
modal _tabheader2 : "Nome Colore" ,
modal _tabheader3 : "Colore tag" ,
modal _useravatar : "Avatar" ,
2020-12-21 19:56:36 +01:00
modal _username : "Nome utente locale" ,
2020-12-22 20:38:51 +01:00
modal _userolecolor : "Non sovrascrivere il colore del ruolo" ,
2020-12-21 19:56:36 +01:00
modal _usertag : "Etichetta" ,
2021-04-23 12:01:44 +02:00
modal _useservernick : "Non sovrascrivere i soprannomi" ,
2020-12-21 19:56:36 +01:00
submenu _resetsettings : "Reimposta utente" ,
submenu _usersettings : "Cambia impostazioni"
2020-09-19 20:49:33 +02:00
} ;
2020-12-21 19:56:36 +01:00
case "ja" : // Japanese
2020-09-19 20:49:33 +02:00
return {
2020-12-22 20:38:51 +01:00
confirm _reset : "このユーザーをリセットしてもよろしいですか?" ,
confirm _resetall : "すべてのユーザーをリセットしてもよろしいですか?" ,
2020-12-21 19:56:36 +01:00
context _localusersettings : "ローカルユーザー設定" ,
modal _colorpicker1 : "名前の色" ,
2022-04-21 18:31:14 +02:00
modal _colorpicker2 : "メッセージの色" ,
2020-12-22 20:38:51 +01:00
modal _colorpicker3 : "タグの色" ,
2020-12-21 19:56:36 +01:00
modal _colorpicker4 : "フォントの色" ,
modal _header : "ローカルユーザー設定" ,
2020-12-22 20:38:51 +01:00
modal _ignoretagcolor : "役割の色を使用する" ,
2020-12-21 19:56:36 +01:00
modal _invalidurl : "無効なURL" ,
2021-11-03 15:57:22 +01:00
modal _showaccountname : "名前を表示" ,
2021-06-01 17:25:52 +02:00
modal _showservernick : "ニックネームを表示" ,
2020-12-21 19:56:36 +01:00
modal _tabheader1 : "ユーザー" ,
modal _tabheader2 : "名前の色" ,
2020-12-22 20:38:51 +01:00
modal _tabheader3 : "タグの色" ,
modal _useravatar : "アバター" ,
2020-12-21 19:56:36 +01:00
modal _username : "ローカルユーザー名" ,
2020-12-22 20:38:51 +01:00
modal _userolecolor : "役割の色を上書きしないでください" ,
modal _usertag : "鬼ごっこ" ,
2021-04-23 12:01:44 +02:00
modal _useservernick : "ニックネームを上書きしないでください" ,
2020-12-22 20:38:51 +01:00
submenu _resetsettings : "ユーザーのリセット" ,
2020-12-21 19:56:36 +01:00
submenu _usersettings : "設定を変更する"
2020-09-19 20:49:33 +02:00
} ;
2020-12-21 19:56:36 +01:00
case "ko" : // Korean
2020-09-19 20:49:33 +02:00
return {
2020-12-22 20:38:51 +01:00
confirm _reset : "이 사용자를 재설정 하시겠습니까?" ,
confirm _resetall : "모든 사용자를 재설정 하시겠습니까?" ,
2020-12-21 19:56:36 +01:00
context _localusersettings : "로컬 사용자 설정" ,
modal _colorpicker1 : "이름 색상" ,
2022-04-21 18:31:14 +02:00
modal _colorpicker2 : "메시지 색상" ,
2020-12-22 20:38:51 +01:00
modal _colorpicker3 : "태그 색상" ,
2020-12-21 19:56:36 +01:00
modal _colorpicker4 : "글자 색" ,
modal _header : "로컬 사용자 설정" ,
2020-12-22 20:38:51 +01:00
modal _ignoretagcolor : "역할 색상 사용" ,
2020-12-21 19:56:36 +01:00
modal _invalidurl : "잘못된 URL" ,
2021-11-03 15:57:22 +01:00
modal _showaccountname : "이름 표시" ,
2021-06-01 17:25:52 +02:00
modal _showservernick : "닉네임 표시" ,
2020-12-21 19:56:36 +01:00
modal _tabheader1 : "사용자" ,
modal _tabheader2 : "이름 색상" ,
2020-12-22 20:38:51 +01:00
modal _tabheader3 : "태그 색상" ,
modal _useravatar : "화신" ,
2020-12-21 19:56:36 +01:00
modal _username : "로컬 사용자 이름" ,
2020-12-22 20:38:51 +01:00
modal _userolecolor : "역할 색상을 덮어 쓰지 마십시오." ,
modal _usertag : "꼬리표" ,
2021-04-23 12:01:44 +02:00
modal _useservernick : "별명을 덮어 쓰지 마십시오" ,
2020-12-21 19:56:36 +01:00
submenu _resetsettings : "사용자 재설정" ,
submenu _usersettings : "설정 변경"
2020-09-19 20:49:33 +02:00
} ;
2020-12-21 19:56:36 +01:00
case "lt" : // Lithuanian
2020-09-19 20:49:33 +02:00
return {
2020-12-22 20:38:51 +01:00
confirm _reset : "Ar tikrai norite iš naujo nustatyti šį naudotoją?" ,
confirm _resetall : "Ar tikrai norite iš naujo nustatyti visus naudotojus?" ,
2020-12-21 19:56:36 +01:00
context _localusersettings : "Vietinio vartotojo nustatymai" ,
modal _colorpicker1 : "Pavadinimo spalva" ,
2022-04-21 18:31:14 +02:00
modal _colorpicker2 : "Pranešimo spalva" ,
2020-12-22 20:38:51 +01:00
modal _colorpicker3 : "Žymos spalva" ,
2020-12-21 19:56:36 +01:00
modal _colorpicker4 : "Šrifto spalva" ,
modal _header : "Vietinio vartotojo nustatymai" ,
2020-12-22 20:38:51 +01:00
modal _ignoretagcolor : "Naudokite vaidmens spalvą" ,
2020-12-21 19:56:36 +01:00
modal _invalidurl : "Neteisingas URL" ,
2021-11-03 15:57:22 +01:00
modal _showaccountname : "Rodyti pavadinimą" ,
2021-06-01 17:25:52 +02:00
modal _showservernick : "Rodyti slapyvardį" ,
2020-12-21 19:56:36 +01:00
modal _tabheader1 : "Vartotojas" ,
modal _tabheader2 : "Pavadinimo spalva" ,
2020-12-22 20:38:51 +01:00
modal _tabheader3 : "Žymos spalva" ,
modal _useravatar : "Avataras" ,
2020-12-21 19:56:36 +01:00
modal _username : "Vietinis vartotojo vardas" ,
2020-12-22 20:38:51 +01:00
modal _userolecolor : "Neperrašykite vaidmens spalvos" ,
modal _usertag : "Žyma" ,
2021-04-23 12:01:44 +02:00
modal _useservernick : "Neperrašykite slapyvardžių" ,
2020-12-21 19:56:36 +01:00
submenu _resetsettings : "Iš naujo nustatyti vartotoją" ,
submenu _usersettings : "Pakeisti nustatymus"
2020-09-19 20:49:33 +02:00
} ;
2020-12-21 19:56:36 +01:00
case "nl" : // Dutch
2020-09-19 20:49:33 +02:00
return {
2020-12-22 20:38:51 +01:00
confirm _reset : "Weet u zeker dat u deze gebruiker wilt resetten?" ,
confirm _resetall : "Weet u zeker dat u alle gebruikers wilt resetten?" ,
2020-12-21 19:56:36 +01:00
context _localusersettings : "Lokale gebruikersinstellingen" ,
modal _colorpicker1 : "Naamkleur" ,
2022-04-21 18:31:14 +02:00
modal _colorpicker2 : "Berichtkleur" ,
2020-12-22 20:38:51 +01:00
modal _colorpicker3 : "Tagkleur" ,
2020-12-21 19:56:36 +01:00
modal _colorpicker4 : "Letterkleur" ,
modal _header : "Lokale gebruikersinstellingen" ,
modal _ignoretagcolor : "Gebruik rolkleur" ,
modal _invalidurl : "Ongeldige URL" ,
2021-11-03 15:57:22 +01:00
modal _showaccountname : "Toon naam" ,
2021-06-01 17:25:52 +02:00
modal _showservernick : "Bijnaam weergeven" ,
2020-12-21 19:56:36 +01:00
modal _tabheader1 : "Gebruiker" ,
modal _tabheader2 : "Naamkleur" ,
2020-12-22 20:38:51 +01:00
modal _tabheader3 : "Tagkleur" ,
modal _useravatar : "Avatar" ,
2020-12-21 19:56:36 +01:00
modal _username : "Lokale gebruikersnaam" ,
modal _userolecolor : "Overschrijf de rolkleur niet" ,
2020-12-22 20:38:51 +01:00
modal _usertag : "Label" ,
2021-04-23 12:01:44 +02:00
modal _useservernick : "Overschrijf geen bijnamen" ,
2020-12-22 20:38:51 +01:00
submenu _resetsettings : "Gebruiker resetten" ,
2020-12-21 19:56:36 +01:00
submenu _usersettings : "Instellingen veranderen"
2020-09-19 20:49:33 +02:00
} ;
2020-12-21 19:56:36 +01:00
case "no" : // Norwegian
2020-09-19 20:49:33 +02:00
return {
2020-12-22 20:38:51 +01:00
confirm _reset : "Er du sikker på at du vil tilbakestille denne brukeren?" ,
confirm _resetall : "Er du sikker på at du vil tilbakestille alle brukere?" ,
2020-12-21 19:56:36 +01:00
context _localusersettings : "Lokale brukerinnstillinger" ,
2020-12-22 20:38:51 +01:00
modal _colorpicker1 : "Navnfarge" ,
2022-04-21 18:31:14 +02:00
modal _colorpicker2 : "Meldingfarge" ,
2020-12-22 20:38:51 +01:00
modal _colorpicker3 : "Merkefarge" ,
2020-12-21 19:56:36 +01:00
modal _colorpicker4 : "Skriftfarge" ,
modal _header : "Lokale brukerinnstillinger" ,
2020-12-22 20:38:51 +01:00
modal _ignoretagcolor : "Bruk rollefarge" ,
2020-12-21 19:56:36 +01:00
modal _invalidurl : "Ugyldig URL" ,
2021-11-03 15:57:22 +01:00
modal _showaccountname : "Vis navn" ,
2021-06-01 17:25:52 +02:00
modal _showservernick : "Vis kallenavn" ,
2020-12-21 19:56:36 +01:00
modal _tabheader1 : "Bruker" ,
2020-12-22 20:38:51 +01:00
modal _tabheader2 : "Navnfarge" ,
modal _tabheader3 : "Merkefarge" ,
modal _useravatar : "Avatar" ,
2020-12-21 19:56:36 +01:00
modal _username : "Lokalt brukernavn" ,
2020-12-22 20:38:51 +01:00
modal _userolecolor : "Ikke skriv rollefargen" ,
modal _usertag : "Stikkord" ,
2021-04-23 12:01:44 +02:00
modal _useservernick : "Ikke overskriv kallenavn" ,
2020-12-21 19:56:36 +01:00
submenu _resetsettings : "Tilbakestill bruker" ,
submenu _usersettings : "Endre innstillinger"
2020-09-19 20:49:33 +02:00
} ;
2020-12-21 19:56:36 +01:00
case "pl" : // Polish
2020-09-19 20:49:33 +02:00
return {
2020-12-22 20:38:51 +01:00
confirm _reset : "Czy na pewno chcesz zresetować tego użytkownika?" ,
confirm _resetall : "Czy na pewno chcesz zresetować wszystkich użytkowników?" ,
context _localusersettings : "Ustawienia użytkownika lokalnego" ,
modal _colorpicker1 : "Nazwa Kolor" ,
2022-04-21 18:31:14 +02:00
modal _colorpicker2 : "Kolor wiadomości" ,
2020-12-22 20:38:51 +01:00
modal _colorpicker3 : "Kolor tagu" ,
2020-12-21 19:56:36 +01:00
modal _colorpicker4 : "Kolor czcionki" ,
2020-12-22 20:38:51 +01:00
modal _header : "Ustawienia użytkownika lokalnego" ,
modal _ignoretagcolor : "Użyj koloru roli" ,
2020-12-21 19:56:36 +01:00
modal _invalidurl : "Nieprawidłowy URL" ,
2021-11-03 15:57:22 +01:00
modal _showaccountname : "Pokaż nazwę" ,
2021-06-01 17:25:52 +02:00
modal _showservernick : "Pokaż pseudonim" ,
2020-12-21 19:56:36 +01:00
modal _tabheader1 : "Użytkownik" ,
2020-12-22 20:38:51 +01:00
modal _tabheader2 : "Nazwa Kolor" ,
modal _tabheader3 : "Kolor tagu" ,
modal _useravatar : "Awatara" ,
2020-12-21 19:56:36 +01:00
modal _username : "Lokalna nazwa użytkownika" ,
2020-12-22 20:38:51 +01:00
modal _userolecolor : "Nie zastępuj koloru roli" ,
modal _usertag : "Etykietka" ,
2021-04-23 12:01:44 +02:00
modal _useservernick : "Nie nadpisuj pseudonimów" ,
2020-12-22 20:38:51 +01:00
submenu _resetsettings : "Resetuj użytkownika" ,
2020-12-21 19:56:36 +01:00
submenu _usersettings : "Zmień ustawienia"
2020-09-19 20:49:33 +02:00
} ;
2020-12-21 19:56:36 +01:00
case "pt-BR" : // Portuguese (Brazil)
2020-09-19 20:49:33 +02:00
return {
2020-12-22 20:38:51 +01:00
confirm _reset : "Tem certeza de que deseja redefinir este usuário?" ,
confirm _resetall : "Tem certeza de que deseja redefinir todos os usuários?" ,
2020-12-21 19:56:36 +01:00
context _localusersettings : "Configurações de usuário local" ,
modal _colorpicker1 : "Cor do nome" ,
2022-04-21 18:31:14 +02:00
modal _colorpicker2 : "Cor da Mensagem" ,
2020-12-22 20:38:51 +01:00
modal _colorpicker3 : "Cor da tag" ,
2020-12-21 19:56:36 +01:00
modal _colorpicker4 : "Cor da fonte" ,
modal _header : "Configurações de usuário local" ,
2020-12-22 20:38:51 +01:00
modal _ignoretagcolor : "Use a cor da função" ,
2020-12-21 19:56:36 +01:00
modal _invalidurl : "URL inválida" ,
2021-11-03 15:57:22 +01:00
modal _showaccountname : "Mostrar nome" ,
2021-06-01 17:25:52 +02:00
modal _showservernick : "Mostrar apelido" ,
2020-12-21 19:56:36 +01:00
modal _tabheader1 : "Do utilizador" ,
2020-12-22 20:38:51 +01:00
modal _tabheader2 : "Cor do Nome" ,
modal _tabheader3 : "Cor da tag" ,
modal _useravatar : "Avatar" ,
2020-12-21 19:56:36 +01:00
modal _username : "Nome de usuário local" ,
2020-12-22 20:38:51 +01:00
modal _userolecolor : "Não sobrescreva a Cor da Função" ,
modal _usertag : "Tag" ,
2021-04-23 12:01:44 +02:00
modal _useservernick : "Não sobrescrever apelidos" ,
2020-12-21 19:56:36 +01:00
submenu _resetsettings : "Reiniciar usuário" ,
submenu _usersettings : "Mudar configurações"
2020-09-19 20:49:33 +02:00
} ;
2020-12-21 19:56:36 +01:00
case "ro" : // Romanian
2020-09-19 20:49:33 +02:00
return {
2020-12-22 20:38:51 +01:00
confirm _reset : "Sigur doriți să resetați acest utilizator?" ,
confirm _resetall : "Sigur doriți să resetați toți utilizatorii?" ,
2020-12-21 19:56:36 +01:00
context _localusersettings : "Setări locale ale utilizatorului" ,
2020-12-22 20:38:51 +01:00
modal _colorpicker1 : "Culoare nume" ,
2022-04-21 18:31:14 +02:00
modal _colorpicker2 : "Culoarea mesajului" ,
2020-12-22 20:38:51 +01:00
modal _colorpicker3 : "Culoare etichetă" ,
2020-12-21 19:56:36 +01:00
modal _colorpicker4 : "Culoarea fontului" ,
modal _header : "Setări locale ale utilizatorului" ,
2020-12-22 20:38:51 +01:00
modal _ignoretagcolor : "Utilizați culoarea rolului" ,
2020-12-21 19:56:36 +01:00
modal _invalidurl : "URL invalid" ,
2021-11-03 15:57:22 +01:00
modal _showaccountname : "Afișează numele" ,
2021-06-01 17:25:52 +02:00
modal _showservernick : "Afișează porecla" ,
2020-12-21 19:56:36 +01:00
modal _tabheader1 : "Utilizator" ,
2020-12-22 20:38:51 +01:00
modal _tabheader2 : "Culoare nume" ,
modal _tabheader3 : "Culoare etichetă" ,
modal _useravatar : "Avatar" ,
modal _username : "Nume utilizator local" ,
modal _userolecolor : "Nu suprascrieți culoarea rolului" ,
modal _usertag : "Etichetă" ,
2021-04-23 12:01:44 +02:00
modal _useservernick : "Nu suprascrieți porecle" ,
2020-12-21 19:56:36 +01:00
submenu _resetsettings : "Resetați utilizatorul" ,
submenu _usersettings : "Schimbă setările"
2020-09-19 20:49:33 +02:00
} ;
2020-12-21 19:56:36 +01:00
case "ru" : // Russian
2020-09-19 20:49:33 +02:00
return {
2020-12-22 20:38:51 +01:00
confirm _reset : "Вы уверены, что хотите сбросить этого пользователя?" ,
confirm _resetall : "Вы уверены, что хотите сбросить всех пользователей?" ,
2020-12-21 19:56:36 +01:00
context _localusersettings : "Настройки локального пользователя" ,
modal _colorpicker1 : "Цвет имени" ,
2022-04-21 18:31:14 +02:00
modal _colorpicker2 : "Цвет сообщения" ,
2020-12-22 20:38:51 +01:00
modal _colorpicker3 : "Цвет метки" ,
2020-12-21 19:56:36 +01:00
modal _colorpicker4 : "Цвет шрифта" ,
modal _header : "Настройки локального пользователя" ,
2020-12-22 20:38:51 +01:00
modal _ignoretagcolor : "Использовать цвет роли" ,
2020-12-21 19:56:36 +01:00
modal _invalidurl : "Неверная ссылка" ,
2021-11-03 15:57:22 +01:00
modal _showaccountname : "Показать имя" ,
2021-06-01 17:25:52 +02:00
modal _showservernick : "Показать ник" ,
2020-12-21 19:56:36 +01:00
modal _tabheader1 : "Пользователь" ,
modal _tabheader2 : "Цвет имени" ,
2020-12-22 20:38:51 +01:00
modal _tabheader3 : "Цвет метки" ,
modal _useravatar : "Аватар" ,
2020-12-21 19:56:36 +01:00
modal _username : "Локальное имя пользователя" ,
2020-12-22 20:38:51 +01:00
modal _userolecolor : "Н е перезаписывайте цвет роли" ,
modal _usertag : "Т е г " ,
2021-04-23 12:01:44 +02:00
modal _useservernick : "Н е перезаписывать никнеймы" ,
2020-12-21 19:56:36 +01:00
submenu _resetsettings : "Сбросить пользователя" ,
submenu _usersettings : "Изменить настройки"
2020-09-19 20:49:33 +02:00
} ;
2020-12-21 19:56:36 +01:00
case "sv" : // Swedish
2020-09-19 20:49:33 +02:00
return {
2020-12-22 20:38:51 +01:00
confirm _reset : "Är du säker på att du vill återställa den här användaren?" ,
confirm _resetall : "Är du säker på att du vill återställa alla användare?" ,
2020-12-21 19:56:36 +01:00
context _localusersettings : "Lokala användarinställningar" ,
modal _colorpicker1 : "Namnfärg" ,
2022-04-21 18:31:14 +02:00
modal _colorpicker2 : "Meddelandefärg" ,
2020-12-22 20:38:51 +01:00
modal _colorpicker3 : "Taggfärg" ,
2020-12-21 19:56:36 +01:00
modal _colorpicker4 : "Fontfärg" ,
modal _header : "Lokala användarinställningar" ,
2020-12-22 20:38:51 +01:00
modal _ignoretagcolor : "Använd rollfärg" ,
2020-12-21 19:56:36 +01:00
modal _invalidurl : "Ogiltig URL" ,
2021-11-03 15:57:22 +01:00
modal _showaccountname : "Visa namn" ,
2021-06-01 17:25:52 +02:00
modal _showservernick : "Visa smeknamn" ,
2020-12-21 19:56:36 +01:00
modal _tabheader1 : "Användare" ,
modal _tabheader2 : "Namnfärg" ,
2020-12-22 20:38:51 +01:00
modal _tabheader3 : "Taggfärg" ,
modal _useravatar : "Avatar" ,
2020-12-21 19:56:36 +01:00
modal _username : "Lokalt användarnamn" ,
2020-12-22 20:38:51 +01:00
modal _userolecolor : "Skriv inte över rollfärgen" ,
2020-12-21 19:56:36 +01:00
modal _usertag : "Märka" ,
2021-04-23 12:01:44 +02:00
modal _useservernick : "Skriv inte över smeknamn" ,
2020-12-21 19:56:36 +01:00
submenu _resetsettings : "Återställ användare" ,
submenu _usersettings : "Ändra inställningar"
2020-09-19 20:49:33 +02:00
} ;
2020-12-21 19:56:36 +01:00
case "th" : // Thai
2020-09-19 20:49:33 +02:00
return {
2020-12-22 20:38:51 +01:00
confirm _reset : "แน่ใจไหมว่าต้องการรีเซ็ตผู้ใช้นี้" ,
confirm _resetall : "แน่ใจไหมว่าต้องการรีเซ็ตผู้ใช้ทั้งหมด" ,
2020-12-21 19:56:36 +01:00
context _localusersettings : "การตั้งค่าผู้ใช้ภายใน" ,
modal _colorpicker1 : "ชื่อสี" ,
2022-04-21 18:31:14 +02:00
modal _colorpicker2 : "สีข้อความ" ,
2020-12-22 20:38:51 +01:00
modal _colorpicker3 : "สีแท็ก" ,
2020-12-21 19:56:36 +01:00
modal _colorpicker4 : "สีตัวอักษร" ,
modal _header : "การตั้งค่าผู้ใช้ภายใน" ,
2020-12-22 20:38:51 +01:00
modal _ignoretagcolor : "ใช้สีของบทบาท" ,
2020-12-21 19:56:36 +01:00
modal _invalidurl : "URL ไม่ถูกต้อง" ,
2021-11-03 15:57:22 +01:00
modal _showaccountname : "แสดงชื่อ" ,
2021-06-01 17:25:52 +02:00
modal _showservernick : "แสดงชื่อเล่น" ,
2020-12-21 19:56:36 +01:00
modal _tabheader1 : "ผู้ใช้" ,
modal _tabheader2 : "ชื่อสี" ,
2020-12-22 20:38:51 +01:00
modal _tabheader3 : "สีแท็ก" ,
modal _useravatar : "สัญลักษณ์" ,
2020-12-21 19:56:36 +01:00
modal _username : "ชื่อผู้ใช้ท้องถิ่น" ,
2020-12-22 20:38:51 +01:00
modal _userolecolor : "อย่าเขียนทับสีของบทบาท" ,
modal _usertag : "แท็ก" ,
2021-04-23 12:01:44 +02:00
modal _useservernick : "อย่าเขียนทับชื่อเล่น" ,
2020-12-21 19:56:36 +01:00
submenu _resetsettings : "รีเซ็ตผู้ใช้" ,
submenu _usersettings : "เปลี่ยนการตั้งค่า"
} ;
case "tr" : // Turkish
return {
2020-12-22 20:38:51 +01:00
confirm _reset : "Bu Kullanı cı yı sı fı rlamak istediğinizden emin misiniz?" ,
confirm _resetall : "Tüm Kullanı cı ları sı fı rlamak istediğinizden emin misiniz?" ,
context _localusersettings : "Yerel Kullanı cı Ayarları " ,
modal _colorpicker1 : "İsim Rengi" ,
2022-04-21 18:31:14 +02:00
modal _colorpicker2 : "Mesaj Rengi" ,
2020-12-22 20:38:51 +01:00
modal _colorpicker3 : "Etiket Rengi" ,
2020-12-21 19:56:36 +01:00
modal _colorpicker4 : "Yazı rengi" ,
2020-12-22 20:38:51 +01:00
modal _header : "Yerel Kullanı cı Ayarları " ,
modal _ignoretagcolor : "Rol Rengini Kullan" ,
2020-12-21 19:56:36 +01:00
modal _invalidurl : "Geçersiz URL" ,
2021-11-03 15:57:22 +01:00
modal _showaccountname : "İsim göster" ,
2021-06-01 17:25:52 +02:00
modal _showservernick : "Takma adı göster" ,
2020-12-21 19:56:36 +01:00
modal _tabheader1 : "Kullanı cı " ,
2020-12-22 20:38:51 +01:00
modal _tabheader2 : "İsim Rengi" ,
modal _tabheader3 : "Etiket Rengi" ,
modal _useravatar : "Avatar" ,
modal _username : "Yerel Kullanı cı Adı " ,
modal _userolecolor : "Rol Renginin üzerine yazmayı n" ,
2020-12-21 19:56:36 +01:00
modal _usertag : "Etiket" ,
2021-04-23 12:01:44 +02:00
modal _useservernick : "Takma adları n üzerine yazmayı n" ,
2020-12-22 20:38:51 +01:00
submenu _resetsettings : "Kullanı cı yı Sı fı rla" ,
2020-12-21 19:56:36 +01:00
submenu _usersettings : "Ayarları değiştir"
} ;
case "uk" : // Ukrainian
return {
2020-12-22 20:38:51 +01:00
confirm _reset : "Ви впевнені, що хочете скинути налаштування цього користувача?" ,
confirm _resetall : "Ви впевнені, що хочете скинути налаштування всіх користувачів?" ,
2020-12-21 19:56:36 +01:00
context _localusersettings : "Налаштування локального користувача" ,
2020-12-22 20:38:51 +01:00
modal _colorpicker1 : "Назва Колір" ,
2022-04-21 18:31:14 +02:00
modal _colorpicker2 : "Колір повідомлення" ,
2020-12-22 20:38:51 +01:00
modal _colorpicker3 : "Колір тегу" ,
2020-12-21 19:56:36 +01:00
modal _colorpicker4 : "Колір шрифту" ,
modal _header : "Налаштування локального користувача" ,
2020-12-22 20:38:51 +01:00
modal _ignoretagcolor : "Використовуйте колір ролі" ,
2020-12-21 19:56:36 +01:00
modal _invalidurl : "Недійсна URL-адреса" ,
2021-11-03 15:57:22 +01:00
modal _showaccountname : "Показати ім'я" ,
2021-06-01 17:25:52 +02:00
modal _showservernick : "Показати псевдонім" ,
2020-12-21 19:56:36 +01:00
modal _tabheader1 : "Користувач" ,
2020-12-22 20:38:51 +01:00
modal _tabheader2 : "Назва Колір" ,
modal _tabheader3 : "Колір тегу" ,
modal _useravatar : "Аватар" ,
2020-12-21 19:56:36 +01:00
modal _username : "Локальне ім’я користувача" ,
2020-12-22 20:38:51 +01:00
modal _userolecolor : "Н е перезаписуйте колір ролі" ,
modal _usertag : "Позначка" ,
2021-04-23 12:01:44 +02:00
modal _useservernick : "Н е перезаписуйте псевдоніми" ,
2020-12-21 19:56:36 +01:00
submenu _resetsettings : "Скинути налаштування користувача" ,
submenu _usersettings : "Змінити налаштування"
} ;
case "vi" : // Vietnamese
return {
2020-12-22 20:38:51 +01:00
confirm _reset : "Bạn có chắc chắn muốn đặt lại Người dùng này không?" ,
confirm _resetall : "Bạn có chắc chắn muốn đặt lại tất cả Người dùng không?" ,
2020-12-21 19:56:36 +01:00
context _localusersettings : "Cài đặt người dùng cục bộ" ,
2020-12-22 20:38:51 +01:00
modal _colorpicker1 : "Tên màu" ,
2022-04-21 18:31:14 +02:00
modal _colorpicker2 : "Màu tin nhắn" ,
2020-12-22 20:38:51 +01:00
modal _colorpicker3 : "Màu thẻ" ,
2020-12-21 19:56:36 +01:00
modal _colorpicker4 : "Màu phông chữ" ,
modal _header : "Cài đặt người dùng cục bộ" ,
2020-12-22 20:38:51 +01:00
modal _ignoretagcolor : "Sử dụng màu vai trò" ,
modal _invalidurl : "URL không hợp lệ" ,
2021-11-03 15:57:22 +01:00
modal _showaccountname : "Hiện tên" ,
2021-06-01 17:25:52 +02:00
modal _showservernick : "Hiển thị biệt hiệu" ,
2020-12-21 19:56:36 +01:00
modal _tabheader1 : "Người dùng" ,
2020-12-22 20:38:51 +01:00
modal _tabheader2 : "Tên màu" ,
modal _tabheader3 : "Màu thẻ" ,
modal _useravatar : "Hình đại diện" ,
2020-12-21 19:56:36 +01:00
modal _username : "Tên người dùng cục bộ" ,
2020-12-22 20:38:51 +01:00
modal _userolecolor : "Không ghi đè Màu vai trò" ,
2020-12-21 19:56:36 +01:00
modal _usertag : "Nhãn" ,
2021-04-23 12:01:44 +02:00
modal _useservernick : "Không ghi đè biệt hiệu" ,
2020-12-21 19:56:36 +01:00
submenu _resetsettings : "Đặt lại người dùng" ,
submenu _usersettings : "Thay đổi cài đặt"
} ;
2021-01-15 17:54:22 +01:00
case "zh-CN" : // Chinese (China)
2020-12-21 19:56:36 +01:00
return {
2020-12-22 20:38:51 +01:00
confirm _reset : "您确定要重置此用户吗?" ,
confirm _resetall : "您确定要重置所有用户吗?" ,
2020-12-21 19:56:36 +01:00
context _localusersettings : "本地用户设置" ,
modal _colorpicker1 : "名称颜色" ,
2022-04-21 18:31:14 +02:00
modal _colorpicker2 : "讯息颜色" ,
2020-12-21 19:56:36 +01:00
modal _colorpicker3 : "标签颜色" ,
modal _colorpicker4 : "字体颜色" ,
modal _header : "本地用户设置" ,
2020-12-22 20:38:51 +01:00
modal _ignoretagcolor : "使用角色颜色" ,
2020-12-21 19:56:36 +01:00
modal _invalidurl : "无效的网址" ,
2021-11-03 15:57:22 +01:00
modal _showaccountname : "显示名称" ,
2021-06-01 17:25:52 +02:00
modal _showservernick : "显示昵称" ,
2020-12-21 19:56:36 +01:00
modal _tabheader1 : "用户" ,
modal _tabheader2 : "名称颜色" ,
modal _tabheader3 : "标签颜色" ,
2020-12-22 20:38:51 +01:00
modal _useravatar : "头像" ,
2020-12-21 19:56:36 +01:00
modal _username : "本地用户名" ,
2020-12-22 20:38:51 +01:00
modal _userolecolor : "不要覆盖角色颜色" ,
2020-12-21 19:56:36 +01:00
modal _usertag : "标签" ,
2021-04-23 12:01:44 +02:00
modal _useservernick : "不要覆盖昵称" ,
2020-12-21 19:56:36 +01:00
submenu _resetsettings : "重置用户" ,
submenu _usersettings : "更改设置"
} ;
2021-01-15 17:54:22 +01:00
case "zh-TW" : // Chinese (Taiwan)
2020-12-21 19:56:36 +01:00
return {
2020-12-22 20:38:51 +01:00
confirm _reset : "您確定要重置此用戶嗎?" ,
confirm _resetall : "您確定要重置所有用戶嗎?" ,
2020-12-21 19:56:36 +01:00
context _localusersettings : "本地用戶設置" ,
modal _colorpicker1 : "名稱顏色" ,
2022-04-21 18:31:14 +02:00
modal _colorpicker2 : "訊息顏色" ,
2020-12-21 19:56:36 +01:00
modal _colorpicker3 : "標籤顏色" ,
modal _colorpicker4 : "字體顏色" ,
modal _header : "本地用戶設置" ,
2020-12-22 20:38:51 +01:00
modal _ignoretagcolor : "使用角色顏色" ,
2020-12-21 19:56:36 +01:00
modal _invalidurl : "無效的網址" ,
2021-11-03 15:57:22 +01:00
modal _showaccountname : "顯示名稱" ,
2021-06-01 17:25:52 +02:00
modal _showservernick : "顯示暱稱" ,
2020-12-21 19:56:36 +01:00
modal _tabheader1 : "用戶" ,
modal _tabheader2 : "名稱顏色" ,
modal _tabheader3 : "標籤顏色" ,
2020-12-22 20:38:51 +01:00
modal _useravatar : "頭像" ,
2020-12-21 19:56:36 +01:00
modal _username : "本地用戶名" ,
2020-12-22 20:38:51 +01:00
modal _userolecolor : "不要覆蓋角色顏色" ,
2020-12-21 19:56:36 +01:00
modal _usertag : "標籤" ,
2021-04-23 12:01:44 +02:00
modal _useservernick : "不要覆蓋暱稱" ,
2020-12-21 19:56:36 +01:00
submenu _resetsettings : "重置用戶" ,
submenu _usersettings : "更改設置"
} ;
default : // English
return {
2020-12-22 20:38:51 +01:00
confirm _reset : "Are you sure you want to reset this User?" ,
confirm _resetall : "Are you sure you want to reset all Users?" ,
2020-12-21 19:56:36 +01:00
context _localusersettings : "Local User Settings" ,
modal _colorpicker1 : "Name Color" ,
2022-04-21 18:31:14 +02:00
modal _colorpicker2 : "Message Color" ,
2020-12-21 19:56:36 +01:00
modal _colorpicker3 : "Tag Color" ,
modal _colorpicker4 : "Font Color" ,
modal _header : "Local User Settings" ,
modal _ignoretagcolor : "Use Role Color" ,
modal _invalidurl : "Invalid URL" ,
2021-11-03 15:57:22 +01:00
modal _showaccountname : "Show Name" ,
2021-06-01 17:25:52 +02:00
modal _showservernick : "Show Nickname" ,
2020-12-21 19:56:36 +01:00
modal _tabheader1 : "User" ,
modal _tabheader2 : "Name Color" ,
modal _tabheader3 : "Tag Color" ,
modal _useravatar : "Avatar" ,
modal _username : "Local Username" ,
modal _userolecolor : "Do not overwrite the Role Color" ,
modal _usertag : "Tag" ,
2021-04-23 12:01:44 +02:00
modal _useservernick : "Do not overwrite Nicknames" ,
2020-12-21 19:56:36 +01:00
submenu _resetsettings : "Reset User" ,
submenu _usersettings : "Change Settings"
2020-09-19 20:49:33 +02:00
} ;
}
}
} ;
2022-09-01 14:40:11 +02:00
} ) ( window . BDFDB _Global . PluginUtils . buildPlugin ( changeLog ) ) ;
2020-12-15 17:49:29 +01:00
} ) ( ) ;