Browse Source

Start moving back to basing off react sdk: move vector out of examples dir

pull/190/head
David Baker 7 years ago
parent
commit
980c71076e
  1. 40
      examples/custom/CustomMTextTile.js
  2. 4
      examples/custom/README.md
  3. 12
      examples/custom/index.html
  4. 40
      examples/custom/index.js
  5. 29
      examples/custom/package.json
  6. 0
      vector/README.md
  7. 0
      vector/fonts
  8. 0
      vector/icons/android-chrome-144x144.png
  9. 0
      vector/icons/android-chrome-192x192.png
  10. 0
      vector/icons/android-chrome-36x36.png
  11. 0
      vector/icons/android-chrome-48x48.png
  12. 0
      vector/icons/android-chrome-72x72.png
  13. 0
      vector/icons/android-chrome-96x96.png
  14. 0
      vector/icons/apple-touch-icon-114x114.png
  15. 0
      vector/icons/apple-touch-icon-120x120.png
  16. 0
      vector/icons/apple-touch-icon-144x144.png
  17. 0
      vector/icons/apple-touch-icon-152x152.png
  18. 0
      vector/icons/apple-touch-icon-180x180.png
  19. 0
      vector/icons/apple-touch-icon-57x57.png
  20. 0
      vector/icons/apple-touch-icon-60x60.png
  21. 0
      vector/icons/apple-touch-icon-72x72.png
  22. 0
      vector/icons/apple-touch-icon-76x76.png
  23. 0
      vector/icons/apple-touch-icon-precomposed.png
  24. 0
      vector/icons/apple-touch-icon.png
  25. 0
      vector/icons/browserconfig.xml
  26. 0
      vector/icons/favicon-16x16.png
  27. 0
      vector/icons/favicon-32x32.png
  28. 0
      vector/icons/favicon-96x96.png
  29. 0
      vector/icons/favicon.ico
  30. 0
      vector/icons/manifest.json
  31. 0
      vector/icons/mstile-144x144.png
  32. 0
      vector/icons/mstile-150x150.png
  33. 0
      vector/icons/mstile-310x150.png
  34. 0
      vector/icons/mstile-310x310.png
  35. 0
      vector/icons/mstile-70x70.png
  36. 0
      vector/img
  37. 0
      vector/index.html
  38. 0
      vector/index.js
  39. 0
      vector/media/busy.mp3
  40. 0
      vector/media/busy.ogg
  41. 0
      vector/media/callend.mp3
  42. 0
      vector/media/callend.ogg
  43. 0
      vector/media/message.mp3
  44. 0
      vector/media/message.ogg
  45. 0
      vector/media/ring.mp3
  46. 0
      vector/media/ring.ogg
  47. 0
      vector/media/ringback.mp3
  48. 0
      vector/media/ringback.ogg
  49. 0
      vector/package.json

40
examples/custom/CustomMTextTile.js

@ -1,40 +0,0 @@
/*
Copyright 2015 OpenMarket Ltd
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
'use strict';
var React = require('react');
var MTextTileController = require("matrix-react-sdk/src/controllers/molecules/MTextTile");
module.exports = React.createClass({
displayName: 'MTextTile',
mixins: [MTextTileController],
render: function() {
var content = this.props.mxEvent.getContent();
return (
<span ref="content" className="mx_MTextTile mx_MessageTile_content" onClick={this.onClick}>
{content.body}
</span>
);
},
onClick: function(ev) {
global.alert(this.props.mxEvent.getContent().body);
}
});

4
examples/custom/README.md

@ -1,4 +0,0 @@
matrix-react-example
====================
An example of how to use the Matrix React SDK to build a more customised app

12
examples/custom/index.html

@ -1,12 +0,0 @@
<!doctype html>
<html lang="en" style="height: 100%; overflow: hidden">
<head>
<meta charset="utf-8">
<title>Matrix React SDK Custom Example</title>
</head>
<body style="height: 100%; ">
<section id="matrixchat" style="height: 100%; "></section>
<script src="bundle.js"></script>
<link rel="stylesheet" href="node_modules/matrix-react-sdk/bundle.css">
</body>
</html>

40
examples/custom/index.js

@ -1,40 +0,0 @@
/*
Copyright 2015 OpenMarket Ltd
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
'use strict';
// Remember to make your project depend on react directly as soon as
// you add a require('react') to any file in your project. Do not rely
// on react being pulled in via matrix-react-sdk: browserify breaks
// horribly in this situation and can end up pulling in multiple copies
// of react.
var React = require("react");
// We pull in the component broker first, separately, as we need to replace
// components before the SDK loads.
var ComponentBroker = require("matrix-react-sdk/src/ComponentBroker");
var CustomMTextTile = require('./CustomMTextTile');
ComponentBroker.set('molecules/MTextTile', CustomMTextTile);
var MatrixReactSdk = require("matrix-react-sdk");
//var MatrixReactSdk = require("../../src/index");
React.render(
<MatrixReactSdk.MatrixChat />,
document.getElementById('matrixchat')
);

29
examples/custom/package.json

@ -1,29 +0,0 @@
{
"name": "matrix-react-example",
"version": "0.0.1",
"description": "Example usage of matrix-react-sdk",
"author": "matrix.org",
"repository": {
"type": "git",
"url": "https://github.com/matrix-org/matrix-react-sdk"
},
"license": "Apache-2.0",
"devDependencies": {
"browserify": "^10.2.3",
"envify": "^3.4.0",
"http-server": "^0.8.0",
"matrix-react-sdk": "../../",
"npm-css": "^0.2.3",
"parallelshell": "^1.2.0",
"reactify": "^1.1.1",
"uglify-js": "^2.4.23",
"watchify": "^3.2.1"
},
"scripts": {
"build": "browserify -t [ envify --NODE_ENV production ] -g reactify index.js | uglifyjs -c -m -o bundle.js",
"start": "parallelshell 'watchify -v -d -g reactify index.js -o bundle.js' 'http-server'"
},
"dependencies": {
"react": "^0.13.3"
}
}

0
examples/vector/README.md → vector/README.md

0
examples/vector/fonts → vector/fonts

0
examples/vector/icons/android-chrome-144x144.png → vector/icons/android-chrome-144x144.png

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

0
examples/vector/icons/android-chrome-192x192.png → vector/icons/android-chrome-192x192.png

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 34 KiB

0
examples/vector/icons/android-chrome-36x36.png → vector/icons/android-chrome-36x36.png

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

0
examples/vector/icons/android-chrome-48x48.png → vector/icons/android-chrome-48x48.png

Before

Width:  |  Height:  |  Size: 4.6 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

0
examples/vector/icons/android-chrome-72x72.png → vector/icons/android-chrome-72x72.png

Before

Width:  |  Height:  |  Size: 8.5 KiB

After

Width:  |  Height:  |  Size: 8.5 KiB

0
examples/vector/icons/android-chrome-96x96.png → vector/icons/android-chrome-96x96.png

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

0
examples/vector/icons/apple-touch-icon-114x114.png → vector/icons/apple-touch-icon-114x114.png

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

0
examples/vector/icons/apple-touch-icon-120x120.png → vector/icons/apple-touch-icon-120x120.png

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

0
examples/vector/icons/apple-touch-icon-144x144.png → vector/icons/apple-touch-icon-144x144.png

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

0
examples/vector/icons/apple-touch-icon-152x152.png → vector/icons/apple-touch-icon-152x152.png

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

0
examples/vector/icons/apple-touch-icon-180x180.png → vector/icons/apple-touch-icon-180x180.png

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 31 KiB

0
examples/vector/icons/apple-touch-icon-57x57.png → vector/icons/apple-touch-icon-57x57.png

Before

Width:  |  Height:  |  Size: 5.9 KiB

After

Width:  |  Height:  |  Size: 5.9 KiB

0
examples/vector/icons/apple-touch-icon-60x60.png → vector/icons/apple-touch-icon-60x60.png

Before

Width:  |  Height:  |  Size: 6.5 KiB

After

Width:  |  Height:  |  Size: 6.5 KiB

0
examples/vector/icons/apple-touch-icon-72x72.png → vector/icons/apple-touch-icon-72x72.png

Before

Width:  |  Height:  |  Size: 8.5 KiB

After

Width:  |  Height:  |  Size: 8.5 KiB

0
examples/vector/icons/apple-touch-icon-76x76.png → vector/icons/apple-touch-icon-76x76.png

Before

Width:  |  Height:  |  Size: 9.1 KiB

After

Width:  |  Height:  |  Size: 9.1 KiB

0
examples/vector/icons/apple-touch-icon-precomposed.png → vector/icons/apple-touch-icon-precomposed.png

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

0
examples/vector/icons/apple-touch-icon.png → vector/icons/apple-touch-icon.png

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 31 KiB

0
examples/vector/icons/browserconfig.xml → vector/icons/browserconfig.xml

0
examples/vector/icons/favicon-16x16.png → vector/icons/favicon-16x16.png

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

0
examples/vector/icons/favicon-32x32.png → vector/icons/favicon-32x32.png

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

0
examples/vector/icons/favicon-96x96.png → vector/icons/favicon-96x96.png

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

0
examples/vector/icons/favicon.ico → vector/icons/favicon.ico

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

0
examples/vector/icons/manifest.json → vector/icons/manifest.json

0
examples/vector/icons/mstile-144x144.png → vector/icons/mstile-144x144.png

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

0
examples/vector/icons/mstile-150x150.png → vector/icons/mstile-150x150.png

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

0
examples/vector/icons/mstile-310x150.png → vector/icons/mstile-310x150.png

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

0
examples/vector/icons/mstile-310x310.png → vector/icons/mstile-310x310.png

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 40 KiB

0
examples/vector/icons/mstile-70x70.png → vector/icons/mstile-70x70.png

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

0
examples/vector/img → vector/img

0
examples/vector/index.html → vector/index.html

0
examples/vector/index.js → vector/index.js

0
examples/vector/media/busy.mp3 → vector/media/busy.mp3

0
examples/vector/media/busy.ogg → vector/media/busy.ogg

0
examples/vector/media/callend.mp3 → vector/media/callend.mp3

0
examples/vector/media/callend.ogg → vector/media/callend.ogg

0
examples/vector/media/message.mp3 → vector/media/message.mp3

0
examples/vector/media/message.ogg → vector/media/message.ogg

0
examples/vector/media/ring.mp3 → vector/media/ring.mp3

0
examples/vector/media/ring.ogg → vector/media/ring.ogg

0
examples/vector/media/ringback.mp3 → vector/media/ringback.mp3

0
examples/vector/media/ringback.ogg → vector/media/ringback.ogg

0
examples/vector/package.json → vector/package.json

Loading…
Cancel
Save