mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-15 20:54:59 +08:00
d3f9a3aeb5
Fixing 1000s of lint issues. Some rules cannot be `--fix`ed but this goes some way to linting the entire codebase.
37 lines
1.3 KiB
JavaScript
37 lines
1.3 KiB
JavaScript
/*
|
|
* skinned-sdk.js
|
|
*
|
|
* Skins the react-sdk with a few stub components which we expect the
|
|
* application to provide
|
|
*/
|
|
|
|
/* this is a convenient place to ensure we load the compatibility libraries we expect our
|
|
* app to provide
|
|
*/
|
|
|
|
// for ES6 stuff like startsWith() and Object.values() that babel doesn't do by
|
|
// default
|
|
require('babel-polyfill');
|
|
|
|
const sdk = require("../src/index");
|
|
|
|
const skin = require('../src/component-index.js');
|
|
const stubComponent = require('./components/stub-component.js');
|
|
|
|
const components = skin.components;
|
|
components['structures.LeftPanel'] = stubComponent();
|
|
components['structures.RightPanel'] = stubComponent();
|
|
components['structures.RoomDirectory'] = stubComponent();
|
|
components['views.globals.MatrixToolbar'] = stubComponent();
|
|
components['views.globals.GuestWarningBar'] = stubComponent();
|
|
components['views.globals.NewVersionBar'] = stubComponent();
|
|
components['views.elements.Spinner'] = stubComponent({displayName: 'Spinner'});
|
|
components['views.messages.DateSeparator'] = stubComponent({displayName: 'DateSeparator'});
|
|
components['views.messages.MessageTimestamp'] = stubComponent({displayName: 'MessageTimestamp'});
|
|
components['views.messages.SenderProfile'] = stubComponent({displayName: 'SenderProfile'});
|
|
components['views.rooms.SearchBar'] = stubComponent();
|
|
|
|
sdk.loadSkin(skin);
|
|
|
|
module.exports = sdk;
|