Browse Source

Convert Vector skin react components to Typescript

pull/17061/head
Michael Telatynski 1 year ago
parent
commit
a8429f3e1d
  1. 2
      src/components/structures/VectorEmbeddedPage.tsx
  2. 0
      src/components/views/auth/VectorAuthFooter.tsx
  3. 5
      src/components/views/auth/VectorAuthHeaderLogo.tsx
  4. 8
      src/components/views/auth/VectorAuthPage.tsx

2
src/components/structures/VectorEmbeddedPage.js → src/components/structures/VectorEmbeddedPage.tsx

@ -24,7 +24,7 @@ export default class VectorEmbeddedPage extends EmbeddedPage {
static replaces = 'EmbeddedPage';
// we're overriding the base component here, for Element-specific tweaks
translate(s) {
translate(s: string) {
s = sanitizeHtml(_t(s));
// ugly fix for https://github.com/vector-im/element-web/issues/4243
// eslint-disable-next-line max-len

0
src/components/views/auth/VectorAuthFooter.js → src/components/views/auth/VectorAuthFooter.tsx

5
src/components/views/auth/VectorAuthHeaderLogo.js → src/components/views/auth/VectorAuthHeaderLogo.tsx

@ -16,16 +16,11 @@ limitations under the License.
*/
import React from 'react';
import PropTypes from 'prop-types';
import SdkConfig from 'matrix-react-sdk/src/SdkConfig';
export default class VectorAuthHeaderLogo extends React.PureComponent {
static replaces = 'AuthHeaderLogo'
static propTypes = {
icon: PropTypes.string,
}
render() {
const brandingConfig = SdkConfig.get().branding;
let logoUrl = "themes/element/img/logos/element-logo.svg";

8
src/components/views/auth/VectorAuthPage.js → src/components/views/auth/VectorAuthPage.tsx

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
import React from 'react';
import React, { CSSProperties } from 'react';
import * as sdk from 'matrix-react-sdk/src/index';
import SdkConfig from 'matrix-react-sdk/src/SdkConfig';
@ -48,12 +48,12 @@ export default class VectorAuthPage extends React.PureComponent {
background: `center/cover fixed url(${VectorAuthPage.getWelcomeBackgroundUrl()})`,
};
const modalStyle = {
const modalStyle: CSSProperties = {
position: 'relative',
background: 'initial',
};
const blurStyle = {
const blurStyle: CSSProperties = {
position: 'absolute',
top: 0,
right: 0,
@ -63,7 +63,7 @@ export default class VectorAuthPage extends React.PureComponent {
background: pageStyle.background,
};
const modalContentStyle = {
const modalContentStyle: CSSProperties = {
display: 'flex',
zIndex: 1,
background: 'rgba(255, 255, 255, 0.59)',
Loading…
Cancel
Save