From 02e1a28e899e6adfe9fb55cfe3ff2702a747fd4f Mon Sep 17 00:00:00 2001 From: or-else Date: Sun, 9 May 2021 14:12:46 -0700 Subject: [PATCH] rename vcard to theCard --- src/lib/utils.js | 4 ++-- src/views/acc-general-view.jsx | 6 +++--- src/views/create-account-view.jsx | 4 ++-- src/views/info-view.jsx | 6 +++--- src/views/new-topic-view.jsx | 4 ++-- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/lib/utils.js b/src/lib/utils.js index c0c54d31..d0c28532 100644 --- a/src/lib/utils.js +++ b/src/lib/utils.js @@ -19,8 +19,8 @@ export function updateFavicon(count) { document.title = (count > 0 ? '('+count+') ' : '') + 'Tinode'; } -// Create VCard which represents topic 'public' info -export function vcard(fn, imageDataUrl) { +// Create theCard which represents topic 'public' info. +export function theCard(fn, imageDataUrl) { let card = null; if ((fn && fn.trim()) || imageDataUrl) { diff --git a/src/views/acc-general-view.jsx b/src/views/acc-general-view.jsx index 302aafc6..45d97b71 100644 --- a/src/views/acc-general-view.jsx +++ b/src/views/acc-general-view.jsx @@ -10,7 +10,7 @@ import TagManager from '../widgets/tag-manager.jsx'; import { MAX_TITLE_LENGTH } from '../config.js'; import { makeImageUrl } from '../lib/blob-helpers.js'; -import { arrayEqual, asEmail, asPhone, vcard } from '../lib/utils.js'; +import { arrayEqual, asEmail, asPhone, theCard } from '../lib/utils.js'; export default class AccGeneralView extends React.Component { constructor(props) { @@ -62,13 +62,13 @@ export default class AccGeneralView extends React.Component { fn = fn.trim().substring(0, MAX_TITLE_LENGTH); if (fn) { this.setState({fullName: fn}); - this.props.onUpdateAccount(undefined, vcard(fn, null)); + this.props.onUpdateAccount(undefined, theCard(fn, null)); } } handleImageChanged(img) { this.setState({avatar: img}); - this.props.onUpdateAccount(undefined, vcard(null, img || Tinode.DEL_CHAR)); + this.props.onUpdateAccount(undefined, theCard(null, img || Tinode.DEL_CHAR)); } handleCredChange(e) { diff --git a/src/views/create-account-view.jsx b/src/views/create-account-view.jsx index 183b4779..77ffe135 100644 --- a/src/views/create-account-view.jsx +++ b/src/views/create-account-view.jsx @@ -7,7 +7,7 @@ import CheckBox from '../widgets/checkbox.jsx'; import VisiblePassword from '../widgets/visible-password.jsx'; import LocalStorageUtil from '../lib/local-storage.js'; -import { vcard } from '../lib/utils.js'; +import { theCard } from '../lib/utils.js'; import { MAX_TITLE_LENGTH } from '../config.js'; @@ -65,7 +65,7 @@ export default class CreateAccountView extends React.PureComponent { this.props.onCreateAccount( this.state.login.trim(), this.state.password.trim(), - vcard(this.state.fn.trim().substring(0, MAX_TITLE_LENGTH), this.state.imageDataUrl), + theCard(this.state.fn.trim().substring(0, MAX_TITLE_LENGTH), this.state.imageDataUrl), {'meth': 'email', 'val': this.state.email}); } diff --git a/src/views/info-view.jsx b/src/views/info-view.jsx index 97df1bc2..920ed791 100644 --- a/src/views/info-view.jsx +++ b/src/views/info-view.jsx @@ -18,7 +18,7 @@ import TagManager from '../widgets/tag-manager.jsx'; import { MAX_TITLE_LENGTH, NO_ACCESS_MODE } from '../config.js'; import { makeImageUrl } from '../lib/blob-helpers.js'; -import { arrayEqual, vcard } from '../lib/utils.js'; +import { arrayEqual, theCard } from '../lib/utils.js'; const messages = defineMessages({ requested: { @@ -282,7 +282,7 @@ class InfoView extends React.Component { fn = fn.trim().substring(0, MAX_TITLE_LENGTH); if (this.state.fullName !== fn) { this.setState({fullName: fn}); - this.props.onTopicDescUpdate(this.props.topic, vcard(fn, null), null); + this.props.onTopicDescUpdate(this.props.topic, theCard(fn, null), null); } } @@ -296,7 +296,7 @@ class InfoView extends React.Component { handleImageChanged(img) { this.setState({avatar: img}); - this.props.onTopicDescUpdate(this.props.topic, vcard(null, img || Tinode.DEL_CHAR), null); + this.props.onTopicDescUpdate(this.props.topic, theCard(null, img || Tinode.DEL_CHAR), null); } handleMuted(ignored, checked) { diff --git a/src/views/new-topic-view.jsx b/src/views/new-topic-view.jsx index 09e6222d..2cf6c843 100644 --- a/src/views/new-topic-view.jsx +++ b/src/views/new-topic-view.jsx @@ -10,7 +10,7 @@ import NewTopicGroup from '../widgets/new-topic-group.jsx'; import SearchContacts from '../widgets/search-contacts.jsx'; import HashNavigation from '../lib/navigation.js'; -import { vcard } from '../lib/utils.js'; +import { theCard } from '../lib/utils.js'; const messages = defineMessages({ search_for_contacts: { @@ -65,7 +65,7 @@ class NewTopicView extends React.Component { handleNewGroupSubmit(name, dataUrl, priv, tags, isChannel) { HashNavigation.navigateTo(HashNavigation.removeUrlParam(window.location.hash, 'tab')); - this.props.onCreateTopic(undefined, vcard(name, dataUrl), priv, tags, isChannel); + this.props.onCreateTopic(undefined, theCard(name, dataUrl), priv, tags, isChannel); } handleGroupByID(topicName) {