diff --git a/.docker/example.bake.Dockerfile b/.docker/example.bake.Dockerfile index 692f1cfcd..032953622 100644 --- a/.docker/example.bake.Dockerfile +++ b/.docker/example.bake.Dockerfile @@ -16,14 +16,24 @@ FROM ubuntu:24.04 AS web-base #### DOCUMENTSERVER-EXAMPLE #### FROM web-base AS build-example -ARG TARGETARCH + ARG TARGETARCH + ARG BRANDING_DIR + ARG COMPANY_NAME -COPY document-server-integration/web/documentserver-example/nodejs/package*.json /app/ -RUN --mount=type=cache,target=/root/.npm cd /app && npm install -COPY document-server-integration/web/documentserver-example/nodejs /app -WORKDIR /app -RUN TARGETARCH_PKG=$(echo "$TARGETARCH" | sed 's/amd64/x64/') && \ -pkg . -t linux-"$TARGETARCH_PKG" --node-options="--max_old_space_size=4096" -o /app/example + COPY document-server-integration/web/documentserver-example/nodejs/package*.json /app/ + RUN --mount=type=cache,target=/root/.npm cd /app && npm install + COPY document-server-integration/web/documentserver-example/nodejs /app + + ### Branding + ENV COMPANY_NAME=${COMPANY_NAME} + COPY ${BRANDING_DIR}/document-server-integration/web/documentserver-example/nodejs /app + RUN find /app/config/ -type f -name '*.json' \ + -exec sed -i "s/Euro-Office/${COMPANY_NAME}/g" {} + + + + WORKDIR /app + RUN TARGETARCH_PKG=$(echo "$TARGETARCH" | sed 's/amd64/x64/') && \ + pkg . -t linux-"$TARGETARCH_PKG" --node-options="--max_old_space_size=4096" -o /app/example FROM scratch AS example COPY --from=build-example /app/ /example \ No newline at end of file diff --git a/web/documentserver-example/csharp-mvc/Content/stylesheet.css b/web/documentserver-example/csharp-mvc/Content/stylesheet.css index a753f1779..cfe877ad5 100644 --- a/web/documentserver-example/csharp-mvc/Content/stylesheet.css +++ b/web/documentserver-example/csharp-mvc/Content/stylesheet.css @@ -112,7 +112,7 @@ header img { } .portal-name { - color: #FF6F3D; + color: #0082C9; font-size: 24px; font-weight: bold; line-height: 133%; @@ -207,8 +207,8 @@ label .checkbox { } .button.orange { - background: #FF6F3D; - border: 1px solid #FF6F3D; + background: #0082C9; + border: 1px solid #0082C9; color: #FFFFFF; } @@ -219,7 +219,7 @@ label .checkbox { } .button.orange:not(.disable):hover { - background: #ff7a4b; + background: #00a5fd; } .button.gray { @@ -234,8 +234,8 @@ label .checkbox { } .button.gray:not(.disable):hover { - border: 1px solid #FF6F3D; - color: #FF6F3D; + border: 1px solid #0082C9; + color: #0082C9; } .button.converting { @@ -264,14 +264,14 @@ label .checkbox { } .button.hoar:not(.disable):hover { - background: #FF6F3D; - border: 1px solid #FF6F3D; + background: #0082C9; + border: 1px solid #0082C9; color: #FFFFFF; } .button.hoar.orange { - background: #FF6F3D; - border: 1px solid #FF6F3D; + background: #0082C9; + border: 1px solid #0082C9; color: #FFFFFF; cursor: default; } @@ -370,11 +370,11 @@ label .checkbox { } .links li.active { - border-bottom: 2px solid #FF6F3D; + border-bottom: 2px solid #0082C9; } .links li.active a { - color: #FF6F3D; + color: #0082C9; } .links li.active a img { @@ -490,7 +490,7 @@ label .checkbox { } .convertPercent { - color: #FF6F3D; + color: #0082C9; font-weight: 700; display: inline; } @@ -553,7 +553,7 @@ footer table td { footer a, footer a:hover, footer a:visited { - color: #FF6F3D; + color: #0082C9; font-size: 14px; line-height: 120%; } diff --git a/web/documentserver-example/csharp/App_Themes/stylesheet.css b/web/documentserver-example/csharp/App_Themes/stylesheet.css index 7c8e4037d..c61764899 100644 --- a/web/documentserver-example/csharp/App_Themes/stylesheet.css +++ b/web/documentserver-example/csharp/App_Themes/stylesheet.css @@ -112,7 +112,7 @@ header img { } .portal-name { - color: #FF6F3D; + color: #0082C9; font-size: 24px; font-weight: bold; line-height: 133%; @@ -207,8 +207,8 @@ label .checkbox { } .button.orange { - background: #FF6F3D; - border: 1px solid #FF6F3D; + background: #0082C9; + border: 1px solid #0082C9; color: #FFFFFF; } @@ -219,7 +219,7 @@ label .checkbox { } .button.orange:not(.disable):hover { - background: #ff7a4b; + background: #00a5fd; } .button.gray { @@ -234,8 +234,8 @@ label .checkbox { } .button.gray:not(.disable):hover { - border: 1px solid #FF6F3D; - color: #FF6F3D; + border: 1px solid #0082C9; + color: #0082C9; } .button.converting { @@ -264,14 +264,14 @@ label .checkbox { } .button.hoar:not(.disable):hover { - background: #FF6F3D; - border: 1px solid #FF6F3D; + background: #0082C9; + border: 1px solid #0082C9; color: #FFFFFF; } .button.hoar.orange { - background: #FF6F3D; - border: 1px solid #FF6F3D; + background: #0082C9; + border: 1px solid #0082C9; color: #FFFFFF; cursor: default; } @@ -370,11 +370,11 @@ label .checkbox { } .links li.active { - border-bottom: 2px solid #FF6F3D; + border-bottom: 2px solid #0082C9; } .links li.active a { - color: #FF6F3D; + color: #0082C9; } .links li.active a img { @@ -490,7 +490,7 @@ label .checkbox { } .convertPercent { - color: #FF6F3D; + color: #0082C9; font-weight: 700; display: inline; } @@ -555,7 +555,7 @@ footer table td { footer a, footer a:hover, footer a:visited { - color: #FF6F3D; + color: #0082C9; font-size: 14px; line-height: 120%; } diff --git a/web/documentserver-example/go/static/stylesheets/stylesheet.css b/web/documentserver-example/go/static/stylesheets/stylesheet.css index 37404c700..9022a36ab 100644 --- a/web/documentserver-example/go/static/stylesheets/stylesheet.css +++ b/web/documentserver-example/go/static/stylesheets/stylesheet.css @@ -112,7 +112,7 @@ header img { } .portal-name { - color: #FF6F3D; + color: #0082C9; font-size: 24px; font-weight: bold; line-height: 133%; @@ -207,8 +207,8 @@ label .checkbox { } .button.orange { - background: #FF6F3D; - border: 1px solid #FF6F3D; + background: #0082C9; + border: 1px solid #0082C9; color: #FFFFFF; } @@ -219,7 +219,7 @@ label .checkbox { } .button.orange:not(.disable):hover { - background: #ff7a4b; + background: #00a5fd; } .button.gray { @@ -234,8 +234,8 @@ label .checkbox { } .button.gray:not(.disable):hover { - border: 1px solid #FF6F3D; - color: #FF6F3D; + border: 1px solid #0082C9; + color: #0082C9; } .button.converting { @@ -264,14 +264,14 @@ label .checkbox { } .button.hoar:not(.disable):hover { - background: #FF6F3D; - border: 1px solid #FF6F3D; + background: #0082C9; + border: 1px solid #0082C9; color: #FFFFFF; } .button.hoar.orange { - background: #FF6F3D; - border: 1px solid #FF6F3D; + background: #0082C9; + border: 1px solid #0082C9; color: #FFFFFF; cursor: default; } @@ -370,11 +370,11 @@ label .checkbox { } .links li.active { - border-bottom: 2px solid #FF6F3D; + border-bottom: 2px solid #0082C9; } .links li.active a { - color: #FF6F3D; + color: #0082C9; } .links li.active a img { @@ -490,7 +490,7 @@ label .checkbox { } .convertPercent { - color: #FF6F3D; + color: #0082C9; font-weight: 700; display: inline; } @@ -553,7 +553,7 @@ footer table td { footer a, footer a:hover, footer a:visited { - color: #FF6F3D; + color: #0082C9; font-size: 14px; line-height: 120%; } diff --git a/web/documentserver-example/java-spring/src/main/resources/static/css/stylesheet.css b/web/documentserver-example/java-spring/src/main/resources/static/css/stylesheet.css index 41720951f..33c440aed 100755 --- a/web/documentserver-example/java-spring/src/main/resources/static/css/stylesheet.css +++ b/web/documentserver-example/java-spring/src/main/resources/static/css/stylesheet.css @@ -112,7 +112,7 @@ header img { } .portal-name { - color: #FF6F3D; + color: #0082C9; font-size: 24px; font-weight: bold; line-height: 133%; @@ -207,8 +207,8 @@ label .checkbox { } .button.orange { - background: #FF6F3D; - border: 1px solid #FF6F3D; + background: #0082C9; + border: 1px solid #0082C9; color: #FFFFFF; } @@ -219,7 +219,7 @@ label .checkbox { } .button.orange:not(.disable):hover{ - background: #ff7a4b; + background: #00a5fd; } .button.gray { @@ -234,8 +234,8 @@ label .checkbox { } .button.gray:not(.disable):hover { - border: 1px solid #FF6F3D; - color: #FF6F3D; + border: 1px solid #0082C9; + color: #0082C9; } .button.converting { @@ -264,14 +264,14 @@ label .checkbox { } .button.hoar:not(.disable):hover { - background: #FF6F3D; - border: 1px solid #FF6F3D; + background: #0082C9; + border: 1px solid #0082C9; color: #FFFFFF; } .button.hoar.orange { - background: #FF6F3D; - border: 1px solid #FF6F3D; + background: #0082C9; + border: 1px solid #0082C9; color: #FFFFFF; cursor: default; } @@ -370,11 +370,11 @@ label .checkbox { } .links li.active { - border-bottom: 2px solid #FF6F3D; + border-bottom: 2px solid #0082C9; } .links li.active a { - color: #FF6F3D; + color: #0082C9; } .links li.active a img { @@ -490,7 +490,7 @@ label .checkbox { } .convertPercent { - color: #FF6F3D; + color: #0082C9; font-weight: 700; display: inline; } @@ -555,7 +555,7 @@ footer table td { footer a, footer a:hover, footer a:visited { - color: #FF6F3D; + color: #0082C9; font-size: 14px; line-height: 120%; } diff --git a/web/documentserver-example/java/src/main/webapp/css/stylesheet.css b/web/documentserver-example/java/src/main/webapp/css/stylesheet.css index 9126a4654..9855f586c 100644 --- a/web/documentserver-example/java/src/main/webapp/css/stylesheet.css +++ b/web/documentserver-example/java/src/main/webapp/css/stylesheet.css @@ -112,7 +112,7 @@ header img { } .portal-name { - color: #FF6F3D; + color: #0082C9; font-size: 24px; font-weight: bold; line-height: 133%; @@ -207,8 +207,8 @@ label .checkbox { } .button.orange { - background: #FF6F3D; - border: 1px solid #FF6F3D; + background: #0082C9; + border: 1px solid #0082C9; color: #FFFFFF; } @@ -219,7 +219,7 @@ label .checkbox { } .button.orange:not(.disable):hover{ - background: #ff7a4b; + background: #00a5fd; } .button.gray { @@ -234,8 +234,8 @@ label .checkbox { } .button.gray:not(.disable):hover { - border: 1px solid #FF6F3D; - color: #FF6F3D; + border: 1px solid #0082C9; + color: #0082C9; } .button.converting { @@ -264,14 +264,14 @@ label .checkbox { } .button.hoar:not(.disable):hover { - background: #FF6F3D; - border: 1px solid #FF6F3D; + background: #0082C9; + border: 1px solid #0082C9; color: #FFFFFF; } .button.hoar.orange { - background: #FF6F3D; - border: 1px solid #FF6F3D; + background: #0082C9; + border: 1px solid #0082C9; color: #FFFFFF; cursor: default; } @@ -370,11 +370,11 @@ label .checkbox { } .links li.active { - border-bottom: 2px solid #FF6F3D; + border-bottom: 2px solid #0082C9; } .links li.active a { - color: #FF6F3D; + color: #0082C9; } .links li.active a img { @@ -490,7 +490,7 @@ label .checkbox { } .convertPercent { - color: #FF6F3D; + color: #0082C9; font-weight: 700; display: inline; } @@ -555,7 +555,7 @@ footer table td { footer a, footer a:hover, footer a:visited { - color: #FF6F3D; + color: #0082C9; font-size: 14px; line-height: 120%; } diff --git a/web/documentserver-example/nodejs/app.js b/web/documentserver-example/nodejs/app.js index cb3ee8834..4f49b8e63 100755 --- a/web/documentserver-example/nodejs/app.js +++ b/web/documentserver-example/nodejs/app.js @@ -50,6 +50,8 @@ const cfgSignatureSecret = configServer.get('token.secret'); const verifyPeerOff = configServer.get('verify_peer_off'); const plugins = config.get('plugins'); +const appName = configServer.get('appName'); + if (verifyPeerOff) { process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0'; } @@ -95,6 +97,7 @@ app.get('/', (req, res) => { // define a handler for default page req.DocManager = new DocManager(req, res); res.render('index', { // render index template with the parameters specified + appName, preloaderUrl: siteUrl + configServer.get('preloaderUrl'), fillExts: fileUtility.getFillExtensions(), storedFiles: req.DocManager.getStoredFiles(), @@ -162,7 +165,7 @@ app.get('/forgotten', async (req, res) => { } req.DocManager = new DocManager(req, res); - res.render('forgotten', { forgottenFiles }); + res.render('forgotten', { forgottenFiles, appName, }); }); app.delete('/forgotten', (req, res) => { // define a handler for removing forgotten file @@ -1252,6 +1255,7 @@ app.get('/editor', (req, res) => { // define a handler for editing document // file config data const argss = { + appName, apiUrl: siteUrl + configServer.get('apiUrl'), file: { name: fileName, diff --git a/web/documentserver-example/nodejs/config/development-linux.json b/web/documentserver-example/nodejs/config/development-linux.json index 958acb975..719eb689b 100644 --- a/web/documentserver-example/nodejs/config/development-linux.json +++ b/web/documentserver-example/nodejs/config/development-linux.json @@ -1,5 +1,6 @@ { "server": { + "appName": "Euro-Office", "siteUrl": "/", "exampleUrl": "http://localhost/example", "token": { diff --git a/web/documentserver-example/nodejs/config/development-mac.json b/web/documentserver-example/nodejs/config/development-mac.json index f029d652a..3eb6951be 100644 --- a/web/documentserver-example/nodejs/config/development-mac.json +++ b/web/documentserver-example/nodejs/config/development-mac.json @@ -1,5 +1,6 @@ { "server": { + "appName": "Euro-Office", "port": 3000, "siteUrl": "http://127.0.0.1:8000/" } diff --git a/web/documentserver-example/nodejs/config/development-windows.json b/web/documentserver-example/nodejs/config/development-windows.json index 179f70165..401b8f22c 100644 --- a/web/documentserver-example/nodejs/config/development-windows.json +++ b/web/documentserver-example/nodejs/config/development-windows.json @@ -1,5 +1,6 @@ { "server": { + "appName": "Euro-Office", "port": 80, "siteUrl": "http://127.0.0.1:8000/" } diff --git a/web/documentserver-example/nodejs/config/production-linux.json b/web/documentserver-example/nodejs/config/production-linux.json index cd35ccaf6..798ba1fa9 100644 --- a/web/documentserver-example/nodejs/config/production-linux.json +++ b/web/documentserver-example/nodejs/config/production-linux.json @@ -1,5 +1,6 @@ { "server": { + "appName": "Euro-Office", "siteUrl": "/", "maxFileSize": 104857600, "storageFolder": "/var/lib/euro-office/documentserver-example/files", diff --git a/web/documentserver-example/nodejs/config/production-windows.json b/web/documentserver-example/nodejs/config/production-windows.json index 1741a5a78..e233e341e 100644 --- a/web/documentserver-example/nodejs/config/production-windows.json +++ b/web/documentserver-example/nodejs/config/production-windows.json @@ -1,5 +1,6 @@ { "server": { + "appName": "Euro-Office", "siteUrl": "/", "maxFileSize": 104857600, "enableForgotten": false diff --git a/web/documentserver-example/nodejs/helpers/wopi/wopiRouting.js b/web/documentserver-example/nodejs/helpers/wopi/wopiRouting.js index a4a48eafe..1127d2d76 100755 --- a/web/documentserver-example/nodejs/helpers/wopi/wopiRouting.js +++ b/web/documentserver-example/nodejs/helpers/wopi/wopiRouting.js @@ -27,6 +27,8 @@ const users = require('../users'); const configServer = config.get('server'); const siteUrl = configServer.get('siteUrl'); // the path to the editors installation +const appName = configServer.get('appName'); + const getCustomWopiParams = function getCustomWopiParams(query) { let tokenParams = ''; let actionParams = ''; @@ -87,6 +89,7 @@ exports.registerRoutes = function registerRoutes(app) { // render wopiIndex template with the parameters specified res.render('wopiIndex', { + appName, wopiEnable, storedFiles: wopiEnable ? files : [], params: req.DocManager.getCustomParams(), @@ -137,6 +140,7 @@ exports.registerRoutes = function registerRoutes(app) { // render wopiAction template with the parameters specified res.render('wopiAction', { + appName, actionUrl: utils.getActionUrl( req.DocManager.getServerUrl(true), req.DocManager.curUserHostAddress(), diff --git a/web/documentserver-example/nodejs/public/images/mobile-logo_eo.svg b/web/documentserver-example/nodejs/public/images/mobile-logo_eo.svg new file mode 100644 index 000000000..d118dd050 --- /dev/null +++ b/web/documentserver-example/nodejs/public/images/mobile-logo_eo.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/web/documentserver-example/nodejs/public/stylesheets/stylesheet.css b/web/documentserver-example/nodejs/public/stylesheets/stylesheet.css index c670a4de6..6770ccd43 100644 --- a/web/documentserver-example/nodejs/public/stylesheets/stylesheet.css +++ b/web/documentserver-example/nodejs/public/stylesheets/stylesheet.css @@ -110,7 +110,7 @@ header img { } .portal-name { - color: #FF6F3D; + color: #0082C9; font-size: 24px; font-weight: bold; line-height: 133%; @@ -208,8 +208,8 @@ label .checkbox { } .button.orange { - background: #FF6F3D; - border: 1px solid #FF6F3D; + background: #0082C9; + border: 1px solid #0082C9; color: #FFFFFF; } @@ -220,7 +220,7 @@ label .checkbox { } .button.orange:not(.disable):hover{ - background: #ff7a4b; + background: #00a5fd; } .button.gray { @@ -235,8 +235,8 @@ label .checkbox { } .button.gray:not(.disable):hover { - border: 1px solid #FF6F3D; - color: #FF6F3D; + border: 1px solid #0082C9; + color: #0082C9; } .button.converting { @@ -265,14 +265,14 @@ label .checkbox { } .button.hoar:not(.disable):hover { - background: #FF6F3D; - border: 1px solid #FF6F3D; + background: #0082C9; + border: 1px solid #0082C9; color: #FFFFFF; } .button.hoar.orange { - background: #FF6F3D; - border: 1px solid #FF6F3D; + background: #0082C9; + border: 1px solid #0082C9; color: #FFFFFF; cursor: default; } @@ -365,11 +365,11 @@ label .checkbox { } .links li.active { - border-bottom: 2px solid #FF6F3D; + border-bottom: 2px solid #0082C9; } .links li.active a { - color: #FF6F3D; + color: #0082C9; } .links li.active a img { @@ -501,7 +501,7 @@ label .checkbox { } .convertPercent { - color: #FF6F3D; + color: #0082C9; font-weight: 700; display: inline; } @@ -572,7 +572,7 @@ footer table td { footer a, footer a:hover, footer a:visited { - color: #FF6F3D; + color: #0082C9; font-size: 14px; line-height: 120%; } diff --git a/web/documentserver-example/nodejs/views/editor.ejs b/web/documentserver-example/nodejs/views/editor.ejs index 1ede311bf..3b396601d 100644 --- a/web/documentserver-example/nodejs/views/editor.ejs +++ b/web/documentserver-example/nodejs/views/editor.ejs @@ -23,7 +23,7 @@ * limitations under the License. * --> -