From 732f7aedcdb1626480a536468644cd69e0a92bd8 Mon Sep 17 00:00:00 2001 From: John Livingston Date: Thu, 23 May 2024 17:17:28 +0200 Subject: [PATCH] REUSE compliance. --- .../common/configuration/contexts/channel.ts | 4 ++++ .../elements/channel-configuration.ts | 4 ++++ .../configuration/elements/channel-home.ts | 4 ++++ .../elements/configuration-row.ts | 4 ++++ client/common/configuration/elements/index.js | 4 ++++ client/common/configuration/register.ts | 1 + .../configuration/services/channel-details.ts | 4 ++++ client/common/global-styles.ts | 21 ------------------- client/common/lib/contexts/peertube.ts | 4 ++++ client/common/lib/directives/translation.ts | 4 ++++ .../common/lib/elements/dynamic-table-form.ts | 4 ++++ client/common/lib/elements/help-button.ts | 4 ++++ client/common/lib/elements/index.js | 4 ++++ client/common/lib/elements/livechat.ts | 4 ++++ 14 files changed, 49 insertions(+), 21 deletions(-) delete mode 100644 client/common/global-styles.ts diff --git a/client/common/configuration/contexts/channel.ts b/client/common/configuration/contexts/channel.ts index 99aaece9..09b2a606 100644 --- a/client/common/configuration/contexts/channel.ts +++ b/client/common/configuration/contexts/channel.ts @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 Mehdi Benadel +// +// SPDX-License-Identifier: AGPL-3.0-only + import type { ChannelConfiguration } from 'shared/lib/types' import { createContext } from '@lit/context' import { ChannelDetailsService } from '../services/channel-details' diff --git a/client/common/configuration/elements/channel-configuration.ts b/client/common/configuration/elements/channel-configuration.ts index 6824e34d..e2a70b4e 100644 --- a/client/common/configuration/elements/channel-configuration.ts +++ b/client/common/configuration/elements/channel-configuration.ts @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 Mehdi Benadel +// +// SPDX-License-Identifier: AGPL-3.0-only + import type { RegisterClientOptions } from '@peertube/peertube-types/client' import type { ChannelConfiguration } from 'shared/lib/types' import { html } from 'lit' diff --git a/client/common/configuration/elements/channel-home.ts b/client/common/configuration/elements/channel-home.ts index 1b15cfe8..a661b78b 100644 --- a/client/common/configuration/elements/channel-home.ts +++ b/client/common/configuration/elements/channel-home.ts @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 Mehdi Benadel +// +// SPDX-License-Identifier: AGPL-3.0-only + import type { RegisterClientOptions } from '@peertube/peertube-types/client' import { html, LitElement } from 'lit' import { customElement, property, state } from 'lit/decorators.js' diff --git a/client/common/configuration/elements/configuration-row.ts b/client/common/configuration/elements/configuration-row.ts index 20420be5..78f03fa2 100644 --- a/client/common/configuration/elements/configuration-row.ts +++ b/client/common/configuration/elements/configuration-row.ts @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 Mehdi Benadel +// +// SPDX-License-Identifier: AGPL-3.0-only + import { html } from 'lit' import { customElement, property } from 'lit/decorators.js' import { LivechatElement } from '../../lib/elements/livechat' diff --git a/client/common/configuration/elements/index.js b/client/common/configuration/elements/index.js index 81761f51..3849396a 100644 --- a/client/common/configuration/elements/index.js +++ b/client/common/configuration/elements/index.js @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 Mehdi Benadel +// +// SPDX-License-Identifier: AGPL-3.0-only + // Add here all your elements, the main JS file will import them all. import './channel-configuration' import './channel-home' diff --git a/client/common/configuration/register.ts b/client/common/configuration/register.ts index 5e69e3ed..edadd7eb 100644 --- a/client/common/configuration/register.ts +++ b/client/common/configuration/register.ts @@ -1,4 +1,5 @@ // SPDX-FileCopyrightText: 2024 John Livingston +// SPDX-FileCopyrightText: 2024 Mehdi Benadel // // SPDX-License-Identifier: AGPL-3.0-only diff --git a/client/common/configuration/services/channel-details.ts b/client/common/configuration/services/channel-details.ts index 04d0819e..559ad47d 100644 --- a/client/common/configuration/services/channel-details.ts +++ b/client/common/configuration/services/channel-details.ts @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 Mehdi Benadel +// +// SPDX-License-Identifier: AGPL-3.0-only + import type { RegisterClientOptions } from '@peertube/peertube-types/client' import { ChannelLiveChatInfos, ChannelConfiguration, ChannelConfigurationOptions } from 'shared/lib/types' import { getBaseRoute } from "../../../utils/uri" diff --git a/client/common/global-styles.ts b/client/common/global-styles.ts deleted file mode 100644 index e8520ca4..00000000 --- a/client/common/global-styles.ts +++ /dev/null @@ -1,21 +0,0 @@ -let globalSheets: CSSStyleSheet[] | undefined = undefined; - -export function getGlobalStyleSheets() { - if (globalSheets === undefined) { - globalSheets = Array.from(document.styleSheets) - .map(x => { - const sheet = new CSSStyleSheet(); - const css = Array.from(x.cssRules).map(rule => rule.cssText).join(' '); - sheet.replaceSync(css); - return sheet; - }); - } - - return globalSheets; -} - -export function addGlobalStylesToShadowRoot(shadowRoot: ShadowRoot) { - shadowRoot.adoptedStyleSheets.push( - ...getGlobalStyleSheets() - ); -} \ No newline at end of file diff --git a/client/common/lib/contexts/peertube.ts b/client/common/lib/contexts/peertube.ts index c132d45a..b8f37377 100644 --- a/client/common/lib/contexts/peertube.ts +++ b/client/common/lib/contexts/peertube.ts @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 Mehdi Benadel +// +// SPDX-License-Identifier: AGPL-3.0-only + import type { RegisterClientOptions } from '@peertube/peertube-types/client/types' import { createContext } from '@lit/context' diff --git a/client/common/lib/directives/translation.ts b/client/common/lib/directives/translation.ts index 07a3bbea..b796d707 100644 --- a/client/common/lib/directives/translation.ts +++ b/client/common/lib/directives/translation.ts @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 Mehdi Benadel +// +// SPDX-License-Identifier: AGPL-3.0-only + import { PartInfo, directive } from 'lit/directive.js' import { AsyncDirective } from 'lit/async-directive.js' import { RegisterClientHelpers } from '@peertube/peertube-types/client'; diff --git a/client/common/lib/elements/dynamic-table-form.ts b/client/common/lib/elements/dynamic-table-form.ts index 83e0cad6..57226f33 100644 --- a/client/common/lib/elements/dynamic-table-form.ts +++ b/client/common/lib/elements/dynamic-table-form.ts @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 Mehdi Benadel +// +// SPDX-License-Identifier: AGPL-3.0-only + import { css, html, LitElement, nothing, TemplateResult } from 'lit' import { repeat } from 'lit/directives/repeat.js' import { customElement, property, state } from 'lit/decorators.js' diff --git a/client/common/lib/elements/help-button.ts b/client/common/lib/elements/help-button.ts index 891d3084..7253d792 100644 --- a/client/common/lib/elements/help-button.ts +++ b/client/common/lib/elements/help-button.ts @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 Mehdi Benadel +// +// SPDX-License-Identifier: AGPL-3.0-only + import { html } from 'lit' import { customElement, property, state } from 'lit/decorators.js' import { unsafeHTML } from 'lit/directives/unsafe-html.js' diff --git a/client/common/lib/elements/index.js b/client/common/lib/elements/index.js index ac4c84b6..7920f81e 100644 --- a/client/common/lib/elements/index.js +++ b/client/common/lib/elements/index.js @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 Mehdi Benadel +// +// SPDX-License-Identifier: AGPL-3.0-only + // Add here all your elements, the main JS file will import them all. import './help-button' import './dynamic-table-form' diff --git a/client/common/lib/elements/livechat.ts b/client/common/lib/elements/livechat.ts index 9581b2a1..be24ec6b 100644 --- a/client/common/lib/elements/livechat.ts +++ b/client/common/lib/elements/livechat.ts @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 Mehdi Benadel +// +// SPDX-License-Identifier: AGPL-3.0-only + import { LitElement } from 'lit' /**