diff --git a/.github/GOVERNANCE.md b/.github/GOVERNANCE.md index c28a2744a..f16128de0 100644 --- a/.github/GOVERNANCE.md +++ b/.github/GOVERNANCE.md @@ -16,4 +16,10 @@ Every commit made by a contributor must include the [Developer Certificate of Or ## Name and marks -The AGPL does not grant permission to use the Fluxer name, logo or other branding. Forks must use a distinct name and branding unless Fluxer Platform AB grants permission otherwise. +Fluxer and the Fluxer logo are trademarks of Fluxer Platform AB. Neither the AGPL nor the CC BY-SA 4.0 licence on Fluxer artwork grants trademark rights. Fluxer Platform AB grants everyone the following permissions. + +- You may distribute unmodified builds of Fluxer, or builds with light patches, under the Fluxer name and logo. Light patches are changes for packaging, portability, security and bug fixes, configuration defaults and translations. Linux distributions, nixpkgs, Flathub and container images are all covered. +- A self-hosted instance running such a build may show the Fluxer name and logo under the instance's own name and domain, as long as it does not imply affiliation with or endorsement by Fluxer Platform AB. +- You may refer to Fluxer by name to describe compatibility, for example "works with Fluxer". + +Forks with substantive functional changes must use their own name and logo. Any other use needs permission from Fluxer Platform AB. Contact support@fluxer.com. diff --git a/README.md b/README.md index 0a6743ee9..8dae3c930 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ Fluxer is a free and open source instant messaging and VoIP chat app built for friends, groups, and communities.

- Fluxer running side by side on a desktop monitor and a phone + Fluxer running side by side on a desktop monitor and a phone

## Download @@ -143,14 +143,13 @@ Full setup notes, including canary, are in the [Linux repositories documentation The source is licensed under the [AGPL-3.0-or-later](./LICENSE) license. -Fluxer branding, icons, default avatars, badge artwork, screenshots and marketing -imagery are copyright Fluxer, all rights reserved, as set out in -[fluxer_static/LICENSE](./fluxer_static/LICENSE). Third-party material keeps its own -terms, listed in +Fluxer artwork, such as the logo, icons, badges and default avatars, is +licensed under [CC BY-SA 4.0](./fluxer_static/LICENSE). Third-party material +keeps its own terms, listed in [fluxer_static/THIRD_PARTY_LICENSES.md](./fluxer_static/THIRD_PARTY_LICENSES.md). -Public availability of this repository does not grant trademark, brand, or -endorsement rights. +Use of the Fluxer name and logo is covered by the +[name and marks policy](./.github/GOVERNANCE.md#name-and-marks). [win-setup-x64]: https://pkgs.fluxer.com/desktop/stable/win32/x64/latest/setup [win-setup-arm64]: https://pkgs.fluxer.com/desktop/stable/win32/arm64/latest/setup diff --git a/deploy/self-hosting/.env.example b/deploy/self-hosting/.env.example index 9c4eabe11..b657fd7a2 100644 --- a/deploy/self-hosting/.env.example +++ b/deploy/self-hosting/.env.example @@ -357,9 +357,8 @@ FLUXER_DISCOVERY_ENABLED=true #FLUXER_GIFT_ENDPOINT= #FLUXER_MEDIA_PROXY_UPLOAD_RELAY_ENDPOINT= #PUBLIC_BOOTSTRAP_API_PUBLIC_ENDPOINT= -# These follow FLUXER_STATIC_CDN_ENDPOINT first, then the public origin. +# This follows FLUXER_STATIC_CDN_ENDPOINT first, then the public origin. #FLUXER_GATEWAY_STATIC_CDN_ENDPOINT= -#FLUXER_UNFURL_STATIC_CDN_ENDPOINT= # These follow FLUXER_MEDIA_ENDPOINT first, then the public origin. #FLUXER_MEDIA_PROXY_PUBLIC_ENDPOINT= #FLUXER_GATEWAY_MEDIA_PROXY_ENDPOINT= diff --git a/deploy/self-hosting/Caddyfile b/deploy/self-hosting/Caddyfile index b0dcbf2a6..28657aab5 100644 --- a/deploy/self-hosting/Caddyfile +++ b/deploy/self-hosting/Caddyfile @@ -42,7 +42,7 @@ reverse_proxy admin:8080 } - @staticAssets path /web/* /emoji/* /libs/* /avatars/* /badges/* /desktop/* /embeds/* + @staticAssets path /web/* /emoji/* /libs/* /avatars/* /badges/* /desktop/* handle @staticAssets { reverse_proxy static-proxy:8080 } diff --git a/deploy/self-hosting/docker-compose.yml b/deploy/self-hosting/docker-compose.yml index c573bc1d7..a83021fa1 100644 --- a/deploy/self-hosting/docker-compose.yml +++ b/deploy/self-hosting/docker-compose.yml @@ -845,8 +845,6 @@ services: FLUXER_SVC_MODE: shard FLUXER_SVC_SHARD_ID: "0" FLUXER_MEDIA_PROXY_ENDPOINT: http://media-proxy:8080 - FLUXER_UNFURL_STATIC_CDN_ENDPOINT: ${FLUXER_UNFURL_STATIC_CDN_ENDPOINT:-} - FLUXER_STATIC_CDN_ENDPOINT: ${FLUXER_STATIC_CDN_ENDPOINT:-${FLUXER_PUBLIC_ORIGIN:-${FLUXER_PUBLIC_SCHEME:-https}://${FLUXER_DOMAIN}}} healthcheck: *fluxer-svc-healthcheck depends_on: nats: {condition: service_healthy} diff --git a/fluxer_api/src/api/assets/github.webp b/fluxer_api/src/api/assets/github.webp deleted file mode 100644 index fbf3c79b9..000000000 Binary files a/fluxer_api/src/api/assets/github.webp and /dev/null differ diff --git a/fluxer_api/src/api/assets/instatus.webp b/fluxer_api/src/api/assets/instatus.webp deleted file mode 100644 index a9704c116..000000000 Binary files a/fluxer_api/src/api/assets/instatus.webp and /dev/null differ diff --git a/fluxer_api/src/api/channel/tests/AttachmentDecay.test.ts b/fluxer_api/src/api/channel/tests/AttachmentDecay.test.ts index c11d3005c..58617bc19 100644 --- a/fluxer_api/src/api/channel/tests/AttachmentDecay.test.ts +++ b/fluxer_api/src/api/channel/tests/AttachmentDecay.test.ts @@ -76,7 +76,7 @@ describe('Attachment Decay', () => { const channel = await createChannel(harness, account.token, guild.id, 'test-channel'); const channelId = guild.system_channel_id ?? channel.id; const file1Data = loadFixture('yeah.png'); - const file2Data = loadFixture('thisisfine.gif'); + const file2Data = loadFixture('animated.gif'); const {response, json} = await sendMessageWithAttachments( harness, account.token, @@ -258,7 +258,7 @@ describe('Attachment Decay', () => { const channel = await createChannel(harness, account.token, guild.id, 'test-channel'); const channelId = guild.system_channel_id ?? channel.id; const smallFile = loadFixture('yeah.png'); - const largeFile = loadFixture('thisisfine.gif'); + const largeFile = loadFixture('animated.gif'); const smallResult = await sendMessageWithAttachments( harness, account.token, diff --git a/fluxer_api/src/api/channel/tests/AttachmentUploadValidation.test.ts b/fluxer_api/src/api/channel/tests/AttachmentUploadValidation.test.ts index 0346638f2..296dd3149 100644 --- a/fluxer_api/src/api/channel/tests/AttachmentUploadValidation.test.ts +++ b/fluxer_api/src/api/channel/tests/AttachmentUploadValidation.test.ts @@ -327,17 +327,17 @@ describe('Attachment Upload Validation', () => { const channel = await createChannel(harness, account.token, guild.id, 'test-channel'); const channelId = guild.system_channel_id ?? channel.id; const file1Data = loadFixture('yeah.png'); - const file2Data = loadFixture('thisisfine.gif'); + const file2Data = loadFixture('animated.gif'); const payload = { content: 'Ordered files test', attachments: [ {id: 0, filename: 'yeah.png', description: 'First file', title: 'First'}, - {id: 1, filename: 'thisisfine.gif', description: 'Second file', title: 'Second'}, + {id: 1, filename: 'animated.gif', description: 'Second file', title: 'Second'}, ], }; const {response, json} = await sendMessageWithAttachments(harness, account.token, channelId, payload, [ {index: 0, filename: 'yeah.png', data: file1Data}, - {index: 1, filename: 'thisisfine.gif', data: file2Data}, + {index: 1, filename: 'animated.gif', data: file2Data}, ]); expect(response.status).toBe(200); expect(json.attachments).toBeDefined(); @@ -346,7 +346,7 @@ describe('Attachment Upload Validation', () => { expect(json.attachments![0].filename).toBe('yeah.png'); expect(json.attachments![0].description).toBe('First file'); expect(json.attachments![0].title).toBe('First'); - expect(json.attachments![1].filename).toBe('thisisfine.gif'); + expect(json.attachments![1].filename).toBe('animated.gif'); expect(json.attachments![1].description).toBe('Second file'); expect(json.attachments![1].title).toBe('Second'); }); @@ -356,17 +356,17 @@ describe('Attachment Upload Validation', () => { const channel = await createChannel(harness, account.token, guild.id, 'test-channel'); const channelId = guild.system_channel_id ?? channel.id; const file1Data = loadFixture('yeah.png'); - const file2Data = loadFixture('thisisfine.gif'); + const file2Data = loadFixture('animated.gif'); const payload = { content: 'Sparse IDs test', attachments: [ {id: 2, filename: 'yeah.png', description: 'ID is 2', title: 'Two'}, - {id: 5, filename: 'thisisfine.gif', description: 'ID is 5', title: 'Five'}, + {id: 5, filename: 'animated.gif', description: 'ID is 5', title: 'Five'}, ], }; const {response, json} = await sendMessageWithAttachments(harness, account.token, channelId, payload, [ {index: 2, filename: 'yeah.png', data: file1Data}, - {index: 5, filename: 'thisisfine.gif', data: file2Data}, + {index: 5, filename: 'animated.gif', data: file2Data}, ]); expect(response.status).toBe(200); expect(json.attachments).toBeDefined(); @@ -472,7 +472,7 @@ describe('Attachment Upload Validation', () => { const channel = await createChannel(harness, account.token, guild.id, 'test-channel'); const channelId = guild.system_channel_id ?? channel.id; const file1Data = loadFixture('yeah.png'); - const file2Data = loadFixture('thisisfine.gif'); + const file2Data = loadFixture('animated.gif'); const payload = { content: 'Mixed metadata test', attachments: [ @@ -485,13 +485,13 @@ describe('Attachment Upload Validation', () => { }, { id: 1, - filename: 'thisisfine.gif', + filename: 'animated.gif', }, ], }; const {response, json} = await sendMessageWithAttachments(harness, account.token, channelId, payload, [ {index: 0, filename: 'yeah.png', data: file1Data}, - {index: 1, filename: 'thisisfine.gif', data: file2Data}, + {index: 1, filename: 'animated.gif', data: file2Data}, ]); expect(response.status).toBe(200); expect(json.attachments).toBeDefined(); diff --git a/fluxer_api/src/api/channel/tests/CrosspostWorkerTestUtils.ts b/fluxer_api/src/api/channel/tests/CrosspostWorkerTestUtils.ts index 0bb5a77b3..7d580613b 100644 --- a/fluxer_api/src/api/channel/tests/CrosspostWorkerTestUtils.ts +++ b/fluxer_api/src/api/channel/tests/CrosspostWorkerTestUtils.ts @@ -76,7 +76,7 @@ export async function sendWithImage( filenames.map((filename, index) => ({ index, filename, - data: loadFixture(filename.endsWith('.gif') ? 'thisisfine.gif' : 'yeah.png'), + data: loadFixture(filename.endsWith('.gif') ? 'animated.gif' : 'yeah.png'), })), ); if (response.status !== 200) { diff --git a/fluxer_api/src/api/channel/tests/EmbedAttachmentUrlResolution.test.ts b/fluxer_api/src/api/channel/tests/EmbedAttachmentUrlResolution.test.ts index 680ac046d..62c9e5418 100644 --- a/fluxer_api/src/api/channel/tests/EmbedAttachmentUrlResolution.test.ts +++ b/fluxer_api/src/api/channel/tests/EmbedAttachmentUrlResolution.test.ts @@ -86,25 +86,25 @@ describe('Embed Attachment URL Resolution', () => { const channel = await createChannel(harness, account.token, guild.id, 'test-channel'); const channelId = guild.system_channel_id ?? channel.id; const file1Data = loadFixture('yeah.png'); - const file2Data = loadFixture('thisisfine.gif'); + const file2Data = loadFixture('animated.gif'); const payload = { content: 'Both image and thumbnail', attachments: [ {id: 0, filename: 'yeah.png'}, - {id: 1, filename: 'thisisfine.gif'}, + {id: 1, filename: 'animated.gif'}, ], embeds: [ { title: 'Complete Embed', description: 'This embed uses both image and thumbnail', - image: {url: 'attachment://thisisfine.gif'}, + image: {url: 'attachment://animated.gif'}, thumbnail: {url: 'attachment://yeah.png'}, }, ], }; const {response, json} = await sendMessageWithAttachments(harness, account.token, channelId, payload, [ {index: 0, filename: 'yeah.png', data: file1Data}, - {index: 1, filename: 'thisisfine.gif', data: file2Data}, + {index: 1, filename: 'animated.gif', data: file2Data}, ]); expect(response.status).toBe(200); expect(json.embeds).toBeDefined(); @@ -576,12 +576,12 @@ describe('Embed Attachment URL Resolution', () => { const channel = await createChannel(harness, account.token, guild.id, 'test-channel'); const channelId = guild.system_channel_id ?? channel.id; const file1Data = loadFixture('yeah.png'); - const file2Data = loadFixture('thisisfine.gif'); + const file2Data = loadFixture('animated.gif'); const payload = { content: 'Multiple embeds with different attachments', attachments: [ {id: 0, filename: 'yeah.png'}, - {id: 1, filename: 'thisisfine.gif'}, + {id: 1, filename: 'animated.gif'}, ], embeds: [ { @@ -592,19 +592,19 @@ describe('Embed Attachment URL Resolution', () => { { title: 'Second Embed', description: 'Uses GIF', - image: {url: 'attachment://thisisfine.gif'}, + image: {url: 'attachment://animated.gif'}, }, ], }; const {response, json} = await sendMessageWithAttachments(harness, account.token, channelId, payload, [ {index: 0, filename: 'yeah.png', data: file1Data}, - {index: 1, filename: 'thisisfine.gif', data: file2Data}, + {index: 1, filename: 'animated.gif', data: file2Data}, ]); expect(response.status).toBe(200); expect(json.embeds).toBeDefined(); expect(json.embeds).toHaveLength(2); expect(json.embeds![0].image?.url).toContain('yeah.png'); - expect(json.embeds![1].image?.url).toContain('thisisfine.gif'); + expect(json.embeds![1].image?.url).toContain('animated.gif'); }); it('should resolve multiple files referenced by embeds', async () => { const account = await createTestAccount(harness); diff --git a/fluxer_api/src/api/test/fixtures/animated.gif b/fluxer_api/src/api/test/fixtures/animated.gif new file mode 100644 index 000000000..048f43348 Binary files /dev/null and b/fluxer_api/src/api/test/fixtures/animated.gif differ diff --git a/fluxer_api/src/api/test/fixtures/ncmec/xsd/report.xsd b/fluxer_api/src/api/test/fixtures/ncmec/xsd/report.xsd deleted file mode 100644 index 0496ea312..000000000 --- a/fluxer_api/src/api/test/fixtures/ncmec/xsd/report.xsd +++ /dev/null @@ -1,3154 +0,0 @@ - - - - - This document describes the ESP incident reporting format. - - - - This is the main top level tag to define an incident report. - - - - - - Report represents a batch of otherwise individual reports that have been grouped for the specified reason. - - - - - This contains general incident information. - - - - - This record summarizes the details of the incident being reported. There can be more than one for different incident details, but there must be at least of these for each report. - - - - - The law enforcement contact information related to the event. This is used if the incident information has already been reported to law enforcement or if the request originated from law enforcement. - - - - - This is information related to the person or organization reporting the incident. - - - - - There can be 0 or 1 reported user or person involved in the incident. - - - - - There can be 0 or more intended recipients involved in the incident. - - - - - There can be 0 or more victim records for each incident. - - - - - Any additional notes on this incident not covered by any other section. - - - - - - - - - - - - This field describes the type of incident being reported. - - - - - The full application name where the reported content occurred. - - - - - Company indicated a higher level of urgency (immediate risk to child) and the reason for this escalation. Only enter text if you want to escalate the report. - - - - - Tags indicated by ESP to describe the reported incident. - - - - - The date/time of the reported incident. - - - - - This is a text field that allows you to enter any additional information related to the incidentDateTime. - - - - - - - - - - - Is the report associated with sextortion? - - - - - Is the report associated with solicitation for child sexual assault material? - - - - - Is the report associated with an interaction between minors? - - - - - Is the report associated with spam? - - - - - Is the report associated with sadistic online exploitation? - - - - - The report is associated with an incident that is informational in nature. Supplying a value will de-escalate the report. - - - - - - - - This record summarizes the details of the incident being reported. There can be one or more for different incident details. Each record must have one of the following subtypes. - - - - - - The incident occurred on a web page. - - - - - The incident occurred over Email. - - - - - The incident occurred in a newsgroup. - - - - - The incident occurred over IM or during a chat session. - - - - - The incident occurred during an online game. - - - - - This category is used when the primary method of communication between the child and/or reported person or user is through a cell phone. This can include phone conversations, text messages, or images sent through the phone. - - - - - This category of the incident does not involve an online or computer component or a cell phone (e.g., face-to-face contact or potentially illegal hard copy or printed materials). - - - - - The incident occurred via a Peer to Peer (also known as P2P) decentralized network that allows users to share files through a direct connection. - - - - - - - - - The incident occurred on a web page. - - - - - - This is the actual URL where the reported incident occurred. There can be as many of these as needed. - - - - - This is a text field that allows you to enter any additional information related to the web page event. - - - - - - True if the reported URL is hosted on another company's server. The reporting company has no further information on this incident and is providing it to NCMEC for informational purposes. - - - - - - - - The incident occurred over email. - - - - - - An email address associated with the incident. - - - - - The headers, subject, and content of the communication. - - - - - Any additional notes to add to the email event. - - - - - - - - - - The incident occurred in a newsgroup. - - - - - The newsgroup name. - - - - - An email address associated with the incident. - - - - - The content of the newsgroup posting including any headers, subject. - - - - - Any additional notes to add to the newsgroup event. - - - - - - - - - The incident occurred over IM or during a chat session. - - - - - - The chat or instant messenger program used. - - - - - The name of the chat room. - - - - - The content of the chat, any chat logs. - - - - - Any additional information related to the chat/instant messaging incident. - - - - - - - - - The incident occurred during an online game. - - - - - - The name of the game the incident occurred in. - - - - - The name of the gaming console if one was used. - - - - - The content of the message/chat that occurred during the game. - - - - - Any additional information about the online gaming incident. - - - - - - - - - This category is used when the primary method of communication between the child and/or reported person or user is through a cell phone. This can include phone conversations, text messages, or images sent through the phone. - - - - - - The cell phone number associated with the incident. - - - - - The latitude associated with the incident. - - - - - The longitude associated with the incident. - - - - - Any additional information about the cell phone incident. - - - - - - - - - This category of the incident does not involve an online or computer component or a cell phone (e.g., face-to-face contact or potentially illegal hard copy or printed materials). - - - - - - The location associated with the incident. - - - - - Incident's address. - - - - - Please describe in detail the incident being reported. - - - - - - - - - The incident occurred via a Peer to Peer (also known as P2P) decentralized network that allows users to share files through a direct connection. - - - - - - The Peer to Peer Client used (e.g., Phex, Emule). - - - - - An IP address used by the person or user reported. - - - - - The name of file(s). - - - - - Any additional information about the cell phone incident. - - - - - - - - - The law enforcement contact information related to the event. This is used if the incident information has already been reported to law enforcement or if the request originated from law enforcement. - - - - - - The law enforcement agency name involved. - - - - - The case number if known. - - - - - The contact information for the investigator or officer on the case. - - - - - Set this to true if the incident was reported to law enforcement by the company. - - - - - Set this to true if domestic law enforcement has served legal process about this person/user or reported incident. - - - - - Set this to true if international law enforcement has served legal process about this person/user or reported incident. - - - - - - - The name of the country associated with this report from which legal process was received. - - - - - - - - - - - - - This is information related to the person or company reporting the incident. - - - - - - Details of the person reporting the information and the company's address. - - - - - Use this field if a person other than the person submitting the report should be contacted by law enforcement regarding the report. - - - - - This open-text field allows a company to include language (not specific to the reported incident) that they want included in every CyberTipline report. For instance, basic company information, how legal process should be served, length of data retention, 24-hour emergency phone numbers, etc.. - - - - - Include Terms of Service (TOS) relevant to the incident being reported. - - - - - Company can include a URL if they wish to direct attention to a web page for further information. - - - - - - - - - - - - The person information about the reported person or user in the incident. - - - - - The description for the vehicle of the reported person. - - - - - The unique ID of the reported person or user in the ESP's system (e.g., friend ID). - - - - - The name of the reporter's product or service that was used by the reported person or user during the incident. - - - - - This account has been compromised, hacked, or hijacked. - - - - - The screen name of the reported person or user. - - - - - A display name, other than a screen name or a username, for the reported person or user. - - - - - The different identifying URLs for this reported person or user. - - - - - A copy of the user's bio as per their account according to the reporting company's platform. - - - - - An originating IP address used by the reported person or user and when it was used. - - - - - An ID for a device used by the reported person or user and, optionally, when it was used. - - - - - Reported person or user is using another company's service. The reporting company has no further information about this person or user. - - - - - List report ID numbers for any prior CyberTipline reports on this reported person or user. - - - - - The ESP believes the reported person or user is engaged in an organized online group related to child sexual exploitation. This open text field is used to provide unique group identifiers (e.g., group name, group ID, etc.). - - - - - Whether the account was temporarily disabled at any point. - - - - - Whether the account was permanently disabled. - - - - - The reporter's estimated location for the reported person or user. - - - - - There are no additional emails to report. - - - - - Any additional account associated with this reported person or user. - - - - - Any additional notes on this reported person or user not covered by any other section - - - - - - - - - - - - The person information about the intended recipient. - - - - - The unique ID of the intended recipient in the ESP's system (e.g., friend ID). - - - - - The name of the reporter's product or service that was used by the intended recipient during the incident. - - - - - This account has been compromised, hacked, or hijacked. - - - - - The screen name of the intended recipient. - - - - - A display name, other than a screen name or a username, for the intended recipient. - - - - - An identifying URL for this intended recipient. - - - - - A copy of the user's bio as per their account according to the reporting company's platform. - - - - - An IP address used by the intended recipient and when it was used. - - - - - An ID for a device used by the intended recipient and when it was used. - - - - - A CyberTipline report ID for any prior CyberTipline report on this intended recipient. - - - - - The ESP believes the intended recipient is engaged in an organized online group related to child sexual exploitation. This open text field is used to provide unique group identifiers (e.g., group name, group ID, etc.). - - - - - Whether the account was temporarily disabled at any point. - - - - - Whether the account was permanently disabled. - - - - - The reporter's estimated location for the intended recipient. - - - - - There are no additional emails to report. - - - - - Additional information about this intended recipient not covered by any other section. - - - - - - - - - There can be 0 or more victim records for each incident. - - - - - - The victim's personal details such as name, address, phone numbers. - - - - - The unique ID of the victim in the ESP's system (e.g., friend ID). - - - - - The name of the reporter's product or service that was used by the victim during the incident. - - - - - This account has been compromised, hacked, or hijacked. - - - - - The screen name of the victim. - - - - - A display name, other than a screen name or a username, for the victim. - - - - - The identifying URL(s) for the victim. - - - - - A copy of the user's bio as per their account according to the reporting company's platform. - - - - - An originating IP address used by the victim and when it was used. - - - - - An ID for a device used by the victim and, optionally, when it was used. - - - - - Victim's school name. - - - - - List of report ID numbers for any prior CyberTipline reports on this victim. - - - - - Whether the account was temporarily disabled at any point. - - - - - Whether the account was permanently disabled. - - - - - The reporter's estimated location for the victim. - - - - - There are no additional emails to report. - - - - - Any additional account associated with this victim. - - - - - Any additional notes on this victim. - - - - - - - - - The root element of the file details. - - - - - - The report this file is related to. - - - - - The file this report is related to. - - - - - The name of the file being reported to NCMEC by the company. - - - - - Original filename associated with the file when it was uploaded to the company's servers by the reported user or person. - - - - - The date and time the file was uploaded to the reporting ESP. - - - - - The URL where reported file was originally located. - - - - - Has your company viewed the file being reported to NCMEC? - - - - - Has your company viewed the EXIF for the file being reported to NCMEC? - - - - - Was the reported file publicly accessible to online users? - - - - - The relevance or relation of the uploaded file to the report. Unless specified otherwise, a file is "Reported" by default. - - - - - - Is the file being shared/posted out of mimicry or other seemingly non-malicious intent? - - - - - Tags indicated by ESP to describe the reported file. - - - - - - This field should be used only if your company has executed the MOU to participate in the Industry Hash Sharing Platform. Only populate with Industry-created classification scale (A1, A2, B1, or B2). - - - - - The original binary hash value of the file at the time it was uploaded by the reported user or person (prior to any potential modification by your company). Include required attribute hashType, specifying the type of hash submitted, e.g., MD5, SHA1, etc. - - - - - This represents the upload IP address of the file and when it occurred. - - - - - An ID for a device used to upload the file and, optionally, when it was used. - - - - - - Additional information regarding the uploaded file your company wishes to report (e.g., "viral video"). - - - - - - - - - All the file meta data name value pairs. - - - - - - The list of meta data. - - - - - - The type of meta data being sent. - - - - - - - - - - - - - - - - - - - - - - A person record. Can be used to represent a reported person or user, victim, or reporting person. - - - - - Person's first name. - - - - - Person's last name. - - - - - Phone number and type. - - - - - Contact email address (type and if verified). - - - - - Person's address. - - - - - Person's age. - - - - - The asserted age for the Person conflicts with the reporter's determination of the Person's age. - - - - - Person's date of birth. - - - - - - - - A person record with information pertinent for contact. - - - - - Person's first name. - - - - - Person's last name. - - - - - Phone number and type. - - - - - Contact email address (type and if verified). - - - - - Person's address. - - - - - - - - - - Street Address. - - - - - City. - - - - - Zip or postal code. - - - - - US State or territory. - - - - - If not in the United States, the state or province. - - - - - Country name or two letter country code. - - - - - - The type of address. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - The complex type phone contains the phone number and if available, the phone type. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - This is an enumeration of all supported incident types. Originally, we only supported child pornography, but we have expanded to support child sex trafficking, child sex tourism, sexual molestation, misleading domain names, misleading worlds or images, online enticement, or unsolicited obscene material to a child. - - - - - - - - - - - - - - - - This represents the origination IP address of an action and when it occurred. - - - - - The IP address from which the incident occurred. - - - - - Type of IP Address reported, e.g., Login, Registration, Upload, etc. - - - - - The time the incident occurred and the IP address was recorded. - - - - - If the ESP has reason to believe this IP address is a proxy, please indicate this here. - - - - - The port number of the IP address. - - - - - - - - This represents the capture of a device ID. - - - - - The type of device ID captured, e.g., IMEI, ICCID, SSID, etc.. - - - - - The value of the ID captured. - - - - - Event during which the company recorded the device ID capture reported, e.g., Login, Registration, Upload, etc.. - - - - - The time the incident occurred and the device ID was recorded. - - - - - - - - This defines the type of URL. Types include login, registration, etc. The available options are enumerated in the schema. - - - - - - - - - - - - - - The latitude or longitude is specified as a decimal number. Plus values represent north and east, negative values represents south and west. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - The full application name of the associated account. - - - - - - - - - Associated account person's first name. - - - - - Associated account person's middle name. - - - - - Associated account person's last name. - - - - - Associated account person's approximate age. - - - - - The asserted age for the associated account person conflicts with the reporter's determination of the associated account person's age. - - - - - Associated account person's date of birth. - - - - - Contact phone number (type and if verified). - - - - - Contact email address (type and if verified). - - - - - There are no additional emails to report. - - - - - Associated account's address. - - - - - The name of the reporter's product or service that was used by the associated account during the incident. - - - - - The unique ID of the associated account in the ESP's system (e.g., friend ID). - - - - - The identifying URL(s) for the associated account. - - - - - The screen name of the associated account. - - - - - A display name, other than a screen name or a username, for the associated account. - - - - - A copy of the user's bio as per their account according to the associated account's platform. - - - - - The ESP believes the associated account is engaged in an organized online group related to child sexual exploitation. This open text field is used to provide unique group identifiers (e.g., group name, group ID, etc.). - - - - - This account has been compromised, hacked, or hijacked. - - - - - Whether the account was temporarily disabled at any point. - - - - - Whether the account was permanently disabled. - - - - - An originating IP address used by the associated account and when it was used. - - - - - An ID for a device used by the associated account and, optionally, when it was used. - - - - - List of report ID numbers for any prior CyberTipline reports on this associated account. - - - - - Any additional notes on this associated account. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Is the file depicting anime, drawing, cartoon, virtual or hentai? - - - - - Is the file being shared/posted out of mimicry or other seemingly non-malicious intent? - - - - - Is the file circulating rapidly from one user to another? - - - - - Does the file contain content that is believed to be self- produced? - - - - - Does the file depict an intentional act of causing physical injury or trauma to a person? - - - - - Does the file depict graphic violence, including but not limited to acts of brutality or detailed or vivid gruesomeness? - - - - - Does the file involve an animal(s)? - - - - - Does the file depicts content that was streamed live at the time it was uploaded? - - - - - Does the file depict an infant? - - - - - Does the file contain content that is believed to be Generative Artificial Intelligence? - - - - - - - - - - - - - - - - - The complex type hash contains a hash and hash type. - - - - - - - - - - - - - The name of the meta data variable. - - - - - The value of the meta data variable. - - - - - - - - - - - - - - - This type supports the code of countries specified in the list of ISO 3166 Country Codes. - - - - - - Anonymous Proxy - - - - - Satellite Provider - - - - - Other Country - - - - - Andorra - - - - - United Arab Emirates - - - - - Afghanistan - - - - - Antigua and Barbuda - - - - - Anguilla - - - - - Albania - - - - - Armenia - - - - - Netherlands Antilles - - - - - Angola - - - - - Asia/Pacific Region - - - - - Antarctica - - - - - Argentina - - - - - American Samoa - - - - - Austria - - - - - Australia - - - - - Aruba - - - - - Aland Islands - - - - - Azerbaijan - - - - - Bosnia and Herzegovina - - - - - Barbados - - - - - Bangladesh - - - - - Belgium - - - - - Burkina Faso - - - - - Bulgaria - - - - - Bahrain - - - - - Burundi - - - - - Benin - - - - - Saint Bartelemey - - - - - Bermuda - - - - - Brunei Darussalam - - - - - Bolivia - - - - - Bonaire, Sint Eustatius and Saba - - - - - Brazil - - - - - Bahamas - - - - - Bhutan - - - - - Bouvet Island - - - - - Botswana - - - - - Belarus - - - - - Belize - - - - - Canada - - - - - Cocos (Keeling) Islands - - - - - Congo, The Democratic Republic of the - - - - - Central African Republic - - - - - Congo - - - - - Switzerland - - - - - Cote d'Ivoire - - - - - Cook Islands - - - - - Chile - - - - - Cameroon - - - - - China - - - - - Colombia - - - - - Costa Rica - - - - - Cuba - - - - - Cape Verde - - - - - Christmas Island - - - - - Curacao - - - - - Cyprus - - - - - Czech Republic - - - - - Germany - - - - - Djibouti - - - - - Denmark - - - - - Dominica - - - - - Dominican Republic - - - - - Algeria - - - - - Ecuador - - - - - Estonia - - - - - Egypt - - - - - Western Sahara - - - - - Eritrea - - - - - Spain - - - - - Ethiopia - - - - - Europe - - - - - Finland - - - - - Fiji - - - - - Falkland Islands (Malvinas) - - - - - Micronesia, Federated States of - - - - - Faroe Islands - - - - - France - - - - - France, Metropolitan - - - - - Gabon - - - - - United Kingdom - - - - - Grenada - - - - - Georgia - - - - - French Guiana - - - - - Guernsey - - - - - Ghana - - - - - Gibraltar - - - - - Greenland - - - - - Gambia - - - - - Guinea - - - - - Guadeloupe - - - - - Equatorial Guinea - - - - - Greece - - - - - South Georgia and the South Sandwich Islands - - - - - Guatemala - - - - - Guam - - - - - Guinea-Bissau - - - - - Guyana - - - - - Hong Kong - - - - - Heard Island and McDonald Islands - - - - - Honduras - - - - - Croatia - - - - - Haiti - - - - - Hungary - - - - - Indonesia - - - - - Ireland - - - - - Israel - - - - - Isle of Man - - - - - India - - - - - British Indian Ocean Territory - - - - - Iraq - - - - - Iran, Islamic Republic of - - - - - Iceland - - - - - Italy - - - - - Jersey - - - - - Jamaica - - - - - Jordan - - - - - Japan - - - - - Kenya - - - - - Kyrgyzstan - - - - - Cambodia - - - - - Kiribati - - - - - Comoros - - - - - Saint Kitts and Nevis - - - - - Korea, Democratic People's Republic of - - - - - Korea, Republic of - - - - - Kuwait - - - - - Cayman Islands - - - - - Kazakhstan - - - - - Lao People's Democratic Republic - - - - - Lebanon - - - - - Saint Lucia - - - - - Liechtenstein - - - - - Sri Lanka - - - - - Liberia - - - - - Lesotho - - - - - Lithuania - - - - - Luxembourg - - - - - Latvia - - - - - Libyan Arab Jamahiriya - - - - - Morocco - - - - - Monaco - - - - - Moldova, Republic of - - - - - Montenegro - - - - - Saint Martin - - - - - Madagascar - - - - - Marshall Islands - - - - - Macedonia - - - - - Mali - - - - - Myanmar - - - - - Mongolia - - - - - Macao - - - - - Northern Mariana Islands - - - - - Martinique - - - - - Mauritania - - - - - Montserrat - - - - - Malta - - - - - Mauritius - - - - - Maldives - - - - - Malawi - - - - - Mexico - - - - - Malaysia - - - - - Mozambique - - - - - Namibia - - - - - New Caledonia - - - - - Niger - - - - - Norfolk Island - - - - - Nigeria - - - - - Nicaragua - - - - - Netherlands - - - - - Norway - - - - - Nepal - - - - - Nauru - - - - - Niue - - - - - New Zealand - - - - - Oman - - - - - Panama - - - - - Peru - - - - - French Polynesia - - - - - Papua New Guinea - - - - - Philippines - - - - - Pakistan - - - - - Poland - - - - - Saint Pierre and Miquelon - - - - - Pitcairn - - - - - Puerto Rico - - - - - Palestinian Territory - - - - - Portugal - - - - - Palau - - - - - Paraguay - - - - - Qatar - - - - - Reunion - - - - - Romania - - - - - Serbia - - - - - Russian Federation - - - - - Rwanda - - - - - Saudi Arabia - - - - - Solomon Islands - - - - - Seychelles - - - - - Sudan - - - - - Sweden - - - - - Singapore - - - - - Saint Helena - - - - - Slovenia - - - - - Svalbard and Jan Mayen - - - - - Slovakia - - - - - Sierra Leone - - - - - San Marino - - - - - Senegal - - - - - Somalia - - - - - Suriname - - - - - South Sudan - - - - - Sao Tome and Principe - - - - - El Salvador - - - - - Sint Maarten (Dutch part) - - - - - Syrian Arab Republic - - - - - Swaziland - - - - - Turks and Caicos Islands - - - - - Chad - - - - - French Southern Territories - - - - - Togo - - - - - Thailand - - - - - Tajikistan - - - - - Tokelau - - - - - Timor-Leste - - - - - Turkmenistan - - - - - Tunisia - - - - - Tonga - - - - - Turkey - - - - - Trinidad and Tobago - - - - - Tuvalu - - - - - Taiwan - - - - - Tanzania, United Republic of - - - - - Ukraine - - - - - Uganda - - - - - United States Minor Outlying Islands - - - - - United States - - - - - Uruguay - - - - - Uzbekistan - - - - - Holy See (Vatican City State) - - - - - Saint Vincent and the Grenadines - - - - - Venezuela - - - - - Virgin Islands, British - - - - - Virgin Islands, U.S. - - - - - Vietnam - - - - - Vanuatu - - - - - Wallis and Futuna - - - - - Samoa - - - - - Kosovo - - - - - Yemen - - - - - Mayotte - - - - - South Africa - - - - - Zambia - - - - - Zimbabwe - - - - - - - - This type supports the two digit codes of the US states and territories. They are enumerated in the XML schema. - - - - - - Alaska - - - - - Alabama - - - - - Arkansas - - - - - Arizona - - - - - California - - - - - Colorado - - - - - Connecticut - - - - - District of Columbia - - - - - Delaware - - - - - Florida - - - - - Georgia - - - - - Guam - - - - - Hawaii - - - - - Iowa - - - - - Idaho - - - - - Illinois - - - - - Indiana - - - - - Kansas - - - - - Kentucky - - - - - Louisiana - - - - - Massachusetts - - - - - Maryland - - - - - Maine - - - - - Michigan - - - - - Minnesota - - - - - Missouri - - - - - Mississippi - - - - - Montana - - - - - North Carolina - - - - - North Dakota - - - - - Nebraska - - - - - New Hampshire - - - - - New Jersey - - - - - New Mexico - - - - - Nevada - - - - - New York - - - - - Ohio - - - - - Oklahoma - - - - - Oregon - - - - - Pennsylvania - - - - - Puerto Rico - - - - - Rhode Island - - - - - South Carolina - - - - - South Dakota - - - - - Tennessee - - - - - Texas - - - - - Utah - - - - - Virginia - - - - - Virgin Islands - - - - - Vermont - - - - - Washington - - - - - Wisconsin - - - - - West Virginia - - - - - Wyoming - - - - - - - - This element is the root element of the response to a report, file or file details submittal. - - - - - - The response code returned from the submittal. 0 is success, any non-zero number is an error code defined in the documentation. - - - - - The description of the error code or empty if the response is success. - - - - - The report ID about which this submittal is related. - - - - - If a file was uploaded, the file ID of the file. - - - - - If a file was uploaded, the md5 hash of the file. - - - - - - - - - The final response from the server once the report has been submitted, all files and file details have been uploaded and the report done has been submitted. - - - - - - The response code returned from the submittal. 0 is success, any non-zero number is an error code defined in the documentation. - - - - - - The list of files successfully uploaded. - - - - - - - - - - - diff --git a/fluxer_api/src/api/test/fixtures/thisisfine.gif b/fluxer_api/src/api/test/fixtures/thisisfine.gif deleted file mode 100644 index 6c8e2feb7..000000000 Binary files a/fluxer_api/src/api/test/fixtures/thisisfine.gif and /dev/null differ diff --git a/fluxer_api/src/api/user/tests/FavoriteMemeLimits.test.ts b/fluxer_api/src/api/user/tests/FavoriteMemeLimits.test.ts index 1bd4a7a5b..ac6bae003 100644 --- a/fluxer_api/src/api/user/tests/FavoriteMemeLimits.test.ts +++ b/fluxer_api/src/api/user/tests/FavoriteMemeLimits.test.ts @@ -113,13 +113,13 @@ describe('Favorite Meme Limits', () => { attachment_id: message1.attachments[0].id, name: 'PNG Meme', }); - const message2 = await createMessageWithImageAttachment(harness, account.token, channel.id, 'thisisfine.gif'); + const message2 = await createMessageWithImageAttachment(harness, account.token, channel.id, 'animated.gif'); const meme2 = await createFavoriteMemeFromMessage(harness, account.token, channel.id, message2.id, { attachment_id: message2.attachments[0].id, name: 'GIF Meme', }); expect(meme2.id).toBeTruthy(); - expect(meme2.filename).toBe('thisisfine.gif'); + expect(meme2.filename).toBe('animated.gif'); }); test('should return error for invalid attachment id', async () => { const account = await createTestAccountForAttachmentTests(harness); diff --git a/fluxer_api/src/api/user/tests/FavoriteMemeOperations.test.ts b/fluxer_api/src/api/user/tests/FavoriteMemeOperations.test.ts index c40c6e516..3e65adf2c 100644 --- a/fluxer_api/src/api/user/tests/FavoriteMemeOperations.test.ts +++ b/fluxer_api/src/api/user/tests/FavoriteMemeOperations.test.ts @@ -244,7 +244,7 @@ describe('Favorite Meme Operations', () => { attachment_id: message1.attachments[0].id, name: 'First Meme', }); - const message2 = await createMessageWithImageAttachment(harness, account.token, channel.id, 'thisisfine.gif'); + const message2 = await createMessageWithImageAttachment(harness, account.token, channel.id, 'animated.gif'); await createFavoriteMemeFromMessage(harness, account.token, channel.id, message2.id, { attachment_id: message2.attachments[0].id, name: 'Second Meme', diff --git a/fluxer_api/src/api/webhook/WebhookService.ts b/fluxer_api/src/api/webhook/WebhookService.ts index 2df4f3a4b..579677f13 100644 --- a/fluxer_api/src/api/webhook/WebhookService.ts +++ b/fluxer_api/src/api/webhook/WebhookService.ts @@ -1,9 +1,9 @@ // SPDX-License-Identifier: AGPL-3.0-or-later -import fs from 'node:fs/promises'; import {stripOwnAttachmentSignature} from '@app/api/attachment/AttachmentUrls'; import type {ChannelID, GuildID, MessageID, UserID, WebhookID, WebhookToken} from '@app/api/BrandedTypes'; import {createChannelID, createGuildID, createWebhookID, createWebhookToken} from '@app/api/BrandedTypes'; +import {Config} from '@app/api/Config'; import type {IChannelRepository} from '@app/api/channel/IChannelRepository'; import type {MessageRequest, MessageUpdateRequest} from '@app/api/channel/MessageTypes'; import {withChannelFollowLock} from '@app/api/channel/services/ChannelFollowers'; @@ -29,7 +29,6 @@ import type {RequestCache} from '@app/api/middleware/RequestCacheMiddleware'; import type {Channel} from '@app/api/models/Channel'; import type {Message} from '@app/api/models/Message'; import type {Webhook} from '@app/api/models/Webhook'; -import {resolveAssetPath} from '@app/api/utils/AssetPaths'; import * as RandomUtils from '@app/api/utils/RandomUtils'; import type {IWebhookRepository} from '@app/api/webhook/IWebhookRepository'; import {transform as GitHubTransform} from '@app/api/webhook/transformers/GitHubTransformer'; @@ -117,6 +116,10 @@ interface WebhookExecuteInstatusParams extends WebhookTokenParams { } const WEBHOOK_AVATAR_MISSING_CACHE_VALUE = '__fluxer_webhook_avatar_missing__'; +const HOSTED_WEBHOOK_AVATAR_URLS = { + github: 'https://fluxer.app/static/img/app-webhook-github.2d0319169a3aee33.webp', + instatus: 'https://fluxer.app/static/img/app-webhook-instatus.22ad5aee16da872c.webp', +} as const; export class WebhookService { private static readonly NO_ALLOWED_MENTIONS: AllowedMentionsRequest = {parse: []}; @@ -744,32 +747,22 @@ export class WebhookService { } private async getGitHubWebhookAvatar(webhookId: WebhookID): Promise { - return this.getStaticWebhookAvatar({webhookId, provider: 'github'}); + return this.getHostedWebhookAvatar({webhookId, provider: 'github'}); } private async getInstatusWebhookAvatar(webhookId: WebhookID): Promise { - return this.getStaticWebhookAvatar({webhookId, provider: 'instatus'}); + return this.getHostedWebhookAvatar({webhookId, provider: 'instatus'}); } - private async getStaticWebhookAvatar({ + private async getHostedWebhookAvatar({ webhookId, provider, }: { webhookId: WebhookID; - provider: 'github' | 'instatus'; + provider: keyof typeof HOSTED_WEBHOOK_AVATAR_URLS; }): Promise { - const cacheKey = `webhook:${webhookId}:avatar:${provider}`; - const avatarCache = await this.cacheService.get(cacheKey); - if (avatarCache) return avatarCache; - const avatarFile = await fs.readFile(resolveAssetPath('assets', `${provider}.webp`)); - const avatar = await this.avatarService.uploadAvatar({ - prefix: 'avatars', - entityId: webhookId, - errorPath: 'avatar', - base64Image: avatarFile.toString('base64'), - }); - await this.cacheService.set(cacheKey, avatar, seconds('1 day')); - return avatar; + if (Config.instance.selfHosted) return null; + return this.getWebhookAvatar({webhookId, avatarUrl: HOSTED_WEBHOOK_AVATAR_URLS[provider]}); } private getWebhookMetadata(webhook: Webhook): Record | undefined { diff --git a/fluxer_api/src/api/webhook/tests/WebhookEmojiBypass.test.ts b/fluxer_api/src/api/webhook/tests/WebhookEmojiBypass.test.ts index b0734e29d..48e1a5393 100644 --- a/fluxer_api/src/api/webhook/tests/WebhookEmojiBypass.test.ts +++ b/fluxer_api/src/api/webhook/tests/WebhookEmojiBypass.test.ts @@ -35,7 +35,7 @@ describe('Webhook emoji bypass', () => { user.token, guildId, 'animated', - 'thisisfine.gif', + 'animated.gif', 'image/gif', ); const webhook = await createWebhook(harness, channelId, user.token, 'Emoji Test Webhook'); diff --git a/fluxer_app/src/features/accessibility/components/NekoSprite.tsx b/fluxer_app/src/features/accessibility/components/NekoSprite.tsx index 974e7a367..43ecf8716 100644 --- a/fluxer_app/src/features/accessibility/components/NekoSprite.tsx +++ b/fluxer_app/src/features/accessibility/components/NekoSprite.tsx @@ -1,4 +1,5 @@ -// SPDX-License-Identifier: AGPL-3.0-or-later +// SPDX-License-Identifier: AGPL-3.0-or-later AND MIT +// SPDX-FileCopyrightText: 2022 adryd import styles from '@app/features/accessibility/components/NekoSprite.module.css'; import Accessibility from '@app/features/accessibility/state/Accessibility'; diff --git a/fluxer_app/src/features/app/config/HostedMedia.ts b/fluxer_app/src/features/app/config/HostedMedia.ts new file mode 100644 index 000000000..e52a51011 --- /dev/null +++ b/fluxer_app/src/features/app/config/HostedMedia.ts @@ -0,0 +1,5 @@ +// SPDX-License-Identifier: AGPL-3.0-or-later + +export function hostedImageUrl(name: string): string { + return `https://fluxer.app/static/img/${name}`; +} diff --git a/fluxer_app/src/features/moderation/components/modals/BanMemberModal.module.css b/fluxer_app/src/features/moderation/components/modals/BanMemberModal.module.css index 5ad088612..a05b49323 100644 --- a/fluxer_app/src/features/moderation/components/modals/BanMemberModal.module.css +++ b/fluxer_app/src/features/moderation/components/modals/BanMemberModal.module.css @@ -7,9 +7,13 @@ } .video { + display: block; width: 100%; max-width: 25rem; + height: auto; + aspect-ratio: 2 / 1; margin-bottom: 1rem; + object-fit: cover; } .sectionTitle { diff --git a/fluxer_app/src/features/moderation/components/modals/BanMemberModal.tsx b/fluxer_app/src/features/moderation/components/modals/BanMemberModal.tsx index 92f9aa59a..d64d0bba5 100644 --- a/fluxer_app/src/features/moderation/components/modals/BanMemberModal.tsx +++ b/fluxer_app/src/features/moderation/components/modals/BanMemberModal.tsx @@ -4,6 +4,7 @@ import Accessibility from '@app/features/accessibility/state/Accessibility'; import * as Modal from '@app/features/app/components/dialogs/Modal'; import {useAnimatedMediaVideoPlayback} from '@app/features/app/hooks/useAnimatedMediaPlayback'; import {useSaveData} from '@app/features/app/hooks/useSaveData'; +import RuntimeConfig from '@app/features/app/state/RuntimeConfig'; import * as GuildCommands from '@app/features/guild/commands/GuildCommands'; import { CUSTOM_ELLIPSIS_DESCRIPTOR, @@ -16,6 +17,7 @@ import { import {showModerationErrorModal} from '@app/features/moderation/components/alerts/ModerationErrorModalUtils'; import styles from '@app/features/moderation/components/modals/BanMemberModal.module.css'; import {BAN_DELETE_MESSAGE_OPTIONS} from '@app/features/moderation/constants/BanDeleteMessageOptions'; +import {BANNED_MP4, BANNED_POSTER, BANNED_WEBM} from '@app/features/moderation/constants/BanModalMedia'; import {Logger} from '@app/features/platform/utils/AppLogger'; import {Button} from '@app/features/ui/button/Button'; import * as ModalCommands from '@app/features/ui/commands/ModalCommands'; @@ -25,9 +27,6 @@ import {Input} from '@app/features/ui/components/form/FormInput'; import {RadioGroup} from '@app/features/ui/radio_group/RadioGroup'; import type {User} from '@app/features/user/models/User'; import * as DisplayNameUtils from '@app/features/user/utils/DisplayNameUtils'; -import bannedMp4 from '@app/media/videos/banned.mp4'; -import bannedWebm from '@app/media/videos/banned.webm'; -import bannedPoster from '@app/media/videos/banned.webp'; import {MAX_TEMP_BAN_DURATION_SECONDS, MIN_TEMP_BAN_DURATION_SECONDS} from '@fluxer/constants/src/LimitConstants'; import {msg} from '@lingui/core/macro'; import {Trans, useLingui} from '@lingui/react/macro'; @@ -101,7 +100,8 @@ export const BanMemberModal: React.FC<{guildId: string; targetUser: User}> = obs const {i18n} = useLingui(); const videoRef = useRef(null); const dataSaverOn = useSaveData(); - const motionArtworkAllowed = !Accessibility.useReducedMotion && !dataSaverOn; + const showArtwork = !RuntimeConfig.isSelfHosted(); + const motionArtworkAllowed = showArtwork && !Accessibility.useReducedMotion && !dataSaverOn; const videoPlaybackAllowed = useAnimatedMediaVideoPlayback(videoRef, {enabled: motionArtworkAllowed}); const [reason, setReason] = useState(''); const [deleteMessageSeconds, setDeleteMessageSeconds] = useState(60 * 60 * 24); @@ -160,22 +160,26 @@ export const BanMemberModal: React.FC<{guildId: string; targetUser: User}> = obs loop muted playsInline - poster={bannedPoster} + poster={BANNED_POSTER} + width={480} + height={240} className={styles.video} data-flx="moderation.ban-member-modal.video" > - - + + - ) : ( + ) : showArtwork ? ( - )} + ) : null}
label={i18n._(BAN_DURATION_DESCRIPTOR)} diff --git a/fluxer_app/src/features/moderation/constants/BanModalMedia.ts b/fluxer_app/src/features/moderation/constants/BanModalMedia.ts new file mode 100644 index 000000000..ca4dc28d8 --- /dev/null +++ b/fluxer_app/src/features/moderation/constants/BanModalMedia.ts @@ -0,0 +1,7 @@ +// SPDX-License-Identifier: AGPL-3.0-or-later + +import {hostedImageUrl} from '@app/features/app/config/HostedMedia'; + +export const BANNED_MP4 = hostedImageUrl('app-banned.57f4a7f02835e746.mp4'); +export const BANNED_WEBM = hostedImageUrl('app-banned.7b2a4c17603fbe1c.webm'); +export const BANNED_POSTER = hostedImageUrl('app-banned.da3d66d03a7c4962.webp'); diff --git a/fluxer_app/src/features/premium/components/plutonium_page/PlutoniumPage.module.css b/fluxer_app/src/features/premium/components/plutonium_page/PlutoniumPage.module.css index 290f66150..f69b8a114 100644 --- a/fluxer_app/src/features/premium/components/plutonium_page/PlutoniumPage.module.css +++ b/fluxer_app/src/features/premium/components/plutonium_page/PlutoniumPage.module.css @@ -778,6 +778,11 @@ .perkRowFlipped { grid-template-columns: 5fr 7fr; } + + .perkRowTextOnly { + grid-template-columns: minmax(0, 1fr); + padding-block: 2.5rem; + } } .perkArtColumn { diff --git a/fluxer_app/src/features/premium/components/plutonium_page/PlutoniumPage.tsx b/fluxer_app/src/features/premium/components/plutonium_page/PlutoniumPage.tsx index 26b7a3037..a81b5f18d 100644 --- a/fluxer_app/src/features/premium/components/plutonium_page/PlutoniumPage.tsx +++ b/fluxer_app/src/features/premium/components/plutonium_page/PlutoniumPage.tsx @@ -30,6 +30,7 @@ import { resolveUploadSizes, } from '@app/features/premium/components/plutonium_page/PlutoniumPageComparison'; import {PlutoniumPageIcon} from '@app/features/premium/components/plutonium_page/PlutoniumPageIcons'; +import {CROWN_AVIF, CROWN_WEBP} from '@app/features/premium/components/plutonium_page/PlutoniumPageMedia'; import { BACK_DESCRIPTOR, CLOSING_BODY_DESCRIPTOR, @@ -74,8 +75,6 @@ import FocusRing from '@app/features/ui/focus_ring/FocusRing'; import MobileLayout from '@app/features/ui/state/MobileLayout'; import Users from '@app/features/user/state/Users'; import * as LocaleUtils from '@app/features/user/utils/LocaleUtils'; -import crownAvif from '@app/media/images/plutonium/plutonium-crown.avif'; -import crownWebp from '@app/media/images/plutonium/plutonium-crown.webp'; import {GuildFeatures} from '@fluxer/constants/src/GuildConstants'; import {getFormattedLongDate} from '@fluxer/date_utils/src/DateFormatting'; import {Trans, useLingui} from '@lingui/react/macro'; @@ -451,22 +450,24 @@ export const PlutoniumPage = observer(function PlutoniumPage() { )}
-
- - - - -
+ {!RuntimeConfig.isSelfHosted() && ( +
+ + + + +
+ )}

{PREMIUM_PRODUCT_FULL_NAME}

diff --git a/fluxer_app/src/features/premium/components/plutonium_page/PlutoniumPageMedia.ts b/fluxer_app/src/features/premium/components/plutonium_page/PlutoniumPageMedia.ts new file mode 100644 index 000000000..d5a484f00 --- /dev/null +++ b/fluxer_app/src/features/premium/components/plutonium_page/PlutoniumPageMedia.ts @@ -0,0 +1,79 @@ +// SPDX-License-Identifier: AGPL-3.0-or-later + +import {hostedImageUrl} from '@app/features/app/config/HostedMedia'; + +export const CROWN_AVIF = hostedImageUrl('perks-plutonium-crown.4d0b72644330bf10.avif'); +export const CROWN_WEBP = hostedImageUrl('perks-plutonium-crown.3265aa6b4147b19b.webp'); + +export const AVATAR_LSF = hostedImageUrl('perks-avatar-lsf.0800cc17b7d31b5e.webp'); +export const BANNER_LSF = hostedImageUrl('perks-banner-lsf.05f2565afc72a167.webp'); +export const EMOJI_CATVIBE = hostedImageUrl('perks-emoji-catvibe.28e83552cc9a26c2.webp'); +export const EMOJI_CATWAVE = hostedImageUrl('perks-emoji-catwave.663abebab1c327fb.webp'); +export const STICKER_FEEL_THAT = hostedImageUrl('perks-sticker-feel-that.3eae385d2d9cc99a.webp'); + +type ShotSet = [string, string, string]; + +export interface ShotFamily { + avif: ShotSet; + webp: ShotSet; +} + +function hostedShotSet([small, medium, large]: ShotSet): ShotSet { + return [hostedImageUrl(small), hostedImageUrl(medium), hostedImageUrl(large)]; +} + +function shotFamily(avif: ShotSet, webp: ShotSet): ShotFamily { + return {avif: hostedShotSet(avif), webp: hostedShotSet(webp)}; +} + +export const EXPRESSIONS_SHOTS = shotFamily( + [ + 'screenshots-feature-perk-expressions-640w.481d53f29ebbe154.avif', + 'screenshots-feature-perk-expressions-1120w.609f056dd55a176f.avif', + 'screenshots-feature-perk-expressions-1600w.35a92d3fc43fa858.avif', + ], + [ + 'screenshots-feature-perk-expressions-640w.74bde0805e3452eb.webp', + 'screenshots-feature-perk-expressions-1120w.f52ad1f714185faa.webp', + 'screenshots-feature-perk-expressions-1600w.192c0d18c4a3d705.webp', + ], +); + +export const PROFILE_SHOTS = shotFamily( + [ + 'screenshots-feature-perk-profile-640w.0df90fc828ae1bb4.avif', + 'screenshots-feature-perk-profile-1120w.ca5e8d03c4f7eac7.avif', + 'screenshots-feature-perk-profile-1600w.c790612e9d3295f7.avif', + ], + [ + 'screenshots-feature-perk-profile-640w.76efd2d804dc3c32.webp', + 'screenshots-feature-perk-profile-1120w.799d04fb886684b2.webp', + 'screenshots-feature-perk-profile-1600w.7459898617b3aa74.webp', + ], +); + +export const STREAM_SHOTS = shotFamily( + [ + 'screenshots-feature-perk-stream-640w.d0567b22ca4d9910.avif', + 'screenshots-feature-perk-stream-1120w.07ea4f292b8953a5.avif', + 'screenshots-feature-perk-stream-1600w.c9697ce430b0773e.avif', + ], + [ + 'screenshots-feature-perk-stream-640w.2848435d90d0afa5.webp', + 'screenshots-feature-perk-stream-1120w.a2076637a71b99bd.webp', + 'screenshots-feature-perk-stream-1600w.745d8f0f60d30672.webp', + ], +); + +export const UPLOAD_SHOTS = shotFamily( + [ + 'screenshots-feature-perk-upload-640w.455d1bdceab21b42.avif', + 'screenshots-feature-perk-upload-1120w.392656a9b0f21585.avif', + 'screenshots-feature-perk-upload-1600w.1aa744f6f0122c3f.avif', + ], + [ + 'screenshots-feature-perk-upload-640w.5b80c11e2a6dfe63.webp', + 'screenshots-feature-perk-upload-1120w.156d068948c832fb.webp', + 'screenshots-feature-perk-upload-1600w.bc3223b318081269.webp', + ], +); diff --git a/fluxer_app/src/features/premium/components/plutonium_page/PlutoniumPageShowcase.tsx b/fluxer_app/src/features/premium/components/plutonium_page/PlutoniumPageShowcase.tsx index 85ddc3db0..35ea8e7fb 100644 --- a/fluxer_app/src/features/premium/components/plutonium_page/PlutoniumPageShowcase.tsx +++ b/fluxer_app/src/features/premium/components/plutonium_page/PlutoniumPageShowcase.tsx @@ -1,6 +1,19 @@ // SPDX-License-Identifier: AGPL-3.0-or-later +import RuntimeConfig from '@app/features/app/state/RuntimeConfig'; import styles from '@app/features/premium/components/plutonium_page/PlutoniumPage.module.css'; +import { + AVATAR_LSF, + BANNER_LSF, + EMOJI_CATVIBE, + EMOJI_CATWAVE, + EXPRESSIONS_SHOTS, + PROFILE_SHOTS, + type ShotFamily, + STICKER_FEEL_THAT, + STREAM_SHOTS, + UPLOAD_SHOTS, +} from '@app/features/premium/components/plutonium_page/PlutoniumPageMedia'; import { SHOWCASE_EXPRESSIONS_BODY_DESCRIPTOR, SHOWCASE_EXPRESSIONS_TITLE_DESCRIPTOR, @@ -13,35 +26,6 @@ import { TAG_FOOTNOTE_MARKER_DESCRIPTOR, } from '@app/features/premium/components/plutonium_page/PlutoniumPageMessages'; import FocusRing from '@app/features/ui/focus_ring/FocusRing'; -import avatarLsf from '@app/media/images/plutonium/avatar-lsf.webp'; -import bannerLsf from '@app/media/images/plutonium/banner-lsf.webp'; -import emojiCatvibe from '@app/media/images/plutonium/emoji-catvibe.webp'; -import emojiCatwave from '@app/media/images/plutonium/emoji-catwave.webp'; -import expressions640Avif from '@app/media/images/plutonium/feature-perk-expressions-640w.avif'; -import expressions640Webp from '@app/media/images/plutonium/feature-perk-expressions-640w.webp'; -import expressions1120Avif from '@app/media/images/plutonium/feature-perk-expressions-1120w.avif'; -import expressions1120Webp from '@app/media/images/plutonium/feature-perk-expressions-1120w.webp'; -import expressions1600Avif from '@app/media/images/plutonium/feature-perk-expressions-1600w.avif'; -import expressions1600Webp from '@app/media/images/plutonium/feature-perk-expressions-1600w.webp'; -import profile640Avif from '@app/media/images/plutonium/feature-perk-profile-640w.avif'; -import profile640Webp from '@app/media/images/plutonium/feature-perk-profile-640w.webp'; -import profile1120Avif from '@app/media/images/plutonium/feature-perk-profile-1120w.avif'; -import profile1120Webp from '@app/media/images/plutonium/feature-perk-profile-1120w.webp'; -import profile1600Avif from '@app/media/images/plutonium/feature-perk-profile-1600w.avif'; -import profile1600Webp from '@app/media/images/plutonium/feature-perk-profile-1600w.webp'; -import stream640Avif from '@app/media/images/plutonium/feature-perk-stream-640w.avif'; -import stream640Webp from '@app/media/images/plutonium/feature-perk-stream-640w.webp'; -import stream1120Avif from '@app/media/images/plutonium/feature-perk-stream-1120w.avif'; -import stream1120Webp from '@app/media/images/plutonium/feature-perk-stream-1120w.webp'; -import stream1600Avif from '@app/media/images/plutonium/feature-perk-stream-1600w.avif'; -import stream1600Webp from '@app/media/images/plutonium/feature-perk-stream-1600w.webp'; -import upload640Avif from '@app/media/images/plutonium/feature-perk-upload-640w.avif'; -import upload640Webp from '@app/media/images/plutonium/feature-perk-upload-640w.webp'; -import upload1120Avif from '@app/media/images/plutonium/feature-perk-upload-1120w.avif'; -import upload1120Webp from '@app/media/images/plutonium/feature-perk-upload-1120w.webp'; -import upload1600Avif from '@app/media/images/plutonium/feature-perk-upload-1600w.avif'; -import upload1600Webp from '@app/media/images/plutonium/feature-perk-upload-1600w.webp'; -import stickerFeelThat from '@app/media/images/plutonium/sticker-feel-that.webp'; import type {MessageDescriptor} from '@lingui/core'; import {useLingui} from '@lingui/react/macro'; import {clsx} from 'clsx'; @@ -50,11 +34,6 @@ import type React from 'react'; const PERK_SHOT_SIZES = '(min-width: 48rem) 50vw, calc(100vw - 5rem)'; const CHAT_SURFACE = 'rgb(30, 29, 35)'; -interface ShotFamily { - avif: [string, string, string]; - webp: [string, string, string]; -} - interface PerkOverlay { src: string; left: number; @@ -78,9 +57,9 @@ interface PerkCard { const SHOT_WIDTHS = [640, 1120, 1600] as const; const EXPRESSIONS_OVERLAYS: ReadonlyArray = [ - {src: emojiCatvibe, left: 65.22, top: 11.241, width: 4.372, height: 5.128, backdrop: CHAT_SURFACE}, - {src: emojiCatwave, left: 14.936, top: 31.197, width: 8.743, height: 10.256, backdrop: CHAT_SURFACE}, - {src: stickerFeelThat, left: 14.936, top: 52.35, width: 29.144, height: 34.188}, + {src: EMOJI_CATVIBE, left: 65.22, top: 11.241, width: 4.372, height: 5.128, backdrop: CHAT_SURFACE}, + {src: EMOJI_CATWAVE, left: 14.936, top: 31.197, width: 8.743, height: 10.256, backdrop: CHAT_SURFACE}, + {src: STICKER_FEEL_THAT, left: 14.936, top: 52.35, width: 29.144, height: 34.188}, ]; const PERK_CARDS: ReadonlyArray = [ @@ -88,10 +67,7 @@ const PERK_CARDS: ReadonlyArray = [ id: 'expressions', title: SHOWCASE_EXPRESSIONS_TITLE_DESCRIPTOR, body: SHOWCASE_EXPRESSIONS_BODY_DESCRIPTOR, - shots: { - avif: [expressions640Avif, expressions1120Avif, expressions1600Avif], - webp: [expressions640Webp, expressions1120Webp, expressions1600Webp], - }, + shots: EXPRESSIONS_SHOTS, width: 549, height: 468, overlays: EXPRESSIONS_OVERLAYS, @@ -100,10 +76,7 @@ const PERK_CARDS: ReadonlyArray = [ id: 'profile', title: SHOWCASE_PROFILE_TITLE_DESCRIPTOR, body: SHOWCASE_PROFILE_BODY_DESCRIPTOR, - shots: { - avif: [profile640Avif, profile1120Avif, profile1600Avif], - webp: [profile640Webp, profile1120Webp, profile1600Webp], - }, + shots: PROFILE_SHOTS, width: 662, height: 407, overlays: [], @@ -113,10 +86,7 @@ const PERK_CARDS: ReadonlyArray = [ id: 'stream', title: SHOWCASE_STREAM_TITLE_DESCRIPTOR, body: SHOWCASE_STREAM_BODY_DESCRIPTOR, - shots: { - avif: [stream640Avif, stream1120Avif, stream1600Avif], - webp: [stream640Webp, stream1120Webp, stream1600Webp], - }, + shots: STREAM_SHOTS, width: 588, height: 343, overlays: [], @@ -125,10 +95,7 @@ const PERK_CARDS: ReadonlyArray = [ id: 'upload', title: SHOWCASE_UPLOAD_TITLE_DESCRIPTOR, body: SHOWCASE_UPLOAD_BODY_DESCRIPTOR, - shots: { - avif: [upload640Avif, upload1120Avif, upload1600Avif], - webp: [upload640Webp, upload1120Webp, upload1600Webp], - }, + shots: UPLOAD_SHOTS, width: 549, height: 362, overlays: [], @@ -161,7 +128,7 @@ function ProfileOverlay() { - + ); @@ -238,6 +205,7 @@ export function PlutoniumPageShowcase({ onFootnoteClick, }: PlutoniumPageShowcaseProps) { const {i18n} = useLingui(); + const showArt = !RuntimeConfig.isSelfHosted(); return ( <> {PERK_CARDS.map((card, index) => { @@ -254,12 +222,14 @@ export function PlutoniumPageShowcase({ return (
-
- -
+ {showArt && ( +
+ +
+ )}

{i18n._(card.title, {size: uploadSize})} diff --git a/fluxer_app/src/features/ui/components/icons/InboxIcon.tsx b/fluxer_app/src/features/ui/components/icons/InboxIcon.tsx index 120db31a0..5f99a81a4 100644 --- a/fluxer_app/src/features/ui/components/icons/InboxIcon.tsx +++ b/fluxer_app/src/features/ui/components/icons/InboxIcon.tsx @@ -1,4 +1,5 @@ -// SPDX-License-Identifier: AGPL-3.0-or-later +// SPDX-License-Identifier: AGPL-3.0-or-later AND Apache-2.0 +// SPDX-FileCopyrightText: Google LLC import {remFromPx} from '@app/features/theme/layout/RemFromPx'; import type {IconProps} from '@phosphor-icons/react'; diff --git a/fluxer_app/src/media/images/fluxer-logo-color.svg b/fluxer_app/src/media/images/fluxer-logo-color.svg index dfb149804..3cddaf188 100644 --- a/fluxer_app/src/media/images/fluxer-logo-color.svg +++ b/fluxer_app/src/media/images/fluxer-logo-color.svg @@ -1,4 +1,5 @@ - + + diff --git a/fluxer_app/src/media/images/fluxer-logo-monochrome.svg b/fluxer_app/src/media/images/fluxer-logo-monochrome.svg index da0e0e36d..f90854efc 100644 --- a/fluxer_app/src/media/images/fluxer-logo-monochrome.svg +++ b/fluxer_app/src/media/images/fluxer-logo-monochrome.svg @@ -1,4 +1,5 @@ - + + \ No newline at end of file diff --git a/fluxer_app/src/media/images/fluxer-logo-wordmark-monochrome.svg b/fluxer_app/src/media/images/fluxer-logo-wordmark-monochrome.svg index bf4144534..9112bb8ad 100644 --- a/fluxer_app/src/media/images/fluxer-logo-wordmark-monochrome.svg +++ b/fluxer_app/src/media/images/fluxer-logo-wordmark-monochrome.svg @@ -1,4 +1,5 @@ - + + diff --git a/fluxer_app/src/media/images/fluxer-wordmark.svg b/fluxer_app/src/media/images/fluxer-wordmark.svg index cd71daf04..123b38f2f 100644 --- a/fluxer_app/src/media/images/fluxer-wordmark.svg +++ b/fluxer_app/src/media/images/fluxer-wordmark.svg @@ -1,4 +1,5 @@ - + + diff --git a/fluxer_app/src/media/images/i-like-food.svg b/fluxer_app/src/media/images/i-like-food.svg index aacc5cf06..5a4c15187 100644 --- a/fluxer_app/src/media/images/i-like-food.svg +++ b/fluxer_app/src/media/images/i-like-food.svg @@ -1,2 +1,3 @@ - + + \ No newline at end of file diff --git a/fluxer_app/src/media/images/neko.png.license b/fluxer_app/src/media/images/neko.png.license new file mode 100644 index 000000000..7ef2a1732 --- /dev/null +++ b/fluxer_app/src/media/images/neko.png.license @@ -0,0 +1,12 @@ +SPDX-License-Identifier: MIT +SPDX-FileCopyrightText: 2022 adryd + +Source: https://github.com/adryd325/oneko.js (oneko.gif) + +Copyright © 2022 adryd + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/fluxer_app/src/media/images/plutonium/avatar-lsf.webp b/fluxer_app/src/media/images/plutonium/avatar-lsf.webp deleted file mode 100644 index e3581a752..000000000 Binary files a/fluxer_app/src/media/images/plutonium/avatar-lsf.webp and /dev/null differ diff --git a/fluxer_app/src/media/images/plutonium/banner-lsf.webp b/fluxer_app/src/media/images/plutonium/banner-lsf.webp deleted file mode 100644 index 01985fb38..000000000 Binary files a/fluxer_app/src/media/images/plutonium/banner-lsf.webp and /dev/null differ diff --git a/fluxer_app/src/media/images/plutonium/emoji-catvibe.webp b/fluxer_app/src/media/images/plutonium/emoji-catvibe.webp deleted file mode 100644 index f99ff2775..000000000 Binary files a/fluxer_app/src/media/images/plutonium/emoji-catvibe.webp and /dev/null differ diff --git a/fluxer_app/src/media/images/plutonium/emoji-catwave.webp b/fluxer_app/src/media/images/plutonium/emoji-catwave.webp deleted file mode 100644 index f022da19b..000000000 Binary files a/fluxer_app/src/media/images/plutonium/emoji-catwave.webp and /dev/null differ diff --git a/fluxer_app/src/media/images/plutonium/feature-perk-expressions-1120w.avif b/fluxer_app/src/media/images/plutonium/feature-perk-expressions-1120w.avif deleted file mode 100644 index bfb8ec8ae..000000000 Binary files a/fluxer_app/src/media/images/plutonium/feature-perk-expressions-1120w.avif and /dev/null differ diff --git a/fluxer_app/src/media/images/plutonium/feature-perk-expressions-1120w.webp b/fluxer_app/src/media/images/plutonium/feature-perk-expressions-1120w.webp deleted file mode 100644 index cae8e2f75..000000000 Binary files a/fluxer_app/src/media/images/plutonium/feature-perk-expressions-1120w.webp and /dev/null differ diff --git a/fluxer_app/src/media/images/plutonium/feature-perk-expressions-1600w.avif b/fluxer_app/src/media/images/plutonium/feature-perk-expressions-1600w.avif deleted file mode 100644 index 9b663ebf2..000000000 Binary files a/fluxer_app/src/media/images/plutonium/feature-perk-expressions-1600w.avif and /dev/null differ diff --git a/fluxer_app/src/media/images/plutonium/feature-perk-expressions-1600w.webp b/fluxer_app/src/media/images/plutonium/feature-perk-expressions-1600w.webp deleted file mode 100644 index 8d8524597..000000000 Binary files a/fluxer_app/src/media/images/plutonium/feature-perk-expressions-1600w.webp and /dev/null differ diff --git a/fluxer_app/src/media/images/plutonium/feature-perk-expressions-640w.avif b/fluxer_app/src/media/images/plutonium/feature-perk-expressions-640w.avif deleted file mode 100644 index 43b3af737..000000000 Binary files a/fluxer_app/src/media/images/plutonium/feature-perk-expressions-640w.avif and /dev/null differ diff --git a/fluxer_app/src/media/images/plutonium/feature-perk-expressions-640w.webp b/fluxer_app/src/media/images/plutonium/feature-perk-expressions-640w.webp deleted file mode 100644 index cc7188e05..000000000 Binary files a/fluxer_app/src/media/images/plutonium/feature-perk-expressions-640w.webp and /dev/null differ diff --git a/fluxer_app/src/media/images/plutonium/feature-perk-profile-1120w.avif b/fluxer_app/src/media/images/plutonium/feature-perk-profile-1120w.avif deleted file mode 100644 index e336a58dc..000000000 Binary files a/fluxer_app/src/media/images/plutonium/feature-perk-profile-1120w.avif and /dev/null differ diff --git a/fluxer_app/src/media/images/plutonium/feature-perk-profile-1120w.webp b/fluxer_app/src/media/images/plutonium/feature-perk-profile-1120w.webp deleted file mode 100644 index bf6c3d9ba..000000000 Binary files a/fluxer_app/src/media/images/plutonium/feature-perk-profile-1120w.webp and /dev/null differ diff --git a/fluxer_app/src/media/images/plutonium/feature-perk-profile-1600w.avif b/fluxer_app/src/media/images/plutonium/feature-perk-profile-1600w.avif deleted file mode 100644 index eec2be91c..000000000 Binary files a/fluxer_app/src/media/images/plutonium/feature-perk-profile-1600w.avif and /dev/null differ diff --git a/fluxer_app/src/media/images/plutonium/feature-perk-profile-1600w.webp b/fluxer_app/src/media/images/plutonium/feature-perk-profile-1600w.webp deleted file mode 100644 index 83e30da34..000000000 Binary files a/fluxer_app/src/media/images/plutonium/feature-perk-profile-1600w.webp and /dev/null differ diff --git a/fluxer_app/src/media/images/plutonium/feature-perk-profile-640w.avif b/fluxer_app/src/media/images/plutonium/feature-perk-profile-640w.avif deleted file mode 100644 index 9ac84241f..000000000 Binary files a/fluxer_app/src/media/images/plutonium/feature-perk-profile-640w.avif and /dev/null differ diff --git a/fluxer_app/src/media/images/plutonium/feature-perk-profile-640w.webp b/fluxer_app/src/media/images/plutonium/feature-perk-profile-640w.webp deleted file mode 100644 index fa16a4c41..000000000 Binary files a/fluxer_app/src/media/images/plutonium/feature-perk-profile-640w.webp and /dev/null differ diff --git a/fluxer_app/src/media/images/plutonium/feature-perk-stream-1120w.avif b/fluxer_app/src/media/images/plutonium/feature-perk-stream-1120w.avif deleted file mode 100644 index 944a04aaf..000000000 Binary files a/fluxer_app/src/media/images/plutonium/feature-perk-stream-1120w.avif and /dev/null differ diff --git a/fluxer_app/src/media/images/plutonium/feature-perk-stream-1120w.webp b/fluxer_app/src/media/images/plutonium/feature-perk-stream-1120w.webp deleted file mode 100644 index a0a883eb8..000000000 Binary files a/fluxer_app/src/media/images/plutonium/feature-perk-stream-1120w.webp and /dev/null differ diff --git a/fluxer_app/src/media/images/plutonium/feature-perk-stream-1600w.avif b/fluxer_app/src/media/images/plutonium/feature-perk-stream-1600w.avif deleted file mode 100644 index 40e773141..000000000 Binary files a/fluxer_app/src/media/images/plutonium/feature-perk-stream-1600w.avif and /dev/null differ diff --git a/fluxer_app/src/media/images/plutonium/feature-perk-stream-1600w.webp b/fluxer_app/src/media/images/plutonium/feature-perk-stream-1600w.webp deleted file mode 100644 index 3233a5c15..000000000 Binary files a/fluxer_app/src/media/images/plutonium/feature-perk-stream-1600w.webp and /dev/null differ diff --git a/fluxer_app/src/media/images/plutonium/feature-perk-stream-640w.avif b/fluxer_app/src/media/images/plutonium/feature-perk-stream-640w.avif deleted file mode 100644 index 128446a68..000000000 Binary files a/fluxer_app/src/media/images/plutonium/feature-perk-stream-640w.avif and /dev/null differ diff --git a/fluxer_app/src/media/images/plutonium/feature-perk-stream-640w.webp b/fluxer_app/src/media/images/plutonium/feature-perk-stream-640w.webp deleted file mode 100644 index ae2da769d..000000000 Binary files a/fluxer_app/src/media/images/plutonium/feature-perk-stream-640w.webp and /dev/null differ diff --git a/fluxer_app/src/media/images/plutonium/feature-perk-upload-1120w.avif b/fluxer_app/src/media/images/plutonium/feature-perk-upload-1120w.avif deleted file mode 100644 index 00e8b7e15..000000000 Binary files a/fluxer_app/src/media/images/plutonium/feature-perk-upload-1120w.avif and /dev/null differ diff --git a/fluxer_app/src/media/images/plutonium/feature-perk-upload-1120w.webp b/fluxer_app/src/media/images/plutonium/feature-perk-upload-1120w.webp deleted file mode 100644 index c77de2027..000000000 Binary files a/fluxer_app/src/media/images/plutonium/feature-perk-upload-1120w.webp and /dev/null differ diff --git a/fluxer_app/src/media/images/plutonium/feature-perk-upload-1600w.avif b/fluxer_app/src/media/images/plutonium/feature-perk-upload-1600w.avif deleted file mode 100644 index 741d981d3..000000000 Binary files a/fluxer_app/src/media/images/plutonium/feature-perk-upload-1600w.avif and /dev/null differ diff --git a/fluxer_app/src/media/images/plutonium/feature-perk-upload-1600w.webp b/fluxer_app/src/media/images/plutonium/feature-perk-upload-1600w.webp deleted file mode 100644 index 169bc0ca3..000000000 Binary files a/fluxer_app/src/media/images/plutonium/feature-perk-upload-1600w.webp and /dev/null differ diff --git a/fluxer_app/src/media/images/plutonium/feature-perk-upload-640w.avif b/fluxer_app/src/media/images/plutonium/feature-perk-upload-640w.avif deleted file mode 100644 index e11391e5c..000000000 Binary files a/fluxer_app/src/media/images/plutonium/feature-perk-upload-640w.avif and /dev/null differ diff --git a/fluxer_app/src/media/images/plutonium/feature-perk-upload-640w.webp b/fluxer_app/src/media/images/plutonium/feature-perk-upload-640w.webp deleted file mode 100644 index 36e5483b6..000000000 Binary files a/fluxer_app/src/media/images/plutonium/feature-perk-upload-640w.webp and /dev/null differ diff --git a/fluxer_app/src/media/images/plutonium/plutonium-crown.avif b/fluxer_app/src/media/images/plutonium/plutonium-crown.avif deleted file mode 100644 index a6ad7eb13..000000000 Binary files a/fluxer_app/src/media/images/plutonium/plutonium-crown.avif and /dev/null differ diff --git a/fluxer_app/src/media/images/plutonium/plutonium-crown.webp b/fluxer_app/src/media/images/plutonium/plutonium-crown.webp deleted file mode 100644 index 796554eb7..000000000 Binary files a/fluxer_app/src/media/images/plutonium/plutonium-crown.webp and /dev/null differ diff --git a/fluxer_app/src/media/images/plutonium/sticker-feel-that.webp b/fluxer_app/src/media/images/plutonium/sticker-feel-that.webp deleted file mode 100644 index 15cc17bd9..000000000 Binary files a/fluxer_app/src/media/images/plutonium/sticker-feel-that.webp and /dev/null differ diff --git a/fluxer_app/src/media/videos/banned.mp4 b/fluxer_app/src/media/videos/banned.mp4 deleted file mode 100644 index 168893c29..000000000 Binary files a/fluxer_app/src/media/videos/banned.mp4 and /dev/null differ diff --git a/fluxer_app/src/media/videos/banned.webm b/fluxer_app/src/media/videos/banned.webm deleted file mode 100644 index 85467ebb7..000000000 Binary files a/fluxer_app/src/media/videos/banned.webm and /dev/null differ diff --git a/fluxer_app/src/media/videos/banned.webp b/fluxer_app/src/media/videos/banned.webp deleted file mode 100644 index cd571217d..000000000 Binary files a/fluxer_app/src/media/videos/banned.webp and /dev/null differ diff --git a/fluxer_app_proxy/src/csp.rs b/fluxer_app_proxy/src/csp.rs index bd6493211..6c4003ceb 100644 --- a/fluxer_app_proxy/src/csp.rs +++ b/fluxer_app_proxy/src/csp.rs @@ -96,6 +96,7 @@ const FRAME_SOURCES: &[&str] = &[ const IMAGE_SOURCES: &[&str] = &[ "https://*.fluxer.app", + "https://fluxer.app", "https://i.ytimg.com", "https://*.youtube.com", "https://*.fluxer.media", @@ -104,6 +105,7 @@ const IMAGE_SOURCES: &[&str] = &[ const MEDIA_SOURCES: &[&str] = &[ "https://*.fluxer.app", + "https://fluxer.app", "https://*.youtube.com", "https://*.fluxer.media", "https://fluxer.media", @@ -434,6 +436,24 @@ mod tests { assert!(csp.contains("frame-ancestors 'none'")); } + #[test] + fn build_csp_allows_the_apex_domain_for_images_and_media() { + let config = default_csp_config(); + let csp = build_csp(&config, &[hash_of("boot()")], &runtime_sources()); + for name in ["img-src ", "media-src "] { + let directive = csp + .split("; ") + .find(|directive| directive.starts_with(name)) + .expect("directive"); + assert!( + directive + .split(' ') + .any(|source| source == "https://fluxer.app"), + "{name}must allow the apex domain: {directive}" + ); + } + } + #[test] fn build_csp_allows_blob_connections_for_camera_background_media() { let config = default_csp_config(); diff --git a/fluxer_app_proxy/src/routes/spa_index.rs b/fluxer_app_proxy/src/routes/spa_index.rs index 4b87f037c..3e589f110 100644 --- a/fluxer_app_proxy/src/routes/spa_index.rs +++ b/fluxer_app_proxy/src/routes/spa_index.rs @@ -74,7 +74,6 @@ const STATIC_ASSET_PREFIXES: &[&str] = &[ "/avatars/", "/badges/", "/desktop/", - "/embeds/", "/emoji/", "/libs/", "/marketing/", diff --git a/fluxer_desktop/build_resources/icons-canary/AppIcon.icon/Assets/Vector.svg b/fluxer_desktop/build_resources/icons-canary/AppIcon.icon/Assets/Vector.svg index 4b9133a1e..dc7dce7fe 100644 --- a/fluxer_desktop/build_resources/icons-canary/AppIcon.icon/Assets/Vector.svg +++ b/fluxer_desktop/build_resources/icons-canary/AppIcon.icon/Assets/Vector.svg @@ -1,4 +1,5 @@ - + + diff --git a/fluxer_desktop/build_resources/icons-stable/AppIcon.icon/Assets/Vector.svg b/fluxer_desktop/build_resources/icons-stable/AppIcon.icon/Assets/Vector.svg index 4b9133a1e..dc7dce7fe 100644 --- a/fluxer_desktop/build_resources/icons-stable/AppIcon.icon/Assets/Vector.svg +++ b/fluxer_desktop/build_resources/icons-stable/AppIcon.icon/Assets/Vector.svg @@ -1,4 +1,5 @@ - + + diff --git a/fluxer_desktop/packaging/linux/app.fluxer.Fluxer.metainfo.xml b/fluxer_desktop/packaging/linux/app.fluxer.Fluxer.metainfo.xml index 4c74d8bd5..39eb3c21d 100644 --- a/fluxer_desktop/packaging/linux/app.fluxer.Fluxer.metainfo.xml +++ b/fluxer_desktop/packaging/linux/app.fluxer.Fluxer.metainfo.xml @@ -44,7 +44,7 @@ The main Fluxer window. - https://raw.githubusercontent.com/fluxerapp/fluxer/refs/heads/main/fluxer_static/marketing/screenshots/desktop-2560w.avif + https://fluxer.app/static/img/screenshots-desktop-2560w.948e9d88f4c9807a.avif https://github.com/fluxerapp/fluxer/issues diff --git a/fluxer_desktop/packaging/linux/app.fluxer.Fluxer.svg b/fluxer_desktop/packaging/linux/app.fluxer.Fluxer.svg index 28d8e85aa..7d18e18f6 100644 --- a/fluxer_desktop/packaging/linux/app.fluxer.Fluxer.svg +++ b/fluxer_desktop/packaging/linux/app.fluxer.Fluxer.svg @@ -1,2 +1,3 @@ - + + diff --git a/fluxer_desktop/packaging/linux/app.fluxer.FluxerCanary.metainfo.xml b/fluxer_desktop/packaging/linux/app.fluxer.FluxerCanary.metainfo.xml index c4bbbb6a3..e767f0332 100644 --- a/fluxer_desktop/packaging/linux/app.fluxer.FluxerCanary.metainfo.xml +++ b/fluxer_desktop/packaging/linux/app.fluxer.FluxerCanary.metainfo.xml @@ -44,7 +44,7 @@ The main Fluxer window. - https://fluxerstatic.com/marketing/screenshots/desktop-1920w.avif + https://fluxer.app/static/img/screenshots-desktop-1920w.4976d2d1f2238c05.avif https://github.com/fluxerapp/fluxer/issues diff --git a/fluxer_desktop/packaging/linux/app.fluxer.FluxerCanary.svg b/fluxer_desktop/packaging/linux/app.fluxer.FluxerCanary.svg index 36ebf78da..b46da5802 100644 --- a/fluxer_desktop/packaging/linux/app.fluxer.FluxerCanary.svg +++ b/fluxer_desktop/packaging/linux/app.fluxer.FluxerCanary.svg @@ -1,2 +1,3 @@ - + + diff --git a/fluxer_docs/src/content/docs/operator/configuration.mdx b/fluxer_docs/src/content/docs/operator/configuration.mdx index 33665fb72..c842aa927 100644 --- a/fluxer_docs/src/content/docs/operator/configuration.mdx +++ b/fluxer_docs/src/content/docs/operator/configuration.mdx @@ -174,7 +174,7 @@ The API and worker validate endpoint URLs at startup. The Gateway endpoint requi #### `FLUXER_STATIC_CDN_DOMAIN` -Default empty. A separate host for static assets. When set, the static endpoint of `api` and `worker` is forced to `https` with no port. Only `api` and `worker` read it, so set `FLUXER_STATIC_CDN_ENDPOINT` to the same origin as well for `admin`, `app-proxy`, `gateway` and `unfurl`. Compose forwards it from `.env`. +Default empty. A separate host for static assets. When set, the static endpoint of `api` and `worker` is forced to `https` with no port. Only `api` and `worker` read it, so set `FLUXER_STATIC_CDN_ENDPOINT` to the same origin as well for `admin`, `app-proxy` and `gateway`. Compose forwards it from `.env`. #### `FLUXER_INVITE_DOMAIN` @@ -210,7 +210,7 @@ Defaults to the derived endpoint. The public Media Proxy URL. The `gifs` service #### `FLUXER_STATIC_CDN_ENDPOINT` -Defaults to the derived endpoint. The static asset origin. Read by `api`, `worker`, `admin`, `app-proxy`, and `unfurl`. Compose forwards it from `.env`. When it is unset, `admin` and `unfurl-shard` get the public origin, and every other service derives it itself. +Defaults to the derived endpoint. The static asset origin. Read by `api`, `worker`, `admin`, and `app-proxy`. Compose forwards it from `.env`. When it is unset, `admin` gets the public origin, and every other service derives it itself. #### `FLUXER_ADMIN_ENDPOINT` @@ -252,10 +252,6 @@ No default. The internal Media Proxy address. `unfurl-shard` reads this name alo No default. The public Media Proxy URL used by `gifs`, `unfurl`, and `media-proxy`. `gifs` requires this or `FLUXER_MEDIA_ENDPOINT` to start. Set it on `media-proxy` so requests for its own assets use local storage instead of an HTTP round trip. For `api` and `worker`, use `FLUXER_MEDIA_ENDPOINT` instead. Compose forwards it from `.env` to every app service. When it is unset, they get `FLUXER_MEDIA_ENDPOINT`, or the public media URL when that is unset too. -#### `FLUXER_UNFURL_STATIC_CDN_ENDPOINT` - -Falls back to `FLUXER_STATIC_CDN_ENDPOINT`. The static origin used by `unfurl`. Read only by `unfurl`. Compose forwards it from `.env` to `unfurl-shard`. - ## The edge The `edge` container is the only HTTP entry point. Neither layout below needs a change to the edge settings. @@ -1082,7 +1078,7 @@ Default `development`. The runtime mode. `development`, `production`, or `test`. #### `FLUXER_SELF_HOSTED` -Default `false`. The self-host switch. Compose sets `true`. It relaxes the production Postgres SSL requirement, seeds the limit tier, gates registration, donation and discovery controllers, keeps premium billing off until it is set up as [Payments](#payments) describes, and turns blocklist feeds off. +Default `false`. The self-host switch. Compose sets `true`. It relaxes the production Postgres SSL requirement, seeds the limit tier, gates registration, donation and discovery controllers, keeps premium billing off until it is set up as [Payments](#payments) describes, turns blocklist feeds off, and keeps hosted-only artwork from `fluxer.app` out of the app, webhook avatars and link embeds. `/_metrics` on `api`, `media-proxy`, `gateway`, and `push`, plus the Gateway's `/_health/ready`, `/_health/drain`, and `/_health/undrain`, are gated to loopback peers, so no proxy reaches them. The probes that work from outside are `/api/_health`, `/gateway/_health`, `/media/_health`, and the edge's own `/_health`. diff --git a/fluxer_static/Dockerfile b/fluxer_static/Dockerfile index a979d4707..b0d430327 100644 --- a/fluxer_static/Dockerfile +++ b/fluxer_static/Dockerfile @@ -9,7 +9,7 @@ ARG SOURCE_DATE="" LABEL org.opencontainers.image.title="fluxer-static" LABEL org.opencontainers.image.description="Self-hostable static asset bundle for Fluxer" -LABEL org.opencontainers.image.licenses="AGPL-3.0-or-later" +LABEL org.opencontainers.image.licenses="AGPL-3.0-or-later AND CC-BY-SA-4.0 AND CC-BY-4.0" LABEL org.opencontainers.image.vendor="Fluxer" LABEL org.opencontainers.image.url="https://fluxer.app" LABEL org.opencontainers.image.documentation="https://docs.fluxer.app" @@ -20,10 +20,10 @@ LABEL org.opencontainers.image.created="${SOURCE_DATE}" LABEL app.fluxer.build-version="${BUILD_VERSION}" COPY fluxer_static/Caddyfile /etc/caddy/Caddyfile +COPY --chown=65532:65532 fluxer_static/LICENSE fluxer_static/THIRD_PARTY_LICENSES.md /srv/fluxer-static/ COPY --chown=65532:65532 fluxer_static/avatars /srv/fluxer-static/avatars COPY --chown=65532:65532 fluxer_static/badges /srv/fluxer-static/badges COPY --chown=65532:65532 fluxer_static/desktop /srv/fluxer-static/desktop -COPY --chown=65532:65532 fluxer_static/embeds /srv/fluxer-static/embeds COPY --chown=65532:65532 fluxer_static/emoji /srv/fluxer-static/emoji COPY --chown=65532:65532 fluxer_static/web /srv/fluxer-static/web diff --git a/fluxer_static/LICENSE b/fluxer_static/LICENSE index 15cfa6697..3ba531891 100644 --- a/fluxer_static/LICENSE +++ b/fluxer_static/LICENSE @@ -1,13 +1,449 @@ -Fluxer Static Asset License Notice +Fluxer artwork license -Unless a file or directory carries a more specific license notice, the contents -of this repository are copyright Fluxer and are all rights reserved. This -includes Fluxer branding, icons, default avatars, badge artwork, screenshots, -marketing images, generated app imagery, and repository automation files. +Copyright Fluxer Platform AB -Third-party materials retain their upstream licenses. See -THIRD_PARTY_LICENSES.md and the license or notice files in the relevant -subdirectories for those terms. +Fluxer-owned artwork is licensed under the Creative Commons +Attribution-ShareAlike 4.0 International License (CC BY-SA 4.0). The full +legal code follows below. This covers the Fluxer-owned assets in fluxer_static, +such as the logo, symbol, badges, default avatars, favicons, app icons, Open +Graph image and branding files. It also covers the same Fluxer artwork wherever +else it appears in this repository, for example the desktop app icons, the app +logo SVGs and the docs logo. + +Third-party files keep their own licenses. See THIRD_PARTY_LICENSES.md and the +license or notice files in the relevant directories. + +This license does not grant trademark rights (section 2(b)(2) of the legal +code). Use of the Fluxer name and logo is covered by the "Name and marks" +section of .github/GOVERNANCE.md. + +======================================================================= + +Attribution-ShareAlike 4.0 International + +======================================================================= + +Creative Commons Corporation ("Creative Commons") is not a law firm and +does not provide legal services or legal advice. Distribution of +Creative Commons public licenses does not create a lawyer-client or +other relationship. Creative Commons makes its licenses and related +information available on an "as-is" basis. Creative Commons gives no +warranties regarding its licenses, any material licensed under their +terms and conditions, or any related information. Creative Commons +disclaims all liability for damages resulting from their use to the +fullest extent possible. + +Using Creative Commons Public Licenses + +Creative Commons public licenses provide a standard set of terms and +conditions that creators and other rights holders may use to share +original works of authorship and other material subject to copyright +and certain other rights specified in the public license below. The +following considerations are for informational purposes only, are not +exhaustive, and do not form part of our licenses. + + Considerations for licensors: Our public licenses are + intended for use by those authorized to give the public + permission to use material in ways otherwise restricted by + copyright and certain other rights. Our licenses are + irrevocable. Licensors should read and understand the terms + and conditions of the license they choose before applying it. + Licensors should also secure all rights necessary before + applying our licenses so that the public can reuse the + material as expected. Licensors should clearly mark any + material not subject to the license. This includes other CC- + licensed material, or material used under an exception or + limitation to copyright. More considerations for licensors: + wiki.creativecommons.org/Considerations_for_licensors + + Considerations for the public: By using one of our public + licenses, a licensor grants the public permission to use the + licensed material under specified terms and conditions. If + the licensor's permission is not necessary for any reason--for + example, because of any applicable exception or limitation to + copyright--then that use is not regulated by the license. Our + licenses grant only permissions under copyright and certain + other rights that a licensor has authority to grant. Use of + the licensed material may still be restricted for other + reasons, including because others have copyright or other + rights in the material. A licensor may make special requests, + such as asking that all changes be marked or described. + Although not required by our licenses, you are encouraged to + respect those requests where reasonable. More considerations + for the public: + wiki.creativecommons.org/Considerations_for_licensees + +======================================================================= + +Creative Commons Attribution-ShareAlike 4.0 International Public +License + +By exercising the Licensed Rights (defined below), You accept and agree +to be bound by the terms and conditions of this Creative Commons +Attribution-ShareAlike 4.0 International Public License ("Public +License"). To the extent this Public License may be interpreted as a +contract, You are granted the Licensed Rights in consideration of Your +acceptance of these terms and conditions, and the Licensor grants You +such rights in consideration of benefits the Licensor receives from +making the Licensed Material available under these terms and +conditions. + + +Section 1 -- Definitions. + + a. Adapted Material means material subject to Copyright and Similar + Rights that is derived from or based upon the Licensed Material + and in which the Licensed Material is translated, altered, + arranged, transformed, or otherwise modified in a manner requiring + permission under the Copyright and Similar Rights held by the + Licensor. For purposes of this Public License, where the Licensed + Material is a musical work, performance, or sound recording, + Adapted Material is always produced where the Licensed Material is + synched in timed relation with a moving image. + + b. Adapter's License means the license You apply to Your Copyright + and Similar Rights in Your contributions to Adapted Material in + accordance with the terms and conditions of this Public License. + + c. BY-SA Compatible License means a license listed at + creativecommons.org/compatiblelicenses, approved by Creative + Commons as essentially the equivalent of this Public License. + + d. Copyright and Similar Rights means copyright and/or similar rights + closely related to copyright including, without limitation, + performance, broadcast, sound recording, and Sui Generis Database + Rights, without regard to how the rights are labeled or + categorized. For purposes of this Public License, the rights + specified in Section 2(b)(1)-(2) are not Copyright and Similar + Rights. + + e. Effective Technological Measures means those measures that, in the + absence of proper authority, may not be circumvented under laws + fulfilling obligations under Article 11 of the WIPO Copyright + Treaty adopted on December 20, 1996, and/or similar international + agreements. + + f. Exceptions and Limitations means fair use, fair dealing, and/or + any other exception or limitation to Copyright and Similar Rights + that applies to Your use of the Licensed Material. + + g. License Elements means the license attributes listed in the name + of a Creative Commons Public License. The License Elements of this + Public License are Attribution and ShareAlike. + + h. Licensed Material means the artistic or literary work, database, + or other material to which the Licensor applied this Public + License. + + i. Licensed Rights means the rights granted to You subject to the + terms and conditions of this Public License, which are limited to + all Copyright and Similar Rights that apply to Your use of the + Licensed Material and that the Licensor has authority to license. + + j. Licensor means the individual(s) or entity(ies) granting rights + under this Public License. + + k. Share means to provide material to the public by any means or + process that requires permission under the Licensed Rights, such + as reproduction, public display, public performance, distribution, + dissemination, communication, or importation, and to make material + available to the public including in ways that members of the + public may access the material from a place and at a time + individually chosen by them. + + l. Sui Generis Database Rights means rights other than copyright + resulting from Directive 96/9/EC of the European Parliament and of + the Council of 11 March 1996 on the legal protection of databases, + as amended and/or succeeded, as well as other essentially + equivalent rights anywhere in the world. + + m. You means the individual or entity exercising the Licensed Rights + under this Public License. Your has a corresponding meaning. + + +Section 2 -- Scope. + + a. License grant. + + 1. Subject to the terms and conditions of this Public License, + the Licensor hereby grants You a worldwide, royalty-free, + non-sublicensable, non-exclusive, irrevocable license to + exercise the Licensed Rights in the Licensed Material to: + + a. reproduce and Share the Licensed Material, in whole or + in part; and + + b. produce, reproduce, and Share Adapted Material. + + 2. Exceptions and Limitations. For the avoidance of doubt, where + Exceptions and Limitations apply to Your use, this Public + License does not apply, and You do not need to comply with + its terms and conditions. + + 3. Term. The term of this Public License is specified in Section + 6(a). + + 4. Media and formats; technical modifications allowed. The + Licensor authorizes You to exercise the Licensed Rights in + all media and formats whether now known or hereafter created, + and to make technical modifications necessary to do so. The + Licensor waives and/or agrees not to assert any right or + authority to forbid You from making technical modifications + necessary to exercise the Licensed Rights, including + technical modifications necessary to circumvent Effective + Technological Measures. For purposes of this Public License, + simply making modifications authorized by this Section 2(a) + (4) never produces Adapted Material. + + 5. Downstream recipients. + + a. Offer from the Licensor -- Licensed Material. Every + recipient of the Licensed Material automatically + receives an offer from the Licensor to exercise the + Licensed Rights under the terms and conditions of this + Public License. + + b. Additional offer from the Licensor -- Adapted Material. + Every recipient of Adapted Material from You + automatically receives an offer from the Licensor to + exercise the Licensed Rights in the Adapted Material + under the conditions of the Adapter's License You apply. + + c. No downstream restrictions. You may not offer or impose + any additional or different terms or conditions on, or + apply any Effective Technological Measures to, the + Licensed Material if doing so restricts exercise of the + Licensed Rights by any recipient of the Licensed + Material. + + 6. No endorsement. Nothing in this Public License constitutes or + may be construed as permission to assert or imply that You + are, or that Your use of the Licensed Material is, connected + with, or sponsored, endorsed, or granted official status by, + the Licensor or others designated to receive attribution as + provided in Section 3(a)(1)(A)(i). + + b. Other rights. + + 1. Moral rights, such as the right of integrity, are not + licensed under this Public License, nor are publicity, + privacy, and/or other similar personality rights; however, to + the extent possible, the Licensor waives and/or agrees not to + assert any such rights held by the Licensor to the limited + extent necessary to allow You to exercise the Licensed + Rights, but not otherwise. + + 2. Patent and trademark rights are not licensed under this + Public License. + + 3. To the extent possible, the Licensor waives any right to + collect royalties from You for the exercise of the Licensed + Rights, whether directly or through a collecting society + under any voluntary or waivable statutory or compulsory + licensing scheme. In all other cases the Licensor expressly + reserves any right to collect such royalties. + + +Section 3 -- License Conditions. + +Your exercise of the Licensed Rights is expressly made subject to the +following conditions. + + a. Attribution. + + 1. If You Share the Licensed Material (including in modified + form), You must: + + a. retain the following if it is supplied by the Licensor + with the Licensed Material: + + i. identification of the creator(s) of the Licensed + Material and any others designated to receive + attribution, in any reasonable manner requested by + the Licensor (including by pseudonym if + designated); + + ii. a copyright notice; + + iii. a notice that refers to this Public License; + + iv. a notice that refers to the disclaimer of + warranties; + + v. a URI or hyperlink to the Licensed Material to the + extent reasonably practicable; + + b. indicate if You modified the Licensed Material and + retain an indication of any previous modifications; and + + c. indicate the Licensed Material is licensed under this + Public License, and include the text of, or the URI or + hyperlink to, this Public License. + + 2. You may satisfy the conditions in Section 3(a)(1) in any + reasonable manner based on the medium, means, and context in + which You Share the Licensed Material. For example, it may be + reasonable to satisfy the conditions by providing a URI or + hyperlink to a resource that includes the required + information. + + 3. If requested by the Licensor, You must remove any of the + information required by Section 3(a)(1)(A) to the extent + reasonably practicable. + + b. ShareAlike. + + In addition to the conditions in Section 3(a), if You Share + Adapted Material You produce, the following conditions also apply. + + 1. The Adapter's License You apply must be a Creative Commons + license with the same License Elements, this version or + later, or a BY-SA Compatible License. + + 2. You must include the text of, or the URI or hyperlink to, the + Adapter's License You apply. You may satisfy this condition + in any reasonable manner based on the medium, means, and + context in which You Share Adapted Material. + + 3. You may not offer or impose any additional or different terms + or conditions on, or apply any Effective Technological + Measures to, Adapted Material that restrict exercise of the + rights granted under the Adapter's License You apply. + + +Section 4 -- Sui Generis Database Rights. + +Where the Licensed Rights include Sui Generis Database Rights that +apply to Your use of the Licensed Material: + + a. for the avoidance of doubt, Section 2(a)(1) grants You the right + to extract, reuse, reproduce, and Share all or a substantial + portion of the contents of the database; + + b. if You include all or a substantial portion of the database + contents in a database in which You have Sui Generis Database + Rights, then the database in which You have Sui Generis Database + Rights (but not its individual contents) is Adapted Material, + including for purposes of Section 3(b); and + + c. You must comply with the conditions in Section 3(a) if You Share + all or a substantial portion of the contents of the database. + +For the avoidance of doubt, this Section 4 supplements and does not +replace Your obligations under this Public License where the Licensed +Rights include other Copyright and Similar Rights. + + +Section 5 -- Disclaimer of Warranties and Limitation of Liability. + + a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE + EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS + AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF + ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, + IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, + WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR + PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, + ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT + KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT + ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. + + b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE + TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, + NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, + INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, + COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR + USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN + ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR + DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR + IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. + + c. The disclaimer of warranties and limitation of liability provided + above shall be interpreted in a manner that, to the extent + possible, most closely approximates an absolute disclaimer and + waiver of all liability. + + +Section 6 -- Term and Termination. + + a. This Public License applies for the term of the Copyright and + Similar Rights licensed here. However, if You fail to comply with + this Public License, then Your rights under this Public License + terminate automatically. + + b. Where Your right to use the Licensed Material has terminated under + Section 6(a), it reinstates: + + 1. automatically as of the date the violation is cured, provided + it is cured within 30 days of Your discovery of the + violation; or + + 2. upon express reinstatement by the Licensor. + + For the avoidance of doubt, this Section 6(b) does not affect any + right the Licensor may have to seek remedies for Your violations + of this Public License. + + c. For the avoidance of doubt, the Licensor may also offer the + Licensed Material under separate terms or conditions or stop + distributing the Licensed Material at any time; however, doing so + will not terminate this Public License. + + d. Sections 1, 5, 6, 7, and 8 survive termination of this Public + License. + + +Section 7 -- Other Terms and Conditions. + + a. The Licensor shall not be bound by any additional or different + terms or conditions communicated by You unless expressly agreed. + + b. Any arrangements, understandings, or agreements regarding the + Licensed Material not stated herein are separate from and + independent of the terms and conditions of this Public License. + + +Section 8 -- Interpretation. + + a. For the avoidance of doubt, this Public License does not, and + shall not be interpreted to, reduce, limit, restrict, or impose + conditions on any use of the Licensed Material that could lawfully + be made without permission under this Public License. + + b. To the extent possible, if any provision of this Public License is + deemed unenforceable, it shall be automatically reformed to the + minimum extent necessary to make it enforceable. If the provision + cannot be reformed, it shall be severed from this Public License + without affecting the enforceability of the remaining terms and + conditions. + + c. No term or condition of this Public License will be waived and no + failure to comply consented to unless expressly agreed to by the + Licensor. + + d. Nothing in this Public License constitutes or may be interpreted + as a limitation upon, or waiver of, any privileges and immunities + that apply to the Licensor or You, including from the legal + processes of any jurisdiction or authority. + + +======================================================================= + +Creative Commons is not a party to its public +licenses. Notwithstanding, Creative Commons may elect to apply one of +its public licenses to material it publishes and in those instances +will be considered the “Licensor.” The text of the Creative Commons +public licenses is dedicated to the public domain under the CC0 Public +Domain Dedication. Except for the limited purpose of indicating that +material is shared under a Creative Commons public license or as +otherwise permitted by the Creative Commons policies published at +creativecommons.org/policies, Creative Commons does not authorize the +use of the trademark "Creative Commons" or any other trademark or logo +of Creative Commons without its prior written consent including, +without limitation, in connection with any unauthorized modifications +to any of its public licenses or any other arrangements, +understandings, or agreements concerning use of licensed material. For +the avoidance of doubt, this paragraph does not form part of the +public licenses. + +Creative Commons may be contacted at creativecommons.org. -Public availability of this repository or the static asset bucket does not -grant trademark, brand, or endorsement rights. diff --git a/fluxer_static/THIRD_PARTY_LICENSES.md b/fluxer_static/THIRD_PARTY_LICENSES.md index ce0c05764..0ac743d32 100644 --- a/fluxer_static/THIRD_PARTY_LICENSES.md +++ b/fluxer_static/THIRD_PARTY_LICENSES.md @@ -1,15 +1,23 @@ # Third-party licenses -This repository mirrors static assets for Fluxer. Fluxer-owned assets are -covered by the root `LICENSE` notice. Third-party assets keep their upstream -licenses and attribution requirements. +This directory mirrors static assets for Fluxer. Fluxer-owned assets are +copyright Fluxer Platform AB and licensed under CC BY-SA 4.0, see `LICENSE`. +Third-party assets keep their upstream licenses and attribution requirements. | Path | Component | License | | --- | --- | --- | | `desktop/spellcheck/dictionaries/` | Hunspell dictionaries packaged as exact `dictionary-*` npm package versions | Varies by language; each dictionary directory includes its own `LICENSE`, and the package summary is in `desktop/spellcheck/dictionaries/NOTICE.md`. | -| `emoji/` | Twemoji graphics from `jdecked/twemoji` | CC-BY-4.0; see `emoji/LICENSE` and `emoji/NOTICE.md`. | -| `marketing/flags/` | Twemoji flag graphics from `jdecked/twemoji` | CC-BY-4.0; see `marketing/flags/LICENSE` and `marketing/flags/NOTICE.md`. | -| `embeds/icons/hn.webp` | Hacker News brand icon | Third-party brand asset; see `embeds/icons/NOTICE.md`. | +| `emoji/` | Twemoji graphics from `jdecked/twemoji`, plus spritesheets generated from them as derivatives. Copyright 2014-2021 Twitter, Inc and other contributors, 2022-present Jason Sofonia, Justine De Caires and other contributors | CC-BY-4.0. See `emoji/LICENSE` and `emoji/NOTICE.md`. | +| `marketing/flags/` | Twemoji flag graphics from `jdecked/twemoji`. Copyright 2014-2021 Twitter, Inc and other contributors, 2022-present Jason Sofonia, Justine De Caires and other contributors | CC-BY-4.0. See `marketing/flags/LICENSE` and `marketing/flags/NOTICE.md`. | +| `web/og-image-default.png` | Background pattern "I Like Food" from Hero Patterns (https://heropatterns.com) by Steve Schoger | CC-BY-4.0 (https://creativecommons.org/licenses/by/4.0/). | + +`fluxer_app` also bundles this third-party artwork outside this directory: + +| Path | Component | License | +| --- | --- | --- | +| `fluxer_app/src/media/images/i-like-food.svg` | "I Like Food" pattern from Hero Patterns (https://heropatterns.com) by Steve Schoger | CC-BY-4.0 (https://creativecommons.org/licenses/by/4.0/). | +| `fluxer_app/src/media/images/neko.png`, `fluxer_app/src/features/accessibility/components/NekoSprite.tsx` | Sprite sheet and sprite tables from `adryd325/oneko.js`. Copyright 2022 adryd | MIT (https://github.com/adryd325/oneko.js/blob/main/LICENSE). | +| `fluxer_app/src/features/ui/components/icons/InboxIcon.tsx` | Inbox icon path from Google Material Icons (`google/material-design-icons`). Copyright Google LLC | Apache-2.0 (https://www.apache.org/licenses/LICENSE-2.0). | Noise suppression WebAssembly binaries and AudioWorklet processors are bundled by `fluxer_app` from `@sapphi-red/web-noise-suppressor` rather than mirrored diff --git a/fluxer_static/avatars/NOTICE.md b/fluxer_static/avatars/NOTICE.md index f5f8bceb6..b61efeeb5 100644 --- a/fluxer_static/avatars/NOTICE.md +++ b/fluxer_static/avatars/NOTICE.md @@ -1,5 +1,4 @@ # Avatar asset notice -The avatar images in this directory are Fluxer-owned static assets. They are -covered by the root `LICENSE` notice unless a specific file later has a -more specific license notice. +The avatar images in this directory are copyright Fluxer Platform AB and +licensed under CC BY-SA 4.0. See the root `LICENSE`. diff --git a/fluxer_static/badges/NOTICE.md b/fluxer_static/badges/NOTICE.md index 12b28bea4..3e036f563 100644 --- a/fluxer_static/badges/NOTICE.md +++ b/fluxer_static/badges/NOTICE.md @@ -1,4 +1,4 @@ # Badge asset notice -The badge SVGs in this directory are Fluxer-owned static assets and product -identity artwork. They are covered by the root `LICENSE` notice. +The badge SVGs in this directory are copyright Fluxer Platform AB and licensed +under CC BY-SA 4.0. See the root `LICENSE`. diff --git a/fluxer_static/embeds/NOTICE.md b/fluxer_static/embeds/NOTICE.md deleted file mode 100644 index 530caa8c4..000000000 --- a/fluxer_static/embeds/NOTICE.md +++ /dev/null @@ -1,5 +0,0 @@ -# Embed asset notices - -Embedded service icons are third-party service identifiers unless a specific -file or subdirectory says otherwise. See `icons/NOTICE.md` for current icon -notices. diff --git a/fluxer_static/embeds/icons/NOTICE.md b/fluxer_static/embeds/icons/NOTICE.md deleted file mode 100644 index 4f69cf523..000000000 --- a/fluxer_static/embeds/icons/NOTICE.md +++ /dev/null @@ -1,5 +0,0 @@ -# Embedded service icon notices - -`hn.webp` is the Hacker News brand icon, included only as a third-party service -identifier. This repository does not grant license, trademark, endorsement, or -brand rights for Hacker News or Y Combinator marks. diff --git a/fluxer_static/embeds/icons/hn.webp b/fluxer_static/embeds/icons/hn.webp deleted file mode 100644 index 890b7c722..000000000 Binary files a/fluxer_static/embeds/icons/hn.webp and /dev/null differ diff --git a/fluxer_static/emoji/NOTICE.md b/fluxer_static/emoji/NOTICE.md index db927e86b..e1972ae01 100644 --- a/fluxer_static/emoji/NOTICE.md +++ b/fluxer_static/emoji/NOTICE.md @@ -1,8 +1,12 @@ # Emoji licenses -The emoji SVGs and spritesheets in this directory are Twemoji graphics sourced -from `jdecked/twemoji`. Twemoji graphics are licensed under Creative Commons -Attribution 4.0 International (CC-BY-4.0), copied in `LICENSE`. +The emoji SVGs in this directory are Twemoji graphics sourced from +`jdecked/twemoji`. The spritesheets are generated from those SVGs and are +derivatives of the same graphics. Twemoji graphics are licensed under Creative +Commons Attribution 4.0 International (CC-BY-4.0), copied in `LICENSE`. + +Copyright 2014-2021 Twitter, Inc and other contributors. Copyright +2022-present Jason Sofonia, Justine De Caires and other contributors. Attribution: Twemoji from https://github.com/jdecked/twemoji, as distributed by `@twemoji/api@17.0.2`. diff --git a/fluxer_static/marketing/NOTICE.md b/fluxer_static/marketing/NOTICE.md index 7b6874eba..c78a2d761 100644 --- a/fluxer_static/marketing/NOTICE.md +++ b/fluxer_static/marketing/NOTICE.md @@ -1,7 +1,7 @@ # Marketing asset notices -Fluxer-owned marketing screenshots, PWA install imagery, and branding assets -are covered by the root `LICENSE` notice. +The `branding/` directory holds Fluxer logo and symbol files, copyright Fluxer +Platform AB and licensed under CC BY-SA 4.0. See the root `LICENSE`. The `flags/` directory is third-party Twemoji artwork and has its own CC-BY-4.0 license and attribution notice. diff --git a/fluxer_static/marketing/branding/NOTICE.md b/fluxer_static/marketing/branding/NOTICE.md index d8e394dc4..ee2a4979d 100644 --- a/fluxer_static/marketing/branding/NOTICE.md +++ b/fluxer_static/marketing/branding/NOTICE.md @@ -1,5 +1,6 @@ # Branding asset notice -The logo and symbol files in this directory are Fluxer-owned brand assets. They -are covered by the root `LICENSE` notice and do not grant trademark or brand -usage rights. +The logo and symbol files in this directory are copyright Fluxer Platform AB +and licensed under CC BY-SA 4.0. See the root `LICENSE`. The license does not +grant trademark rights. See the "Name and marks" section of +`.github/GOVERNANCE.md`. diff --git a/fluxer_static/marketing/flags/NOTICE.md b/fluxer_static/marketing/flags/NOTICE.md index ca54dfe04..213cb4f87 100644 --- a/fluxer_static/marketing/flags/NOTICE.md +++ b/fluxer_static/marketing/flags/NOTICE.md @@ -4,5 +4,8 @@ The flag SVGs in this directory are Twemoji graphics sourced from `jdecked/twemoji`. Twemoji graphics are licensed under Creative Commons Attribution 4.0 International (CC-BY-4.0), copied in `LICENSE`. +Copyright 2014-2021 Twitter, Inc and other contributors. Copyright +2022-present Jason Sofonia, Justine De Caires and other contributors. + Attribution: Twemoji from https://github.com/jdecked/twemoji, as distributed by `@twemoji/api@17.0.2`. diff --git a/fluxer_static/marketing/pwa-install/NOTICE.md b/fluxer_static/marketing/pwa-install/NOTICE.md deleted file mode 100644 index 14ce70a5f..000000000 --- a/fluxer_static/marketing/pwa-install/NOTICE.md +++ /dev/null @@ -1,4 +0,0 @@ -# PWA install asset notice - -The PWA install images in this directory are Fluxer-owned marketing assets. -They are covered by the root `LICENSE` notice. diff --git a/fluxer_static/marketing/pwa-install/android-240w.avif b/fluxer_static/marketing/pwa-install/android-240w.avif deleted file mode 100644 index f0f3c43d5..000000000 Binary files a/fluxer_static/marketing/pwa-install/android-240w.avif and /dev/null differ diff --git a/fluxer_static/marketing/pwa-install/android-240w.png b/fluxer_static/marketing/pwa-install/android-240w.png deleted file mode 100644 index 8375463d7..000000000 Binary files a/fluxer_static/marketing/pwa-install/android-240w.png and /dev/null differ diff --git a/fluxer_static/marketing/pwa-install/android-240w.webp b/fluxer_static/marketing/pwa-install/android-240w.webp deleted file mode 100644 index ab79b3de7..000000000 Binary files a/fluxer_static/marketing/pwa-install/android-240w.webp and /dev/null differ diff --git a/fluxer_static/marketing/pwa-install/android-320w.avif b/fluxer_static/marketing/pwa-install/android-320w.avif deleted file mode 100644 index ea7b42c8e..000000000 Binary files a/fluxer_static/marketing/pwa-install/android-320w.avif and /dev/null differ diff --git a/fluxer_static/marketing/pwa-install/android-320w.png b/fluxer_static/marketing/pwa-install/android-320w.png deleted file mode 100644 index 625553ec1..000000000 Binary files a/fluxer_static/marketing/pwa-install/android-320w.png and /dev/null differ diff --git a/fluxer_static/marketing/pwa-install/android-320w.webp b/fluxer_static/marketing/pwa-install/android-320w.webp deleted file mode 100644 index ff9cd7672..000000000 Binary files a/fluxer_static/marketing/pwa-install/android-320w.webp and /dev/null differ diff --git a/fluxer_static/marketing/pwa-install/android-480w.avif b/fluxer_static/marketing/pwa-install/android-480w.avif deleted file mode 100644 index 1f6601749..000000000 Binary files a/fluxer_static/marketing/pwa-install/android-480w.avif and /dev/null differ diff --git a/fluxer_static/marketing/pwa-install/android-480w.png b/fluxer_static/marketing/pwa-install/android-480w.png deleted file mode 100644 index 6395c4aa7..000000000 Binary files a/fluxer_static/marketing/pwa-install/android-480w.png and /dev/null differ diff --git a/fluxer_static/marketing/pwa-install/android-480w.webp b/fluxer_static/marketing/pwa-install/android-480w.webp deleted file mode 100644 index a0742ae5a..000000000 Binary files a/fluxer_static/marketing/pwa-install/android-480w.webp and /dev/null differ diff --git a/fluxer_static/marketing/pwa-install/desktop-320w.avif b/fluxer_static/marketing/pwa-install/desktop-320w.avif deleted file mode 100644 index 7bc3b29ce..000000000 Binary files a/fluxer_static/marketing/pwa-install/desktop-320w.avif and /dev/null differ diff --git a/fluxer_static/marketing/pwa-install/desktop-320w.png b/fluxer_static/marketing/pwa-install/desktop-320w.png deleted file mode 100644 index 89c38ff82..000000000 Binary files a/fluxer_static/marketing/pwa-install/desktop-320w.png and /dev/null differ diff --git a/fluxer_static/marketing/pwa-install/desktop-320w.webp b/fluxer_static/marketing/pwa-install/desktop-320w.webp deleted file mode 100644 index 5bb2a61b3..000000000 Binary files a/fluxer_static/marketing/pwa-install/desktop-320w.webp and /dev/null differ diff --git a/fluxer_static/marketing/pwa-install/desktop-480w.avif b/fluxer_static/marketing/pwa-install/desktop-480w.avif deleted file mode 100644 index 9f99aceb8..000000000 Binary files a/fluxer_static/marketing/pwa-install/desktop-480w.avif and /dev/null differ diff --git a/fluxer_static/marketing/pwa-install/desktop-480w.png b/fluxer_static/marketing/pwa-install/desktop-480w.png deleted file mode 100644 index 1d8d2c3d7..000000000 Binary files a/fluxer_static/marketing/pwa-install/desktop-480w.png and /dev/null differ diff --git a/fluxer_static/marketing/pwa-install/desktop-480w.webp b/fluxer_static/marketing/pwa-install/desktop-480w.webp deleted file mode 100644 index e81340ce7..000000000 Binary files a/fluxer_static/marketing/pwa-install/desktop-480w.webp and /dev/null differ diff --git a/fluxer_static/marketing/pwa-install/desktop-640w.avif b/fluxer_static/marketing/pwa-install/desktop-640w.avif deleted file mode 100644 index 120d317d6..000000000 Binary files a/fluxer_static/marketing/pwa-install/desktop-640w.avif and /dev/null differ diff --git a/fluxer_static/marketing/pwa-install/desktop-640w.png b/fluxer_static/marketing/pwa-install/desktop-640w.png deleted file mode 100644 index 58dea059e..000000000 Binary files a/fluxer_static/marketing/pwa-install/desktop-640w.png and /dev/null differ diff --git a/fluxer_static/marketing/pwa-install/desktop-640w.webp b/fluxer_static/marketing/pwa-install/desktop-640w.webp deleted file mode 100644 index 532bdd7ec..000000000 Binary files a/fluxer_static/marketing/pwa-install/desktop-640w.webp and /dev/null differ diff --git a/fluxer_static/marketing/pwa-install/desktop-960w.avif b/fluxer_static/marketing/pwa-install/desktop-960w.avif deleted file mode 100644 index 80e358777..000000000 Binary files a/fluxer_static/marketing/pwa-install/desktop-960w.avif and /dev/null differ diff --git a/fluxer_static/marketing/pwa-install/desktop-960w.png b/fluxer_static/marketing/pwa-install/desktop-960w.png deleted file mode 100644 index f7ab816f2..000000000 Binary files a/fluxer_static/marketing/pwa-install/desktop-960w.png and /dev/null differ diff --git a/fluxer_static/marketing/pwa-install/desktop-960w.webp b/fluxer_static/marketing/pwa-install/desktop-960w.webp deleted file mode 100644 index 7666d8061..000000000 Binary files a/fluxer_static/marketing/pwa-install/desktop-960w.webp and /dev/null differ diff --git a/fluxer_static/marketing/pwa-install/ios-320w.avif b/fluxer_static/marketing/pwa-install/ios-320w.avif deleted file mode 100644 index 93f00e425..000000000 Binary files a/fluxer_static/marketing/pwa-install/ios-320w.avif and /dev/null differ diff --git a/fluxer_static/marketing/pwa-install/ios-320w.png b/fluxer_static/marketing/pwa-install/ios-320w.png deleted file mode 100644 index 9846f9b5a..000000000 Binary files a/fluxer_static/marketing/pwa-install/ios-320w.png and /dev/null differ diff --git a/fluxer_static/marketing/pwa-install/ios-320w.webp b/fluxer_static/marketing/pwa-install/ios-320w.webp deleted file mode 100644 index b3cff6495..000000000 Binary files a/fluxer_static/marketing/pwa-install/ios-320w.webp and /dev/null differ diff --git a/fluxer_static/marketing/pwa-install/ios-480w.avif b/fluxer_static/marketing/pwa-install/ios-480w.avif deleted file mode 100644 index f5cb4729e..000000000 Binary files a/fluxer_static/marketing/pwa-install/ios-480w.avif and /dev/null differ diff --git a/fluxer_static/marketing/pwa-install/ios-480w.png b/fluxer_static/marketing/pwa-install/ios-480w.png deleted file mode 100644 index d48983c86..000000000 Binary files a/fluxer_static/marketing/pwa-install/ios-480w.png and /dev/null differ diff --git a/fluxer_static/marketing/pwa-install/ios-480w.webp b/fluxer_static/marketing/pwa-install/ios-480w.webp deleted file mode 100644 index 6258f9061..000000000 Binary files a/fluxer_static/marketing/pwa-install/ios-480w.webp and /dev/null differ diff --git a/fluxer_static/marketing/pwa-install/ios-640w.avif b/fluxer_static/marketing/pwa-install/ios-640w.avif deleted file mode 100644 index 9a8849b5e..000000000 Binary files a/fluxer_static/marketing/pwa-install/ios-640w.avif and /dev/null differ diff --git a/fluxer_static/marketing/pwa-install/ios-640w.png b/fluxer_static/marketing/pwa-install/ios-640w.png deleted file mode 100644 index 07932a096..000000000 Binary files a/fluxer_static/marketing/pwa-install/ios-640w.png and /dev/null differ diff --git a/fluxer_static/marketing/pwa-install/ios-640w.webp b/fluxer_static/marketing/pwa-install/ios-640w.webp deleted file mode 100644 index 5c7177ec7..000000000 Binary files a/fluxer_static/marketing/pwa-install/ios-640w.webp and /dev/null differ diff --git a/fluxer_static/marketing/screenshots/NOTICE.md b/fluxer_static/marketing/screenshots/NOTICE.md deleted file mode 100644 index cd1170c01..000000000 --- a/fluxer_static/marketing/screenshots/NOTICE.md +++ /dev/null @@ -1,4 +0,0 @@ -# Screenshot asset notice - -The screenshots in this directory are Fluxer-owned marketing assets. They are -covered by the root `LICENSE` notice. diff --git a/fluxer_static/marketing/screenshots/desktop-1024w.avif b/fluxer_static/marketing/screenshots/desktop-1024w.avif deleted file mode 100644 index 3ab50ecd0..000000000 Binary files a/fluxer_static/marketing/screenshots/desktop-1024w.avif and /dev/null differ diff --git a/fluxer_static/marketing/screenshots/desktop-1024w.png b/fluxer_static/marketing/screenshots/desktop-1024w.png deleted file mode 100644 index a00e80301..000000000 Binary files a/fluxer_static/marketing/screenshots/desktop-1024w.png and /dev/null differ diff --git a/fluxer_static/marketing/screenshots/desktop-1024w.webp b/fluxer_static/marketing/screenshots/desktop-1024w.webp deleted file mode 100644 index 9d718b917..000000000 Binary files a/fluxer_static/marketing/screenshots/desktop-1024w.webp and /dev/null differ diff --git a/fluxer_static/marketing/screenshots/desktop-1920w.avif b/fluxer_static/marketing/screenshots/desktop-1920w.avif deleted file mode 100644 index 8e188c18d..000000000 Binary files a/fluxer_static/marketing/screenshots/desktop-1920w.avif and /dev/null differ diff --git a/fluxer_static/marketing/screenshots/desktop-1920w.png b/fluxer_static/marketing/screenshots/desktop-1920w.png deleted file mode 100644 index 85f79993b..000000000 Binary files a/fluxer_static/marketing/screenshots/desktop-1920w.png and /dev/null differ diff --git a/fluxer_static/marketing/screenshots/desktop-1920w.webp b/fluxer_static/marketing/screenshots/desktop-1920w.webp deleted file mode 100644 index 188b8eb28..000000000 Binary files a/fluxer_static/marketing/screenshots/desktop-1920w.webp and /dev/null differ diff --git a/fluxer_static/marketing/screenshots/desktop-2560w.avif b/fluxer_static/marketing/screenshots/desktop-2560w.avif deleted file mode 100644 index baf5e14ab..000000000 Binary files a/fluxer_static/marketing/screenshots/desktop-2560w.avif and /dev/null differ diff --git a/fluxer_static/marketing/screenshots/desktop-2560w.png b/fluxer_static/marketing/screenshots/desktop-2560w.png deleted file mode 100644 index 0b81527c5..000000000 Binary files a/fluxer_static/marketing/screenshots/desktop-2560w.png and /dev/null differ diff --git a/fluxer_static/marketing/screenshots/desktop-2560w.webp b/fluxer_static/marketing/screenshots/desktop-2560w.webp deleted file mode 100644 index 669f1c372..000000000 Binary files a/fluxer_static/marketing/screenshots/desktop-2560w.webp and /dev/null differ diff --git a/fluxer_static/marketing/screenshots/desktop-480w.avif b/fluxer_static/marketing/screenshots/desktop-480w.avif deleted file mode 100644 index 05a374116..000000000 Binary files a/fluxer_static/marketing/screenshots/desktop-480w.avif and /dev/null differ diff --git a/fluxer_static/marketing/screenshots/desktop-480w.png b/fluxer_static/marketing/screenshots/desktop-480w.png deleted file mode 100644 index 0b0dcadd5..000000000 Binary files a/fluxer_static/marketing/screenshots/desktop-480w.png and /dev/null differ diff --git a/fluxer_static/marketing/screenshots/desktop-480w.webp b/fluxer_static/marketing/screenshots/desktop-480w.webp deleted file mode 100644 index b311e1fe7..000000000 Binary files a/fluxer_static/marketing/screenshots/desktop-480w.webp and /dev/null differ diff --git a/fluxer_static/marketing/screenshots/desktop-768w.avif b/fluxer_static/marketing/screenshots/desktop-768w.avif deleted file mode 100644 index 2d9a4ac72..000000000 Binary files a/fluxer_static/marketing/screenshots/desktop-768w.avif and /dev/null differ diff --git a/fluxer_static/marketing/screenshots/desktop-768w.png b/fluxer_static/marketing/screenshots/desktop-768w.png deleted file mode 100644 index 64c5cdf3e..000000000 Binary files a/fluxer_static/marketing/screenshots/desktop-768w.png and /dev/null differ diff --git a/fluxer_static/marketing/screenshots/desktop-768w.webp b/fluxer_static/marketing/screenshots/desktop-768w.webp deleted file mode 100644 index 3b800aa46..000000000 Binary files a/fluxer_static/marketing/screenshots/desktop-768w.webp and /dev/null differ diff --git a/fluxer_static/marketing/screenshots/desktop-readme-1920w.png b/fluxer_static/marketing/screenshots/desktop-readme-1920w.png deleted file mode 100644 index 1af509a60..000000000 Binary files a/fluxer_static/marketing/screenshots/desktop-readme-1920w.png and /dev/null differ diff --git a/fluxer_static/web/NOTICE.md b/fluxer_static/web/NOTICE.md index 907d262be..207b6fae2 100644 --- a/fluxer_static/web/NOTICE.md +++ b/fluxer_static/web/NOTICE.md @@ -1,5 +1,9 @@ # Web asset notice The favicons, app icons, Open Graph images, and related web images in this -directory are Fluxer-owned static assets. They are covered by the root -`LICENSE` notice. +directory are copyright Fluxer Platform AB and licensed under CC BY-SA 4.0. See +the root `LICENSE`. + +The background pattern in `og-image-default.png` is "I Like Food" from Hero +Patterns by Steve Schoger, licensed under CC BY 4.0. See +`THIRD_PARTY_LICENSES.md`. diff --git a/fluxer_static/web/icons/NOTICE.md b/fluxer_static/web/icons/NOTICE.md index 40ad539a3..f9533f69b 100644 --- a/fluxer_static/web/icons/NOTICE.md +++ b/fluxer_static/web/icons/NOTICE.md @@ -1,5 +1,6 @@ # Web icon asset notice -The desktop app icon files in this directory are Fluxer-owned product assets. -They are covered by the root `LICENSE` notice and do not grant trademark or -brand usage rights. +The desktop app icon files in this directory are copyright Fluxer Platform AB +and licensed under CC BY-SA 4.0. See the root `LICENSE`. The license does not +grant trademark rights. See the "Name and marks" section of +`.github/GOVERNANCE.md`. diff --git a/fluxer_unfurl/src/resolvers/default_resolver.rs b/fluxer_unfurl/src/resolvers/default_resolver.rs index 8f1139bca..32ada6f74 100644 --- a/fluxer_unfurl/src/resolvers/default_resolver.rs +++ b/fluxer_unfurl/src/resolvers/default_resolver.rs @@ -105,7 +105,7 @@ async fn resolve_html(ctx: &ResolveContext<'_>) -> anyhow::Result EmbedFooter { + EmbedFooter { + text: "Hacker News".to_owned(), + icon_url: (!self_hosted).then(|| HN_ICON_URL.to_owned()), + ..Default::default() + } +} + fn format_unix_timestamp(secs: u64) -> String { chrono_lite(secs) } @@ -277,6 +281,13 @@ mod tests { assert!(!r.matches(&u("https://news.ycombinator.com/"))); } + #[test] + fn hn_footer_icon_is_hosted_only() { + assert_eq!(hn_footer(false).icon_url.as_deref(), Some(HN_ICON_URL)); + assert_eq!(hn_footer(true).icon_url, None); + assert_eq!(hn_footer(true).text, "Hacker News"); + } + #[test] fn chrono_lite_leap_year() { assert_eq!(chrono_lite(1582934400), "2020-02-29T00:00:00Z"); diff --git a/fluxer_unfurl/src/resolvers/mod.rs b/fluxer_unfurl/src/resolvers/mod.rs index 1dc1408d7..b9015ff3d 100644 --- a/fluxer_unfurl/src/resolvers/mod.rs +++ b/fluxer_unfurl/src/resolvers/mod.rs @@ -25,21 +25,11 @@ pub struct ResolveContext<'mp> { pub http_client: reqwest::Client, pub nsfw_mode: NsfwMode, pub media_proxy: &'mp MediaProxyClient, - pub static_cdn_endpoint: &'mp str, + pub self_hosted: bool, pub youtube_api_key: Option, pub klipy_api_key: Option, } -impl ResolveContext<'_> { - pub fn static_asset_url(&self, path: &str) -> Option { - let endpoint = self.static_cdn_endpoint.trim().trim_end_matches('/'); - if endpoint.is_empty() { - return None; - } - Some(format!("{}/{}", endpoint, path.trim_start_matches('/'))) - } -} - pub struct ResolverResult { pub embeds: Vec, } diff --git a/fluxer_unfurl/src/shard_impl.rs b/fluxer_unfurl/src/shard_impl.rs index eff43cb28..7413c01b7 100644 --- a/fluxer_unfurl/src/shard_impl.rs +++ b/fluxer_unfurl/src/shard_impl.rs @@ -23,7 +23,7 @@ pub struct UnfurlShard { http_client: reqwest::Client, resolvers: Vec>, media_proxy: MediaProxyClient, - static_cdn_endpoint: String, + self_hosted: bool, } impl UnfurlShard { @@ -37,11 +37,7 @@ impl UnfurlShard { let media_proxy_secret = optional_env("FLUXER_MEDIA_PROXY_SECRET_KEY"); let media_proxy_public_endpoint = optional_env("FLUXER_MEDIA_PROXY_PUBLIC_ENDPOINT") .map(|v| fluxer_common::config::normalize_public_endpoint_from_env(&v)); - let static_cdn_endpoint = fluxer_common::config::normalize_public_endpoint_from_env( - &optional_env("FLUXER_UNFURL_STATIC_CDN_ENDPOINT") - .or_else(|| optional_env("FLUXER_STATIC_CDN_ENDPOINT")) - .unwrap_or_default(), - ); + let self_hosted = fluxer_common::config::read_bool_env("FLUXER_SELF_HOSTED", false); let (media_proxy_endpoint, media_proxy_secret) = match ( media_proxy_endpoint, media_proxy_secret, @@ -81,7 +77,7 @@ impl UnfurlShard { http_client, resolvers, media_proxy, - static_cdn_endpoint, + self_hosted, } } @@ -103,7 +99,7 @@ impl UnfurlShard { None, internal_http_client(), ), - static_cdn_endpoint: String::new(), + self_hosted: false, } } @@ -128,7 +124,7 @@ impl UnfurlShard { http_client: self.http_client.clone(), nsfw_mode, media_proxy: &self.media_proxy, - static_cdn_endpoint: &self.static_cdn_endpoint, + self_hosted: self.self_hosted, youtube_api_key: youtube_api_key.map(str::to_owned), klipy_api_key: klipy_api_key.map(str::to_owned), }; @@ -328,12 +324,11 @@ mod tests { static ENV_LOCK: Mutex<()> = Mutex::new(()); - const PUBLIC_ENDPOINT_ENV: [&str; 8] = [ + const PUBLIC_ENDPOINT_ENV: [&str; 7] = [ "FLUXER_MEDIA_PROXY_ENDPOINT", "FLUXER_MEDIA_PROXY_SECRET_KEY", "FLUXER_MEDIA_PROXY_PUBLIC_ENDPOINT", - "FLUXER_UNFURL_STATIC_CDN_ENDPOINT", - "FLUXER_STATIC_CDN_ENDPOINT", + "FLUXER_SELF_HOSTED", "FLUXER_BASE_DOMAIN", "FLUXER_PUBLIC_PORT", "FLUXER_PUBLIC_ORIGIN", @@ -355,7 +350,7 @@ mod tests { } #[test] - fn a_non_default_public_port_reaches_the_public_media_and_static_endpoints() { + fn a_non_default_public_port_reaches_the_public_media_endpoint() { let shard = shard_from_env(&[ ("FLUXER_MEDIA_PROXY_ENDPOINT", "http://media-proxy:8080"), ("FLUXER_MEDIA_PROXY_SECRET_KEY", "secret"), @@ -363,12 +358,10 @@ mod tests { "FLUXER_MEDIA_PROXY_PUBLIC_ENDPOINT", "http://fluxer.example/media", ), - ("FLUXER_STATIC_CDN_ENDPOINT", "http://fluxer.example"), ("FLUXER_BASE_DOMAIN", "fluxer.example"), ("FLUXER_PUBLIC_PORT", "19080"), ]); - assert_eq!(shard.static_cdn_endpoint, "http://fluxer.example:19080"); assert!( shard .media_proxy @@ -379,7 +372,7 @@ mod tests { } #[test] - fn a_default_public_port_leaves_the_public_media_and_static_endpoints_alone() { + fn a_default_public_port_leaves_the_public_media_endpoint_alone() { let shard = shard_from_env(&[ ("FLUXER_MEDIA_PROXY_ENDPOINT", "http://media-proxy:8080"), ("FLUXER_MEDIA_PROXY_SECRET_KEY", "secret"), @@ -387,12 +380,10 @@ mod tests { "FLUXER_MEDIA_PROXY_PUBLIC_ENDPOINT", "https://fluxer.example/media", ), - ("FLUXER_STATIC_CDN_ENDPOINT", "https://fluxer.example"), ("FLUXER_BASE_DOMAIN", "fluxer.example"), ("FLUXER_PUBLIC_PORT", "443"), ]); - assert_eq!(shard.static_cdn_endpoint, "https://fluxer.example"); assert!( shard .media_proxy @@ -402,6 +393,18 @@ mod tests { ); } + #[test] + fn self_hosted_follows_the_fluxer_self_hosted_env() { + let media_proxy = [ + ("FLUXER_MEDIA_PROXY_ENDPOINT", "http://media-proxy:8080"), + ("FLUXER_MEDIA_PROXY_SECRET_KEY", "secret"), + ]; + assert!(!shard_from_env(&media_proxy).self_hosted); + let mut vars = media_proxy.to_vec(); + vars.push(("FLUXER_SELF_HOSTED", "true")); + assert!(shard_from_env(&vars).self_hosted); + } + fn unfurl(url: &str, youtube_api_key: Option<&str>) -> UnfurlRequest { UnfurlRequest::Unfurl { url: url.to_owned(), diff --git a/tools/dev/src/manifest.rs b/tools/dev/src/manifest.rs index 4417ac824..cabdcfdc4 100644 --- a/tools/dev/src/manifest.rs +++ b/tools/dev/src/manifest.rs @@ -94,20 +94,6 @@ pub const PROXY_ROUTES: &[ProxyRoute] = &[ strip_prefix: false, alternate_ports: &[], }, - ProxyRoute { - prefix: "/marketing/pwa-install", - host: LOOPBACK_HOST, - port: APP_PROXY_PORT, - strip_prefix: false, - alternate_ports: &[], - }, - ProxyRoute { - prefix: "/marketing/screenshots", - host: LOOPBACK_HOST, - port: APP_PROXY_PORT, - strip_prefix: false, - alternate_ports: &[], - }, ProxyRoute { prefix: "/assets", host: LOOPBACK_HOST,