From 388f403af2b2fb2ce1fabbea7d5de19fa30b3006 Mon Sep 17 00:00:00 2001 From: RMidhunSuresh <hi@midhun.dev> Date: Wed, 6 Jul 2022 23:45:25 +0530 Subject: [PATCH] Add license headers to source files --- cypress/e2e/1-demo/demo.cy.ts | 16 ++++++++++++++++ src/main.ts | 16 ++++++++++++++++ src/observables/MessageFromParent.ts | 16 ++++++++++++++++ src/parent/common.ts | 16 ++++++++++++++++ src/parent/iframe.ts | 16 ++++++++++++++++ src/parent/load.ts | 16 ++++++++++++++++ src/parent/parent.ts | 16 ++++++++++++++++ src/random.ts | 16 ++++++++++++++++ src/types/IChatterboxConfig.ts | 16 ++++++++++++++++ src/ui/views/AccountSetupView.ts | 16 ++++++++++++++++ src/ui/views/ChatterboxView.ts | 16 ++++++++++++++++ src/ui/views/FooterView.ts | 16 ++++++++++++++++ src/ui/views/LoadingView.ts | 16 ++++++++++++++++ src/ui/views/RootView.ts | 16 ++++++++++++++++ src/viewmodels/AccountSetupViewModel.ts | 16 ++++++++++++++++ src/viewmodels/ChatterboxViewModel.ts | 16 ++++++++++++++++ src/viewmodels/FooterViewModel.ts | 16 ++++++++++++++++ src/viewmodels/RootViewModel.ts | 16 ++++++++++++++++ src/viewmodels/tiles.ts | 16 ++++++++++++++++ 19 files changed, 304 insertions(+) diff --git a/cypress/e2e/1-demo/demo.cy.ts b/cypress/e2e/1-demo/demo.cy.ts index 0586fdf..c81b611 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 45bd835..0cb70b2 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 7b54465..9da4d2f 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 4e67e07..9df9ffc 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 017791d..d294b1b 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 59d7c3d..29a7d18 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 093803c..b13fccd 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 1b668e8..f670dc8 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 2f70f9b..c94e7b0 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 5bef00c..323b34c 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 7c52182..1fce067 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 f645b39..8d7638b 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 ed477d3..43b3b08 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 bae3b83..d9502c5 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 6284729..454fea2 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 6c54d68..0397ccf 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 a3ec8d0..8bc7895 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 9327b64..cd80268 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 6e73809..3e0a7a7 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" -- GitLab