Move document name to new column

This commit is contained in:
J. Ryan Stinnett 2019-09-27 17:57:10 +01:00
parent 701ec259e6
commit d80a2df979
2 changed files with 4 additions and 8 deletions

View file

@ -40,6 +40,7 @@ limitations under the License.
} }
.mx_TermsDialog_link { .mx_TermsDialog_link {
display: inline-block;
mask-image: url('$(res)/img/external-link.svg'); mask-image: url('$(res)/img/external-link.svg');
background-color: $accent-color; background-color: $accent-color;
width: 10px; width: 10px;

View file

@ -90,21 +90,17 @@ export default class TermsDialog extends React.PureComponent {
} }
} }
_summaryForServiceType(serviceType, docName) { _summaryForServiceType(serviceType) {
switch (serviceType) { switch (serviceType) {
case Matrix.SERVICE_TYPES.IS: case Matrix.SERVICE_TYPES.IS:
return <div> return <div>
{_t("Find others by phone or email")} {_t("Find others by phone or email")}
<br /> <br />
{_t("Be found by phone or email")} {_t("Be found by phone or email")}
{docName !== null ? <br /> : ''}
{docName !== null ? '('+docName+')' : ''}
</div>; </div>;
case Matrix.SERVICE_TYPES.IM: case Matrix.SERVICE_TYPES.IM:
return <div> return <div>
{_t("Use bots, bridges, widgets and sticker packs")} {_t("Use bots, bridges, widgets and sticker packs")}
{docName !== null ? <br /> : ''}
{docName !== null ? '('+docName+')' : ''}
</div>; </div>;
} }
} }
@ -133,14 +129,13 @@ export default class TermsDialog extends React.PureComponent {
} }
const summary = this._summaryForServiceType( const summary = this._summaryForServiceType(
policiesAndService.service.serviceType, policiesAndService.service.serviceType,
policyValues.length > 1 ? termDoc[termsLang].name : null,
); );
rows.push(<tr key={termDoc[termsLang].url}> rows.push(<tr key={termDoc[termsLang].url}>
<td className="mx_TermsDialog_service">{serviceName}</td> <td className="mx_TermsDialog_service">{serviceName}</td>
<td className="mx_TermsDialog_summary">{summary}</td> <td className="mx_TermsDialog_summary">{summary}</td>
<td><a rel="noopener" target="_blank" href={termDoc[termsLang].url}> <td>{termDoc[termsLang].name} <a rel="noopener" target="_blank" href={termDoc[termsLang].url}>
<div className="mx_TermsDialog_link" /> <span className="mx_TermsDialog_link" />
</a></td> </a></td>
<td><TermsCheckbox <td><TermsCheckbox
url={termDoc[termsLang].url} url={termDoc[termsLang].url}