diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..f433b1a53f5b830a205fd2df78e2b34974656c7b --- /dev/null +++ b/LICENSE @@ -0,0 +1,177 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS diff --git a/cypress/e2e/1-demo/demo.cy.ts b/cypress/e2e/1-demo/demo.cy.ts index 0586fdf8eb90eabd6ec8e726f2994ea987b38354..c81b611b9b2be45e51becef2fd57b34e1c5fbed2 100644 --- a/cypress/e2e/1-demo/demo.cy.ts +++ b/cypress/e2e/1-demo/demo.cy.ts @@ -1,3 +1,19 @@ +/* +Copyright 2022 The Matrix.org Foundation C.I.C. + +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. +*/ + /// <reference types="cypress" /> import demoInstance from '../../fixtures/demoInstance.json' diff --git a/package.json b/package.json index 49c8e49a2ccbfab2548f38b848dfeae16f609ec3..ff09043e9cf3b1214735f344001edd5709b5272c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,10 @@ { "name": "chatterbox", "version": "0.4.2", + "description": "Chatterbox lets you securely embed the Hydrogen matrix client on any website!", + "repository": "git@github.com:vector-im/chatterbox.git", + "author": "matrix.org", + "license": "Apache-2.0", "scripts": { "start": "vite", "build": "tsc && vite build && vite build --config parent-vite.config.js && scripts/after-build.sh", diff --git a/public/config.json b/public/config.json index 6645f28f2a7be89a88953d9d7d6b0afd998b26d3..4081fec222bf62c6d0ee69e40c72aacdf194ccfc 100644 --- a/public/config.json +++ b/public/config.json @@ -1,17 +1,17 @@ { - "homeserver": "https://matrix.midhun.dev", - "auto_join_room": "!XOUozZcpOvneVFsrGi:matrix.midhun.dev", + "homeserver": "https://your-homeserver.com", + "auto_join_room": "Internal matrix id of the room", "username_prefix": "foobar", "header": { - "title": "Chatterbox Test Room", - "avatar": "https://i.imgur.com/KkSYCKB.png" + "title": "Your Fancy Title", + "avatar": "https://link_to_avatar/awesome.png" }, "footer": { "chatterbox_link": "https://element.io/solutions/embedded-live-chat-for-customer-service", "matrix_link": "https://matrix.org" }, - "token": "k9SL1R~GcdbjiFjC", - "invite_user": "@botuser:matrix.midhun.dev", - "encrypt_room": true, - "avatar": "https://i.imgur.com/FD1z37K.png" + "token": "Valid Token to be used with Token Authenticated Registration", + "invite_user": "@botuser:your-homeserver.com", + "encrypt_room": false, + "avatar": "https://link_to_avatar/avatar.png" } diff --git a/src/main.ts b/src/main.ts index 45bd83549495d1caeb023155f4bc4677dbca0f83..0cb70b2616ad0102525614ed338258d13b58ece9 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,3 +1,19 @@ +/* +Copyright 2022 The Matrix.org Foundation C.I.C. + +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. +*/ + import type { IChatterboxConfig } from "./types/IChatterboxConfig"; import { Platform, createRouter, Navigation } from "hydrogen-view-sdk"; import { RootViewModel } from "./viewmodels/RootViewModel"; diff --git a/src/observables/MessageFromParent.ts b/src/observables/MessageFromParent.ts index 7b5446525e5be993224f14b59002512c5c9159ed..9da4d2f815de5e176dfa6041cc0a907d726eb88b 100644 --- a/src/observables/MessageFromParent.ts +++ b/src/observables/MessageFromParent.ts @@ -1,3 +1,19 @@ +/* +Copyright 2022 The Matrix.org Foundation C.I.C. + +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. +*/ + import { EventEmitter } from "hydrogen-view-sdk"; export class MessageFromParent extends EventEmitter { diff --git a/src/parent/common.ts b/src/parent/common.ts index 4e67e073103a1cecc04309806d4cda5025233e21..9df9ffc6994305c86c63b0bea77e613888c9d234 100644 --- a/src/parent/common.ts +++ b/src/parent/common.ts @@ -1,3 +1,19 @@ +/* +Copyright 2022 The Matrix.org Foundation C.I.C. + +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. +*/ + export function isMobile() { return window.innerWidth <= 800 && window.innerHeight <= 930; } diff --git a/src/parent/iframe.ts b/src/parent/iframe.ts index 017791d97cd90b0a65b49415f0d0477d30bf073f..d294b1b90b63d4459a3fe3ff452429e0d09caada 100644 --- a/src/parent/iframe.ts +++ b/src/parent/iframe.ts @@ -1,3 +1,19 @@ +/* +Copyright 2022 The Matrix.org Foundation C.I.C. + +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. +*/ + import { isMobile } from "./common"; const sizeCollection = { diff --git a/src/parent/load.ts b/src/parent/load.ts index 59d7c3d4a9874737273bb8f49c49a54d89ffd2c5..29a7d18ed765827767efccbf52b7469c79be32ef 100644 --- a/src/parent/load.ts +++ b/src/parent/load.ts @@ -1,3 +1,19 @@ +/* +Copyright 2022 The Matrix.org Foundation C.I.C. + +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. +*/ + import { isMobile } from "./common"; import { toggleIframe } from "./iframe"; diff --git a/src/parent/parent.ts b/src/parent/parent.ts index 093803c53aa593d896d9694b41f648f18a94932a..b13fccda9063c2374ace5c0781275262c0bbf2ec 100644 --- a/src/parent/parent.ts +++ b/src/parent/parent.ts @@ -1,3 +1,19 @@ +/* +Copyright 2022 The Matrix.org Foundation C.I.C. + +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. +*/ + import { resizeIframe, toggleIframe, removeIframe } from "./iframe"; import { loadStartButton } from "./load"; import "./parent-style.css"; diff --git a/src/random.ts b/src/random.ts index 1b668e8a3e3a2ff728e94aec88e03cd19035bc97..f670dc8c79e59c744d2310b89ec8bdf7815f178e 100644 --- a/src/random.ts +++ b/src/random.ts @@ -1,3 +1,19 @@ +/* +Copyright 2022 The Matrix.org Foundation C.I.C. + +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. +*/ + function generateRandomString(length: number, allowedCharacters: string): string { let result = ""; const l = allowedCharacters.length; diff --git a/src/types/IChatterboxConfig.ts b/src/types/IChatterboxConfig.ts index 2f70f9b3475623cac2b62be99923ea2ff6a470c7..c94e7b0b221e547c81823562eea6f7b78fde5264 100644 --- a/src/types/IChatterboxConfig.ts +++ b/src/types/IChatterboxConfig.ts @@ -1,3 +1,19 @@ +/* +Copyright 2022 The Matrix.org Foundation C.I.C. + +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. +*/ + export interface IChatterboxConfig { homeserver: string; // Internal room-id of the room to which chatterbox should join diff --git a/src/ui/views/AccountSetupView.ts b/src/ui/views/AccountSetupView.ts index 5bef00c741e20e3383b30d4f5d1f89807229b965..323b34c5a312a03eb6c7873ba19961e1bff4bd6e 100644 --- a/src/ui/views/AccountSetupView.ts +++ b/src/ui/views/AccountSetupView.ts @@ -1,3 +1,19 @@ +/* +Copyright 2022 The Matrix.org Foundation C.I.C. + +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. +*/ + import { TemplateView } from "hydrogen-view-sdk"; import { AccountSetupViewModel } from "../../viewmodels/AccountSetupViewModel"; import { LoadingView } from "./LoadingView"; diff --git a/src/ui/views/ChatterboxView.ts b/src/ui/views/ChatterboxView.ts index 7c521829efc0c500981e6a47488505074259e208..1fce067ebe7fa73347a1259afd46250f0306ec1d 100644 --- a/src/ui/views/ChatterboxView.ts +++ b/src/ui/views/ChatterboxView.ts @@ -1,3 +1,19 @@ +/* +Copyright 2022 The Matrix.org Foundation C.I.C. + +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. +*/ + import { TemplateView, TimelineView, AvatarView, viewClassForTile } from "hydrogen-view-sdk"; import { MessageComposer } from "hydrogen-view-sdk"; import { ChatterboxViewModel } from "../../viewmodels/ChatterboxViewModel"; diff --git a/src/ui/views/FooterView.ts b/src/ui/views/FooterView.ts index f645b39289715122bae3ee594da6e81fecd61a80..8d7638bad18135b6fe5f19e641d8e307ea7746a2 100644 --- a/src/ui/views/FooterView.ts +++ b/src/ui/views/FooterView.ts @@ -1,3 +1,19 @@ +/* +Copyright 2022 The Matrix.org Foundation C.I.C. + +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. +*/ + import { TemplateView } from "hydrogen-view-sdk"; import chatterboxLogo from "../res/chat-bubbles.svg"; import { FooterViewModel } from "../../viewmodels/FooterViewModel"; diff --git a/src/ui/views/LoadingView.ts b/src/ui/views/LoadingView.ts index ed477d32bc388c8005e97578955e6e1d822e6f84..43b3b0880b1a09dcdcedfd6dacb8cf46d1b1223d 100644 --- a/src/ui/views/LoadingView.ts +++ b/src/ui/views/LoadingView.ts @@ -1,3 +1,19 @@ +/* +Copyright 2022 The Matrix.org Foundation C.I.C. + +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. +*/ + import { TemplateView } from "hydrogen-view-sdk"; export class LoadingView extends TemplateView { diff --git a/src/ui/views/RootView.ts b/src/ui/views/RootView.ts index bae3b837b20afb32484735c4890288f372ab3430..d9502c5003a3335bbfabdb48a3f8d3f0093ec4d0 100644 --- a/src/ui/views/RootView.ts +++ b/src/ui/views/RootView.ts @@ -1,3 +1,19 @@ +/* +Copyright 2022 The Matrix.org Foundation C.I.C. + +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. +*/ + import { TemplateView } from "hydrogen-view-sdk"; import { RootViewModel } from "../../viewmodels/RootViewModel"; import { AccountSetupView } from "./AccountSetupView"; diff --git a/src/viewmodels/AccountSetupViewModel.ts b/src/viewmodels/AccountSetupViewModel.ts index 6284729f54a54bb47692f9cf8f78cd430bd6be97..454fea2744182f2a74364de379a6609932618cb0 100644 --- a/src/viewmodels/AccountSetupViewModel.ts +++ b/src/viewmodels/AccountSetupViewModel.ts @@ -1,3 +1,19 @@ +/* +Copyright 2022 The Matrix.org Foundation C.I.C. + +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. +*/ + import { ViewModel, Client, LoadStatus } from "hydrogen-view-sdk"; import { IChatterboxConfig } from "../types/IChatterboxConfig"; import { generatePassword, generateUsername } from "../random"; diff --git a/src/viewmodels/ChatterboxViewModel.ts b/src/viewmodels/ChatterboxViewModel.ts index 6c54d6839e2670c3e87e0029d318a7526bce242c..0397ccf7feac5578aa7562bc4b37b671dc695a0a 100644 --- a/src/viewmodels/ChatterboxViewModel.ts +++ b/src/viewmodels/ChatterboxViewModel.ts @@ -1,3 +1,19 @@ +/* +Copyright 2022 The Matrix.org Foundation C.I.C. + +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. +*/ + import { RoomViewModel, ViewModel, RoomStatus } from "hydrogen-view-sdk"; import { createCustomTileClassForEntry } from "./tiles"; diff --git a/src/viewmodels/FooterViewModel.ts b/src/viewmodels/FooterViewModel.ts index a3ec8d06de91a452af5ac0efdd0fc1ec6f39e899..8bc78959e44b40aaa5f07c31510edcab8822c2fa 100644 --- a/src/viewmodels/FooterViewModel.ts +++ b/src/viewmodels/FooterViewModel.ts @@ -1,3 +1,19 @@ +/* +Copyright 2022 The Matrix.org Foundation C.I.C. + +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. +*/ + import { ViewModel } from "hydrogen-view-sdk"; import { IChatterboxConfig } from "../types/IChatterboxConfig"; diff --git a/src/viewmodels/RootViewModel.ts b/src/viewmodels/RootViewModel.ts index 9327b644d783034f2929caffe6423a4cf8527d0d..cd80268ae50dd530afa7d284584f561c64665c7a 100644 --- a/src/viewmodels/RootViewModel.ts +++ b/src/viewmodels/RootViewModel.ts @@ -1,3 +1,19 @@ +/* +Copyright 2022 The Matrix.org Foundation C.I.C. + +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. +*/ + import { ViewModel, Client, Navigation, createRouter, Platform, RoomStatus, LoadStatus } from "hydrogen-view-sdk"; import { IChatterboxConfig } from "../types/IChatterboxConfig"; import { ChatterboxViewModel } from "./ChatterboxViewModel"; diff --git a/src/viewmodels/tiles.ts b/src/viewmodels/tiles.ts index 6e738090db6164d7fa16f04d921fc756ca3171c4..3e0a7a79aa99fe7aec9755a1312d70a9ab70dc99 100644 --- a/src/viewmodels/tiles.ts +++ b/src/viewmodels/tiles.ts @@ -1,3 +1,19 @@ +/* +Copyright 2022 The Matrix.org Foundation C.I.C. + +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. +*/ + import { TextTile, ImageTile, VideoTile, FileTile, LocationTile, RedactedTile, EncryptionEnabledTile, tileClassForEntry } from "hydrogen-view-sdk"; // Override all the message-tiles to show the display name as "me"