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/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"