mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-11-11 04:48:00 +03:00
interface: remove leading sig checks for groups
Some sig checks have been left in as contacts still uses this paradigm
This commit is contained in:
parent
76bc3d82e1
commit
08173cfc49
@ -80,7 +80,7 @@ export default class ChatApp extends React.Component<ChatAppProps, {}> {
|
||||
return e[0];
|
||||
})
|
||||
.includes(associations.chat?.[stat]?.['group-path']) ||
|
||||
associations.chat?.[stat]?.['group-path'].startsWith('/~/'))
|
||||
props.groups[associations.chat?.[stat]?.['group-path']]?.hidden)
|
||||
) {
|
||||
totalUnreads += unread;
|
||||
}
|
||||
@ -203,7 +203,6 @@ export default class ChatApp extends React.Component<ChatAppProps, {}> {
|
||||
path="/~chat/join/:ship?/:station?"
|
||||
render={(props) => {
|
||||
let station = `/${props.match.params.ship}/${props.match.params.station}`;
|
||||
const sig = props.match.url.includes('/~/');
|
||||
|
||||
return (
|
||||
<Skeleton
|
||||
@ -229,10 +228,6 @@ export default class ChatApp extends React.Component<ChatAppProps, {}> {
|
||||
path="/~chat/(popout)?/room/(~)?/:ship/:station+"
|
||||
render={(props) => {
|
||||
let station = `/${props.match.params.ship}/${props.match.params.station}`;
|
||||
const sig = props.match.url.includes('/~/');
|
||||
if (sig) {
|
||||
station = '/~' + station;
|
||||
}
|
||||
const mailbox = inbox[station] || {
|
||||
config: {
|
||||
read: 0,
|
||||
@ -333,11 +328,6 @@ export default class ChatApp extends React.Component<ChatAppProps, {}> {
|
||||
path="/~chat/(popout)?/settings/(~)?/:ship/:station+"
|
||||
render={(props) => {
|
||||
let station = `/${props.match.params.ship}/${props.match.params.station}`;
|
||||
const sig = props.match.url.includes('/~/');
|
||||
if (sig) {
|
||||
station = '/~' + station;
|
||||
}
|
||||
|
||||
const popout = props.match.url.includes('/popout/');
|
||||
|
||||
const association =
|
||||
|
@ -205,6 +205,7 @@ export class Message extends Component {
|
||||
contact={contact}
|
||||
color={color}
|
||||
sigilClass={sigilClass}
|
||||
association={props.association}
|
||||
group={props.group}
|
||||
className="fl pr3 v-top bg-white bg-gray0-d"
|
||||
/>
|
||||
|
@ -86,6 +86,7 @@ export class OverlaySigil extends Component {
|
||||
color={props.color}
|
||||
topSpace={state.topSpace}
|
||||
bottomSpace={state.bottomSpace}
|
||||
association={props.association}
|
||||
group={props.group}
|
||||
onDismiss={this.profileHide}
|
||||
/>
|
||||
|
@ -34,7 +34,7 @@ export class ProfileOverlay extends Component {
|
||||
}
|
||||
|
||||
render() {
|
||||
const { contact, ship, color, topSpace, bottomSpace, group } = this.props;
|
||||
const { contact, ship, color, topSpace, bottomSpace, group, association } = this.props;
|
||||
|
||||
let top, bottom;
|
||||
if (topSpace < OVERLAY_HEIGHT / 2) {
|
||||
@ -50,9 +50,9 @@ export class ProfileOverlay extends Component {
|
||||
|
||||
const isOwn = window.ship === ship;
|
||||
|
||||
const identityHref = group['group-path'].startsWith('/~/')
|
||||
const identityHref = group.hidden
|
||||
? '/~groups/me'
|
||||
: `/~groups/view${group['group-path']}/${window.ship}`;
|
||||
: `/~groups/view${association['group-path']}/${window.ship}`;
|
||||
|
||||
const img = (contact && (contact.avatar !== null))
|
||||
? <img src={contact.avatar} height={160} width={160} className="brt2 dib" />
|
||||
|
@ -5,7 +5,6 @@ import { Link } from 'react-router-dom';
|
||||
import { LoadingScreen } from './loading';
|
||||
import { LinksTabBar } from './lib/links-tabbar';
|
||||
import { MemberElement } from './lib/member-element';
|
||||
import { InviteElement } from './lib/invite-element';
|
||||
import { SidebarSwitcher } from '../../../components/SidebarSwitch';
|
||||
import { makeRoutePath } from '../../../lib/util';
|
||||
import { GroupView } from '../../../components/Group';
|
||||
@ -18,25 +17,6 @@ export class MemberScreen extends Component {
|
||||
return <LoadingScreen />;
|
||||
}
|
||||
|
||||
const isManaged = '/~/' !== props.groupPath.slice(0, 3);
|
||||
|
||||
const members = Array.from(props.group).map((mem) => {
|
||||
const contact =
|
||||
mem in props.contactDetails ? props.contactDetails[mem] : false;
|
||||
|
||||
return (
|
||||
<MemberElement
|
||||
key={mem}
|
||||
amOwner={props.amOwner}
|
||||
contact={contact}
|
||||
ship={mem}
|
||||
groupPath={props.groupPath}
|
||||
resourcePath={props.resourcePath}
|
||||
api={props.api}
|
||||
/>
|
||||
);
|
||||
});
|
||||
|
||||
return (
|
||||
<div className='h-100 w-100 overflow-x-hidden flex flex-column white-d'>
|
||||
<div
|
||||
|
Loading…
Reference in New Issue
Block a user