Skip to content

Commit

Permalink
change build completly
Browse files Browse the repository at this point in the history
  • Loading branch information
sybnex committed Oct 4, 2023
1 parent 00f08a8 commit 76360ad
Show file tree
Hide file tree
Showing 2 changed files with 132 additions and 0 deletions.
1 change: 1 addition & 0 deletions build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ RUN cp -r /tmp/theia-blueprint/* . && \
mv package.json package.json.orig
COPY package.json.acend .
COPY preload.html ./applications/browser/resources/preload.html
COPY branding-util.tsx ./theia-extensions/product/src/browser/branding-util.tsx

# customize package.json
RUN jq -s '.[0] * .[1]' package.json.acend package.json.orig > package.json.tmp1 && \
Expand Down
131 changes: 131 additions & 0 deletions build/branding-util.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
/********************************************************************************
* Copyright (C) 2020 EclipseSource and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

import { Key, KeyCode } from '@theia/core/lib/browser';
import { WindowService } from '@theia/core/lib/browser/window/window-service';
import * as React from 'react';

export interface ExternalBrowserLinkProps {
text: string;
url: string;
windowService: WindowService;
}

function ExternalBrowserLink(props: ExternalBrowserLinkProps): JSX.Element {
return <a
role={'button'}
tabIndex={0}
onClick={() => openExternalLink(props.url, props.windowService)}
onKeyDown={(e: React.KeyboardEvent) => {
if (Key.ENTER.keyCode === KeyCode.createKeyCode(e.nativeEvent).key?.keyCode) {
openExternalLink(props.url, props.windowService);
}
}}>
{props.text}
</a>;
}

function openExternalLink(url: string, windowService: WindowService): void {
windowService.openNewWindow(url, { external: true });
}

export function renderWhatIs(windowService: WindowService): React.ReactNode {
return <div className='gs-section'>
<h3 className='gs-section-header'>
What is this Webshell?
</h3>
<div >
This Webshell gives you everthing you need to work on our Labs.
All tools mentioned in the lab are integraded and preconfigured.
For more information ask your Trainer (the person in the front)!
</div>
</div>;
}

export function renderWhatIsNot(): React.ReactNode {
return <div className='gs-section'>
<h3 className='gs-section-header'>
What is it not?
</h3>
<div >
As it used for our Tranings only it will be deleted after your Training has ended (plus 2 or 3 days).
</div>
</div>;
}

export function renderSupport(windowService: WindowService): React.ReactNode {
return <div className='gs-section'>
<h3 className='gs-section-header'>
Support
</h3>
<div >
For any questions or things which are not working ask your acend Trainer.
</div>
</div>;
}

export function renderTickets(windowService: WindowService): React.ReactNode {
return <div className='gs-section'>
<h3 className='gs-section-header'>
Reporting feature requests and bugs
</h3>
<div >
If something is missing in the toolset or you have a great idea, please tell us so we can integrate it.
</div>
</div>;
}

export function renderSourceCode(windowService: WindowService): React.ReactNode {
return <div className='gs-section'>
<h3 className='gs-section-header'>
Source Code
</h3>
<div >
The source code of Eclipse Theia Blueprint is available
on <ExternalBrowserLink text="Github" url="https://github.com/eclipse-theia/theia-blueprint"
windowService={windowService} ></ExternalBrowserLink>.
</div>
</div>;
}

export function renderDocumentation(windowService: WindowService): React.ReactNode {
return <div className='gs-section'>
<h3 className='gs-section-header'>
Documentation
</h3>
<div >
Please see <ExternalBrowserLink text="here" url="https://theia-ide.org/docs/blueprint_documentation/"
windowService={windowService} ></ExternalBrowserLink> for
documentation how to customize Eclipse Theia Blueprint.
</div>
</div>;
}

export function renderDownloads(): React.ReactNode {
return <div className='gs-section'>
<h3 className='gs-section-header'>
Updates and Downloads
</h3>
<div className='gs-action-container'>
You can update Eclipse Theia Blueprint directly in this application by navigating to
File {'>'} Settings {'>'} Check for Updates… Moreover the application will check for updates
after each launch automatically.
</div>
<div className='gs-action-container'>
Alternatively you can download the most recent version from the download page.
</div>
</div>;
}

0 comments on commit 76360ad

Please sign in to comment.