From 85af22fb34a433b694f4c142d3e6d843130d135a Mon Sep 17 00:00:00 2001 From: David Llewellyn-Jones Date: Mon, 18 Apr 2022 13:52:33 +0300 Subject: [PATCH] Support configurable branding of graphics Allows the image and icon folders to be set as part of the branding configuration. --- branding.json | 6 +++++- build.js | 8 ++++++-- src/ui/modals/specific-modals/DeveloperModeModal.svelte | 5 +++-- src/ui/partials/Animation.svelte | 5 +++-- src/ui/partials/Yumi.svelte | 4 +++- src/ui/views/Done.svelte | 2 +- src/ui/views/ManualDownload.svelte | 3 ++- src/ui/views/NotSupported.svelte | 2 +- src/ui/views/SelectOs.svelte | 4 ++-- src/ui/views/UserAction.svelte | 5 +++-- src/ui/views/WaitForDevice.svelte | 2 +- 11 files changed, 30 insertions(+), 16 deletions(-) diff --git a/branding.json b/branding.json index e13c5aea..03a26ed9 100644 --- a/branding.json +++ b/branding.json @@ -27,5 +27,9 @@ "support-url": "https://askubuntu.com/questions/tagged/ubuntu-touch", "contact-name": "Telegram", "contact-url": "https://t.me/WelcomePlus", - "update-url": "https://api.github.com/repos/ubports/ubports-installer/releases/latest" + "update-url": "https://api.github.com/repos/ubports/ubports-installer/releases/latest", + "screens": "public/screens", + "images": "public/img", + "icons": "build/icons/", + "logo": "yumi.svg" } diff --git a/build.js b/build.js index e5de7311..fef99c43 100755 --- a/build.js +++ b/build.js @@ -69,9 +69,13 @@ var buildConfig = { publish: [], files: [ "src/**/*", - "public/**/*", + "public/*", + "public/build/**/*", + "public/fonts/**/*", + `${branding.screens}/**/*`, + `${branding.images}/**/*`, "node_modules/**/*", - "build/icons/icon.*", + `${branding.icons}/icon.*`, "branding.json", // exclude binaries for other operating systems ...PLATFORMS.filter(p => p !== opts.os).map( diff --git a/src/ui/modals/specific-modals/DeveloperModeModal.svelte b/src/ui/modals/specific-modals/DeveloperModeModal.svelte index 4b7f80b7..ee0d6da6 100644 --- a/src/ui/modals/specific-modals/DeveloperModeModal.svelte +++ b/src/ui/modals/specific-modals/DeveloperModeModal.svelte @@ -1,6 +1,7 @@ yumi
Screen6 diff --git a/src/ui/views/ManualDownload.svelte b/src/ui/views/ManualDownload.svelte index 1becc418..53395c30 100644 --- a/src/ui/views/ManualDownload.svelte +++ b/src/ui/views/ManualDownload.svelte @@ -4,6 +4,7 @@ manualDownloadGroup, eventObject } from "../../stores.mjs"; + import branding from "../../../branding.json"; let downloadedFile; @@ -18,7 +19,7 @@
Screen6 diff --git a/src/ui/views/NotSupported.svelte b/src/ui/views/NotSupported.svelte index e483588c..329cf7a3 100644 --- a/src/ui/views/NotSupported.svelte +++ b/src/ui/views/NotSupported.svelte @@ -10,7 +10,7 @@
Screen5 diff --git a/src/ui/views/SelectOs.svelte b/src/ui/views/SelectOs.svelte index 63cc203a..d7eb764f 100644 --- a/src/ui/views/SelectOs.svelte +++ b/src/ui/views/SelectOs.svelte @@ -1,6 +1,6 @@
Screen6 diff --git a/src/ui/views/WaitForDevice.svelte b/src/ui/views/WaitForDevice.svelte index 41ba122b..4c917c29 100644 --- a/src/ui/views/WaitForDevice.svelte +++ b/src/ui/views/WaitForDevice.svelte @@ -22,7 +22,7 @@
screen1