Skip to content

Commit

Permalink
Merge branch 'v2.x/staging' into v2.x/migration
Browse files Browse the repository at this point in the history
  • Loading branch information
DivergentEuropeans authored Aug 21, 2023
2 parents 07afd28 + a462c6b commit bc2fce5
Show file tree
Hide file tree
Showing 7 changed files with 577 additions and 490 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/build-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,50 @@ jobs:
github-repo: ${{ github.repository }}
github-token: ${{ secrets.GITHUB_TOKEN }}

check_changelog:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
path: copy-repo
fetch-depth: ${{ github.event_name == 'pull_request' && 2 || 0 }}

- name: Get changed files
id: changed-files
run: |
cd copy-repo
if ${{ github.event_name == 'pull_request' }}; then
echo "changed_files=$(git diff --name-only -r HEAD^1 HEAD | xargs)" >> $GITHUB_OUTPUT
else
echo "changed_files=$(git diff --name-only ${{ github.event.before }} ${{ github.event.after }} | xargs)" >> $GITHUB_OUTPUT
fi
- name: List changed files
id: set-flag
run: |
cd copy-repo
for file in ${{ steps.changed-files.outputs.changed_files }}; do
echo "$file was changed"
if [[ $file == "CHANGELOG.md" ]]
then
echo "file-flag=true" >> $GITHUB_OUTPUT
break;
else
echo "file-flag=false" >> $GITHUB_OUTPUT
fi
done
- name: Check if CHANGELOG is Updated and Abort if not updated
if: steps.set-flag.outputs.file-flag != 'true'
run: |
echo "CHANGELOG.md not updated, please update CHANGELOG.md with the changes made in the pull request"
exit 1
- name: Remove copy-repo
if: always()
run: rm -r copy-repo

build:
runs-on: ubuntu-latest
needs: check-permission
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

All notable changes to the Zlux App Manager will be documented in this file.

## `2.10.0`
- Bugfix: Fixed a timing issue with the iframe-adapter for Firefox (#532)

## `2.8.0`
- Bugfix: Fixed the iframe-adapter not properly recognizing standalone mode
- Bugfix: Fixed Iframes from unintentionally loading their sources multiple times during refocus & multi-app situations
Expand Down
44 changes: 37 additions & 7 deletions bootstrap/web/iframe-adapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,22 +187,52 @@ var ZoweZLUX = {
//True - Single app mode, False - We are in regular desktop mode
isSingleAppMode() {
return new Promise(function(resolve, reject) {
if (window.top.GIZA_PLUGIN_TO_BE_LOADED) { //Ancient edgecase
if (window.top.GIZA_PLUGIN_TO_BE_LOADED) {
resolve(true); //Standalone mode
} else {
resolve(false);
}
} else {
//resolve(false) doesn't work great here and fails timing situations in some browsers (for example: Firefox)
let intervalId = setInterval(checkForStandaloneMode, 100);
function checkForStandaloneMode() {
if (ZoweZLUX.iframe.pluginDef) { //If we have the plugin definition
clearInterval(intervalId);
resolve(false);
}
}
setTimeout(() => {
clearInterval(intervalId);
if (ZoweZLUX.iframe.pluginDef === undefined || null) {
resolve(true);
} else {
resolve(false);
}
}, 1000);
}
});
},

//True - Standalone + using simple window manager, False - We are in regular desktop or using the MVD window manager for single app mode
isSingleAppModeSimple() {
return new Promise(function(resolve, reject) {
if (window.top.GIZA_SIMPLE_CONTAINER_REQUESTED) { //Ancient edgecase
if (window.top.GIZA_SIMPLE_CONTAINER_REQUESTED) {
resolve(true); //Standalone mode
} else {
resolve(false);
}
//resolve(false) doesn't work great here and fails timing situations in some browsers (for example: Firefox)
let intervalId = setInterval(checkForStandaloneMode, 100);
function checkForStandaloneMode() {
if (ZoweZLUX.iframe.pluginDef) { //If we have the plugin definition
clearInterval(intervalId);
resolve(false);
}
}
setTimeout(() => {
clearInterval(intervalId);
if (ZoweZLUX.iframe.pluginDef === undefined || null) {
resolve(true);
} else {
resolve(false);
}
}, 1000);
}
});
}
},
Expand Down
6 changes: 3 additions & 3 deletions system-apps/app-generator/nodeServer/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit bc2fce5

Please sign in to comment.