import {settingsCookie} from "../0globals"; import BDV2 from "../modules/v2"; import Utils from "../modules/utils"; import DOM from "../modules/domtools"; import XSvg from "./xSvg"; import ReloadIcon from "./reloadIcon"; import EditIcon from "./icons/edit"; import DeleteIcon from "./icons/delete"; import Switch from "./components/switch"; import TooltipWrap from "./tooltipWrap"; import V2C_SettingsTitle from "./settingsTitle"; import V2C_SettingsGroup from "./settingsGroup"; const React = BDV2.React; const anchorClasses = BDV2.anchorClasses; export default class V2C_PresenceSettings extends BDV2.reactComponent { constructor(props) { super(props); console.log(props) } updatePreview(data){ this.setState({ data }) } render() { let contentModule = BDModules.get(e => e.contentColumn)[0] return (
{/** options */} {RPCProps.map(e => { return })}
{/** preview */}
) } } class PresenceSettingRow extends BDV2.reactComponent { render(){ let setting = this.props.setting let rowModule = BDModules.get(e => e.removeKeybind)[0] let marginModule = BDModules.get(e => e.marginBottom20)[0] let marginModule2 = BDModules.get(e => e.defaultMarginh5)[0] let colorModule = BDModules.get(e => e.colorStandard)[0] let sizeModule = BDModules.get(e => e.size32)[0] return (
{setting.title}
) } } class RpcPreview extends BDV2.reactComponent { constructor(props = {}){ super(props) this.state = { active: "profile" } this.tabs = [] } changeTab(tab){ let ancientTab = this.state.active if(ancientTab === tab.props.id)return this.tabs.forEach(e => { e.setActive(false) }) this.setState({ active: tab.id }) } render(){ return (
) } isActive(tab){ return this.state.active === tab } /** * * @param {string} tmplate * @param {any} data */ renderTemplate(tmplate, data){ Object.keys(data).forEach(k => { tmplate.replace(new RegExp("{{"+k+"}}", "g"), data[k]) }) return tmplate } } class Tab extends BDV2.reactComponent { constructor(props){ super(props) this.state = { active: props.preview.isActive(props.id) } props.preview.tabs.push(this) } setActive(isActive){ this.setState({ active: !!isActive }) } render(){ let className = `lc-navItem` if(this.state.active){ className += ` lc-navItemActive` }else{ className += ` lc-navItemInactive` } return (
{ this.props.onClick(this) this.setActive(true) }}> {this.props.title}
) } } class Status extends BDV2.reactComponent { render(){ let status = BDModules.get(e => e.default && e.default.getPresence)[0].default.getPresence().status if(status === "invisible")status = "offline" let className = "pointerEvents-2zdfdO da-pointerEvents" return } } class Profile extends BDV2.ReactComponent { render(){ let user = BDModules.get(e => e.default && e.default.getCurrentUser)[0].default.getCurrentUser() let avatarURL = user.getAvatarURL(user.avatar.startsWith("a_") ? "gif" : "png") let [ flexModule1, stylingModule1, rootModule1, avatarModule1, nameTagModule1 ] = [ BDModules.get(e => e.flex && e._horizontal)[0], BDModules.get(e => e.vertical && e.alignStretch)[0], BDModules.get(e => e.topSectionStreaming)[0], BDModules.get(e => e.pointerEvents)[0], BDModules.get(e => e.bot)[0] ] return [
{user.username} #{user.discriminator}

En train de jouer

Deroku Vanity

Lightcord test
gay comme phorcys
50 min 24 s écoulées
Note
Logo Twitter
jen_wina
,
] } } class Badges extends BDV2.reactComponent { render(){ let user = BDModules.get(e => e.default && e.default.getCurrentUser)[0].default.getCurrentUser() let rootModule = BDModules.get(e => e.topSectionStreaming)[0] let UserFlags = BDModules.get(e => e.UserFlags)[0].UserFlags let badges = [] let serialized = [] for(let flagName in UserFlags){ if(user.hasFlag(UserFlags[flagName]))serialized.push(flagName) } for(let flagName of serialized){ let searchable = `profileBadge${flagName.toLowerCase().replace(/_/g, " ").split(" ").map(e => e[0].toUpperCase()+e.slice(1)).join("")}` searchable = searchable.replace("HypesquadOnline", "HypeSquadOnline") console.log(searchable, rootModule[searchable]) if(!rootModule[searchable])continue badges.push() } if(user.hasPremiumSubscription){ badges.push() } return badges } } class Badge extends BDV2.reactComponent { render(){ let rootModule1 = BDModules.get(e => e.topSectionStreaming)[0] return (
) } } const RPCProps = [ { title: "State", id: "state", default: "Browsing Discord", type: "text" }, { title: "Details", id: "details", default: "Lightcord", type: "text" } ] const Constants = { PresenceViewer: { USER_ACTIVITY_HEADER_WATCHING: "Watching {name}", USER_ACTIVITY_HEADER_PLAYING: "Playing a game", USER_ACTIVITY_STATE_SIZE: "({count} of {max})", USER_ACTIVITY_TIMESTAMP_END: "{hours, plural, =-1 {} other {{hours}:}}{minutes, plural, =-1 {} other {{minutes}:}}{seconds, plural, =-1 {} other {{seconds}}} left", USER_ACTIVITY_TIMESTAMP_START: "{hours, plural, =-1 {} other {{hours}:}}{minutes, plural, =-1 {} other {{minutes}:}}{seconds, plural, =-1 {} other {{seconds}}} elapsed", USER_ACTIVITY_ACTION_NOTIFY_ME: "Notify Me", USER_ACTIVITY_ACTION_ASK_TO_JOIN: "Ask to Join", USER_ACTIVITY_ACTION_SPECTATE: "Spectate", SECTION_TITLE: "Rich Presence Visualizer", SECTION_MORE_INFO: "Rich Presence lets your game surface exciting game data on your players' profiles, and lets them play together with chat invites, Ask to Join, and Spectate. See exactly how your text and art will look on a user's profile.", PROFILE: "Full Profile", USER_POPOUT: "User Popout", ACTIVITY_FEED: "Games Tab", NONE: "None", SHOW_CODE: "Show Code", MOBILE_ALERT: "Rich Presence Visualizer only available on desktop", PARTY_ID_MUST_BE_UNIQUE: "Party ID can't match Join or Spectate Secrets.", SECRETS_MUST_BE_UNIQUE: "Join and Spectate Secrets must be unique strings." }, Tooltips: { STATE: "[type: char*]\nThe user's current party status", DETAILS: "[type: char*]\nWhat the player is currently doing", START_TIMESTAMP: '[type: int64_t]\nEpoch seconds for game start - including will show time as "elapsed"', END_TIMESTAMP: '[type: int64_t]\nEpoch seconds for game end - including will show time as "remaining"\t', LARGE_IMAGE_KEY: "[type: char*]\nKey of the uploaded image for the large profile artwork", LARGE_IMAGE_TEXT: "[type: char*]\nTooltip for the largeImageKey", SMALL_IMAGE_KEY: "[type: char*]\nKey of the uploaded image for the small profile artwork", SMALL_IMAGE_TEXT: "[type: char*]\nTooltip for the smallImageKey", PARTY_ID: "[type: char*]\nId of the player's party, lobby, or group", PARTY_SIZE: "[type: int]\nCurrent size of the player's party, lobby, or group", PARTY_MAX: "[type: int]\nMaximum size of the player's party, lobby, or group\t", SPECTATE_SECRET: "[type: char*]\nUnique hashed string for Spectate button", JOIN_SECRET: "[type: char*]\nUnique hashed string for chat invitations and Ask to Join" }, UserProfile: { USER_INFO: "User Info", MUTUAL_SERVERS: "Mutual Servers", MUTUAL_FRIENDS: "Mutual Friends", NOTE: "Note", ADD_NOTE: "Click to add note" } }