From f8604d012b7d98c9c5dd53328a75f157f72ed4e4 Mon Sep 17 00:00:00 2001 From: JarbasAI <33701864+JarbasAl@users.noreply.github.com> Date: Fri, 20 Sep 2024 21:36:24 +0100 Subject: [PATCH 1/6] feat:semver (#113) --- .github/workflows/auto_translate.yml | 52 ----------- .github/workflows/conventional-label.yaml | 10 ++ .github/workflows/prepare_skillstore.yml | 29 ------ .github/workflows/propose_release.yml | 32 ------- .github/workflows/publish_alpha.yml | 34 ------- .github/workflows/publish_release.yml | 13 --- .github/workflows/publish_stable.yml | 58 ++++++++++++ .github/workflows/release_workflow.yml | 108 ++++++++++++++++++++++ 8 files changed, 176 insertions(+), 160 deletions(-) delete mode 100644 .github/workflows/auto_translate.yml create mode 100644 .github/workflows/conventional-label.yaml delete mode 100644 .github/workflows/prepare_skillstore.yml delete mode 100644 .github/workflows/propose_release.yml delete mode 100644 .github/workflows/publish_alpha.yml delete mode 100644 .github/workflows/publish_release.yml create mode 100644 .github/workflows/publish_stable.yml create mode 100644 .github/workflows/release_workflow.yml diff --git a/.github/workflows/auto_translate.yml b/.github/workflows/auto_translate.yml deleted file mode 100644 index 2945f94..0000000 --- a/.github/workflows/auto_translate.yml +++ /dev/null @@ -1,52 +0,0 @@ -name: Auto translate -on: - workflow_dispatch: - push: - branches: - - dev - -jobs: - translate: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - with: - ref: dev - fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository. - - name: Setup Python - uses: actions/setup-python@v1 - with: - python-version: 3.8 - - name: Install Translate Tools - run: | - pip install git+https://github.com/NeonGeckoCom/neon-lang-plugin-libretranslate - - name: Auto Translate - run: | - python scripts/translate.py - - name: Commit to dev - uses: stefanzweifel/git-auto-commit-action@v4 - with: - commit_message: Auto Translate - branch: dev - prepare_skillstore: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - with: - ref: dev - fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository. - - name: Setup Python - uses: actions/setup-python@v1 - with: - python-version: 3.8 - - name: Install OSM - run: | - pip install ovos-skills-manager~=0.0.10 - - name: Update Skill Store metadata - run: | - python scripts/prepare_skillstore.py - - name: Commit to dev - uses: stefanzweifel/git-auto-commit-action@v4 - with: - commit_message: Update skill store metadata - branch: dev diff --git a/.github/workflows/conventional-label.yaml b/.github/workflows/conventional-label.yaml new file mode 100644 index 0000000..0a449cb --- /dev/null +++ b/.github/workflows/conventional-label.yaml @@ -0,0 +1,10 @@ +# auto add labels to PRs +on: + pull_request_target: + types: [ opened, edited ] +name: conventional-release-labels +jobs: + label: + runs-on: ubuntu-latest + steps: + - uses: bcoe/conventional-release-labels@v1 \ No newline at end of file diff --git a/.github/workflows/prepare_skillstore.yml b/.github/workflows/prepare_skillstore.yml deleted file mode 100644 index 106862d..0000000 --- a/.github/workflows/prepare_skillstore.yml +++ /dev/null @@ -1,29 +0,0 @@ -# This workflow will generate a distribution and upload it to PyPI - -name: Create Skill Store Metadata -on: - workflow_dispatch: - -jobs: - build_and_publish: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - with: - ref: dev - fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository. - - name: Setup Python - uses: actions/setup-python@v1 - with: - python-version: 3.8 - - name: Install OSM - run: | - pip install ovos-skills-manager~=0.0.10 - - name: Update Skill Store metadata - run: | - python scripts/prepare_skillstore.py - - name: Commit to dev - uses: stefanzweifel/git-auto-commit-action@v4 - with: - commit_message: Update skill store metadata - branch: dev diff --git a/.github/workflows/propose_release.yml b/.github/workflows/propose_release.yml deleted file mode 100644 index b496de0..0000000 --- a/.github/workflows/propose_release.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: Propose Stable Release -on: - workflow_dispatch: - inputs: - release_type: - type: choice - description: Release Type - options: - - build - - minor - - major -jobs: - update_version: - uses: neongeckocom/.github/.github/workflows/propose_semver_release.yml@master - with: - release_type: ${{ inputs.release_type }} - version_file: version.py - alpha_var: VERSION_ALPHA - build_var: VERSION_BUILD - minor_var: VERSION_MINOR - major_var: VERSION_MAJOR - update_changelog: True - branch: dev - - pull_changes: - needs: update_version - uses: neongeckocom/.github/.github/workflows/pull_master.yml@master - with: - pr_assignee: ${{ github.actor }} - pr_draft: false - pr_title: ${{ needs.update_version.outputs.version }} - pr_body: ${{ needs.update_version.outputs.changelog }} diff --git a/.github/workflows/publish_alpha.yml b/.github/workflows/publish_alpha.yml deleted file mode 100644 index 619c903..0000000 --- a/.github/workflows/publish_alpha.yml +++ /dev/null @@ -1,34 +0,0 @@ -# This workflow will generate a distribution and upload it to PyPI - -name: Publish Alpha Build ...aX -on: - push: - branches: - - dev - paths-ignore: - - 'version.py' - - 'test/**' - - 'examples/**' - - '.github/**' - - '.gitignore' - - 'LICENSE' - - 'CHANGELOG.md' - - 'MANIFEST.in' - - 'readme.md' - - 'scripts/**' - - 'translations/**' - workflow_dispatch: - -jobs: - publish_alpha_release: - uses: neongeckocom/.github/.github/workflows/publish_alpha_release.yml@master - secrets: - PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} - with: - version_file: "version.py" - publish_prerelease: true - update_changelog: true - alpha_var: VERSION_ALPHA - build_var: VERSION_BUILD - minor_var: VERSION_MINOR - major_var: VERSION_MAJOR \ No newline at end of file diff --git a/.github/workflows/publish_release.yml b/.github/workflows/publish_release.yml deleted file mode 100644 index c86812b..0000000 --- a/.github/workflows/publish_release.yml +++ /dev/null @@ -1,13 +0,0 @@ -# This workflow will generate a release distribution and upload it to PyPI - -name: Publish Build and GitHub Release -on: - push: - branches: - - master - -jobs: - build_and_publish_pypi_and_release: - uses: neongeckocom/.github/.github/workflows/publish_stable_release.yml@master - secrets: - PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} diff --git a/.github/workflows/publish_stable.yml b/.github/workflows/publish_stable.yml new file mode 100644 index 0000000..6b5412a --- /dev/null +++ b/.github/workflows/publish_stable.yml @@ -0,0 +1,58 @@ +name: Stable Release +on: + push: + branches: [master] + workflow_dispatch: + +jobs: + publish_stable: + uses: TigreGotico/gh-automations/.github/workflows/publish-stable.yml@master + secrets: inherit + with: + branch: 'master' + version_file: 'version.py' + setup_py: 'setup.py' + publish_release: true + + publish_pypi: + needs: publish_stable + if: success() # Ensure this job only runs if the previous job succeeds + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + ref: dev + fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository. + - name: Setup Python + uses: actions/setup-python@v1 + with: + python-version: 3.8 + - name: Install Build Tools + run: | + python -m pip install build wheel + - name: version + run: echo "::set-output name=version::$(python setup.py --version)" + id: version + - name: Build Distribution Packages + run: | + python setup.py sdist bdist_wheel + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@master + with: + password: ${{secrets.PYPI_TOKEN}} + + + sync_dev: + needs: publish_stable + if: success() # Ensure this job only runs if the previous job succeeds + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository. + ref: master + - name: Push master -> dev + uses: ad-m/github-push-action@master + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + branch: dev \ No newline at end of file diff --git a/.github/workflows/release_workflow.yml b/.github/workflows/release_workflow.yml new file mode 100644 index 0000000..fa21ba9 --- /dev/null +++ b/.github/workflows/release_workflow.yml @@ -0,0 +1,108 @@ +name: Release Alpha and Propose Stable + +on: + pull_request: + types: [closed] + branches: [dev] + +jobs: + publish_alpha: + if: github.event.pull_request.merged == true + uses: TigreGotico/gh-automations/.github/workflows/publish-alpha.yml@master + secrets: inherit + with: + branch: 'dev' + version_file: 'version.py' + setup_py: 'setup.py' + update_changelog: true + publish_prerelease: true + changelog_max_issues: 100 + + notify: + if: github.event.pull_request.merged == true + needs: publish_alpha + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Send message to Matrix bots channel + id: matrix-chat-message + uses: fadenb/matrix-chat-message@v0.0.6 + with: + homeserver: 'matrix.org' + token: ${{ secrets.MATRIX_TOKEN }} + channel: '!WjxEKjjINpyBRPFgxl:krbel.duckdns.org' + message: | + new ${{ github.event.repository.name }} PR merged! https://github.com/${{ github.repository }}/pull/${{ github.event.number }} + + publish_pypi: + needs: publish_alpha + if: success() # Ensure this job only runs if the previous job succeeds + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + ref: dev + fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository. + - name: Setup Python + uses: actions/setup-python@v1 + with: + python-version: 3.8 + - name: Install Build Tools + run: | + python -m pip install build wheel + - name: version + run: echo "::set-output name=version::$(python setup.py --version)" + id: version + - name: Build Distribution Packages + run: | + python setup.py sdist bdist_wheel + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@master + with: + password: ${{secrets.PYPI_TOKEN}} + + + propose_release: + needs: publish_alpha + if: success() # Ensure this job only runs if the previous job succeeds + runs-on: ubuntu-latest + steps: + - name: Checkout dev branch + uses: actions/checkout@v3 + with: + ref: dev + + - name: Setup Python + uses: actions/setup-python@v2 + with: + python-version: '3.10' + + - name: Get version from setup.py + id: get_version + run: | + VERSION=$(python setup.py --version) + echo "VERSION=$VERSION" >> $GITHUB_ENV + + - name: Create and push new branch + run: | + git checkout -b release-${{ env.VERSION }} + git push origin release-${{ env.VERSION }} + + - name: Open Pull Request from dev to master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + # Variables + BRANCH_NAME="release-${{ env.VERSION }}" + BASE_BRANCH="master" + HEAD_BRANCH="release-${{ env.VERSION }}" + PR_TITLE="Release ${{ env.VERSION }}" + PR_BODY="Human review requested!" + + # Create a PR using GitHub API + curl -X POST \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: token $GITHUB_TOKEN" \ + -d "{\"title\":\"$PR_TITLE\",\"body\":\"$PR_BODY\",\"head\":\"$HEAD_BRANCH\",\"base\":\"$BASE_BRANCH\"}" \ + https://api.github.com/repos/${{ github.repository }}/pulls + From 4ea7b9cfa161bc0e535d5867d4ad19a8a17658a1 Mon Sep 17 00:00:00 2001 From: JarbasAl Date: Fri, 20 Sep 2024 20:36:42 +0000 Subject: [PATCH 2/6] Increment Version to 0.0.4a1 --- version.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/version.py b/version.py index 23532c1..441e978 100644 --- a/version.py +++ b/version.py @@ -1,6 +1,6 @@ # START_VERSION_BLOCK VERSION_MAJOR = 0 VERSION_MINOR = 0 -VERSION_BUILD = 3 -VERSION_ALPHA = 0 +VERSION_BUILD = 4 +VERSION_ALPHA = 1 # END_VERSION_BLOCK From 9597600af7a4765684f705c3cadcb0da28ec18c8 Mon Sep 17 00:00:00 2001 From: JarbasAl Date: Fri, 20 Sep 2024 20:37:09 +0000 Subject: [PATCH 3/6] Update Changelog --- CHANGELOG.md | 148 ++------------------------------------------------- 1 file changed, 3 insertions(+), 145 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9ff0048..ae24b32 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,154 +1,12 @@ # Changelog -## [0.0.3](https://github.com/OpenVoiceOS/skill-ovos-homescreen/tree/0.0.3) (2024-09-02) +## [0.0.4a1](https://github.com/OpenVoiceOS/skill-ovos-homescreen/tree/0.0.4a1) (2024-09-20) -[Full Changelog](https://github.com/OpenVoiceOS/skill-ovos-homescreen/compare/0.0.3a16...0.0.3) +[Full Changelog](https://github.com/OpenVoiceOS/skill-ovos-homescreen/compare/0.0.3...0.0.4a1) **Merged pull requests:** -- added italian [\#105](https://github.com/OpenVoiceOS/skill-ovos-homescreen/pull/105) ([gitlocalize-app[bot]](https://github.com/apps/gitlocalize-app)) - -## [0.0.3a16](https://github.com/OpenVoiceOS/skill-ovos-homescreen/tree/0.0.3a16) (2024-01-12) - -[Full Changelog](https://github.com/OpenVoiceOS/skill-ovos-homescreen/compare/0.0.3a15...0.0.3a16) - -**Fixed bugs:** - -- add markdown content type [\#103](https://github.com/OpenVoiceOS/skill-ovos-homescreen/pull/103) ([emphasize](https://github.com/emphasize)) - -## [0.0.3a15](https://github.com/OpenVoiceOS/skill-ovos-homescreen/tree/0.0.3a15) (2024-01-12) - -[Full Changelog](https://github.com/OpenVoiceOS/skill-ovos-homescreen/compare/0.0.3a14...0.0.3a15) - -**Fixed bugs:** - -- fix markup indentation [\#102](https://github.com/OpenVoiceOS/skill-ovos-homescreen/pull/102) ([emphasize](https://github.com/emphasize)) - -## [0.0.3a14](https://github.com/OpenVoiceOS/skill-ovos-homescreen/tree/0.0.3a14) (2024-01-11) - -[Full Changelog](https://github.com/OpenVoiceOS/skill-ovos-homescreen/compare/0.0.3a13...0.0.3a14) - -## [0.0.3a13](https://github.com/OpenVoiceOS/skill-ovos-homescreen/tree/0.0.3a13) (2024-01-11) - -[Full Changelog](https://github.com/OpenVoiceOS/skill-ovos-homescreen/compare/0.0.3a12...0.0.3a13) - -**Fixed bugs:** - -- fix/log\_spam [\#100](https://github.com/OpenVoiceOS/skill-ovos-homescreen/pull/100) ([JarbasAl](https://github.com/JarbasAl)) - -**Merged pull requests:** - -- Update link [\#97](https://github.com/OpenVoiceOS/skill-ovos-homescreen/pull/97) ([builderjer](https://github.com/builderjer)) - -## [0.0.3a12](https://github.com/OpenVoiceOS/skill-ovos-homescreen/tree/0.0.3a12) (2024-01-11) - -[Full Changelog](https://github.com/OpenVoiceOS/skill-ovos-homescreen/compare/0.0.3a11...0.0.3a12) - -**Fixed bugs:** - -- Unable to upload the QML files to GUI [\#89](https://github.com/OpenVoiceOS/skill-ovos-homescreen/issues/89) - -**Merged pull requests:** - -- working for ovos-utils 0.1.0 [\#101](https://github.com/OpenVoiceOS/skill-ovos-homescreen/pull/101) ([builderjer](https://github.com/builderjer)) - -## [0.0.3a11](https://github.com/OpenVoiceOS/skill-ovos-homescreen/tree/0.0.3a11) (2023-12-26) - -[Full Changelog](https://github.com/OpenVoiceOS/skill-ovos-homescreen/compare/0.0.3a10...0.0.3a11) - -**Implemented enhancements:** - -- Fix/notification popup [\#92](https://github.com/OpenVoiceOS/skill-ovos-homescreen/pull/92) ([emphasize](https://github.com/emphasize)) - -**Closed issues:** - -- notification dismissal expectations [\#91](https://github.com/OpenVoiceOS/skill-ovos-homescreen/issues/91) - -## [0.0.3a10](https://github.com/OpenVoiceOS/skill-ovos-homescreen/tree/0.0.3a10) (2023-11-14) - -[Full Changelog](https://github.com/OpenVoiceOS/skill-ovos-homescreen/compare/0.0.3a9...0.0.3a10) - -**Implemented enhancements:** - -- Add bus events to control main view pages [\#98](https://github.com/OpenVoiceOS/skill-ovos-homescreen/pull/98) ([atd](https://github.com/atd)) - -## [0.0.3a9](https://github.com/OpenVoiceOS/skill-ovos-homescreen/tree/0.0.3a9) (2023-11-12) - -[Full Changelog](https://github.com/OpenVoiceOS/skill-ovos-homescreen/compare/0.0.3a8...0.0.3a9) - -**Merged pull requests:** - -- Companion to https://github.com/OpenVoiceOS/community-docs/pull/80 [\#96](https://github.com/OpenVoiceOS/skill-ovos-homescreen/pull/96) ([builderjer](https://github.com/builderjer)) - -## [0.0.3a8](https://github.com/OpenVoiceOS/skill-ovos-homescreen/tree/0.0.3a8) (2023-11-12) - -[Full Changelog](https://github.com/OpenVoiceOS/skill-ovos-homescreen/compare/0.0.3a7...0.0.3a8) - -**Merged pull requests:** - -- docs: include settings.json locations [\#95](https://github.com/OpenVoiceOS/skill-ovos-homescreen/pull/95) ([mikejgray](https://github.com/mikejgray)) - -## [0.0.3a7](https://github.com/OpenVoiceOS/skill-ovos-homescreen/tree/0.0.3a7) (2023-11-12) - -[Full Changelog](https://github.com/OpenVoiceOS/skill-ovos-homescreen/compare/0.0.3a6...0.0.3a7) - -**Closed issues:** - -- Add documentation [\#93](https://github.com/OpenVoiceOS/skill-ovos-homescreen/issues/93) -- Notification icon missing after navigating to settings and back [\#76](https://github.com/OpenVoiceOS/skill-ovos-homescreen/issues/76) - -**Merged pull requests:** - -- add README.md [\#94](https://github.com/OpenVoiceOS/skill-ovos-homescreen/pull/94) ([JarbasAl](https://github.com/JarbasAl)) - -## [0.0.3a6](https://github.com/OpenVoiceOS/skill-ovos-homescreen/tree/0.0.3a6) (2023-07-29) - -[Full Changelog](https://github.com/OpenVoiceOS/skill-ovos-homescreen/compare/V0.0.3a5...0.0.3a6) - -**Fixed bugs:** - -- Improved exception handling around SkillAPIs [\#88](https://github.com/OpenVoiceOS/skill-ovos-homescreen/pull/88) ([NeonDaniel](https://github.com/NeonDaniel)) - -**Closed issues:** - -- Event `ovos.homescreen.displayed` after homescreen is fully loaded [\#82](https://github.com/OpenVoiceOS/skill-ovos-homescreen/issues/82) - -## [V0.0.3a5](https://github.com/OpenVoiceOS/skill-ovos-homescreen/tree/V0.0.3a5) (2023-06-30) - -[Full Changelog](https://github.com/OpenVoiceOS/skill-ovos-homescreen/compare/V0.0.3a4...V0.0.3a5) - -**Merged pull requests:** - -- send it from the python side everytime even if not visible and idle is called [\#65](https://github.com/OpenVoiceOS/skill-ovos-homescreen/pull/65) ([AIIX](https://github.com/AIIX)) - -## [V0.0.3a4](https://github.com/OpenVoiceOS/skill-ovos-homescreen/tree/V0.0.3a4) (2023-06-28) - -[Full Changelog](https://github.com/OpenVoiceOS/skill-ovos-homescreen/compare/V0.0.3a3...V0.0.3a4) - -**Merged pull requests:** - -- ovos\_bus\_client [\#87](https://github.com/OpenVoiceOS/skill-ovos-homescreen/pull/87) ([JarbasAl](https://github.com/JarbasAl)) - -## [V0.0.3a3](https://github.com/OpenVoiceOS/skill-ovos-homescreen/tree/V0.0.3a3) (2023-06-07) - -[Full Changelog](https://github.com/OpenVoiceOS/skill-ovos-homescreen/compare/V0.0.3a1...V0.0.3a3) - -**Merged pull requests:** - -- fix it-it [\#86](https://github.com/OpenVoiceOS/skill-ovos-homescreen/pull/86) ([denics](https://github.com/denics)) -- refactor/disable\_prefix [\#84](https://github.com/OpenVoiceOS/skill-ovos-homescreen/pull/84) ([JarbasAl](https://github.com/JarbasAl)) - -## [V0.0.3a1](https://github.com/OpenVoiceOS/skill-ovos-homescreen/tree/V0.0.3a1) (2023-06-07) - -[Full Changelog](https://github.com/OpenVoiceOS/skill-ovos-homescreen/compare/V0.0.2...V0.0.3a1) - -**Closed issues:** - -- Log spam if date time api not available [\#51](https://github.com/OpenVoiceOS/skill-ovos-homescreen/issues/51) - -**Merged pull requests:** - -- reviewd it-it [\#85](https://github.com/OpenVoiceOS/skill-ovos-homescreen/pull/85) ([denics](https://github.com/denics)) +- feat:semver [\#113](https://github.com/OpenVoiceOS/skill-ovos-homescreen/pull/113) ([JarbasAl](https://github.com/JarbasAl)) From 2e5e5777578322d49c33af8c796079c706ac30c5 Mon Sep 17 00:00:00 2001 From: JarbasAI <33701864+JarbasAl@users.noreply.github.com> Date: Fri, 20 Sep 2024 21:41:39 +0100 Subject: [PATCH 4/6] deprecate!:remove dashboard (#112) * deprecate!:remove dashboard * deprecate!:remove dashboard --- __init__.py | 72 +--- initialcards.json | 25 -- skill/__init__.py | 16 - skill/cardGenerator.py | 51 --- skill/dashboardHandler.py | 98 ----- ui/AddCardOverlay.qml | 340 ------------------ ui/BoxesPage.qml | 153 -------- ui/GridBox.qml | 206 ----------- ui/boxes/PlayRelaxingMusic.qml | 70 ---- ui/boxes/PlayTheNews.qml | 14 - ui/boxes/SetAlarmBox.qml | 14 - ui/boxes/TakeNoteBox.qml | 14 - ui/code/dashmodel.js | 160 --------- ui/delegates/BoxAbstractDelegate.qml | 35 -- ui/delegates/BoxSimpleDelegate.qml | 119 ------ ui/idle.qml | 10 +- ui/qmldir | 3 - ui/templates/CardTemplate.qml | 119 ------ ui/translations/AddCardOverlay_de.ts | 57 --- ui/translations/AddCardOverlay_es.ts | 57 --- ui/translations/AddCardOverlay_fr.ts | 57 --- ui/translations/AddCardOverlay_it.ts | 57 --- ui/translations/AddCardOverlay_nl.ts | 57 --- ui/translations/AddCardOverlay_pt.ts | 57 --- ui/translations/BoxesPage_de.ts | 17 - ui/translations/BoxesPage_es.ts | 17 - ui/translations/BoxesPage_fr.ts | 17 - ui/translations/BoxesPage_it.ts | 17 - ui/translations/BoxesPage_nl.ts | 17 - ui/translations/BoxesPage_pt.ts | 17 - ui/translations/GridBox_de.ts | 22 -- ui/translations/GridBox_es.ts | 22 -- ui/translations/GridBox_fr.ts | 22 -- ui/translations/GridBox_it.ts | 22 -- ui/translations/GridBox_nl.ts | 22 -- ui/translations/GridBox_pt.ts | 22 -- .../skill-ovos-homescreen.openvoiceos_de.qm | Bin 1380 -> 0 bytes .../skill-ovos-homescreen.openvoiceos_es.qm | Bin 1492 -> 0 bytes .../skill-ovos-homescreen.openvoiceos_fr.qm | Bin 1448 -> 0 bytes .../skill-ovos-homescreen.openvoiceos_it.qm | Bin 1480 -> 0 bytes .../skill-ovos-homescreen.openvoiceos_nl.qm | Bin 1368 -> 0 bytes .../skill-ovos-homescreen.openvoiceos_pt.qm | Bin 1430 -> 0 bytes 42 files changed, 8 insertions(+), 2087 deletions(-) delete mode 100644 initialcards.json delete mode 100644 skill/__init__.py delete mode 100644 skill/cardGenerator.py delete mode 100644 skill/dashboardHandler.py delete mode 100644 ui/AddCardOverlay.qml delete mode 100644 ui/BoxesPage.qml delete mode 100644 ui/GridBox.qml delete mode 100644 ui/boxes/PlayRelaxingMusic.qml delete mode 100644 ui/boxes/PlayTheNews.qml delete mode 100644 ui/boxes/SetAlarmBox.qml delete mode 100644 ui/boxes/TakeNoteBox.qml delete mode 100644 ui/code/dashmodel.js delete mode 100644 ui/delegates/BoxAbstractDelegate.qml delete mode 100644 ui/delegates/BoxSimpleDelegate.qml delete mode 100644 ui/templates/CardTemplate.qml delete mode 100644 ui/translations/AddCardOverlay_de.ts delete mode 100644 ui/translations/AddCardOverlay_es.ts delete mode 100644 ui/translations/AddCardOverlay_fr.ts delete mode 100644 ui/translations/AddCardOverlay_it.ts delete mode 100644 ui/translations/AddCardOverlay_nl.ts delete mode 100644 ui/translations/AddCardOverlay_pt.ts delete mode 100644 ui/translations/BoxesPage_de.ts delete mode 100644 ui/translations/BoxesPage_es.ts delete mode 100644 ui/translations/BoxesPage_fr.ts delete mode 100644 ui/translations/BoxesPage_it.ts delete mode 100644 ui/translations/BoxesPage_nl.ts delete mode 100644 ui/translations/BoxesPage_pt.ts delete mode 100644 ui/translations/GridBox_de.ts delete mode 100644 ui/translations/GridBox_es.ts delete mode 100644 ui/translations/GridBox_fr.ts delete mode 100644 ui/translations/GridBox_it.ts delete mode 100644 ui/translations/GridBox_nl.ts delete mode 100644 ui/translations/GridBox_pt.ts delete mode 100644 ui/translations/skill-ovos-homescreen.openvoiceos_de.qm delete mode 100644 ui/translations/skill-ovos-homescreen.openvoiceos_es.qm delete mode 100644 ui/translations/skill-ovos-homescreen.openvoiceos_fr.qm delete mode 100644 ui/translations/skill-ovos-homescreen.openvoiceos_it.qm delete mode 100644 ui/translations/skill-ovos-homescreen.openvoiceos_nl.qm delete mode 100644 ui/translations/skill-ovos-homescreen.openvoiceos_pt.qm diff --git a/__init__.py b/__init__.py index b7928e5..7683e7a 100644 --- a/__init__.py +++ b/__init__.py @@ -24,10 +24,9 @@ from ovos_bus_client import Message from ovos_utils import classproperty from ovos_utils.log import LOG +from ovos_utils.time import now_local from ovos_utils.process_utils import RuntimeRequirements -from .skill import (DashboardHandler, CardGenerator) - class OVOSHomescreenSkill(OVOSSkill): def __init__(self, *args, **kwargs): @@ -44,9 +43,6 @@ def __init__(self, *args, **kwargs): self.datetime_api = None self.skill_info_api = None - # Display Configuration Variables - self.dashboard_handler = None - # Media State Tracking For Widget # Needed for setting qml button state self.media_widget_player_state = None @@ -69,17 +65,10 @@ def runtime_requirements(self): no_gui_fallback=False) def initialize(self): - self.dashboard_handler = DashboardHandler(self.file_system.path, - path.dirname(__file__)) - self.card_generator = CardGenerator(self.file_system.path, self.bus, - path.dirname(__file__)) self.loc_wallpaper_folder = self.file_system.path + '/wallpapers/' self.rtlMode = 1 if self.config_core.get("rtl", False) else 0 - now = datetime.datetime.now() - callback_time = datetime.datetime( - now.year, now.month, now.day, now.hour, now.minute - ) + datetime.timedelta(seconds=60) + callback_time = now_local() + datetime.timedelta(seconds=60) self.schedule_repeating_event(self.update_dt, callback_time, 10) # Handler Registration For Notifications @@ -108,16 +97,6 @@ def initialize(self): self.add_event("ovos.widgets.alarm.remove", self.handle_alarm_widget_manager) - # Handler Registration For Dashboard - self.add_event("ovos.homescreen.dashboard.add.card", - self.add_dashboard_card) - self.add_event("ovos.homescreen.dashboard.generate.card", - self.generate_dashboard_card) - self.gui.register_handler("ovos.homescreen.dashboard.generate.card", - self.generate_dashboard_card) - self.gui.register_handler("ovos.homescreen.dashboard.remove.card", - self.remove_dashboard_card) - if not self.file_system.exists("wallpapers"): os.mkdir(path.join(self.file_system.path, "wallpapers")) @@ -193,7 +172,6 @@ def handle_idle(self, message): self.gui["notification_model"] = self.notifications_storage_model self.gui["system_connectivity"] = "offline" self.gui["applications_model"] = self.build_voice_applications_model() - self.gui["dashboard_model"] = self.get_dashboard_cards() self.gui["persistent_menu_hint"] = self.settings.get("persistent_menu_hint", False) try: @@ -430,6 +408,8 @@ def _load_skill_apis(self): ##################################################################### # Build Voice Applications Model + # TODO - handle this via bus, this was a standard from plasma bigscreen which we never really adopted, + # and they dropped "voice apps" so there is nothing left to be compatible with def find_icon_full_path(self, icon_name): localuser = environ.get('USER') @@ -450,6 +430,8 @@ def find_icon_full_path(self, icon_name): return icon_full_path def parse_desktop_file(self, file_path): + # TODO - handle this via bus, this was a standard from plasma bigscreen which we never really adopted, + # and they dropped "voice apps" so there is nothing left to be compatible with if path.isfile(file_path) and path.splitext(file_path)[1] == ".desktop": if path.isfile(file_path) and path.isfile(file_path) and path.getsize(file_path) > 0: @@ -570,48 +552,6 @@ def handle_media_player_widget_update(self, message=None): "state": self.media_widget_player_state }) - ###################################################################### - # Handle Dashboard - - def generate_dashboard_card(self, message=None): - """ - Generate a custom dashboard card from the UI - """ - if message is None: - return - card = message.data.get("card", {}) - self.card_generator.generate(card) - - def add_dashboard_card(self, message=None): - """ - Adds a card to the dashboard from external source - """ - if message is not None: - card = message.data.get("card", {}) - self.dashboard_handler.add_item(card) - - self.gui['dashboard_model'] = self.get_dashboard_cards() - - def remove_dashboard_card(self, message=None): - """ - Removes a card from the dashboard from external source - """ - if message is not None: - self.log.info(f"Removing card: {message.data.get('card_id', {})}") - card_id = message.data.get("card_id", None) - self.dashboard_handler.remove_item(card_id) - - self.gui['dashboard_model'] = self.get_dashboard_cards() - - def get_dashboard_cards(self, message=None): - """ - Returns the current dashboard cards - """ - # Dump the model to a stringified JSON object - cards = self.dashboard_handler.get_collection() - collection = {"collection": cards} - return collection - ###################################################################### # Handle Screenshot diff --git a/initialcards.json b/initialcards.json deleted file mode 100644 index 942e301..0000000 --- a/initialcards.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "collection": [ - { - "url": "ui/boxes/SetAlarmBox.qml", - "verticalSize": "standard", - "horizontalSize": "standard" - - }, - { - "url": "ui/boxes/PlayTheNews.qml", - "verticalSize": "standard", - "horizontalSize": "standard" - }, - { - "url": "ui/boxes/PlayRelaxingMusic.qml", - "verticalSize": "long", - "horizontalSize": "standard" - }, - { - "url": "ui/boxes/TakeNoteBox.qml", - "verticalSize": "standard", - "horizontalSize": "standard" - } - ] -} \ No newline at end of file diff --git a/skill/__init__.py b/skill/__init__.py deleted file mode 100644 index 3be733e..0000000 --- a/skill/__init__.py +++ /dev/null @@ -1,16 +0,0 @@ -# Copyright 2022, OpenVoiceOS. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -from .dashboardHandler import DashboardHandler -from .cardGenerator import CardGenerator diff --git a/skill/cardGenerator.py b/skill/cardGenerator.py deleted file mode 100644 index 2d31a89..0000000 --- a/skill/cardGenerator.py +++ /dev/null @@ -1,51 +0,0 @@ -# Copyright 2022, OpenVoiceOS. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import datetime -from ovos_bus_client import Message - - -class CardGenerator: - def __init__(self, file_system_path, bus, skill_folder_path): - self.bus = bus - self.storage_area = file_system_path - self.skill_folder_path = skill_folder_path - - def generate(self, data): - current_date_time = datetime.datetime.now().strftime("%Y%H%M%S") - - with open(self.skill_folder_path + "/ui/templates/CardTemplate.qml", "r") as f: - template_file = f.read() - template_file = template_file.replace( - "action-holder", data["action"]) - template_file = template_file.replace( - "header-holder", data["header"]) - template_file = template_file.replace( - "text-holder", data["description"]) - template_file = template_file.replace( - "box-icon-holder", data["icon"]) - template_file = template_file.replace( - "icon-color-holder", data["iconColor"]) - - with open(self.storage_area + "/CustomCard" + current_date_time + ".qml", "w") as f: - f.write(template_file) - f.close() - - self.card = { - "url": "file://" + self.storage_area + "/CustomCard" + current_date_time + ".qml", - "verticalSize": "standard", - "horizontalSize": "standard" - } - self.bus.emit( - Message("ovos.homescreen.dashboard.add.card", {"card": self.card})) diff --git a/skill/dashboardHandler.py b/skill/dashboardHandler.py deleted file mode 100644 index c23de12..0000000 --- a/skill/dashboardHandler.py +++ /dev/null @@ -1,98 +0,0 @@ -# Copyright 2022, OpenVoiceOS. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import json -from os import path, remove -from json_database import JsonStorage -from uuid import uuid4 - - -class DashboardHandler: - def __init__(self, file_system_path, skill_folder_path): - self.dashboard_model = JsonStorage( - file_system_path + "/dashboard.json") - self.dashboard_collection = self.dashboard_model.get("collection", []) - self.skill_folder_path = skill_folder_path - - if len(self.dashboard_collection) == 0: - self.prepend_inital_dashboard_cards() - - def prepend_inital_dashboard_cards(self): - """ - Prepends initial cards to the dashboard - """ - with open(self.skill_folder_path + "/initialcards.json", "r") as f: - initial_cards = json.load(f) - for card in initial_cards.get("collection", []): - url = self.skill_folder_path + "/" + card['url'] - card["url"] = url - self.add_item(card) - - def add_item(self, item): - """ - Adds an item to the dashboard - """ - if item not in self.dashboard_collection: - item["id"] = str(uuid4()) - self.dashboard_collection.append(item) - self.dashboard_model["collection"] = self.dashboard_collection - self.dashboard_model.store() - - def remove_item(self, item_id): - """ - Removes an item from the dashboard - """ - print("Removing item in dashboard handler: " + item_id) - try: - self.dashboard_collection = [ - item for item in self.dashboard_collection if item["id"] != item_id] - self.dashboard_model["collection"] = self.dashboard_collection - self.dashboard_model.store() - except Exception as e: - print("Error removing item from dashboard: " + str(e)) - - def get_collection(self): - """ - Returns the current dashboard cards - """ - gridItemModel = [] - for item in self.dashboard_collection: - cellHeight = 5 - cellWidth = 5 - - if item.get("verticalSize", "").lower() == "short": - cellHeight = 3 - elif item.get("verticalSize", "").lower() == "standard": - cellHeight = 5 - elif item.get("verticalSize", "").lower() == "long": - cellHeight = 10 - else: - cellHeight = 5 - - if item.get("horizontalSize", "").lower() == "standard": - cellWidth = 5 - elif item.get("horizontalSize", "").lower() == "long": - cellWidth = 10 - else: - cellWidth = 5 - - gridItem = { - "id": item.get("id", ""), - "url": item.get("url", ""), - "cellHeight": cellHeight, - "cellWidth": cellWidth - } - gridItemModel.append(gridItem) - - return gridItemModel diff --git a/ui/AddCardOverlay.qml b/ui/AddCardOverlay.qml deleted file mode 100644 index 47a950c..0000000 --- a/ui/AddCardOverlay.qml +++ /dev/null @@ -1,340 +0,0 @@ -import QtQuick.Layouts 1.4 -import QtQuick 2.12 -import QtQuick.Controls 2.12 -import org.kde.kirigami 2.11 as Kirigami -import QtGraphicalEffects 1.0 -import Mycroft 1.0 as Mycroft - -Rectangle { - color: Qt.darker(Qt.rgba(Kirigami.Theme.backgroundColor.r, Kirigami.Theme.backgroundColor.g, Kirigami.Theme.backgroundColor.b, 0.99), 1.25) - radius: 6 - opacity: opened ? 1 : 0 - enabled: opened ? 1 : 0 - property bool opened: false - layer.enabled: true - layer.effect: DropShadow { - anchors.fill: parent - samples: 16 - color: Qt.rgba(0, 0, 0, 0.4) - radius: 16 - verticalOffset: 0.0 - horizontalOffset: 0.0 - spread: 0.2 - } - - function open() { - opened = true - reset() - } - - function close() { - opened = false - reset() - } - - function reset() { - headerTextField.text = "" - descriptionTextField.text = "" - actionTextField.text = "" - iconSelector.selectedIcon = "" - } - - Keys.onEscapePressed: { - opened = false - } - - ListModel { - id: iconListModel - ListElement { iconName: "alarm-symbolic" } - ListElement { iconName: "folder-music-symbolic" } - ListElement { iconName: "document-duplicate" } - ListElement { iconName: "typewriter" } - ListElement { iconName: "actor" } - ListElement { iconName: "add-placemark" } - } - - Item { - anchors.fill: parent - anchors.margins: Mycroft.Units.gridUnit / 2 - - Kirigami.Heading { - id: addCardOverlayHeaderArea - level: 2 - text: qsTr("Add Card") - color: Kirigami.Theme.textColor - anchors.top: parent.top - anchors.topMargin: Mycroft.Units.gridUnit / 2 - anchors.left: parent.left - anchors.leftMargin: Mycroft.Units.gridUnit - } - - Kirigami.Separator { - id: addCardOverlayHeaderSept - anchors.top: addCardOverlayHeaderArea.bottom - anchors.topMargin: Mycroft.Units.gridUnit / 2 - anchors.left: parent.left - anchors.right: parent.right - color: Kirigami.Theme.highlightColor - height: 1 - } - - Item { - anchors.top: addCardOverlayHeaderSept.bottom - anchors.bottom: addCardOverlayFooterSept.top - anchors.topMargin: Mycroft.Units.gridUnit / 2 - anchors.bottomMargin: Mycroft.Units.gridUnit / 2 - anchors.left: parent.left - anchors.right: parent.right - - ColumnLayout { - anchors.fill: parent - - Item { - Layout.fillWidth: true - Layout.fillHeight: true - - Rectangle { - id: headerTextFieldBoxLabel - anchors.left: parent.left - width: Mycroft.Units.gridUnit * 10 - height: parent.height - radius: 6 - color: Kirigami.Theme.highlightColor - - Text { - anchors.centerIn: parent - text: qsTr("Header") - color: Kirigami.Theme.textColor - } - } - TextField { - id: headerTextField - anchors.left: headerTextFieldBoxLabel.right - anchors.right: parent.right - anchors.top: parent.top - anchors.bottom: parent.bottom - anchors.margins: Mycroft.Units.gridUnit / 2 - color: Kirigami.Theme.textColor - - background: Rectangle { - radius: 6 - color: Qt.lighter(Kirigami.Theme.backgroundColor, 1.25) - border.color: headerTextField.enabled ? Qt.lighter(Kirigami.Theme.highlightColor, 1.5) : "transparent" - - Text { - anchors.centerIn: parent - visible: !headerTextField.focus && headerTextField.text == "" ? 1 : 0 - text: qsTr("Card Header Text") - color: Qt.rgba(Kirigami.Theme.textColor.r, Kirigami.Theme.textColor.g, Kirigami.Theme.textColor.b, 0.5) - } - } - } - } - Item { - Layout.fillWidth: true - Layout.fillHeight: true - - Rectangle { - id: bodyTextFieldBoxLabel - anchors.left: parent.left - width: Mycroft.Units.gridUnit * 10 - height: parent.height - radius: 6 - color: Kirigami.Theme.highlightColor - - Label { - anchors.centerIn: parent - text: qsTr("Description") - color: Kirigami.Theme.textColor - } - } - TextField { - id: descriptionTextField - anchors.left: bodyTextFieldBoxLabel.right - anchors.right: parent.right - anchors.top: parent.top - anchors.bottom: parent.bottom - anchors.margins: Mycroft.Units.gridUnit / 2 - color: Kirigami.Theme.textColor - - background: Rectangle { - radius: 6 - color: Qt.lighter(Kirigami.Theme.backgroundColor, 1.25) - border.color: descriptionTextField.enabled ? Qt.lighter(Kirigami.Theme.highlightColor, 1.5) : "transparent" - - Text { - anchors.centerIn: parent - visible: !descriptionTextField.focus && descriptionTextField.text == "" ? 1 : 0 - text: qsTr("Card Description Text") - color: Qt.rgba(Kirigami.Theme.textColor.r, Kirigami.Theme.textColor.g, Kirigami.Theme.textColor.b, 0.5) - } - } - } - } - - Item { - Layout.fillWidth: true - Layout.fillHeight: true - - Rectangle { - id: actionTextFieldBoxLabel - anchors.left: parent.left - width: Mycroft.Units.gridUnit * 10 - height: parent.height - radius: 6 - color: Kirigami.Theme.highlightColor - - Label { - anchors.centerIn: parent - text: qsTr("Utterance") - color: Kirigami.Theme.textColor - } - } - TextField { - id: actionTextField - anchors.left: actionTextFieldBoxLabel.right - anchors.right: parent.right - anchors.top: parent.top - anchors.bottom: parent.bottom - anchors.margins: Mycroft.Units.gridUnit / 2 - color: Kirigami.Theme.textColor - - - background: Rectangle { - radius: 6 - color: Qt.lighter(Kirigami.Theme.backgroundColor, 1.25) - border.color: actionTextField.enabled ? Qt.lighter(Kirigami.Theme.highlightColor, 1.5) : "transparent" - - Text { - anchors.centerIn: parent - visible: !actionTextField.focus && actionTextField.text == "" ? 1 : 0 - text: qsTr("Card Action Text") - color: Qt.rgba(Kirigami.Theme.textColor.r, Kirigami.Theme.textColor.g, Kirigami.Theme.textColor.b, 0.5) - } - } - } - } - - Item { - Layout.fillWidth: true - Layout.fillHeight: true - - Rectangle { - id: iconTextFieldBoxLabel - anchors.left: parent.left - width: Mycroft.Units.gridUnit * 10 - height: parent.height - radius: 6 - color: Kirigami.Theme.highlightColor - - Label { - anchors.centerIn: parent - text: qsTr("Icon") - color: Kirigami.Theme.textColor - } - } - Rectangle { - id: iconSelector - anchors.left: iconTextFieldBoxLabel.right - anchors.right: parent.right - anchors.top: parent.top - anchors.bottom: parent.bottom - anchors.margins: Mycroft.Units.gridUnit / 2 - color: Qt.darker(Kirigami.Theme.backgroundColor, 2) - radius: 6 - property string selectedIcon: "" - - RowLayout { - anchors.fill: parent - anchors.margins: Mycroft.Units.gridUnit / 2 - - Repeater { - model: iconListModel - - Rectangle { - Layout.fillWidth: true - Layout.fillHeight: true - radius: 6 - color: iconSelector.selectedIcon == model.iconName ? Kirigami.Theme.highlightColor : "transparent" - - Kirigami.Icon { - anchors.fill: parent - source: model.iconName - color: iconSelector.selectedIcon == model.iconName ? Kirigami.Theme.textColor : Kirigami.Theme.highlightColor - } - - MouseArea { - anchors.fill: parent - onClicked: { - Mycroft.SoundEffects.playClickedSound(Qt.resolvedUrl("sounds/clicked.wav")) - iconSelector.selectedIcon = model.iconName - } - } - } - } - } - } - } - } - } - - Kirigami.Separator { - id: addCardOverlayFooterSept - anchors.bottom: addCardOverlayFooterArea.top - anchors.bottomMargin: Mycroft.Units.gridUnit / 2 - anchors.left: parent.left - anchors.right: parent.right - color: Kirigami.Theme.highlightColor - height: 1 - } - - RowLayout { - id: addCardOverlayFooterArea - anchors.left: parent.left - anchors.right: parent.right - anchors.bottom: parent.bottom - height: Mycroft.Units.gridUnit * 4 - - Button { - Layout.fillHeight: true - Layout.fillWidth: true - icon.name: "list-add" - text: qsTr("Add") - - background: Rectangle { - color: Kirigami.Theme.highlightColor - radius: 6 - } - - onClicked: { - var card = { - header: headerTextField.text, - description: descriptionTextField.text, - icon: iconSelector.selectedIcon, - action: actionTextField.text, - iconColor: Kirigami.Theme.textColor - } - Mycroft.SoundEffects.playClickedSound(Qt.resolvedUrl("sounds/clicked.wav")) - triggerGuiEvent("ovos.homescreen.dashboard.generate.card", {"card": card}) - close() - } - } - Button { - Layout.fillHeight: true - Layout.fillWidth: true - icon.name: "window-close-symbolic" - text: qsTr("Cancel") - - background: Rectangle { - color: Kirigami.Theme.highlightColor - radius: 6 - } - - onClicked: { - Mycroft.SoundEffects.playClickedSound(Qt.resolvedUrl("sounds/clicked.wav")) - close() - } - } - } - } -} diff --git a/ui/BoxesPage.qml b/ui/BoxesPage.qml deleted file mode 100644 index c60aeef..0000000 --- a/ui/BoxesPage.qml +++ /dev/null @@ -1,153 +0,0 @@ -import QtQuick.Layouts 1.4 -import QtQuick 2.12 -import QtQuick.Controls 2.12 -import org.kde.kirigami 2.11 as Kirigami -import QtGraphicalEffects 1.0 -import Mycroft 1.0 as Mycroft - -Control { - id: boxoverlayroot - Kirigami.Theme.inherit: false - Kirigami.Theme.colorSet: Kirigami.Theme.View - property bool horizontalMode: boxoverlayroot.width > boxoverlayroot.height ? 1 : 0 - - background: Rectangle { - width: idleRoot.width - height: idleRoot.height - anchors.left: parent.left - anchors.top: parent.top - anchors.leftMargin: -Mycroft.Units.gridUnit * 2 - anchors.topMargin: -Mycroft.Units.gridUnit * 2 - color: Kirigami.Theme.backgroundColor - } - - contentItem: Item { - - Kirigami.Heading { - id: boxesOverlayHeader - level: 1 - text: qsTr("Quick Access") - color: Kirigami.Theme.textColor - anchors.top: parent.top - anchors.topMargin: Mycroft.Units.gridUnit / 2 - anchors.left: parent.left - anchors.right: boxesOverlayAddButton.right - anchors.rightMargin: Mycroft.Units.gridUnit - anchors.leftMargin: Mycroft.Units.gridUnit - } - - Control { - id: boxesOverlayAddButton - anchors.top: parent.top - anchors.topMargin: Mycroft.Units.gridUnit / 4 - anchors.bottom: boxesOverlayHeaderSept.top - anchors.bottomMargin: Mycroft.Units.gridUnit / 4 - anchors.right: parent.right - anchors.rightMargin: Mycroft.Units.gridUnit - width: Mycroft.Units.gridUnit * 4 - - background: Rectangle { - id: boxesOverlayAddButtonBackground - color: Kirigami.Theme.highlightColor - radius: 6 - } - - contentItem: Kirigami.Icon { - id: boxesOverlayAddButtonIcon - source: "list-add-symbolic" - color: Kirigami.Theme.textColor - anchors.centerIn: parent - } - - SequentialAnimation { - id: boxesOverlayAddButtonAnimation - PropertyAnimation { target: boxesOverlayAddButtonBackground; property: "color"; to: Kirigami.Theme.backgroundColor; duration: 200 } - PropertyAnimation { target: boxesOverlayAddButtonBackground; property: "color"; to: Kirigami.Theme.highlightColor; duration: 200 } - } - - MouseArea { - anchors.fill: parent - - onClicked: { - boxesOverlayAddButtonAnimation.start() - Mycroft.SoundEffects.playClickedSound(Qt.resolvedUrl("sounds/clicked.wav")) - addCardOverlay.open() - } - } - } - - Kirigami.Separator { - id: boxesOverlayHeaderSept - anchors.top: boxesOverlayHeader.bottom - anchors.topMargin: Mycroft.Units.gridUnit / 2 - anchors.left: parent.left - anchors.right: parent.right - color: Kirigami.Theme.highlightColor - height: 1 - } - - GridBox { - id: gridBox - visible: addCardOverlay.opened ? 0 : 1 - anchors.left: parent.left - anchors.leftMargin: Mycroft.Units.gridUnit / 2 - anchors.horizontalCenter: parent.horizontalCenter - anchors.top: boxesOverlayHeaderSept.bottom - anchors.topMargin: Mycroft.Units.gridUnit / 2 - anchors.bottom: boxesOverlayFooterSept.top - anchors.bottomMargin: Mycroft.Units.gridUnit / 2 - } - - Kirigami.Separator { - id: boxesOverlayFooterSept - anchors.bottom: boxesOverlayFooter.top - anchors.bottomMargin: Mycroft.Units.gridUnit / 2 - anchors.left: parent.left - anchors.right: parent.right - color: Kirigami.Theme.highlightColor - height: 1 - } - - RowLayout { - id: boxesOverlayFooter - anchors.left: parent.left - anchors.leftMargin: Mycroft.Units.gridUnit / 2 - anchors.right: parent.right - anchors.rightMargin: Mycroft.Units.gridUnit / 2 - anchors.bottom: parent.bottom - height: Mycroft.Units.gridUnit * 2 - - Kirigami.Icon { - id: boxesOverlayFooterIcon - source: "documentinfo" - color: Kirigami.Theme.highlightColor - Layout.topMargin: Mycroft.Units.gridUnit / 3 - Layout.bottomMargin: Mycroft.Units.gridUnit / 3 - Layout.fillHeight: true - Layout.preferredWidth: height - } - - Label { - id: boxesOverlayFooterLabel - text: qsTr("Double-tap card to perform card action") - color: Kirigami.Theme.textColor - Layout.fillWidth: true - Layout.fillHeight: true - verticalAlignment: Text.AlignVCenter - horizontalAlignment: Text.AlignLeft - maximumLineCount: 1 - font.pixelSize: parent.height * 0.35 - fontSizeMode: Text.Fit - minimumPixelSize: 8 - elide: Text.ElideRight - } - } - - AddCardOverlay { - id: addCardOverlay - width: parent.width - height: parent.height - } - } -} - diff --git a/ui/GridBox.qml b/ui/GridBox.qml deleted file mode 100644 index e5054ac..0000000 --- a/ui/GridBox.qml +++ /dev/null @@ -1,206 +0,0 @@ -import QtQuick 2.12 -import QtQuick.Controls 2.12 -import QtQuick.Layouts 1.12 -import QtQml.Models 2.12 -import QtQuick.Window 2.12 -import Mycroft 1.0 as Mycroft -import org.kde.kirigami 2.11 as Kirigami -import "code/dashmodel.js" as DashboardJS - -Item { - id: gridBoxRoot - width: parent.width - height: parent.height - property var dashModel: sessionData.dashboard_model ? sessionData.dashboard_model : null - property bool horizontalMode: width >= height ? 1 : 0 - - onDashModelChanged: { - DashboardJS.dashboard_spacing = 4 - DashboardJS.available_height.setActualHeight(flickableItem.height) - DashboardJS.available_width.setActualWidth(flickableItem.width - (gridBoxRoot.horizontalMode ? Mycroft.Units.gridUnit * 4 : 0)) - - if(dashModel) { - DashboardJS.add_items_from_session(dashModel.collection) - repeaterModel.model = DashboardJS.dashboard_model - } - } - - Kirigami.OverlaySheet { - id: cardHoldOverlay - parent: gridBoxRoot - showCloseButton: false - property var cardId - title: qsTr("Edit Card") - - onSheetOpenChanged: { - if (!sheetOpen) { - cardId = "" - } - } - - contentItem: Item { - implicitWidth: Mycroft.Units.gridUnit * 5 - implicitHeight: Mycroft.Units.gridUnit * 5 - - RowLayout { - anchors.fill: parent - - Button { - id: cardHoldRemoveButton - Layout.fillWidth: true - Layout.fillHeight: true - text: qsTr("Remove") - - background: Rectangle { - color: cardHoldRemoveButton.pressed ? Kirigami.Theme.backgroundColor : Kirigami.Theme.highlightColor - radius: 6 - } - - onClicked: { - Mycroft.SoundEffects.playClickedSound(Qt.resolvedUrl("sounds/clicked.wav")) - triggerGuiEvent("ovos.homescreen.dashboard.remove.card", {"card_id": cardHoldOverlay.cardId}) - DashboardJS.remove_item_by_id(cardHoldOverlay.cardId) - cardHoldOverlay.close() - } - } - Button { - id: cardHoldCloseButton - Layout.fillWidth: true - Layout.fillHeight: true - text: qsTr("Cancel") - - background: Rectangle { - color: cardHoldCloseButton.pressed ? Kirigami.Theme.backgroundColor : Kirigami.Theme.highlightColor - radius: 6 - } - - onClicked: { - Mycroft.SoundEffects.playClickedSound(Qt.resolvedUrl("sounds/clicked.wav")) - cardHoldOverlay.close() - } - } - } - } - } - - Item { - anchors.fill: parent - anchors.rightMargin: gridBoxRoot.horizontalMode ? -Mycroft.Units.gridUnit * 2 : 0 - - Flickable { - id: flickableItem - anchors.fill: parent - anchors.rightMargin: gridBoxRoot.horizontalMode ? Mycroft.Units.gridUnit * 2 : 0 - clip: true - contentWidth: gridBoxRoot.horizontalMode ? flow.implicitWidth : flow.width - contentHeight: gridBoxRoot.horizontalMode ? flow.height : flow.implicitHeight - - onHeightChanged: { - DashboardJS.available_height.setActualHeight(flickableItem.height) - repeaterModel.update() - } - - onWidthChanged: { - DashboardJS.available_width.setActualWidth(flickableItem.width - (gridBoxRoot.horizontalMode ? Mycroft.Units.gridUnit * 4 : 0)) - repeaterModel.update() - } - - Flow { - id: flow - width: flickableItem.width - height: flickableItem.height - spacing: 4 - flow: gridBoxRoot.horizontalMode ? Flow.TopToBottom : Flow.LeftToRight - - Repeater { - id: repeaterModel - - delegate: MouseArea { - id: delegateRoot - width: gridBoxRoot.horizontalMode ? modelData.width : modelData.width * 2 - height: modelData.height - - property alias contentItem: contentLoader.item - property bool held: false - property int visualIndex: DelegateModel.itemsIndex - drag.target: held ? delegateContentItem : undefined - - SequentialAnimation { - id: delegateClickAnimation - NumberAnimation { - target: delegateContentItem - property: "opacity" - from: 1 - to: 0.5 - duration: 150 - } - NumberAnimation { - target: delegateContentItem - property: "opacity" - from: 0.5 - to: 1 - duration: 150 - } - } - - onDoubleClicked: { - delegateClickAnimation.start() - Mycroft.SoundEffects.playClickedSound(Qt.resolvedUrl("sounds/clicked.wav")) - Mycroft.MycroftController.sendText(contentItem.action) - } - - onPressAndHold: { - held = true - cardHoldOverlay.cardId = modelData.id - cardHoldOverlay.open() - delegateContentItem.opacity = 0.5 - } - - onReleased: { - if (held === true) { - held = false - delegateContentItem.opacity = 1 - delegateContentItem.Drag.drop() - } else { - //action on release - } - } - - Item { - id: delegateContentItem - anchors.fill: parent - anchors.margins: flow.spacing - Drag.active: delegateRoot.drag.active - Drag.source: delegateRoot - Drag.hotSpot.x: 36 - Drag.hotSpot.y: 36 - - states: [ - State { - when: delegateContentItem.Drag.active - - ParentChange { - target: delegateContentItem - parent: flow - } - - PropertyChanges { - target: delegateContentItem - anchors.fill: undefined - } - } - ] - - Loader { - id: contentLoader - anchors.fill: parent - anchors.margins: 16 - source: modelData.url - } - } - } - } - } - } - } -} diff --git a/ui/boxes/PlayRelaxingMusic.qml b/ui/boxes/PlayRelaxingMusic.qml deleted file mode 100644 index ddbdf86..0000000 --- a/ui/boxes/PlayRelaxingMusic.qml +++ /dev/null @@ -1,70 +0,0 @@ -import QtQuick.Layouts 1.4 -import QtQuick 2.12 -import QtQuick.Controls 2.12 -import org.kde.kirigami 2.11 as Kirigami -import QtGraphicalEffects 1.0 -import Mycroft 1.0 as Mycroft -import "../delegates" as Delegates - -Delegates.BoxAbstractDelegate { - action: "play relaxing music" - preferredCellWidth: 4 - preferredCellHeight: 8 - - ColumnLayout { - id: primaryContentBoxLayout - anchors.fill: parent - anchors.margins: Mycroft.Units.gridUnit / 2 - - Rectangle { - id: headerIconItemBox - Layout.fillWidth: true - Layout.preferredHeight: parent.height * 0.25 - Layout.margins: -Mycroft.Units.gridUnit / 2.5 - radius: 15 - color: Kirigami.Theme.highlightColor - - Kirigami.Icon { - id: headerIcon - anchors.centerIn: parent - width: parent.height - height: width - color: Kirigami.Theme.backgroundColor - source: "new-audio-alarm" - } - } - - Image { - Layout.fillWidth: true - Layout.fillHeight: true - fillMode: Image.PreserveAspectCrop - source: "https://source.unsplash.com/800x800/?music" - } - - Rectangle { - id: contentPrimaryItemBox - Layout.fillWidth: true - Layout.preferredHeight: parent.height * 0.25 - Layout.margins: -Mycroft.Units.gridUnit / 2.5 - radius: 15 - color: Kirigami.Theme.highlightColor - - Label { - id: primaryBoxText - width: parent.width - height: parent.height - horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignVCenter - maximumLineCount: 3 - elide: Text.ElideRight - wrapMode: Text.WordWrap - fontSizeMode: Text.Fit - minimumPixelSize: 10 - font.pixelSize: 100 - color: Kirigami.Theme.textColor - text: "Play relaxing music & sounds" - } - } - } -} - diff --git a/ui/boxes/PlayTheNews.qml b/ui/boxes/PlayTheNews.qml deleted file mode 100644 index cb9daa5..0000000 --- a/ui/boxes/PlayTheNews.qml +++ /dev/null @@ -1,14 +0,0 @@ -import QtQuick.Layouts 1.4 -import QtQuick 2.12 -import QtQuick.Controls 2.12 -import org.kde.kirigami 2.11 as Kirigami -import QtGraphicalEffects 1.0 -import Mycroft 1.0 as Mycroft -import "../delegates" as Delegates - -Delegates.BoxSimpleDelegate { - boxIcon: "send_signal" - iconColor: "#0be5b6" - text: "Get the latest news and headlines" - action: "play the latest news" -} diff --git a/ui/boxes/SetAlarmBox.qml b/ui/boxes/SetAlarmBox.qml deleted file mode 100644 index 3c4b7a6..0000000 --- a/ui/boxes/SetAlarmBox.qml +++ /dev/null @@ -1,14 +0,0 @@ -import QtQuick.Layouts 1.4 -import QtQuick 2.12 -import QtQuick.Controls 2.12 -import org.kde.kirigami 2.11 as Kirigami -import QtGraphicalEffects 1.0 -import Mycroft 1.0 as Mycroft -import "../delegates" as Delegates - -Delegates.BoxSimpleDelegate { - boxIcon: "player-time" - iconColor: "#FFBF00" - text: "Set up an alarm to wake up on time" - action: "create a new alarm for morning" -} diff --git a/ui/boxes/TakeNoteBox.qml b/ui/boxes/TakeNoteBox.qml deleted file mode 100644 index dc0038d..0000000 --- a/ui/boxes/TakeNoteBox.qml +++ /dev/null @@ -1,14 +0,0 @@ -import QtQuick.Layouts 1.4 -import QtQuick 2.12 -import QtQuick.Controls 2.12 -import org.kde.kirigami 2.11 as Kirigami -import QtGraphicalEffects 1.0 -import Mycroft 1.0 as Mycroft -import "../delegates" as Delegates - -Delegates.BoxSimpleDelegate { - boxIcon: "document-edit-sign" - iconColor: "#5d58c9" - text: "Dictate a quick note" - action: "take a note" -} diff --git a/ui/code/dashmodel.js b/ui/code/dashmodel.js deleted file mode 100644 index bb0634b..0000000 --- a/ui/code/dashmodel.js +++ /dev/null @@ -1,160 +0,0 @@ -var dashboard_model = [] -var flow_model = [] -var dashboard_spacing -var dashboard_available_width -var dashboard_available_height - -var available_width = { - width: 0, - getActualWidth() { - return this.width; - }, - setActualWidth(value) { - this.width = value; - dashboard_available_width = value - widthOnChanged(); - } -}; - -var available_height = { - height: 0, - getActualHeight() { - return this.height; - }, - setActualHeight(value) { - this.height = value; - dashboard_available_height = value; - heightOnChanged(); - } -}; - -function add_items_from_session(collection) { - if (collection.length == 0) { - return; - } - - for (var i = 0; i < collection.length; i++) { - var item = collection[i]; - if (!item_in_flow_model(item)) { - add_item(item); - } else { - console.log("Item already in flow model"); - } - } -} - -function item_in_flow_model(item) { - for (var i = 0; i < flow_model.length; i++) { - if (flow_model[i].id == item.id) { - return true; - } - } - return false; -} - -function widthOnChanged() { - for (var i = 0; i < flow_model.length; i++) { - flow_model[i].width = get_width(flow_model[i].cellWidth); - } - update_dashboard_model() -} - -function heightOnChanged() { - for (var i = 0; i < flow_model.length; i++) { - flow_model[i].height = get_height(flow_model[i].cellHeight); - } - update_dashboard_model() -} - -function add_item(item) { - // Add the calculated height and width to the item - item.height = get_height(item.cellHeight); - item.width = get_width(item.cellWidth); - if (!item_in_flow_model(item)) { - flow_model.push(item); - } else { - console.log("Item already in flow model"); - } - - update_dashboard_model() -} - -function get_item(index) { - return flow_model[index]; -} - -function get_item_count() { - return flow_model.length; -} - -function clear_model() { - flow_model = []; - update_dashboard_model(); -} - -function remove_item(index) { - flow_model.splice(index, 1); - update_dashboard_model(); -} - -function remove_item_by_id(cardID) { - for (var i = 0; i < flow_model.length; i++) { - if (flow_model[i].id == cardID) { - flow_model.splice(i, 1); - update_dashboard_model(); - return; - } - } -} - -function update_dashboard_model() { - dashboard_model = [] - for (var i = 0; i < flow_model.length; i++) { - dashboard_model.push(flow_model[i]); - } - repeaterModel.model = [] - repeaterModel.model = dashboard_model -} - -function get_height(requiredCellHeight) { - if (requiredCellHeight == 1) { - return dashboard_available_height * 0.1 - dashboard_spacing; - } else if (requiredCellHeight == 2) { - return dashboard_available_height * 0.2 - dashboard_spacing; - } - else if (requiredCellHeight == 3) { - return dashboard_available_height * 0.3 - dashboard_spacing; - } - else if (requiredCellHeight == 4) { - return dashboard_available_height * 0.4 - dashboard_spacing; - } - else if (requiredCellHeight == 5) { - return dashboard_available_height * 0.5 - dashboard_spacing; - } - else if (requiredCellHeight == 6) { - return dashboard_available_height * 0.6 - dashboard_spacing; - } - else if (requiredCellHeight == 7) { - return dashboard_available_height * 0.7 - dashboard_spacing; - } - else if (requiredCellHeight == 8) { - return dashboard_available_height * 0.8 - dashboard_spacing; - } - else if (requiredCellHeight == 9) { - return dashboard_available_height * 0.9 - dashboard_spacing; - } - else if (requiredCellHeight == 10) { - return dashboard_available_height - dashboard_spacing; - } else { - return dashboard_available_height * 0.5 - dashboard_spacing; - } -} - -function get_width(requiredCellWidth) { - if (requiredCellWidth <= 5) { - return Math.round(dashboard_available_width * 0.5 - dashboard_spacing) - } - else if (requiredCellWidth > 5) { - return Math.round(dashboard_available_width - dashboard_spacing) - } -} diff --git a/ui/delegates/BoxAbstractDelegate.qml b/ui/delegates/BoxAbstractDelegate.qml deleted file mode 100644 index e789b7c..0000000 --- a/ui/delegates/BoxAbstractDelegate.qml +++ /dev/null @@ -1,35 +0,0 @@ -import QtQuick.Layouts 1.4 -import QtQuick 2.12 -import QtQuick.Controls 2.12 -import org.kde.kirigami 2.11 as Kirigami -import QtGraphicalEffects 1.0 -import Mycroft 1.0 as Mycroft - -Control { - id: boxDelegateRootItem - z: 1 - - property var action: "" - property int preferredCellWidth: 4 - property int preferredCellHeight: 4 - - background: Rectangle { - color: Kirigami.Theme.backgroundColor - border.color: Kirigami.Theme.highlightColor - border.width: 1 - radius: 15 - layer.enabled: true - layer.effect: DropShadow { - transparentBorder: false - horizontalOffset: 3 - verticalOffset: 3 - color: Qt.rgba(0, 0, 0, 0.50) - spread: 0.2 - samples: 8 - } - } - - contentItem: Item { - z: 2 - } -} diff --git a/ui/delegates/BoxSimpleDelegate.qml b/ui/delegates/BoxSimpleDelegate.qml deleted file mode 100644 index 21dee8c..0000000 --- a/ui/delegates/BoxSimpleDelegate.qml +++ /dev/null @@ -1,119 +0,0 @@ -import QtQuick.Layouts 1.4 -import QtQuick 2.12 -import QtQuick.Controls 2.12 -import org.kde.kirigami 2.11 as Kirigami -import QtGraphicalEffects 1.0 -import Mycroft 1.0 as Mycroft - -Rectangle { - id: boxDelegateRootItem - color: Kirigami.Theme.backgroundColor - border.color: Kirigami.Theme.highlightColor - border.width: 1 - radius: 15 - z: 1 - layer.enabled: true - layer.effect: DropShadow { - transparentBorder: false - horizontalOffset: 3 - verticalOffset: 3 - color: Qt.rgba(0, 0, 0, 0.50) - spread: 0.2 - samples: 8 - } - property var action: "" - property alias boxIcon: headerIcon.source - property alias heading: primaryBoxHeading.text - property alias text: primaryBoxText.text - property alias boxImage: mainIcon.source - property color iconColor: "red" - property color textColor: "white" - - property bool hasBoxIcon: headerIcon.source ? 1 : 0 - property bool hasHeading: primaryBoxHeading.text ? 1 : 0 - property bool hasText: primaryBoxText.text ? 1 : 0 - property bool hasBoxImage: mainIcon.source ? 1 : 0 - - property int preferredCellHeight: 4 - property int preferredCellWidth: 4 - - RowLayout { - anchors.fill: parent - anchors.margins: Mycroft.Units.gridUnit / 2 - - ColumnLayout { - id: primaryContentBoxLayout - Layout.preferredWidth: hasBoxImage ? parent.width * 0.60 : parent.width - Layout.fillHeight: true - - Rectangle { - id: headerIconItemBox - Layout.fillWidth: true - Layout.preferredHeight: parent.height * 0.35 - Layout.margins: -Mycroft.Units.gridUnit / 2.5 - radius: 15 - color: Kirigami.Theme.highlightColor - - Kirigami.Icon { - id: headerIcon - anchors.centerIn: parent - width: parent.height - height: width - color: Kirigami.Theme.backgroundColor - } - } - - Item { - id: contentPrimaryItemBox - Layout.fillWidth: true - Layout.fillHeight: true - Layout.leftMargin: Mycroft.Units.gridUnit - Layout.rightMargin: Mycroft.Units.gridUnit - - Kirigami.Heading { - id: primaryBoxHeading - anchors.top: parent.top - anchors.left: parent.left - elide: Text.ElideRight - maximumLineCount: 1 - level: 3 - color: Kirigami.Theme.textColor - enabled: hasHeading - visible: hasHeading - } - - Label { - id: primaryBoxText - anchors.top: hasHeading ? primaryBoxHeading.bottom : parent.top - anchors.topMargin: Mycroft.Units.gridUnit / 2 - anchors.left: parent.left - width: parent.width - height: parent.height - maximumLineCount: 3 - elide: Text.ElideRight - wrapMode: Text.WordWrap - fontSizeMode: Text.Fit - minimumPixelSize: 10 - font.pixelSize: 100 - color: Kirigami.Theme.textColor - } - } - } - - Item { - id: contentSecondaryItemBox - Layout.fillWidth: true - Layout.fillHeight: true - enabled: hasBoxImage - visible: hasBoxImage - - Kirigami.Icon { - id: mainIcon - anchors.bottom: parent.bottom - width: parent.height - height: width - color: boxDelegateRootItem.iconColor - } - } - } -} diff --git a/ui/idle.qml b/ui/idle.qml index 5184fb5..15027f1 100644 --- a/ui/idle.qml +++ b/ui/idle.qml @@ -231,8 +231,8 @@ Mycroft.CardDelegate { anchors.right: parent.right anchors.rightMargin: -Mycroft.Units.gridUnit * 2 anchors.verticalCenter: parent.verticalCenter - visible: mainView.currentIndex == 0 || mainView.currentIndex == 1 - enabled: mainView.currentIndex == 0 || mainView.currentIndex == 1 + visible: mainView.currentIndex == 0 + enabled: mainView.currentIndex == 0 z: 2 Rectangle { @@ -345,12 +345,6 @@ Mycroft.CardDelegate { Layout.fillWidth: true Layout.fillHeight: true } - - BoxesPage { - id: boxesView - Layout.fillWidth: true - Layout.fillHeight: true - } } Popup { diff --git a/ui/qmldir b/ui/qmldir index 0e62755..26cca41 100644 --- a/ui/qmldir +++ b/ui/qmldir @@ -1,13 +1,10 @@ idle 1.0 idle.qml NotificationDelegate 1.0 NotificationDelegate.qml -AddCardOverlay 1.0 AddCardOverlay.qml AppEntry 1.0 AppEntry.qml AppsBar 1.0 AppsBar.qml SwipeArea 1.0 SwipeArea.qml -BoxesPage 1.0 BoxesPage.qml DayMonthDisplay 1.0 DayMonthDisplay.qml ExamplesDisplay 1.0 ExamplesDisplay.qml -GridBox 1.0 GridBox.qml HorizontalDisplayLayout 1.0 HorizontalDisplayLayout.qml HorizontalTopArea 1.0 HorizontalTopArea.qml MainPage 1.0 MainPage.qml diff --git a/ui/templates/CardTemplate.qml b/ui/templates/CardTemplate.qml deleted file mode 100644 index bf9ebc9..0000000 --- a/ui/templates/CardTemplate.qml +++ /dev/null @@ -1,119 +0,0 @@ -import QtQuick.Layouts 1.4 -import QtQuick 2.12 -import QtQuick.Controls 2.12 -import org.kde.kirigami 2.11 as Kirigami -import QtGraphicalEffects 1.0 -import Mycroft 1.0 as Mycroft - -Rectangle { - id: boxDelegateRootItem - color: Kirigami.Theme.backgroundColor - border.color: Kirigami.Theme.highlightColor - border.width: 1 - radius: 15 - z: 1 - layer.enabled: true - layer.effect: DropShadow { - transparentBorder: false - horizontalOffset: 3 - verticalOffset: 3 - color: Qt.rgba(0, 0, 0, 0.50) - spread: 0.2 - samples: 8 - } - property var action: "action-holder" - property var boxIcon: "box-icon-holder" - property var heading: "header-holder" - property var text: "text-holder" - property color iconColor: "icon-color-holder" - - property alias boxImage: mainIcon.source - - property bool hasBoxIcon: headerIcon.source ? 1 : 0 - property bool hasHeading: primaryBoxHeading.text ? 1 : 0 - property bool hasText: primaryBoxText.text ? 1 : 0 - property bool hasBoxImage: mainIcon.source ? 1 : 0 - - RowLayout { - anchors.fill: parent - anchors.margins: Mycroft.Units.gridUnit / 2 - - ColumnLayout { - id: primaryContentBoxLayout - Layout.preferredWidth: hasBoxImage ? parent.width * 0.60 : parent.width - Layout.fillHeight: true - - Rectangle { - id: headerIconItemBox - Layout.fillWidth: true - Layout.preferredHeight: parent.height * 0.35 - Layout.margins: -Mycroft.Units.gridUnit / 2.5 - radius: 15 - color: Kirigami.Theme.highlightColor - - Kirigami.Icon { - id: headerIcon - anchors.centerIn: parent - width: parent.height - height: width - color: Kirigami.Theme.backgroundColor - source: boxDelegateRootItem.boxIcon - } - } - - Item { - id: contentPrimaryItemBox - Layout.fillWidth: true - Layout.fillHeight: true - Layout.leftMargin: Mycroft.Units.gridUnit - Layout.rightMargin: Mycroft.Units.gridUnit - - Kirigami.Heading { - id: primaryBoxHeading - anchors.top: parent.top - anchors.left: parent.left - elide: Text.ElideRight - maximumLineCount: 1 - level: 3 - color: Kirigami.Theme.textColor - enabled: false - visible: false - text: boxDelegateRootItem.heading - } - - Label { - id: primaryBoxText - anchors.top: hasHeading ? primaryBoxHeading.bottom : parent.top - anchors.topMargin: Mycroft.Units.gridUnit / 2 - anchors.left: parent.left - width: parent.width - height: parent.height - maximumLineCount: 3 - elide: Text.ElideRight - wrapMode: Text.WordWrap - fontSizeMode: Text.Fit - minimumPixelSize: 10 - font.pixelSize: 100 - color: Kirigami.Theme.textColor - text: boxDelegateRootItem.text - } - } - } - - Item { - id: contentSecondaryItemBox - Layout.fillWidth: true - Layout.fillHeight: true - enabled: hasBoxImage - visible: hasBoxImage - - Kirigami.Icon { - id: mainIcon - anchors.bottom: parent.bottom - width: parent.height - height: width - color: boxDelegateRootItem.iconColor - } - } - } -} diff --git a/ui/translations/AddCardOverlay_de.ts b/ui/translations/AddCardOverlay_de.ts deleted file mode 100644 index 90c5053..0000000 --- a/ui/translations/AddCardOverlay_de.ts +++ /dev/null @@ -1,57 +0,0 @@ - - - - - AddCardOverlay - - - Add Card - Karte hinzufügen - - - - Header - Kopfzeile - - - - Card Header Text - Kopfzeilentext - - - - Description - Beschreibung - - - - Card Description Text - Beschreibungstext - - - - Utterance - Sprachausgabe - - - - Card Action Text - Text bei Aktion - - - - Icon - Symbol - - - - Add - Hinzufügen - - - - Cancel - Abbrechen - - - diff --git a/ui/translations/AddCardOverlay_es.ts b/ui/translations/AddCardOverlay_es.ts deleted file mode 100644 index 8534941..0000000 --- a/ui/translations/AddCardOverlay_es.ts +++ /dev/null @@ -1,57 +0,0 @@ - - - - - AddCardOverlay - - - Add Card - Agregar tarjeta - - - - Header - Encabezamiento - - - - Card Header Text - Texto del encabezado de la tarjeta - - - - Description - Descripción - - - - Card Description Text - Texto de descripción de la tarjeta - - - - Utterance - Declaración - - - - Card Action Text - Texto de acción de tarjeta - - - - Icon - Icono - - - - Add - Agregar - - - - Cancel - Cancelar - - - diff --git a/ui/translations/AddCardOverlay_fr.ts b/ui/translations/AddCardOverlay_fr.ts deleted file mode 100644 index 48c2cdf..0000000 --- a/ui/translations/AddCardOverlay_fr.ts +++ /dev/null @@ -1,57 +0,0 @@ - - - - - AddCardOverlay - - - Add Card - Ajouter une carte - - - - Header - Entête - - - - Card Header Text - Texte d'en-tête de carte - - - - Description - La description - - - - Card Description Text - Texte de description de la carte - - - - Utterance - Énonciation - - - - Card Action Text - Texte d'action de la carte - - - - Icon - Icône - - - - Add - Ajouter - - - - Cancel - Annuler - - - diff --git a/ui/translations/AddCardOverlay_it.ts b/ui/translations/AddCardOverlay_it.ts deleted file mode 100644 index b9e1d7b..0000000 --- a/ui/translations/AddCardOverlay_it.ts +++ /dev/null @@ -1,57 +0,0 @@ - - - - - AddCardOverlay - - - Add Card - Aggiungi blocco - - - - Header - Intestazione - - - - Card Header Text - Testo dell'intestazione del blocco - - - - Description - Descrizione - - - - Card Description Text - Descrizione del blocco - - - - Utterance - Espressione - - - - Card Action Text - Funzione del blocco - - - - Icon - Icona - - - - Add - Aggiungere - - - - Cancel - Annulla - - - diff --git a/ui/translations/AddCardOverlay_nl.ts b/ui/translations/AddCardOverlay_nl.ts deleted file mode 100644 index 40268f0..0000000 --- a/ui/translations/AddCardOverlay_nl.ts +++ /dev/null @@ -1,57 +0,0 @@ - - - - - AddCardOverlay - - - Add Card - Voeg een kaart toe - - - - Header - kop - - - - Card Header Text - Kaartkoptekst - - - - Description - Beschrijving - - - - Card Description Text - Kaart Beschrijving Tekst - - - - Utterance - uiting - - - - Card Action Text - Kaart Actie Tekst - - - - Icon - Icoon - - - - Add - Toevoegen - - - - Cancel - Annuleren - - - diff --git a/ui/translations/AddCardOverlay_pt.ts b/ui/translations/AddCardOverlay_pt.ts deleted file mode 100644 index e3b6695..0000000 --- a/ui/translations/AddCardOverlay_pt.ts +++ /dev/null @@ -1,57 +0,0 @@ - - - - - AddCardOverlay - - - Add Card - Adicionar cartão - - - - Header - Cabeçalho - - - - Card Header Text - Texto do cabeçalho do cartão - - - - Description - Descrição - - - - Card Description Text - Texto de descrição do cartão - - - - Utterance - Enunciado - - - - Card Action Text - Texto da ação do cartão - - - - Icon - Ícone - - - - Add - Adicionar - - - - Cancel - Cancelar - - - diff --git a/ui/translations/BoxesPage_de.ts b/ui/translations/BoxesPage_de.ts deleted file mode 100644 index 131d1dd..0000000 --- a/ui/translations/BoxesPage_de.ts +++ /dev/null @@ -1,17 +0,0 @@ - - - - - BoxesPage - - - Quick Access - Schneller Zugang - - - - Double-tap card to perform card action - Zur Ausführung zweimal tippen - - - diff --git a/ui/translations/BoxesPage_es.ts b/ui/translations/BoxesPage_es.ts deleted file mode 100644 index d9f2b5c..0000000 --- a/ui/translations/BoxesPage_es.ts +++ /dev/null @@ -1,17 +0,0 @@ - - - - - BoxesPage - - - Quick Access - Acceso rapido - - - - Double-tap card to perform card action - Toque dos veces la tarjeta para realizar la acción de la tarjeta - - - diff --git a/ui/translations/BoxesPage_fr.ts b/ui/translations/BoxesPage_fr.ts deleted file mode 100644 index d91d04e..0000000 --- a/ui/translations/BoxesPage_fr.ts +++ /dev/null @@ -1,17 +0,0 @@ - - - - - BoxesPage - - - Quick Access - Accès rapide - - - - Double-tap card to perform card action - Appuyez deux fois sur la carte pour effectuer une action de carte - - - diff --git a/ui/translations/BoxesPage_it.ts b/ui/translations/BoxesPage_it.ts deleted file mode 100644 index 19b0e6a..0000000 --- a/ui/translations/BoxesPage_it.ts +++ /dev/null @@ -1,17 +0,0 @@ - - - - - BoxesPage - - - Quick Access - Accesso rapido - - - - Double-tap card to perform card action - Tocca due volte il blocco per lanciare l'azione - - - diff --git a/ui/translations/BoxesPage_nl.ts b/ui/translations/BoxesPage_nl.ts deleted file mode 100644 index 976c08a..0000000 --- a/ui/translations/BoxesPage_nl.ts +++ /dev/null @@ -1,17 +0,0 @@ - - - - - BoxesPage - - - Quick Access - Snelle toegang - - - - Double-tap card to perform card action - Dubbeltik op kaart om kaartactie uit te voeren - - - diff --git a/ui/translations/BoxesPage_pt.ts b/ui/translations/BoxesPage_pt.ts deleted file mode 100644 index 9412378..0000000 --- a/ui/translations/BoxesPage_pt.ts +++ /dev/null @@ -1,17 +0,0 @@ - - - - - BoxesPage - - - Quick Access - Acesso rápido - - - - Double-tap card to perform card action - Toque duas vezes no cartão para executar a ação do cartão - - - diff --git a/ui/translations/GridBox_de.ts b/ui/translations/GridBox_de.ts deleted file mode 100644 index 8ff3b53..0000000 --- a/ui/translations/GridBox_de.ts +++ /dev/null @@ -1,22 +0,0 @@ - - - - - GridBox - - - Edit Card - Karte bearbeiten - - - - Remove - Entfernen - - - - Cancel - Abbrechen - - - diff --git a/ui/translations/GridBox_es.ts b/ui/translations/GridBox_es.ts deleted file mode 100644 index 74948ed..0000000 --- a/ui/translations/GridBox_es.ts +++ /dev/null @@ -1,22 +0,0 @@ - - - - - GridBox - - - Edit Card - Editar tarjeta - - - - Remove - Remover - - - - Cancel - Cancelar - - - diff --git a/ui/translations/GridBox_fr.ts b/ui/translations/GridBox_fr.ts deleted file mode 100644 index b1db90b..0000000 --- a/ui/translations/GridBox_fr.ts +++ /dev/null @@ -1,22 +0,0 @@ - - - - - GridBox - - - Edit Card - Modifier la carte - - - - Remove - Retirer - - - - Cancel - Annuler - - - diff --git a/ui/translations/GridBox_it.ts b/ui/translations/GridBox_it.ts deleted file mode 100644 index 051f11c..0000000 --- a/ui/translations/GridBox_it.ts +++ /dev/null @@ -1,22 +0,0 @@ - - - - - GridBox - - - Edit Card - Modifica scheda - - - - Remove - Rimuovere - - - - Cancel - Annulla - - - diff --git a/ui/translations/GridBox_nl.ts b/ui/translations/GridBox_nl.ts deleted file mode 100644 index 070d6d9..0000000 --- a/ui/translations/GridBox_nl.ts +++ /dev/null @@ -1,22 +0,0 @@ - - - - - GridBox - - - Edit Card - Kaart bewerken - - - - Remove - Verwijderen - - - - Cancel - Annuleren - - - diff --git a/ui/translations/GridBox_pt.ts b/ui/translations/GridBox_pt.ts deleted file mode 100644 index 83bfe25..0000000 --- a/ui/translations/GridBox_pt.ts +++ /dev/null @@ -1,22 +0,0 @@ - - - - - GridBox - - - Edit Card - Editar cartão - - - - Remove - Remover - - - - Cancel - Cancelar - - - diff --git a/ui/translations/skill-ovos-homescreen.openvoiceos_de.qm b/ui/translations/skill-ovos-homescreen.openvoiceos_de.qm deleted file mode 100644 index 56c406eb6e3ebaca62567157d8d29b06889c65a8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1380 zcma)5OK1~O6uoICX_D4oP$;FyC@P4!Q5RC(IrQf9(#^L! zMxI~1^Yp_#BFdP2rdliG+al5UT~s3N*9D@!BXn%v6)g6W`R))=`hMyw_fZdMW48nB zdZFE#e1du{tm(_zr|wJOD05@%754qeeL1KRrMBcxH2$DIE^NB`9<^C8m%alxT6leU zH}*RN*PUmm4+lREf5UkV3$F)h?AS^ZWRXK%YEzwlQ-e4;Is8Fce9|S;>_^>*T4BOG zHP4037E%(a({W-XC;&pIxpi1_KciXndtZ>ajrEhCvPdCa;R4B73$e(kk~2 zVR`>#9)V#ld9b;wcx}9$Rh*&F3C>I|))hLGBs7vY5L1?P-QsFd5k4ELNP-U16fIB- z{I(q0)Yve)c9M&XB3toC$ef%`)xK ov|TE!4#Y~d=&{JgGWL=Wx3 zt6-rBg5ZCk9(;fxNI?+vDth-IT2CIt-?vM*iS8DWkjx|Vd(8Kk6Hmqdjj!u>-_90a zUViZW<0B$UN%vCi{2XShMDq_Z5@|m#5>2epsUx?rctYZR31dC+UAjcccUt|vhf|NW zdyQupZv>;ZNBgq;3buwTgSzWo8~wVYW00bD8f=J+A( zZ%nOpUw}8C|2(q^+$RgJW|KHEO=W76B8gvvR0dm=#y43OVv_&ISTU41Gmy$Qt|u6C za2!KAd5oniV8JZp$N;M|IF6`56#%2a%`q46I z3A1HriID*8q#a!Oq%?$7J6?GoRiiE#=5%Vre_Ys#RQtnb2f*e~}6`|80DZWFTS&-E?yDjL9)t{cJePi;9luPgy=UzIa1pc3?3 zTmxil!t%lgVT@p!7Gb#q%N*|QXDGcWJI=t**x30TUJeeR8o5@gVoO8ueKbqhK{$%E n08S6qTKJkk@DssRg#d*C*|p$!R?9LC?n*x*0mCY|CK8F?=GHSY diff --git a/ui/translations/skill-ovos-homescreen.openvoiceos_fr.qm b/ui/translations/skill-ovos-homescreen.openvoiceos_fr.qm deleted file mode 100644 index 98839f4021687cb7582888b3872fdd1559225368..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1448 zcma)5O=#0#7=F8^UE9^^MHwArQSyOOx$VJg zRk>Mx2zxoS$&T`Q@hNcS)V0bp_|Ip)9a4xAyRx&5b=bAs)+=veZ{*lY2e?A+#o>MM zzdv%-dJOv||9z zdwMaX0&M}Ul1>^487YdB0bZ2>;(|#57A~L69s%i+X6f9FgB55F?yW$zN{lAJtmDf- zE*6xqK#z&jL8`V%MQTy^4BJxYc*~2UIod}fla!%dkO`1Eo2J|zP?ou?3&Z&@@4-Ia z32<683ARsB%7Y6Yrgn^LjEjG!Hclsk>I_UL>fgv8isOour)h}mN{f)`P(vIjM^)6Y z1K{srQL4Ia#Q}EEOE}B!>L|RnQTT{2d)D)~kV6v}VF{z=;PR=BaxQjT>0^pisw1+2 zwyL;&v{uD9_RJ1WoM2DnKMwyoo^s-RSb4Uw1B2%9@4eVxw*8AHpY$|G)#WgHw(4+E zx5YyEtp&p=Q^`)*E$*Jy8a&v(F=V0R`VgoUQ0YK9x)@a=f5tcTd5pKtU3Wl)O|0DT zj4&8@yZb(i%o$kfxWjDwsuOW%rf@lc_{`n!=hwRlqMp(QPeFbZO^D1x+Zrms6yzy4BSvM@e9D-EfN3# diff --git a/ui/translations/skill-ovos-homescreen.openvoiceos_it.qm b/ui/translations/skill-ovos-homescreen.openvoiceos_it.qm deleted file mode 100644 index 9034e219b845e36e21d161fafac843dddb077661..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1480 zcmb7E&ubGw6n<$oX_Ce&#fBn9)JQbJv<)@HF zsBmiCxL19Kcq5EP-uSZe3b^yBJC)Zse?9Zsmr1C;O0sOtQ%WUXc|sWPmg^G>&EzG%Y+nIe5CjbjfPj+=+utQw_O#(2~$) zSZnwp=&!(w1R?L)w+806N9Sc0Z6##Otnp2VNOvIGy`qmTC!P*JDbf-Cg)))3wG`!6{Zve|SMsaxF6%5*e>V8^)0)yW=eqqh@NL+z7 z>lx+j91|+~2yCGkqa{F_D4GmX?)~_rmv~clg1g#+$x{guBKXwE=yFpfhg+_8WeDbk iWf`MI@Tw?5Bo>|DwJ4RS3)|9D7*r#~t%6}Fk@y4OGB3UW diff --git a/ui/translations/skill-ovos-homescreen.openvoiceos_nl.qm b/ui/translations/skill-ovos-homescreen.openvoiceos_nl.qm deleted file mode 100644 index def54721d2cce1998f38f97639a63ed1d9d0215d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1368 zcma)5OKa3n6h70*OlPL!g8{XaE~2O#5d>Xyp^JIgI@Q)!btT%{IcsjR&D{GDUUl_we4ZV&4_g-?UQ{j z9d+^9So4;-e~PtuFcIT)7N*eJ zw1o!~0Fy9nmFS%1(>-CeVL^-g{st`nIS9j3QrO5p$Q+*lU7sb~67`8sbMdGxR5XMM zg6$Y)4Oj}?Z3pW(G=GM7ynfJ`1g;XaM36=}0k$0-G*@>xllp{)u${0(6`Bcl+Sse- ZC!S-|tf$1Hu$Z2ipfVwD6%0d}%x}%m8qxp& diff --git a/ui/translations/skill-ovos-homescreen.openvoiceos_pt.qm b/ui/translations/skill-ovos-homescreen.openvoiceos_pt.qm deleted file mode 100644 index 0d14d0d60bca9df91beb8f694efdf7b880803b8a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1430 zcmb7E&1(}u6n|+pX_D4h0zxSY>p?G~7d_4LjfA%^Gy8t;^Y`}T12*~m!^Z9H zgZm#}y8H0;eIkn0<;8qCkAG`KGn>#v#`gx1d)$I{M0Zzw!jQZ0zRrQ`pZXJ{~uSA_tOlOFy8$rS`7Aguazx8()CSrk-UF z!G3e>M(q*wyYV+upMksQ;IR{hMTT<3$RQizQH?AT30zYg63sC-3Y~^7Sc08ta^YH6 zBMN8!iNl?(@FZ!6yq=c?(58ZixtgE?U^Rd_xq$@Y1*>LrHw<`;7654>o`={BP!rNt z(e+t92W2#&vN3bEbiA6mz*{mbK=!u)T)XAu!>vHW{vB$c4prp7Eu8v)$Lkibh%(zK z&85pjm3E3-jEldPmZ2h?1`6p-Y^*Qeu-0Vs&;p6|@bOOkFldUl(LY5t-h&vkwpR-S zWT*t=hNg&vHn2W+CC^LAg`!CqT40DCT>-u`z6Lz_7-SRY72N|9p1ZByWiQ^>VJ9Fa zY+4W-9;CigEE|q#hl^fg(d9>_RX1%#I_a5pE-Id=cFvY2p-MfO_gdUPYb|lTUsKpG zwGcjjDmOuIk&zRqef(U*v6n$)oBRF%A44tH=!|d}V(&&R>90Yz&OzIgEHOv+7CHb= zQyD2&k+5p+uMbJQ%&T5gPbgrY0*Um-_YE{waJeN^HHO37PBSKH9zG??uRv5%ZThO3 a)8o&cc~3eO$F|gt>0WfuYw$A?jr;^}0x;VE From 180f4cb05725213cb7c13335457b1e2e8702d063 Mon Sep 17 00:00:00 2001 From: JarbasAl Date: Fri, 20 Sep 2024 20:41:55 +0000 Subject: [PATCH 5/6] Increment Version to 1.0.0a1 --- version.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/version.py b/version.py index 441e978..cd3bcb6 100644 --- a/version.py +++ b/version.py @@ -1,6 +1,6 @@ # START_VERSION_BLOCK -VERSION_MAJOR = 0 +VERSION_MAJOR = 1 VERSION_MINOR = 0 -VERSION_BUILD = 4 +VERSION_BUILD = 0 VERSION_ALPHA = 1 # END_VERSION_BLOCK From d8e9a5865371b0b2c248ac4a2ae4e08c07c16fbf Mon Sep 17 00:00:00 2001 From: JarbasAl Date: Fri, 20 Sep 2024 20:42:20 +0000 Subject: [PATCH 6/6] Update Changelog --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ae24b32..b4f6425 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [1.0.0a1](https://github.com/OpenVoiceOS/skill-ovos-homescreen/tree/1.0.0a1) (2024-09-20) + +[Full Changelog](https://github.com/OpenVoiceOS/skill-ovos-homescreen/compare/0.0.4a1...1.0.0a1) + +**Breaking changes:** + +- deprecate!:remove dashboard [\#112](https://github.com/OpenVoiceOS/skill-ovos-homescreen/pull/112) ([JarbasAl](https://github.com/JarbasAl)) + ## [0.0.4a1](https://github.com/OpenVoiceOS/skill-ovos-homescreen/tree/0.0.4a1) (2024-09-20) [Full Changelog](https://github.com/OpenVoiceOS/skill-ovos-homescreen/compare/0.0.3...0.0.4a1)