mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-15 10:02:47 +03:00
parent
241233cca3
commit
6f8ff9c2a1
@ -52,7 +52,7 @@ export class NewDmScreen extends Component {
|
|||||||
|
|
||||||
titleChange(event) {
|
titleChange(event) {
|
||||||
const asciiSafe = event.target.value.toLowerCase()
|
const asciiSafe = event.target.value.toLowerCase()
|
||||||
.replace(/[^a-z0-9~_.-]/g, '-');
|
.replace(/[^a-z0-9_-]/g, '-');
|
||||||
this.setState({
|
this.setState({
|
||||||
idName: asciiSafe,
|
idName: asciiSafe,
|
||||||
title: event.target.value
|
title: event.target.value
|
||||||
|
@ -38,7 +38,7 @@ export class NewScreen extends Component {
|
|||||||
|
|
||||||
titleChange(event) {
|
titleChange(event) {
|
||||||
const asciiSafe = event.target.value.toLowerCase()
|
const asciiSafe = event.target.value.toLowerCase()
|
||||||
.replace(/[^a-z0-9~_.-]/g, '-');
|
.replace(/[^a-z0-9_-]/g, '-');
|
||||||
this.setState({
|
this.setState({
|
||||||
idName: asciiSafe,
|
idName: asciiSafe,
|
||||||
title: event.target.value
|
title: event.target.value
|
||||||
|
@ -6,10 +6,10 @@ import { Spinner } from '~/views/components/Spinner';
|
|||||||
import { Toggle } from '~/views/components/toggle';
|
import { Toggle } from '~/views/components/toggle';
|
||||||
import { RouteComponentProps } from 'react-router-dom';
|
import { RouteComponentProps } from 'react-router-dom';
|
||||||
|
|
||||||
import { Groups, GroupPolicy, Resource } from '~/types/group-update';
|
import { Groups, GroupPolicy } from '~/types/group-update';
|
||||||
import { Contacts, Rolodex } from '~/types/contact-update';
|
import { Rolodex } from '~/types/contact-update';
|
||||||
import GlobalApi from '~/logic/api/global';
|
import GlobalApi from '~/logic/api/global';
|
||||||
import { Patp, PatpNoSig, Enc } from '~/types/noun';
|
import { Enc } from '~/types/noun';
|
||||||
|
|
||||||
type NewScreenProps = Pick<RouteComponentProps, 'history'> & {
|
type NewScreenProps = Pick<RouteComponentProps, 'history'> & {
|
||||||
groups: Groups;
|
groups: Groups;
|
||||||
@ -20,7 +20,6 @@ type NewScreenProps = Pick<RouteComponentProps, 'history'> & {
|
|||||||
type TextChange = React.ChangeEvent<HTMLTextAreaElement | HTMLInputElement>;
|
type TextChange = React.ChangeEvent<HTMLTextAreaElement | HTMLInputElement>;
|
||||||
type BooleanChange = React.ChangeEvent<HTMLInputElement>;
|
type BooleanChange = React.ChangeEvent<HTMLInputElement>;
|
||||||
|
|
||||||
|
|
||||||
interface NewScreenState {
|
interface NewScreenState {
|
||||||
groupName: string;
|
groupName: string;
|
||||||
title: string;
|
title: string;
|
||||||
@ -55,7 +54,7 @@ export class NewScreen extends Component<NewScreenProps, NewScreenState> {
|
|||||||
groupNameChange(event: TextChange) {
|
groupNameChange(event: TextChange) {
|
||||||
const asciiSafe = event.target.value
|
const asciiSafe = event.target.value
|
||||||
.toLowerCase()
|
.toLowerCase()
|
||||||
.replace(/[^a-z0-9~_.-]/g, '-');
|
.replace(/[^a-z0-9_-]/g, '-');
|
||||||
this.setState({
|
this.setState({
|
||||||
groupName: asciiSafe,
|
groupName: asciiSafe,
|
||||||
title: event.target.value,
|
title: event.target.value,
|
||||||
|
Loading…
Reference in New Issue
Block a user