diff --git a/.github/workflows/build-healthchat.yaml b/.github/workflows/build-healthchat.yaml index c6f8caf28b..4d122f7dc7 100644 --- a/.github/workflows/build-healthchat.yaml +++ b/.github/workflows/build-healthchat.yaml @@ -5,6 +5,13 @@ on: push: branches: - release/healthchat + workflow_dispatch: + inputs: + healthchat_workspace_ref: + description: "healthchat-workspace git ref (tag, branch, or SHA). Leave empty for default branch." + required: false + default: "" + type: string jobs: build-healthchat-app: @@ -25,6 +32,30 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 0 # needed for docker-package to be able to calculate the version + - name: Checkout healthchat-workspace + uses: actions/checkout@v4 + with: + repository: Novaloop-AG/healthchat-workspace + path: healthchat-workspace + token: ${{ secrets.HEALTHCHAT_WORKSPACE_TOKEN }} + ref: ${{ github.event.inputs.healthchat_workspace_ref || '' }} + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 22 + - name: Build element-plugin + run: | + cd healthchat-workspace/element-plugin + npm ci + npm run build + cd module + npm ci + npm run build + - name: Stage plugin artifacts for Docker + run: | + mkdir -p plugin-dist/elements + cp healthchat-workspace/element-plugin/module/dist/healthchat-module.js plugin-dist/healthchat-module.js + cp healthchat-workspace/element-plugin/dist/elements/browser/main.js plugin-dist/elements/healthchat-elements.js - name: Log in to the Github Container registry uses: docker/login-action@v3 with: diff --git a/.gitignore b/.gitignore index 694b9e6201..394ed1a1fe 100644 --- a/.gitignore +++ b/.gitignore @@ -37,3 +37,5 @@ storybook-static /packages/shared-components/node_modules /packages/shared-components/dist /packages/shared-components/src/i18nKeys.d.ts + +/plugin-dist diff --git a/Dockerfile b/Dockerfile index 675f900b96..749a9b388d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,6 +15,11 @@ RUN /src/scripts/docker-link-repos.sh RUN yarn --network-timeout=200000 install RUN /src/scripts/docker-package.sh +# Copy HealthChat plugin artifacts +RUN mkdir -p /src/webapp/modules/elements +COPY plugin-dist/healthchat-module.js /src/webapp/modules/healthchat-module.js +COPY plugin-dist/elements/healthchat-elements.js /src/webapp/modules/elements/healthchat-elements.js + # Copy the config now so that we don't create another layer in the app image RUN cp /src/config.sample.json /src/webapp/config.json diff --git a/config.json b/config.json index d039164ef4..d4fd3edc97 100644 --- a/config.json +++ b/config.json @@ -2,7 +2,7 @@ "brand": "HealthChat", "branding": { "auth_footer_links": null, - "auth_header_logo_url": "https://healthchat.ch/assets/logo.png", + "auth_header_logo_url": "themes/element/img/logos/element-logo.png", "welcome_background_url": null }, "bug_report_endpoint_url": "https://element.io/bugreports/submit", @@ -16,7 +16,7 @@ "base_url": "" } }, - "default_theme": "light", + "default_theme": "custom-HealthChat Light", "disable_custom_urls": true, "disable_guests": true, "element_call": {}, @@ -57,53 +57,52 @@ "custom_themes": [ "HealthChat Light", { - "colors": { - "accent-color": "#7287fd", - "alert": "#df8e1d", - "avatar-background-colors": [ - "#1e66f5", - "#8839ef", - "#40a02b" - ], - "focus-bg-color": "#acb0be", - "menu-selected-color": "#bcc0cc", - "other-user-pill-bg-color": "#04a5e5", - "primary-color": "#7287fd", - "reaction-row-button-selected-bg-color": "#bcc0cc", - "room-highlight-color": "#04a5e5", - "roomlist-background-color": "#e6e9ef", - "roomlist-highlights-color": "#bcc0cc", - "roomlist-separator-color": "#8c8fa1", - "roomlist-text-color": "#4c4f69", - "roomlist-text-secondary-color": "#4c4f69", - "secondary-content": "#4c4f69", - "sidebar-color": "#dce0e8", - "tertiary-content": "#4c4f69", - "timeline-background-color": "#eff1f5", - "timeline-highlights-color": "#bcc0cc", - "timeline-text-color": "#4c4f69", - "timeline-text-secondary-color": "#6c6f85", - "togglesw-off-color": "#7c7f93", - "username-colors": [ - "#8839ef", - "#e64553", - "#fe640b", - "#40a02b", - "#179299", - "#04a5e5", - "#209fb5", - "#7287fd" - ], - "warning-color": "#d20f39" - }, + "name": "HealthChat Light", "is_dark": false, - "name": "HealthChat Light" + "colors": { + "accent-color": "#1f4d85", + "primary-color": "#1f4d85", + "alert": "#df8e1d", + "warning-color": "#d20f39", + "sidebar-color": "#12325c", + "roomlist-background-color": "#f5f5f5", + "roomlist-highlights-color": "#d9d9d9", + "roomlist-separator-color": "#9b9898", + "roomlist-text-color": "#473e3e", + "roomlist-text-secondary-color": "#9b9898", + "timeline-background-color": "#ffffff", + "timeline-highlights-color": "#d9d9d9", + "timeline-text-color": "#473e3e", + "timeline-text-secondary-color": "#9b9898", + "secondary-content": "#9b9898", + "tertiary-content": "#9b9898", + "focus-bg-color": "#d9d9d9", + "menu-selected-color": "#d9d9d9", + "other-user-pill-bg-color": "#376A91", + "room-highlight-color": "#376A91", + "reaction-row-button-selected-bg-color": "#d9d9d9", + "togglesw-off-color": "#9b9898", + "avatar-background-colors": ["#12325c", "#1f4d85", "#376A91"], + "username-colors": ["#12325c", "#2a4063", "#1f4d85", "#376A91", "#473e3e", "#1f4d85", "#2a4063", "#12325c"] + }, + "fonts": { + "general": "\"Century Gothic\", \"Futura\", \"Trebuchet MS\", \"Arial\", sans-serif" + }, + "compound": { + "--cpd-color-text-action-accent": "#1f4d85", + "--cpd-color-bg-action-primary-rest": "#1f4d85", + "--cpd-color-bg-action-primary-hovered": "#2a4063", + "--cpd-color-bg-action-primary-pressed": "#12325c", + "--cpd-color-text-link-external": "#1f4d85", + "--cpd-color-icon-accent-tertiary": "#376A91" + } } ] }, "show_labs_settings": false, - "modules": ["/modules/user-directory-module.js"], - "ch.healthchat.user_directory": { - "api_base_url": "http://localhost:5001" + "modules": ["/modules/healthchat-module.js"], + "ch.healthchat": { + "api_base_url": "http://localhost:5001", + "elements_base_url": "/modules/elements" } } diff --git a/res/manifest.json b/res/manifest.json index 6b0d70c059..ea675bbd1c 100644 --- a/res/manifest.json +++ b/res/manifest.json @@ -2,7 +2,7 @@ "name": "HealthChat", "short_name": "HealthChat", "display": "standalone", - "theme_color": "#76CFA6", + "theme_color": "#12325c", "start_url": "index.html", "icons": [ { @@ -21,7 +21,7 @@ "type": "image/png" }, { - "src": "/vector-icons/152png", + "src": "/vector-icons/152.png", "sizes": "152x152", "type": "image/png" }, diff --git a/res/themes/element/img/logos/element-app-logo.png b/res/themes/element/img/logos/element-app-logo.png index b5da82864f..f9dc21547a 100644 Binary files a/res/themes/element/img/logos/element-app-logo.png and b/res/themes/element/img/logos/element-app-logo.png differ diff --git a/res/themes/element/img/logos/element-logo.png b/res/themes/element/img/logos/element-logo.png new file mode 100644 index 0000000000..57e49b8436 Binary files /dev/null and b/res/themes/element/img/logos/element-logo.png differ diff --git a/res/themes/element/img/logos/element-logo.svg b/res/themes/element/img/logos/element-logo.svg deleted file mode 100644 index 6b545457ce..0000000000 --- a/res/themes/element/img/logos/element-logo.svg +++ /dev/null @@ -1,84 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/res/themes/element/img/logos/opengraph.png b/res/themes/element/img/logos/opengraph.png index d1b9d70e08..686cd44020 100644 Binary files a/res/themes/element/img/logos/opengraph.png and b/res/themes/element/img/logos/opengraph.png differ diff --git a/res/themes/light/css/_light.pcss b/res/themes/light/css/_light.pcss index f01a85cb4c..33e322b73e 100644 --- a/res/themes/light/css/_light.pcss +++ b/res/themes/light/css/_light.pcss @@ -11,6 +11,7 @@ digits in flowed text to stand out. TODO: Consider putting all emoji fonts to the end rather than the front. */ $font-family: + "Century Gothic", "Futura", "Trebuchet MS", "Inter", var(--emoji-font-family), "Apple Color Emoji", "Segoe UI Emoji", "Arial", "Helvetica", sans-serif, "Noto Color Emoji"; @@ -59,20 +60,20 @@ $username-variant6-color: var(--cpd-color-text-decorative-6); * To use under very rare circumstances, always prefer the semantics defined * in https://compound.element.io/?path=/docs/tokens-semantic-colors--docs */ -$accent-100: var(--cpd-color-green-100); -$accent-200: var(--cpd-color-green-200); -$accent-300: var(--cpd-color-green-300); -$accent-400: var(--cpd-color-green-400); -$accent-500: var(--cpd-color-green-500); -$accent-600: var(--cpd-color-green-600); -$accent-700: var(--cpd-color-green-700); -$accent-800: var(--cpd-color-green-800); -$accent-900: var(--cpd-color-green-900); -$accent-1000: var(--cpd-color-green-1000); -$accent-1100: var(--cpd-color-green-1100); -$accent-1200: var(--cpd-color-green-1200); -$accent-1300: var(--cpd-color-green-1300); -$accent-1400: var(--cpd-color-green-1400); +$accent-100: var(--cpd-color-blue-100); +$accent-200: var(--cpd-color-blue-200); +$accent-300: var(--cpd-color-blue-300); +$accent-400: var(--cpd-color-blue-400); +$accent-500: var(--cpd-color-blue-500); +$accent-600: var(--cpd-color-blue-600); +$accent-700: var(--cpd-color-blue-700); +$accent-800: var(--cpd-color-blue-800); +$accent-900: var(--cpd-color-blue-900); +$accent-1000: var(--cpd-color-blue-1000); +$accent-1100: var(--cpd-color-blue-1100); +$accent-1200: var(--cpd-color-blue-1200); +$accent-1300: var(--cpd-color-blue-1300); +$accent-1400: var(--cpd-color-blue-1400); /* Reused Figma non-compound colors */ /* ******************** */ @@ -110,7 +111,7 @@ $info-plinth-bg-color: #f7f7f7; $event-selected-color: var(--cpd-color-bg-subtle-secondary); $topleftmenu-color: #212121; $roomtopic-color: #9e9e9e; -$spacePanel-bg-color: rgba(232, 232, 232, 0.77); +$spacePanel-bg-color: #12325c; $panel-gradient: rgba(242, 245, 248, 0), rgba(242, 245, 248, 1); $h3-color: #3d3b39; $event-highlight-bg-color: $yellow-background; @@ -279,7 +280,7 @@ $voice-record-icon-color: $tertiary-content; /* Bubble tiles */ /* ******************** */ -$eventbubble-self-bg: var(--cpd-color-green-300); +$eventbubble-self-bg: var(--cpd-color-blue-300); $eventbubble-others-bg: var(--cpd-color-gray-300); $eventbubble-bg-hover: var(--cpd-color-bg-subtle-secondary); /* ******************** */ diff --git a/res/vector-icons/1024.png b/res/vector-icons/1024.png index 78550bc095..4cdd2a3751 100644 Binary files a/res/vector-icons/1024.png and b/res/vector-icons/1024.png differ diff --git a/res/vector-icons/120.png b/res/vector-icons/120.png index 1f5ac33747..2e31ffb794 100644 Binary files a/res/vector-icons/120.png and b/res/vector-icons/120.png differ diff --git a/res/vector-icons/144.png b/res/vector-icons/144.png index cdf6278dbf..a8d7ad6575 100644 Binary files a/res/vector-icons/144.png and b/res/vector-icons/144.png differ diff --git a/res/vector-icons/152.png b/res/vector-icons/152.png index 35229ae99f..50220f8a2f 100644 Binary files a/res/vector-icons/152.png and b/res/vector-icons/152.png differ diff --git a/res/vector-icons/180.png b/res/vector-icons/180.png index fa80c4d58c..3d34372bcf 100644 Binary files a/res/vector-icons/180.png and b/res/vector-icons/180.png differ diff --git a/res/vector-icons/24.png b/res/vector-icons/24.png index 4d318d9034..b5f760c279 100644 Binary files a/res/vector-icons/24.png and b/res/vector-icons/24.png differ diff --git a/res/vector-icons/512.png b/res/vector-icons/512.png index b5da82864f..867933cbeb 100644 Binary files a/res/vector-icons/512.png and b/res/vector-icons/512.png differ diff --git a/res/welcome.html b/res/welcome.html index f1cf3911f4..8379bb4005 100644 --- a/res/welcome.html +++ b/res/welcome.html @@ -8,6 +8,7 @@ } .mx_Parent { + font-family: "Century Gothic", "Futura", "Trebuchet MS", sans-serif; display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; @@ -90,7 +91,7 @@ background-repeat: no-repeat; background-position: 10px center; text-decoration: none; - color: #2e2f32 !important; + color: #473e3e !important; } .mx_ButtonLabel { @@ -110,12 +111,12 @@ } .mx_ButtonSignIn { - background-color: #368bd6; + background-color: #1f4d85; color: white !important; } .mx_ButtonCreateAccount { - background-color: #0dbd8b; + background-color: #376A91; color: white !important; } @@ -165,7 +166,7 @@ we don't have an account and should hide them. No account == no guest account ei
- +

_t("welcome_to_element")

diff --git a/src/components/structures/HomePage.tsx b/src/components/structures/HomePage.tsx index 5cbd2858c5..b22e3fc085 100644 --- a/src/components/structures/HomePage.tsx +++ b/src/components/structures/HomePage.tsx @@ -100,7 +100,7 @@ const HomePage: React.FC = ({ justRegistered = false }) => { introSection = ; } else { const brandingConfig = SdkConfig.getObject("branding"); - const logoUrl = brandingConfig?.get("auth_header_logo_url") ?? "themes/element/img/logos/element-logo.svg"; + const logoUrl = brandingConfig?.get("auth_header_logo_url") ?? "themes/element/img/logos/element-logo.png"; introSection = ( diff --git a/src/components/views/auth/AuthHeaderLogo.tsx b/src/components/views/auth/AuthHeaderLogo.tsx index 35d35bc3a5..ece362d6c1 100644 --- a/src/components/views/auth/AuthHeaderLogo.tsx +++ b/src/components/views/auth/AuthHeaderLogo.tsx @@ -13,7 +13,7 @@ import SdkConfig from "../../../SdkConfig"; export default class AuthHeaderLogo extends React.PureComponent { public render(): React.ReactElement { const brandingConfig = SdkConfig.getObject("branding"); - const logoUrl = brandingConfig?.get("auth_header_logo_url") ?? "themes/element/img/logos/element-logo.svg"; + const logoUrl = brandingConfig?.get("auth_header_logo_url") ?? "themes/element/img/logos/element-logo.png"; return (
should match snapshot 1`] = ` > Element diff --git a/test/unit-tests/components/views/rooms/__snapshots__/RoomPreviewBar-test.tsx.snap b/test/unit-tests/components/views/rooms/__snapshots__/RoomPreviewBar-test.tsx.snap index 0de553d401..56a28d0a77 100644 --- a/test/unit-tests/components/views/rooms/__snapshots__/RoomPreviewBar-test.tsx.snap +++ b/test/unit-tests/components/views/rooms/__snapshots__/RoomPreviewBar-test.tsx.snap @@ -238,7 +238,7 @@ exports[` with an invite with an invited email when client has This invite to RoomPreviewBar-test-room was sent to test@test.com

- Share this email in Settings to receive invites directly in Element. + Share this email in Settings to receive invites directly in HealthChat.

`; @@ -283,7 +283,7 @@ exports[` with an invite with an invited email when client has This invite to RoomPreviewBar-test-room was sent to test@test.com

- Use an identity server in Settings to receive invites directly in Element. + Use an identity server in Settings to receive invites directly in HealthChat.

`; @@ -296,7 +296,7 @@ exports[` with an invite with an invited email when invitedEma This invite to RoomPreviewBar-test-room was sent to test@test.com which is not associated with your account

- Link this email with your account in Settings to receive invites directly in Element. + Link this email with your account in Settings to receive invites directly in HealthChat.

`; diff --git a/test/unit-tests/components/views/settings/__snapshots__/EventIndexPanel-test.tsx.snap b/test/unit-tests/components/views/settings/__snapshots__/EventIndexPanel-test.tsx.snap index aab56e28f7..d753221afe 100644 --- a/test/unit-tests/components/views/settings/__snapshots__/EventIndexPanel-test.tsx.snap +++ b/test/unit-tests/components/views/settings/__snapshots__/EventIndexPanel-test.tsx.snap @@ -23,14 +23,14 @@ exports[` when event indexing is not supported renders link t class="mx_SettingsSubsection_text" > - Element can't securely cache encrypted messages locally while running in a web browser. Use + HealthChat can't securely cache encrypted messages locally while running in a web browser. Use - Element Desktop + HealthChat Desktop @@ -47,7 +47,7 @@ exports[` when event indexing is supported but not installed class="mx_SettingsSubsection_text" > - Element is missing some components required for securely caching encrypted messages locally. If you'd like to experiment with this feature, build a custom Element Desktop with + HealthChat is missing some components required for securely caching encrypted messages locally. If you'd like to experiment with this feature, build a custom HealthChat Desktop with renders QR code 1`] = `
  1. - Open Element on your other device + Open HealthChat on your other device
  2. diff --git a/test/unit-tests/components/views/settings/encryption/__snapshots__/DeleteKeyStoragePanel-test.tsx.snap b/test/unit-tests/components/views/settings/encryption/__snapshots__/DeleteKeyStoragePanel-test.tsx.snap index d82823b1e3..62528067c3 100644 --- a/test/unit-tests/components/views/settings/encryption/__snapshots__/DeleteKeyStoragePanel-test.tsx.snap +++ b/test/unit-tests/components/views/settings/encryption/__snapshots__/DeleteKeyStoragePanel-test.tsx.snap @@ -125,7 +125,7 @@ exports[` should match snapshot 1`] = ` d="M6.293 6.293a1 1 0 0 1 1.414 0L12 10.586l4.293-4.293a1 1 0 1 1 1.414 1.414L13.414 12l4.293 4.293a1 1 0 0 1-1.414 1.414L12 13.414l-4.293 4.293a1 1 0 0 1-1.414-1.414L10.586 12 6.293 7.707a1 1 0 0 1 0-1.414" /> - You will lose access to your encrypted messages if you are signed out of Element everywhere + You will lose access to your encrypted messages if you are signed out of HealthChat everywhere
diff --git a/test/unit-tests/components/views/settings/tabs/user/__snapshots__/AppearanceUserSettingsTab-test.tsx.snap b/test/unit-tests/components/views/settings/tabs/user/__snapshots__/AppearanceUserSettingsTab-test.tsx.snap index 5ad2eb43f7..e63d1f4888 100644 --- a/test/unit-tests/components/views/settings/tabs/user/__snapshots__/AppearanceUserSettingsTab-test.tsx.snap +++ b/test/unit-tests/components/views/settings/tabs/user/__snapshots__/AppearanceUserSettingsTab-test.tsx.snap @@ -179,7 +179,6 @@ exports[`AppearanceUserSettingsTab should render 1`] = ` class="_container_1qhtc_10" > renders correctly when user has no ignored u

- Add users and servers you want to ignore here. Use asterisks to have Element match any characters. For example, + Add users and servers you want to ignore here. Use asterisks to have HealthChat match any characters. For example, @bot:* diff --git a/test/unit-tests/components/views/settings/tabs/user/__snapshots__/SecurityUserSettingsTab-test.tsx.snap b/test/unit-tests/components/views/settings/tabs/user/__snapshots__/SecurityUserSettingsTab-test.tsx.snap index 146277e9f2..2a6d38494a 100644 --- a/test/unit-tests/components/views/settings/tabs/user/__snapshots__/SecurityUserSettingsTab-test.tsx.snap +++ b/test/unit-tests/components/views/settings/tabs/user/__snapshots__/SecurityUserSettingsTab-test.tsx.snap @@ -137,14 +137,14 @@ exports[` renders security section 1`] = ` class="mx_SettingsSubsection_text" > - Element can't securely cache encrypted messages locally while running in a web browser. Use + HealthChat can't securely cache encrypted messages locally while running in a web browser. Use - Element Desktop + HealthChat Desktop diff --git a/test/unit-tests/utils/__snapshots__/AutoDiscoveryUtils-test.tsx.snap b/test/unit-tests/utils/__snapshots__/AutoDiscoveryUtils-test.tsx.snap index 8556db8ba8..5ae8658729 100644 --- a/test/unit-tests/utils/__snapshots__/AutoDiscoveryUtils-test.tsx.snap +++ b/test/unit-tests/utils/__snapshots__/AutoDiscoveryUtils-test.tsx.snap @@ -4,11 +4,11 @@ exports[`AutoDiscoveryUtils authComponentStateForError should return expected er { "serverDeadError":

- Your Element is misconfigured + Your HealthChat is misconfigured
- Ask your Element admin to check + Ask your HealthChat admin to check " `; -exports[`HTMLExport should have an SDK-branded destination file name 1`] = `"Element - My Test Room Welcome - Chat Export - 2022-11-17T16-58-32.517Z.zip"`; +exports[`HTMLExport should have an SDK-branded destination file name 1`] = `"HealthChat - My Test Room Welcome - Chat Export - 2022-11-17T16-58-32.517Z.zip"`; exports[`HTMLExport should have an SDK-branded destination file name 2`] = `"BrandedChatWithSlashesForFun - My Test Room Welcome - Chat Export - 2022-11-17T16-58-32.517Z.zip"`; diff --git a/test/unit-tests/vector/__snapshots__/init-test.ts.snap b/test/unit-tests/vector/__snapshots__/init-test.ts.snap index b441bfa55f..e462267fc8 100644 --- a/test/unit-tests/vector/__snapshots__/init-test.ts.snap +++ b/test/unit-tests/vector/__snapshots__/init-test.ts.snap @@ -8,7 +8,7 @@ exports[`showError should match snapshot 1`] = ` class="mx_ErrorView cpd-theme-light" >