diff --git a/pkg/interface/src/apps/chat/components/settings.js b/pkg/interface/src/apps/chat/components/settings.js index 6109cff9b..5471d42e8 100644 --- a/pkg/interface/src/apps/chat/components/settings.js +++ b/pkg/interface/src/apps/chat/components/settings.js @@ -6,6 +6,7 @@ import { Spinner } from '../../../components/Spinner'; import { ChatTabBar } from './lib/chat-tabbar'; import { InviteSearch } from '../../../components/InviteSearch'; import SidebarSwitcher from '../../../components/SidebarSwitch'; +import Toggle from '../../../components/toggle'; export class SettingsScreen extends Component { constructor(props) { @@ -195,18 +196,12 @@ export class SettingsScreen extends Component { } else { let inclusiveToggle =
; if (state.targetGroup) { - // TODO toggle component into /lib - const inclusiveClasses = state.inclusive - ? 'relative checked bg-green2 br3 h1 toggle v-mid z-0' - : 'relative bg-gray4 bg-gray1-d br3 h1 toggle v-mid z-0'; inclusiveToggle = (Delete Group
++ If private, members must be invited +
+Delete Group
Permanently delete this group. All current members will no longer see this group.
diff --git a/pkg/interface/src/apps/groups/components/new.tsx b/pkg/interface/src/apps/groups/components/new.tsx index b930072aa..d36c16d38 100644 --- a/pkg/interface/src/apps/groups/components/new.tsx +++ b/pkg/interface/src/apps/groups/components/new.tsx @@ -3,6 +3,7 @@ import React, { Component } from 'react'; import { Link } from 'react-router-dom'; import { InviteSearch, Invites } from '../../../components/InviteSearch'; import { Spinner } from '../../../components/Spinner'; +import { Toggle } from '../../../components/toggle'; import { RouteComponentProps } from 'react-router-dom'; import { Groups, GroupPolicy, Resource } from '../../../types/group-update'; import { Contacts, Rolodex } from '../../../types/contact-update'; @@ -129,9 +130,6 @@ export class NewScreen extends Componentdiff --git a/pkg/interface/src/apps/publish/components/lib/settings.js b/pkg/interface/src/apps/publish/components/lib/settings.js index ebd46c627..fa13197e5 100644 --- a/pkg/interface/src/apps/publish/components/lib/settings.js +++ b/pkg/interface/src/apps/publish/components/lib/settings.js @@ -1,7 +1,7 @@ import React, { Component } from 'react'; -import { writeText } from '../../../../lib/util'; import { Spinner } from '../../../../components/Spinner'; import { InviteSearch } from '../../../../components/InviteSearch'; +import Toggle from '../../../../components/toggle'; export class Settings extends Component { constructor(props) { @@ -133,22 +133,16 @@ export class Settings extends Component { // don't give the option to make inclusive if we don't own the target // group const targetOwned = (state.targetGroup) - ? state.targetGroup.slice(0, window.ship.length+3) === `/~${window.ship}/` + ? Boolean(state.targetGroup.includes(`/~${window.ship}/`)) : false; let inclusiveToggle =
; if (targetOwned) { - // TODO toggle component into /lib - const inclusiveClasses = state.inclusive - ? 'relative checked bg-green2 br3 h1 toggle v-mid z-0' - : 'relative bg-gray4 bg-gray1-d br3 h1 toggle v-mid z-0'; inclusiveToggle = (@@ -293,7 +281,7 @@ export class Settings extends Component {