diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS deleted file mode 100644 index f3a597df33..0000000000 --- a/.github/CODEOWNERS +++ /dev/null @@ -1,5 +0,0 @@ -# Order is important; the last matching pattern takes the most precedence. -* @tauri-apps/wg-doc - -# Disabled until wg-devops has active members -# .github @tauri-apps/wg-devops diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml deleted file mode 100644 index a3128a4691..0000000000 --- a/.github/ISSUE_TEMPLATE/config.yml +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright 2019-2024 Tauri Programme within The Commons Conservancy -# SPDX-License-Identifier: Apache-2.0 -# SPDX-License-Identifier: MIT - -blank_issues_enabled: true -contact_links: - - name: 💬 Discord Chat - url: https://discord.com/invite/tauri - about: Ask questions and talk to other Tauri users and the maintainers diff --git a/.github/ISSUE_TEMPLATE/page_request.yml b/.github/ISSUE_TEMPLATE/page_request.yml deleted file mode 100644 index 92b1b378b4..0000000000 --- a/.github/ISSUE_TEMPLATE/page_request.yml +++ /dev/null @@ -1,50 +0,0 @@ -# Copyright 2019-2024 Tauri Programme within The Commons Conservancy -# SPDX-License-Identifier: Apache-2.0 -# SPDX-License-Identifier: MIT - -name: 🤔 v2 Page Request -title: '[request] ' -description: Request a new page or updated content -labels: - - enhancement - - discuss - -body: - - type: input - id: question - attributes: - label: Question you want answered - description: The question you were trying to get answered by going to the website and couldn't find. Even if you weren't looking to get a specific question answered try to encapsulate the essence of your issue in the form of a question. - placeholder: "How do I register a new State?" - validations: - required: true - - - type: textarea - id: answer - attributes: - label: Where did you look for an answer? - description: Think back on how you navigate the site in order to find the answer to your question so we get a better idea of how people interact with the site. - placeholder: First I tried searching for the issue, then I went to the sidebar to find a relevant page... - validations: - required: true - - - type: input - id: url - attributes: - label: Page URL - description: If applicable, copy-paste the URL to the page you want updated. - placeholder: "https://v2.tauri.app/some/specific/page" - - - type: textarea - id: context - attributes: - label: Additional context - description: Add any other context about the problem here. - - - type: checkboxes - attributes: - label: Are you willing to work on this yourself? - description: If so don't hesitate to reach out on Discord to us, we're more than happy to help you get set up with contributing! - options: - - label: I want to work on this myself - required: false diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 2c4cdb3ec8..0000000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,23 +0,0 @@ - - -#### Description - -- What does this PR change? Give us a brief description. -- Closes # - - diff --git a/.github/TRANSLATING.md b/.github/TRANSLATING.md deleted file mode 100644 index 1fb11de321..0000000000 --- a/.github/TRANSLATING.md +++ /dev/null @@ -1,88 +0,0 @@ -# Translations (i18n) - -Thanks for your interest in helping translate the Tauri docs! Visit the [translation status page](https://v2.tauri.app/contribute/translate-status) to see which docs are ready for translation, need updated, or need reviewed. - -To ensure a translation is consistent across multiple contributions, be sure to [communicate with others contributors in the `#docs` channel on Discord](https://discord.com/invite/tauri) and consult with reliable external resources such as [Microsoft terminology search](https://msit.powerbi.com/view?r=eyJrIjoiODJmYjU4Y2YtM2M0ZC00YzYxLWE1YTktNzFjYmYxNTAxNjQ0IiwidCI6IjcyZjk4OGJmLTg2ZjEtNDFhZi05MWFiLTJkN2NkMDExZGI0NyIsImMiOjV9) during translation. - -## Enabling a Language - -If you seek to contribute but find your language missing please let us know in https://github.com/tauri-apps/tauri-docs/issues/1611. Once we have enough support for a particular language then we'll be able to enable it with the community's support. - -### Maintainer Checklist for Adding New Languages - -- Update https://github.com/tauri-apps/tauri-docs/blob/v2/locales.json -- Update https://github.com/tauri-apps/tauri-docs/blob/v2/.github/labeler.yml - -## Starting a Translation - -Before you start working on a translation, look through the [open pull requests](https://v2.tauri.app/contribute/translate-status#needs-review) to see if anyone else is already working on the page for that language. - -If that page isn't in the list, then now it's time for you to lead the effort! So here's how to start: - -1. Head to [translation status page](https://v2.tauri.app/contribute/translate-status). -2. Look for missing translation in corresponding languages. -3. Make sure no one else has been working on the corresponding page. -4. Click `Create page +` which will help you automagically fork the repository and create the corresponding page. You might want to copy the contents of English page as a starting point. -5. Translate the page following the [translation guidelines](#translation-guidelines). -6. Once your translation is done, initiate a pull request. - -Note that you may submit a draft pull request before your translation is complete: e.g., you may want to ask for help with translations or simply indicate to others that you're already translating a specific page. However, your pull request will not be merged until the translation is complete. - -## Updating a Translation - -### Corrections - -If you notice spelling or grammar errors, typos, or opportunities for better phrasing, open a pull request with your suggested fix. If you see a problem that you aren't sure of or don't have time to fix, open an issue. - -### Broken Links - -When broken links are found, try to fix them across all translations. Ideally, only update the linked URLs, so that translation review will not be necessary. - -## Translation Guidelines - -Here are some guidelines to help with the translation. - -**Markdown Formatting** - -- [ ] Preserve the Markdown formatting. This includes headers (#, ##, etc.), lists (*, -, 1.), and inline styles like bold, italic, and code. -- [ ] Ensure that links ([link text](URL)) remain functional and direct to the correct locations. -- [ ] Ensure code blocks (triple backticks ```) are unchanged in terms of their syntax and content. -- [ ] Double-check tables, making sure their structure remains intact. Using the Prettier formatter is a great way to do this. - -**Terminology** - -- [ ] Familiarize yourself with key Tauri terms and ensure they're translated consistently. It may be helpful to look at other, already translated pages as a reference. -- [ ] For some terms, it might be appropriate to keep them in English and provide a translation in parentheses. -- [ ] If a term has no definitive way to translate, be sure to [communicate with others contributors in the `#docs` channel on Discord](https://discord.com/invite/tauri) or through pull request and consult with reliable external resources such as [Microsoft terminology search](https://msit.powerbi.com/view?r=eyJrIjoiODJmYjU4Y2YtM2M0ZC00YzYxLWE1YTktNzFjYmYxNTAxNjQ0IiwidCI6IjcyZjk4OGJmLTg2ZjEtNDFhZi05MWFiLTJkN2NkMDExZGI0NyIsImMiOjV9). - -**Code and Command Examples** - -- [ ] Avoid translating code unless it contains explanatory comments. Translated comments should retain the original meaning. -- [ ] Ensure command-line examples remain functional. Only translate the descriptive parts, not the actual commands. - -**Link Descriptions** - -- [ ] If link descriptions (text that appears when you hover over a link) are present, make sure to translate them, but ensure they still describe the link's destination correctly. - -**Consistency** - -- [ ] Ensure that the terminology and style are consistent throughout the document. -- [ ] If the document refers to other sections within itself, double-check that these references are accurate post-translation. - -**Cultural Considerations** - -- [ ] Ensure that examples, metaphors, or idioms are culturally relevant or adapt them so that they are. -- [ ] Avoid terms or examples that might be considered offensive or inappropriate in the target language or culture. - -**Images and Alt Text** - -- [ ] If the document contains images with text, consider whether the text in the image needs to be translated. -- [ ] Translate the alt text (a description of the image for accessibility purposes) for each image. - -**Feedback** - -- [ ] If there are parts of the original document that are unclear or might be misunderstood, communicate with the original author or a knowledgeable person to seek clarity. - -Remember, the main goal of the translation is to make the content as accessible and clear to the new audience as it was to the original audience. Always prioritize clarity and accuracy. - -Thank you for your interest in contributing; we're excited to have you! Reach out on the [`#docs` channel on Discord](https://discord.com/invite/tauri) if you have any questions along the way. diff --git a/.github/labeler.yml b/.github/labeler.yml deleted file mode 100644 index fcaec757b4..0000000000 --- a/.github/labeler.yml +++ /dev/null @@ -1,19 +0,0 @@ -# See https://github.com/actions/labeler - -i18n: - - src/content/docs/es/**/* - - src/content/docs/fr/**/* - - src/content/docs/it/**/* - - src/content/docs/zh-cn/**/* - -"i18n: es": - - src/content/docs/es/**/* - -"i18n: fr": - - src/content/docs/fr/**/* - -"i18n: it": - - src/content/docs/it/**/* - -"i18n: zh-cn": - - src/content/docs/zh-cn/**/* diff --git a/.github/sponsors/crabnebula.svg b/.github/sponsors/crabnebula.svg deleted file mode 100644 index 94af70f6ef..0000000000 --- a/.github/sponsors/crabnebula.svg +++ /dev/null @@ -1,31 +0,0 @@ - diff --git a/.github/workflows/assign.yml b/.github/workflows/assign.yml deleted file mode 100644 index c4811e6d88..0000000000 --- a/.github/workflows/assign.yml +++ /dev/null @@ -1,24 +0,0 @@ -name: 'Auto Assign' - -on: - pull_request_target: - types: [opened] - -jobs: - auto_assign: - runs-on: ubuntu-latest - steps: - - name: Auto-assign PR to author - if: ${{ github.event.pull_request.user.type != 'Bot' }} - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # The gh cli currently does not consider the pr author an assignable user if they aren't part of the org - run: gh api -X POST /repos/tauri-apps/tauri-docs/issues/${{ github.event.pull_request.number }}/assignees -f "assignees[]=${{ github.event.pull_request.user.login }}" - #run: gh pr edit ${{ github.event.pull_request.number }} --add-assignee ${{ github.event.pull_request.user.login }} -R ${{ github.repository }} - - - name: Auto-assign Renovate PRs - if: ${{ github.event.pull_request.user.type == 'Bot' && github.event.pull_request.user.login == 'renovate[bot]' }} - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # The gh cli currently does not consider the pr author an assignable user if they aren't part of the org - run: gh api -X POST /repos/tauri-apps/tauri-docs/issues/${{ github.event.pull_request.number }}/assignees -f "assignees[]=vasfvitor" diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml deleted file mode 100644 index c720392298..0000000000 --- a/.github/workflows/check.yml +++ /dev/null @@ -1,25 +0,0 @@ -# Adapted from https://github.com/withastro/starlight/blob/main/.github/workflows/format.yml - -name: 'Check formatting' - -on: - pull_request: - -jobs: - format: - runs-on: ubuntu-latest - steps: - - name: Check out code using Git - uses: actions/checkout@v4 - - - uses: pnpm/action-setup@v4 - - - uses: actions/setup-node@v4 - with: - node-version: 20 - cache: 'pnpm' - - - run: pnpm i - - - name: Check formatting - run: pnpm format:check diff --git a/.github/workflows/congrats.yml b/.github/workflows/congrats.yml deleted file mode 100644 index 1c24dad45e..0000000000 --- a/.github/workflows/congrats.yml +++ /dev/null @@ -1,11 +0,0 @@ -name: 'Congrats' - -on: - push: - branches: [v2] - -jobs: - congrats: - uses: tauri-apps/automation/.github/workflows/congrats.yml@main - secrets: - DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml deleted file mode 100644 index 15b12e3ab8..0000000000 --- a/.github/workflows/labeler.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: 'Pull Request Labeler' - -on: - pull_request_target: - -jobs: - add_labels: - permissions: - contents: read - pull-requests: write - runs-on: ubuntu-latest - env: - NETLIFY_BUILD_KEY: ${{ secrets.NETLIFY_BUILD_KEY }} - steps: - - id: label-pr - uses: actions/labeler@v4 - with: - repo-token: '${{ secrets.GITHUB_TOKEN }}' - # Trigger prod netlify re-build to refresh i18n dashboard - - name: Rebuild i18n Dashboard - if: contains(steps.label-pr.outputs.all-labels, 'i18n') - run: curl -X POST -d {} https://api.netlify.com/build_hooks/$NETLIFY_BUILD_KEY diff --git a/.github/workflows/priority.yml b/.github/workflows/priority.yml deleted file mode 100644 index 5cc76f5368..0000000000 --- a/.github/workflows/priority.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: 'Priority Updater' - -on: - issues: - types: [opened] - pull_request_target: - types: [opened] - -jobs: - set_statuses: - runs-on: ubuntu-latest - if: ${{ !contains(github.event.issue.labels.*.name, 'manual') && !contains(github.event.pull_request.labels.*.name, 'manual') }} - steps: - - name: Get project data - env: - GH_TOKEN: ${{ secrets.TEST_TOKEN }} - run: | - echo "PROJECT_ID=$(gh project view 27 --owner tauri-apps --format json --jq '.id')" >> $GITHUB_ENV - gh project field-list 27 --owner tauri-apps --format json > project_data.json - echo 'PRIORITY_FIELD_ID='$(jq '.fields[] | select(.name== "Priority") | .id' project_data.json) >> $GITHUB_ENV - echo 'LOW_PRIORITY_ID='$(jq '.fields[] | select(.name== "Priority") | .options[] | select(.name=="Low") | .id' project_data.json) >> $GITHUB_ENV - echo 'MEDIUM_PRIORITY_ID='$(jq '.fields[] | select(.name== "Priority") | .options[] | select(.name=="Medium") | .id' project_data.json) >> $GITHUB_ENV - echo 'HIGH_PRIORITY_ID='$(jq '.fields[] | select(.name== "Priority") | .options[] | select(.name=="High") | .id' project_data.json) >> $GITHUB_ENV - echo 'CRITICAL_PRIORITY_ID='$(jq '.fields[] | select(.name== "Priority") | .options[] | select(.name=="Critical") | .id' project_data.json) >> $GITHUB_ENV - - - name: Default priority - run: | - echo 'PRIORITY_ID='${{ env.LOW_PRIORITY_ID }} >> $GITHUB_ENV - - - name: Add project item / Get item id - env: - GH_TOKEN: ${{ secrets.TEST_TOKEN }} - run: | - echo "ITEM_ID=$(gh project item-add 27 --owner tauri-apps --url https://github.com/tauri-apps/tauri-docs/issues/${{ github.event.pull_request.number || github.event.issue.number }} --format json --jq '.id')" >> $GITHUB_ENV - - - name: Set fields - if: ${{ github.event.issue.status == 'open' || github.event.pull_request.status == 'open' }} - env: - GH_TOKEN: ${{ secrets.TEST_TOKEN }} - run: | - gh project item-edit --id ${{ env.ITEM_ID }} --project-id ${{ env.PROJECT_ID }} --field-id ${{ env.PRIORITY_FIELD_ID }} --single-select-option-id ${{ env.PRIORITY_ID }} diff --git a/.github/workflows/status.yml b/.github/workflows/status.yml deleted file mode 100644 index c84146a12b..0000000000 --- a/.github/workflows/status.yml +++ /dev/null @@ -1,62 +0,0 @@ -name: 'Status Updater' - -on: - issues: - pull_request_target: - -jobs: - set_statuses: - runs-on: ubuntu-latest - if: ${{ !contains(github.event.issue.labels.*.name, 'manual') && !contains(github.event.pull_request.labels.*.name, 'manual') }} - steps: - - name: Get project data - env: - GH_TOKEN: ${{ secrets.TEST_TOKEN }} - run: | - echo "PROJECT_ID=$(gh project view 27 --owner tauri-apps --format json --jq '.id')" >> $GITHUB_ENV - gh project field-list 27 --owner tauri-apps --format json > project_data.json - echo 'STATUS_FIELD_ID='$(jq '.fields[] | select(.name== "Status") | .id' project_data.json) >> $GITHUB_ENV - echo 'BACKLOG_STATUS_ID='$(jq '.fields[] | select(.name== "Status") | .options[] | select(.name=="🪵 Backlog") | .id' project_data.json) >> $GITHUB_ENV - echo 'READY_STATUS_ID='$(jq '.fields[] | select(.name== "Status") | .options[] | select(.name=="💪 Ready") | .id' project_data.json) >> $GITHUB_ENV - echo 'IN_PROGRESS_STATUS_ID='$(jq '.fields[] | select(.name== "Status") | .options[] | select(.name=="🏗️ In progress") | .id' project_data.json) >> $GITHUB_ENV - echo 'IN_REVIEW_STATUS_ID='$(jq '.fields[] | select(.name== "Status") | .options[] | select(.name=="📋 In review") | .id' project_data.json) >> $GITHUB_ENV - echo 'DONE_STATUS_ID='$(jq '.fields[] | select(.name== "Status") | .options[] | select(.name=="✅ Done") | .id' project_data.json) >> $GITHUB_ENV - - - name: Add project item / Get item id - env: - GH_TOKEN: ${{ secrets.TEST_TOKEN }} - run: echo "ITEM_ID=$(gh project item-add 27 --owner tauri-apps --url https://github.com/tauri-apps/tauri-docs/issues/${{ github.event.pull_request.number || github.event.issue.number }} --format json --jq '.id')" >> $GITHUB_ENV - - #===== PULL REQUESTS =====# - - name: Is In progress - if: ${{ github.event_name == 'pull_request_target' && (github.event.pull_request.draft == true || github.event.pull_request.mergeable == false) }} - run: echo 'STATUS_ID='${{ env.IN_PROGRESS_STATUS_ID }} >> $GITHUB_ENV - - - name: Is In review - if: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.draft == false && github.event.pull_request.mergeable == true }} - run: echo 'STATUS_ID='${{ env.IN_REVIEW_STATUS_ID }} >> $GITHUB_ENV - #===== END PULL REQUESTS =====# - - #===== ISSUES =====# - - name: Is Ready - if: ${{ github.event_name == 'issues' && (github.event.issue.labels[0] != null && github.event.issue.milestone != null) }} - run: echo 'STATUS_ID='${{ env.READY_STATUS_ID }} >> $GITHUB_ENV - - - name: Is In progress - if: ${{ github.event_name == 'issues' && (github.event.issue.labels[0] != null && github.event.issue.milestone != null && github.event.issue.assignees[0] != null) }} - run: echo 'STATUS_ID='${{ env.IN_PROGRESS_STATUS_ID }} >> $GITHUB_ENV - - - name: Is In review - if: ${{ github.event_name == 'issues' && (github.event.issue.labels[0] != null && github.event.issue.pull_request.merged_at != null) }} - run: echo 'STATUS_ID='${{ env.IN_REVIEW_STATUS_ID }} >> $GITHUB_ENV - - - name: Is Backlog - if: ${{ github.event_name == 'issues' && (github.event.issue.labels[0] == null || github.event.issue.milestone == null || contains(github.event.issue.labels.*.name, 'upstream') || contains(github.event.issue.labels.*.name, 'discuss')) }} - run: echo 'STATUS_ID='${{ env.BACKLOG_STATUS_ID }} >> $GITHUB_ENV - #===== END ISSUES =====# - - - name: Set fields - if: ${{ github.event.issue.status == 'open' || github.event.pull_request.status == 'open' }} - env: - GH_TOKEN: ${{ secrets.TEST_TOKEN }} - run: gh project item-edit --id ${{ env.ITEM_ID }} --project-id ${{ env.PROJECT_ID }} --field-id ${{ env.STATUS_FIELD_ID }} --single-select-option-id ${{ env.STATUS_ID }} diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index bcfed603f7..0000000000 --- a/.gitmodules +++ /dev/null @@ -1,12 +0,0 @@ -[submodule "packages/plugins-workspace"] - path = packages/plugins-workspace - url = https://github.com/tauri-apps/plugins-workspace.git - branch = v2 -[submodule "packages/awesome-tauri"] - path = packages/awesome-tauri - url = https://github.com/tauri-apps/awesome-tauri - branch = dev -[submodule "packages/tauri"] - path = packages/tauri - url = https://github.com/tauri-apps/tauri.git - branch = dev diff --git a/.prettierrc b/.prettierrc deleted file mode 100644 index d45484de76..0000000000 --- a/.prettierrc +++ /dev/null @@ -1,29 +0,0 @@ -{ - "printWidth": 100, - "semi": true, - "singleQuote": true, - "tabWidth": 2, - "trailingComma": "es5", - "useTabs": false, - "plugins": ["prettier-plugin-astro"], - "overrides": [ - { - "files": "*.astro", - "options": { - "parser": "astro" - } - }, - { - "files": ["*.json", "*.md", "*.toml", "*.yml"], - "options": { - "useTabs": false - } - }, - { - "files": ["*.md", "*.mdx"], - "options": { - "printWidth": 80 - } - } - ] -} diff --git a/.vscode/extensions.json b/.vscode/extensions.json deleted file mode 100644 index 22a15055d6..0000000000 --- a/.vscode/extensions.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "recommendations": ["astro-build.astro-vscode"], - "unwantedRecommendations": [] -} diff --git a/.vscode/launch.json b/.vscode/launch.json deleted file mode 100644 index d642209762..0000000000 --- a/.vscode/launch.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "version": "0.2.0", - "configurations": [ - { - "command": "./node_modules/.bin/astro dev", - "name": "Development server", - "request": "launch", - "type": "node-terminal" - } - ] -} diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index e66e920719..0000000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "files.encoding": "utf8", - "prettier.documentSelectors": ["**/*.astro"], - "[astro]": { - "editor.defaultFormatter": "astro-build.astro-vscode" - } -} diff --git a/LICENSE b/LICENSE index cac2185963..5b477ce77a 100644 --- a/LICENSE +++ b/LICENSE @@ -2,20 +2,19 @@ MIT License Copyright (c) 2020-2023 Tauri Programme within the Commons Conservancy -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/README.md b/README.md deleted file mode 100644 index 7053d67ad6..0000000000 --- a/README.md +++ /dev/null @@ -1,40 +0,0 @@ -![README Banner](https://github.com/tauri-apps/tauri-docs/assets/61861940/ab6fd2f5-07b7-46b2-9125-77cba0064c1b) - -[![Netlify Status](https://api.netlify.com/api/v1/badges/6dc81a5e-32ac-46f4-80c5-198f4a536e26/deploy-status)](https://app.netlify.com/sites/tauri-docs-starlight/deploys) - -Welcome to the home for Tauri 2.0 documentation - we're excited to have you! ✨ - -This repo is used to build the docs for Tauri at https://tauri.app. - -If you are looking for the old v1 docs, see [here](https://github.com/tauri-apps/tauri-docs/tree/v1). - -[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/tauri-apps/tauri-docs/tree/v2) -[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/tauri-apps/tauri-docs/tree/v2) - -## Get Involved - -- [Join us on Discord](https://discord.com/invite/tauri) in the [`#docs` channel](https://discord.com/channels/616186924390023171/662624589037436928) to ask any questions or give feedback -- Check out the [Tauri 2.0 Documentation Roadmap](https://github.com/tauri-apps/tauri-docs/issues/1344) and see if there's anything you'd like to get involved in -- Read the [contributing guidelines](.github/CONTRIBUTING.md) to learn how to get up and running - -## Partners - - - - - - - -
- - CrabNebula - -
- -For the complete list of sponsors please visit our [website](https://tauri.app#sponsors) and [Open Collective](https://opencollective.com/tauri). - -## License - -MIT License - -Copyright (c) 2020-2023 Tauri Programme within The Commons Conservancy diff --git a/src/assets/about/governance/diagram.svg b/Source/assets/about/governance/diagram.svg similarity index 100% rename from src/assets/about/governance/diagram.svg rename to Source/assets/about/governance/diagram.svg diff --git a/src/assets/blog/crabnebula.svg b/Source/assets/blog/crabnebula.svg similarity index 99% rename from src/assets/blog/crabnebula.svg rename to Source/assets/blog/crabnebula.svg index a9bb4609d3..40e24131b5 100644 --- a/src/assets/blog/crabnebula.svg +++ b/Source/assets/blog/crabnebula.svg @@ -1,31 +1,31 @@ -
@@ -77,20 +77,23 @@ function renderPlatformIcon(iconId: IconId) { `; } -export function getPlatformSupportIcon(supportLevel: string, platform: Platform): string { - const iconMap: Record = { - windows: 'bi-windows', - linux: 'cib-linux', - ios: 'simple-icons-ios', - macos: 'simple-icons-macos', - android: 'material-symbols-android', - }; +export function getPlatformSupportIcon( + supportLevel: string, + platform: Platform, +): string { + const iconMap: Record = { + windows: "bi-windows", + linux: "cib-linux", + ios: "simple-icons-ios", + macos: "simple-icons-macos", + android: "material-symbols-android", + }; - const iconId = iconMap[platform]; + const iconId = iconMap[platform]; - if (supportLevel !== 'full' && supportLevel !== 'partial') { - return ''; - } + if (supportLevel !== "full" && supportLevel !== "partial") { + return ""; + } - return renderPlatformIcon(iconId); + return renderPlatformIcon(iconId); } diff --git a/Source/content/config.ts b/Source/content/config.ts new file mode 100644 index 0000000000..c64baadd42 --- /dev/null +++ b/Source/content/config.ts @@ -0,0 +1,10 @@ +import { i18nSchema } from "@astrojs/starlight/schema"; +import { defineCollection } from "astro:content"; +import { docsSchema } from "src/schemas/docsSchema"; + +export const collections = { + docs: defineCollection({ + schema: docsSchema, + }), + i18n: defineCollection({ type: "data", schema: i18nSchema() }), +}; diff --git a/src/content/docs/404.md b/Source/content/docs/404.md similarity index 100% rename from src/content/docs/404.md rename to Source/content/docs/404.md diff --git a/src/content/docs/_fragments/cta.mdx b/Source/content/docs/_fragments/cta.mdx similarity index 100% rename from src/content/docs/_fragments/cta.mdx rename to Source/content/docs/_fragments/cta.mdx diff --git a/src/content/docs/_it/develop/Debug/vscode.mdx b/Source/content/docs/_it/develop/Debug/vscode.mdx similarity index 100% rename from src/content/docs/_it/develop/Debug/vscode.mdx rename to Source/content/docs/_it/develop/Debug/vscode.mdx diff --git a/src/content/docs/about/book.md b/Source/content/docs/about/book.md similarity index 100% rename from src/content/docs/about/book.md rename to Source/content/docs/about/book.md diff --git a/src/content/docs/about/governance.md b/Source/content/docs/about/governance.md similarity index 100% rename from src/content/docs/about/governance.md rename to Source/content/docs/about/governance.md diff --git a/src/content/docs/about/index.mdx b/Source/content/docs/about/index.mdx similarity index 100% rename from src/content/docs/about/index.mdx rename to Source/content/docs/about/index.mdx diff --git a/src/content/docs/about/philosophy.md b/Source/content/docs/about/philosophy.md similarity index 100% rename from src/content/docs/about/philosophy.md rename to Source/content/docs/about/philosophy.md diff --git a/src/content/docs/about/trademark.md b/Source/content/docs/about/trademark.md similarity index 100% rename from src/content/docs/about/trademark.md rename to Source/content/docs/about/trademark.md diff --git a/src/content/docs/blog/create-tauri-app-version-3-released.md b/Source/content/docs/blog/create-tauri-app-version-3-released.md similarity index 100% rename from src/content/docs/blog/create-tauri-app-version-3-released.md rename to Source/content/docs/blog/create-tauri-app-version-3-released.md diff --git a/src/content/docs/blog/create-tauri-app-version-3-released/header.jpg b/Source/content/docs/blog/create-tauri-app-version-3-released/header.jpg similarity index 100% rename from src/content/docs/blog/create-tauri-app-version-3-released/header.jpg rename to Source/content/docs/blog/create-tauri-app-version-3-released/header.jpg diff --git a/src/content/docs/blog/cve-2024-24576.md b/Source/content/docs/blog/cve-2024-24576.md similarity index 100% rename from src/content/docs/blog/cve-2024-24576.md rename to Source/content/docs/blog/cve-2024-24576.md diff --git a/src/content/docs/blog/partnership-crabnebula.md b/Source/content/docs/blog/partnership-crabnebula.md similarity index 100% rename from src/content/docs/blog/partnership-crabnebula.md rename to Source/content/docs/blog/partnership-crabnebula.md diff --git a/src/content/docs/blog/partnership-crabnebula/header.png b/Source/content/docs/blog/partnership-crabnebula/header.png similarity index 100% rename from src/content/docs/blog/partnership-crabnebula/header.png rename to Source/content/docs/blog/partnership-crabnebula/header.png diff --git a/src/content/docs/blog/roadmap-to-tauri-2-0.md b/Source/content/docs/blog/roadmap-to-tauri-2-0.md similarity index 100% rename from src/content/docs/blog/roadmap-to-tauri-2-0.md rename to Source/content/docs/blog/roadmap-to-tauri-2-0.md diff --git a/src/content/docs/blog/roadmap-to-tauri-2-0/header.png b/Source/content/docs/blog/roadmap-to-tauri-2-0/header.png similarity index 100% rename from src/content/docs/blog/roadmap-to-tauri-2-0/header.png rename to Source/content/docs/blog/roadmap-to-tauri-2-0/header.png diff --git a/src/content/docs/blog/tauri-1-0.md b/Source/content/docs/blog/tauri-1-0.md similarity index 100% rename from src/content/docs/blog/tauri-1-0.md rename to Source/content/docs/blog/tauri-1-0.md diff --git a/src/content/docs/blog/tauri-1-1.mdx b/Source/content/docs/blog/tauri-1-1.mdx similarity index 100% rename from src/content/docs/blog/tauri-1-1.mdx rename to Source/content/docs/blog/tauri-1-1.mdx diff --git a/src/content/docs/blog/tauri-1-2.mdx b/Source/content/docs/blog/tauri-1-2.mdx similarity index 100% rename from src/content/docs/blog/tauri-1-2.mdx rename to Source/content/docs/blog/tauri-1-2.mdx diff --git a/src/content/docs/blog/tauri-1-3.mdx b/Source/content/docs/blog/tauri-1-3.mdx similarity index 100% rename from src/content/docs/blog/tauri-1-3.mdx rename to Source/content/docs/blog/tauri-1-3.mdx diff --git a/src/content/docs/blog/tauri-1-4.mdx b/Source/content/docs/blog/tauri-1-4.mdx similarity index 100% rename from src/content/docs/blog/tauri-1-4.mdx rename to Source/content/docs/blog/tauri-1-4.mdx diff --git a/src/content/docs/blog/tauri-1-5.mdx b/Source/content/docs/blog/tauri-1-5.mdx similarity index 100% rename from src/content/docs/blog/tauri-1-5.mdx rename to Source/content/docs/blog/tauri-1-5.mdx diff --git a/src/content/docs/blog/tauri-1-6.mdx b/Source/content/docs/blog/tauri-1-6.mdx similarity index 100% rename from src/content/docs/blog/tauri-1-6.mdx rename to Source/content/docs/blog/tauri-1-6.mdx diff --git a/src/content/docs/blog/tauri-1-7.mdx b/Source/content/docs/blog/tauri-1-7.mdx similarity index 100% rename from src/content/docs/blog/tauri-1-7.mdx rename to Source/content/docs/blog/tauri-1-7.mdx diff --git a/src/content/docs/blog/tauri-2-0-0-alpha-3.md b/Source/content/docs/blog/tauri-2-0-0-alpha-3.md similarity index 100% rename from src/content/docs/blog/tauri-2-0-0-alpha-3.md rename to Source/content/docs/blog/tauri-2-0-0-alpha-3.md diff --git a/src/content/docs/blog/tauri-2-0-0-alpha-4.mdx b/Source/content/docs/blog/tauri-2-0-0-alpha-4.mdx similarity index 100% rename from src/content/docs/blog/tauri-2-0-0-alpha-4.mdx rename to Source/content/docs/blog/tauri-2-0-0-alpha-4.mdx diff --git a/src/content/docs/blog/tauri-2-0-0-beta.md b/Source/content/docs/blog/tauri-2-0-0-beta.md similarity index 100% rename from src/content/docs/blog/tauri-2-0-0-beta.md rename to Source/content/docs/blog/tauri-2-0-0-beta.md diff --git a/src/content/docs/blog/tauri-2-0-0-release-candidate.mdx b/Source/content/docs/blog/tauri-2-0-0-release-candidate.mdx similarity index 100% rename from src/content/docs/blog/tauri-2-0-0-release-candidate.mdx rename to Source/content/docs/blog/tauri-2-0-0-release-candidate.mdx diff --git a/src/content/docs/blog/tauri-2.0.mdx b/Source/content/docs/blog/tauri-2.0.mdx similarity index 100% rename from src/content/docs/blog/tauri-2.0.mdx rename to Source/content/docs/blog/tauri-2.0.mdx diff --git a/src/content/docs/blog/tauri-board-elections-2024.md b/Source/content/docs/blog/tauri-board-elections-2024.md similarity index 100% rename from src/content/docs/blog/tauri-board-elections-2024.md rename to Source/content/docs/blog/tauri-board-elections-2024.md diff --git a/src/content/docs/blog/tauri-board-elections-and-governance-updates.md b/Source/content/docs/blog/tauri-board-elections-and-governance-updates.md similarity index 100% rename from src/content/docs/blog/tauri-board-elections-and-governance-updates.md rename to Source/content/docs/blog/tauri-board-elections-and-governance-updates.md diff --git a/src/content/docs/blog/tauri-community-growth-and-feedback.md b/Source/content/docs/blog/tauri-community-growth-and-feedback.md similarity index 100% rename from src/content/docs/blog/tauri-community-growth-and-feedback.md rename to Source/content/docs/blog/tauri-community-growth-and-feedback.md diff --git a/src/content/docs/blog/tauri-egui-0-1.md b/Source/content/docs/blog/tauri-egui-0-1.md similarity index 100% rename from src/content/docs/blog/tauri-egui-0-1.md rename to Source/content/docs/blog/tauri-egui-0-1.md diff --git a/src/content/docs/blog/tauri-mobile-alpha.mdx b/Source/content/docs/blog/tauri-mobile-alpha.mdx similarity index 100% rename from src/content/docs/blog/tauri-mobile-alpha.mdx rename to Source/content/docs/blog/tauri-mobile-alpha.mdx diff --git a/src/content/docs/blog/tauri-programme-turns-1-and-board-elections.md b/Source/content/docs/blog/tauri-programme-turns-1-and-board-elections.md similarity index 100% rename from src/content/docs/blog/tauri-programme-turns-1-and-board-elections.md rename to Source/content/docs/blog/tauri-programme-turns-1-and-board-elections.md diff --git a/src/content/docs/blog/tauri_1_0_images/github_stars_dark.png b/Source/content/docs/blog/tauri_1_0_images/github_stars_dark.png similarity index 100% rename from src/content/docs/blog/tauri_1_0_images/github_stars_dark.png rename to Source/content/docs/blog/tauri_1_0_images/github_stars_dark.png diff --git a/src/content/docs/blog/tauri_1_0_images/hackernews.jpg b/Source/content/docs/blog/tauri_1_0_images/hackernews.jpg similarity index 100% rename from src/content/docs/blog/tauri_1_0_images/hackernews.jpg rename to Source/content/docs/blog/tauri_1_0_images/hackernews.jpg diff --git a/src/content/docs/blog/tauri_1_0_images/header.png b/Source/content/docs/blog/tauri_1_0_images/header.png similarity index 100% rename from src/content/docs/blog/tauri_1_0_images/header.png rename to Source/content/docs/blog/tauri_1_0_images/header.png diff --git a/src/content/docs/blog/tauri_1_0_images/hoodie.jpg b/Source/content/docs/blog/tauri_1_0_images/hoodie.jpg similarity index 100% rename from src/content/docs/blog/tauri_1_0_images/hoodie.jpg rename to Source/content/docs/blog/tauri_1_0_images/hoodie.jpg diff --git a/src/content/docs/blog/tauri_1_0_images/ossc_logo_dark.png b/Source/content/docs/blog/tauri_1_0_images/ossc_logo_dark.png similarity index 100% rename from src/content/docs/blog/tauri_1_0_images/ossc_logo_dark.png rename to Source/content/docs/blog/tauri_1_0_images/ossc_logo_dark.png diff --git a/src/content/docs/blog/tauri_1_0_images/ossinsight.jpg b/Source/content/docs/blog/tauri_1_0_images/ossinsight.jpg similarity index 100% rename from src/content/docs/blog/tauri_1_0_images/ossinsight.jpg rename to Source/content/docs/blog/tauri_1_0_images/ossinsight.jpg diff --git a/src/content/docs/blog/tauri_1_0_images/padloc_logo_dark.svg b/Source/content/docs/blog/tauri_1_0_images/padloc_logo_dark.svg similarity index 100% rename from src/content/docs/blog/tauri_1_0_images/padloc_logo_dark.svg rename to Source/content/docs/blog/tauri_1_0_images/padloc_logo_dark.svg diff --git a/src/content/docs/blog/tauri_1_0_images/prisma_logo.svg b/Source/content/docs/blog/tauri_1_0_images/prisma_logo.svg similarity index 100% rename from src/content/docs/blog/tauri_1_0_images/prisma_logo.svg rename to Source/content/docs/blog/tauri_1_0_images/prisma_logo.svg diff --git a/src/content/docs/blog/tauri_1_0_images/prisma_logo_dark.svg b/Source/content/docs/blog/tauri_1_0_images/prisma_logo_dark.svg similarity index 100% rename from src/content/docs/blog/tauri_1_0_images/prisma_logo_dark.svg rename to Source/content/docs/blog/tauri_1_0_images/prisma_logo_dark.svg diff --git a/src/content/docs/blog/tauri_1_0_images/spacedrive_logo_dark.png b/Source/content/docs/blog/tauri_1_0_images/spacedrive_logo_dark.png similarity index 100% rename from src/content/docs/blog/tauri_1_0_images/spacedrive_logo_dark.png rename to Source/content/docs/blog/tauri_1_0_images/spacedrive_logo_dark.png diff --git a/src/content/docs/blog/tauri_1_0_images/state_of_js.png b/Source/content/docs/blog/tauri_1_0_images/state_of_js.png similarity index 100% rename from src/content/docs/blog/tauri_1_0_images/state_of_js.png rename to Source/content/docs/blog/tauri_1_0_images/state_of_js.png diff --git a/src/content/docs/blog/tauri_1_0_images/worker_conf_2022.png b/Source/content/docs/blog/tauri_1_0_images/worker_conf_2022.png similarity index 100% rename from src/content/docs/blog/tauri_1_0_images/worker_conf_2022.png rename to Source/content/docs/blog/tauri_1_0_images/worker_conf_2022.png diff --git a/src/content/docs/blog/tauri_1_1_images/header.png b/Source/content/docs/blog/tauri_1_1_images/header.png similarity index 100% rename from src/content/docs/blog/tauri_1_1_images/header.png rename to Source/content/docs/blog/tauri_1_1_images/header.png diff --git a/src/content/docs/blog/tauri_1_2_images/header.png b/Source/content/docs/blog/tauri_1_2_images/header.png similarity index 100% rename from src/content/docs/blog/tauri_1_2_images/header.png rename to Source/content/docs/blog/tauri_1_2_images/header.png diff --git a/src/content/docs/blog/tauri_1_3_images/header.png b/Source/content/docs/blog/tauri_1_3_images/header.png similarity index 100% rename from src/content/docs/blog/tauri_1_3_images/header.png rename to Source/content/docs/blog/tauri_1_3_images/header.png diff --git a/src/content/docs/blog/tauri_1_4_images/header.png b/Source/content/docs/blog/tauri_1_4_images/header.png similarity index 100% rename from src/content/docs/blog/tauri_1_4_images/header.png rename to Source/content/docs/blog/tauri_1_4_images/header.png diff --git a/src/content/docs/blog/tauri_1_5_images/header.png b/Source/content/docs/blog/tauri_1_5_images/header.png similarity index 100% rename from src/content/docs/blog/tauri_1_5_images/header.png rename to Source/content/docs/blog/tauri_1_5_images/header.png diff --git a/src/content/docs/blog/tauri_2_0_0_alpha_0/android-preview.png b/Source/content/docs/blog/tauri_2_0_0_alpha_0/android-preview.png similarity index 100% rename from src/content/docs/blog/tauri_2_0_0_alpha_0/android-preview.png rename to Source/content/docs/blog/tauri_2_0_0_alpha_0/android-preview.png diff --git a/src/content/docs/blog/tauri_2_0_0_alpha_0/header.png b/Source/content/docs/blog/tauri_2_0_0_alpha_0/header.png similarity index 100% rename from src/content/docs/blog/tauri_2_0_0_alpha_0/header.png rename to Source/content/docs/blog/tauri_2_0_0_alpha_0/header.png diff --git a/src/content/docs/blog/tauri_2_0_0_alpha_0/ios-preview.png b/Source/content/docs/blog/tauri_2_0_0_alpha_0/ios-preview.png similarity index 100% rename from src/content/docs/blog/tauri_2_0_0_alpha_0/ios-preview.png rename to Source/content/docs/blog/tauri_2_0_0_alpha_0/ios-preview.png diff --git a/src/content/docs/blog/tauri_community_growth_and_feedback/header.jpg b/Source/content/docs/blog/tauri_community_growth_and_feedback/header.jpg similarity index 100% rename from src/content/docs/blog/tauri_community_growth_and_feedback/header.jpg rename to Source/content/docs/blog/tauri_community_growth_and_feedback/header.jpg diff --git a/src/content/docs/blog/tauri_community_growth_and_feedback/search_preview.gif b/Source/content/docs/blog/tauri_community_growth_and_feedback/search_preview.gif similarity index 100% rename from src/content/docs/blog/tauri_community_growth_and_feedback/search_preview.gif rename to Source/content/docs/blog/tauri_community_growth_and_feedback/search_preview.gif diff --git a/src/content/docs/blog/tauri_egui_0_1_images/example.png b/Source/content/docs/blog/tauri_egui_0_1_images/example.png similarity index 100% rename from src/content/docs/blog/tauri_egui_0_1_images/example.png rename to Source/content/docs/blog/tauri_egui_0_1_images/example.png diff --git a/src/content/docs/concept/Inter-Process Communication/brownfield.md b/Source/content/docs/concept/Inter-Process Communication/brownfield.md similarity index 100% rename from src/content/docs/concept/Inter-Process Communication/brownfield.md rename to Source/content/docs/concept/Inter-Process Communication/brownfield.md diff --git a/src/content/docs/concept/Inter-Process Communication/index.mdx b/Source/content/docs/concept/Inter-Process Communication/index.mdx similarity index 100% rename from src/content/docs/concept/Inter-Process Communication/index.mdx rename to Source/content/docs/concept/Inter-Process Communication/index.mdx diff --git a/src/content/docs/concept/Inter-Process Communication/isolation.md b/Source/content/docs/concept/Inter-Process Communication/isolation.md similarity index 100% rename from src/content/docs/concept/Inter-Process Communication/isolation.md rename to Source/content/docs/concept/Inter-Process Communication/isolation.md diff --git a/src/content/docs/concept/architecture.mdx b/Source/content/docs/concept/architecture.mdx similarity index 100% rename from src/content/docs/concept/architecture.mdx rename to Source/content/docs/concept/architecture.mdx diff --git a/src/content/docs/concept/index.mdx b/Source/content/docs/concept/index.mdx similarity index 100% rename from src/content/docs/concept/index.mdx rename to Source/content/docs/concept/index.mdx diff --git a/src/content/docs/concept/process-model.md b/Source/content/docs/concept/process-model.md similarity index 100% rename from src/content/docs/concept/process-model.md rename to Source/content/docs/concept/process-model.md diff --git a/src/content/docs/concept/size.mdx b/Source/content/docs/concept/size.mdx similarity index 100% rename from src/content/docs/concept/size.mdx rename to Source/content/docs/concept/size.mdx diff --git a/src/content/docs/develop/Debug/crabnebula-devtools.mdx b/Source/content/docs/develop/Debug/crabnebula-devtools.mdx similarity index 100% rename from src/content/docs/develop/Debug/crabnebula-devtools.mdx rename to Source/content/docs/develop/Debug/crabnebula-devtools.mdx diff --git a/src/content/docs/develop/Debug/index.mdx b/Source/content/docs/develop/Debug/index.mdx similarity index 100% rename from src/content/docs/develop/Debug/index.mdx rename to Source/content/docs/develop/Debug/index.mdx diff --git a/src/content/docs/develop/Debug/rustrover.mdx b/Source/content/docs/develop/Debug/rustrover.mdx similarity index 100% rename from src/content/docs/develop/Debug/rustrover.mdx rename to Source/content/docs/develop/Debug/rustrover.mdx diff --git a/src/content/docs/develop/Debug/vscode.mdx b/Source/content/docs/develop/Debug/vscode.mdx similarity index 100% rename from src/content/docs/develop/Debug/vscode.mdx rename to Source/content/docs/develop/Debug/vscode.mdx diff --git a/src/content/docs/develop/Plugins/develop-mobile.mdx b/Source/content/docs/develop/Plugins/develop-mobile.mdx similarity index 100% rename from src/content/docs/develop/Plugins/develop-mobile.mdx rename to Source/content/docs/develop/Plugins/develop-mobile.mdx diff --git a/src/content/docs/develop/Plugins/index.mdx b/Source/content/docs/develop/Plugins/index.mdx similarity index 100% rename from src/content/docs/develop/Plugins/index.mdx rename to Source/content/docs/develop/Plugins/index.mdx diff --git a/src/content/docs/develop/Tests/WebDriver/Example/index.mdx b/Source/content/docs/develop/Tests/WebDriver/Example/index.mdx similarity index 100% rename from src/content/docs/develop/Tests/WebDriver/Example/index.mdx rename to Source/content/docs/develop/Tests/WebDriver/Example/index.mdx diff --git a/src/content/docs/develop/Tests/WebDriver/Example/selenium.mdx b/Source/content/docs/develop/Tests/WebDriver/Example/selenium.mdx similarity index 100% rename from src/content/docs/develop/Tests/WebDriver/Example/selenium.mdx rename to Source/content/docs/develop/Tests/WebDriver/Example/selenium.mdx diff --git a/src/content/docs/develop/Tests/WebDriver/Example/webdriverio.mdx b/Source/content/docs/develop/Tests/WebDriver/Example/webdriverio.mdx similarity index 100% rename from src/content/docs/develop/Tests/WebDriver/Example/webdriverio.mdx rename to Source/content/docs/develop/Tests/WebDriver/Example/webdriverio.mdx diff --git a/src/content/docs/develop/Tests/WebDriver/ci.md b/Source/content/docs/develop/Tests/WebDriver/ci.md similarity index 100% rename from src/content/docs/develop/Tests/WebDriver/ci.md rename to Source/content/docs/develop/Tests/WebDriver/ci.md diff --git a/src/content/docs/develop/Tests/WebDriver/index.mdx b/Source/content/docs/develop/Tests/WebDriver/index.mdx similarity index 100% rename from src/content/docs/develop/Tests/WebDriver/index.mdx rename to Source/content/docs/develop/Tests/WebDriver/index.mdx diff --git a/src/content/docs/develop/Tests/index.mdx b/Source/content/docs/develop/Tests/index.mdx similarity index 100% rename from src/content/docs/develop/Tests/index.mdx rename to Source/content/docs/develop/Tests/index.mdx diff --git a/src/content/docs/develop/Tests/mocking.md b/Source/content/docs/develop/Tests/mocking.md similarity index 100% rename from src/content/docs/develop/Tests/mocking.md rename to Source/content/docs/develop/Tests/mocking.md diff --git a/src/content/docs/develop/_sections/frontend-listen.mdx b/Source/content/docs/develop/_sections/frontend-listen.mdx similarity index 100% rename from src/content/docs/develop/_sections/frontend-listen.mdx rename to Source/content/docs/develop/_sections/frontend-listen.mdx diff --git a/src/content/docs/develop/calling-frontend.mdx b/Source/content/docs/develop/calling-frontend.mdx similarity index 100% rename from src/content/docs/develop/calling-frontend.mdx rename to Source/content/docs/develop/calling-frontend.mdx diff --git a/src/content/docs/develop/calling-rust.mdx b/Source/content/docs/develop/calling-rust.mdx similarity index 100% rename from src/content/docs/develop/calling-rust.mdx rename to Source/content/docs/develop/calling-rust.mdx diff --git a/src/content/docs/develop/configuration-files.mdx b/Source/content/docs/develop/configuration-files.mdx similarity index 100% rename from src/content/docs/develop/configuration-files.mdx rename to Source/content/docs/develop/configuration-files.mdx diff --git a/src/content/docs/develop/index.mdx b/Source/content/docs/develop/index.mdx similarity index 100% rename from src/content/docs/develop/index.mdx rename to Source/content/docs/develop/index.mdx diff --git a/src/content/docs/develop/resources.mdx b/Source/content/docs/develop/resources.mdx similarity index 100% rename from src/content/docs/develop/resources.mdx rename to Source/content/docs/develop/resources.mdx diff --git a/src/content/docs/develop/sidecar.mdx b/Source/content/docs/develop/sidecar.mdx similarity index 100% rename from src/content/docs/develop/sidecar.mdx rename to Source/content/docs/develop/sidecar.mdx diff --git a/src/content/docs/develop/state-management.mdx b/Source/content/docs/develop/state-management.mdx similarity index 100% rename from src/content/docs/develop/state-management.mdx rename to Source/content/docs/develop/state-management.mdx diff --git a/src/content/docs/develop/updating-dependencies.mdx b/Source/content/docs/develop/updating-dependencies.mdx similarity index 100% rename from src/content/docs/develop/updating-dependencies.mdx rename to Source/content/docs/develop/updating-dependencies.mdx diff --git a/src/content/docs/distribute/Pipelines/crabnebula-cloud.mdx b/Source/content/docs/distribute/Pipelines/crabnebula-cloud.mdx similarity index 100% rename from src/content/docs/distribute/Pipelines/crabnebula-cloud.mdx rename to Source/content/docs/distribute/Pipelines/crabnebula-cloud.mdx diff --git a/src/content/docs/distribute/Pipelines/github.mdx b/Source/content/docs/distribute/Pipelines/github.mdx similarity index 100% rename from src/content/docs/distribute/Pipelines/github.mdx rename to Source/content/docs/distribute/Pipelines/github.mdx diff --git a/src/content/docs/distribute/Sign/android.mdx b/Source/content/docs/distribute/Sign/android.mdx similarity index 100% rename from src/content/docs/distribute/Sign/android.mdx rename to Source/content/docs/distribute/Sign/android.mdx diff --git a/src/content/docs/distribute/Sign/ios.mdx b/Source/content/docs/distribute/Sign/ios.mdx similarity index 100% rename from src/content/docs/distribute/Sign/ios.mdx rename to Source/content/docs/distribute/Sign/ios.mdx diff --git a/src/content/docs/distribute/Sign/linux.mdx b/Source/content/docs/distribute/Sign/linux.mdx similarity index 100% rename from src/content/docs/distribute/Sign/linux.mdx rename to Source/content/docs/distribute/Sign/linux.mdx diff --git a/src/content/docs/distribute/Sign/macos.mdx b/Source/content/docs/distribute/Sign/macos.mdx similarity index 100% rename from src/content/docs/distribute/Sign/macos.mdx rename to Source/content/docs/distribute/Sign/macos.mdx diff --git a/src/content/docs/distribute/Sign/windows.mdx b/Source/content/docs/distribute/Sign/windows.mdx similarity index 100% rename from src/content/docs/distribute/Sign/windows.mdx rename to Source/content/docs/distribute/Sign/windows.mdx diff --git a/src/content/docs/distribute/app-store.mdx b/Source/content/docs/distribute/app-store.mdx similarity index 100% rename from src/content/docs/distribute/app-store.mdx rename to Source/content/docs/distribute/app-store.mdx diff --git a/src/content/docs/distribute/appimage.mdx b/Source/content/docs/distribute/appimage.mdx similarity index 100% rename from src/content/docs/distribute/appimage.mdx rename to Source/content/docs/distribute/appimage.mdx diff --git a/src/content/docs/distribute/aur.mdx b/Source/content/docs/distribute/aur.mdx similarity index 100% rename from src/content/docs/distribute/aur.mdx rename to Source/content/docs/distribute/aur.mdx diff --git a/src/content/docs/distribute/crabnebula-cloud.mdx b/Source/content/docs/distribute/crabnebula-cloud.mdx similarity index 100% rename from src/content/docs/distribute/crabnebula-cloud.mdx rename to Source/content/docs/distribute/crabnebula-cloud.mdx diff --git a/src/content/docs/distribute/debian.mdx b/Source/content/docs/distribute/debian.mdx similarity index 100% rename from src/content/docs/distribute/debian.mdx rename to Source/content/docs/distribute/debian.mdx diff --git a/src/content/docs/distribute/dmg.mdx b/Source/content/docs/distribute/dmg.mdx similarity index 100% rename from src/content/docs/distribute/dmg.mdx rename to Source/content/docs/distribute/dmg.mdx diff --git a/src/content/docs/distribute/flatpak.mdx b/Source/content/docs/distribute/flatpak.mdx similarity index 100% rename from src/content/docs/distribute/flatpak.mdx rename to Source/content/docs/distribute/flatpak.mdx diff --git a/src/content/docs/distribute/google-play.mdx b/Source/content/docs/distribute/google-play.mdx similarity index 100% rename from src/content/docs/distribute/google-play.mdx rename to Source/content/docs/distribute/google-play.mdx diff --git a/src/content/docs/distribute/index.mdx b/Source/content/docs/distribute/index.mdx similarity index 100% rename from src/content/docs/distribute/index.mdx rename to Source/content/docs/distribute/index.mdx diff --git a/src/content/docs/distribute/macos-application-bundle.mdx b/Source/content/docs/distribute/macos-application-bundle.mdx similarity index 100% rename from src/content/docs/distribute/macos-application-bundle.mdx rename to Source/content/docs/distribute/macos-application-bundle.mdx diff --git a/src/content/docs/distribute/microsoft-store.mdx b/Source/content/docs/distribute/microsoft-store.mdx similarity index 100% rename from src/content/docs/distribute/microsoft-store.mdx rename to Source/content/docs/distribute/microsoft-store.mdx diff --git a/src/content/docs/distribute/rpm.mdx b/Source/content/docs/distribute/rpm.mdx similarity index 100% rename from src/content/docs/distribute/rpm.mdx rename to Source/content/docs/distribute/rpm.mdx diff --git a/src/content/docs/distribute/snapcraft.mdx b/Source/content/docs/distribute/snapcraft.mdx similarity index 100% rename from src/content/docs/distribute/snapcraft.mdx rename to Source/content/docs/distribute/snapcraft.mdx diff --git a/src/content/docs/distribute/windows-installer.mdx b/Source/content/docs/distribute/windows-installer.mdx similarity index 100% rename from src/content/docs/distribute/windows-installer.mdx rename to Source/content/docs/distribute/windows-installer.mdx diff --git a/src/content/docs/es/index.mdx b/Source/content/docs/es/index.mdx similarity index 100% rename from src/content/docs/es/index.mdx rename to Source/content/docs/es/index.mdx diff --git a/src/content/docs/es/plugin/dialog.mdx b/Source/content/docs/es/plugin/dialog.mdx similarity index 100% rename from src/content/docs/es/plugin/dialog.mdx rename to Source/content/docs/es/plugin/dialog.mdx diff --git a/src/content/docs/es/plugin/index.mdx b/Source/content/docs/es/plugin/index.mdx similarity index 100% rename from src/content/docs/es/plugin/index.mdx rename to Source/content/docs/es/plugin/index.mdx diff --git a/src/content/docs/es/start/frontend/index.mdx b/Source/content/docs/es/start/frontend/index.mdx similarity index 100% rename from src/content/docs/es/start/frontend/index.mdx rename to Source/content/docs/es/start/frontend/index.mdx diff --git a/src/content/docs/es/start/frontend/nextjs.mdx b/Source/content/docs/es/start/frontend/nextjs.mdx similarity index 100% rename from src/content/docs/es/start/frontend/nextjs.mdx rename to Source/content/docs/es/start/frontend/nextjs.mdx diff --git a/src/content/docs/es/start/frontend/nuxt.mdx b/Source/content/docs/es/start/frontend/nuxt.mdx similarity index 100% rename from src/content/docs/es/start/frontend/nuxt.mdx rename to Source/content/docs/es/start/frontend/nuxt.mdx diff --git a/src/content/docs/es/start/frontend/trunk.mdx b/Source/content/docs/es/start/frontend/trunk.mdx similarity index 100% rename from src/content/docs/es/start/frontend/trunk.mdx rename to Source/content/docs/es/start/frontend/trunk.mdx diff --git a/src/content/docs/es/start/migrate/from-tauri-1.mdx b/Source/content/docs/es/start/migrate/from-tauri-1.mdx similarity index 100% rename from src/content/docs/es/start/migrate/from-tauri-1.mdx rename to Source/content/docs/es/start/migrate/from-tauri-1.mdx diff --git a/src/content/docs/es/start/prerequisites.mdx b/Source/content/docs/es/start/prerequisites.mdx similarity index 100% rename from src/content/docs/es/start/prerequisites.mdx rename to Source/content/docs/es/start/prerequisites.mdx diff --git a/src/content/docs/es/start/visual-studio-build-tools-installer.png b/Source/content/docs/es/start/visual-studio-build-tools-installer.png similarity index 100% rename from src/content/docs/es/start/visual-studio-build-tools-installer.png rename to Source/content/docs/es/start/visual-studio-build-tools-installer.png diff --git a/src/content/docs/fr/develop/Debug/application.mdx b/Source/content/docs/fr/develop/Debug/application.mdx similarity index 100% rename from src/content/docs/fr/develop/Debug/application.mdx rename to Source/content/docs/fr/develop/Debug/application.mdx diff --git a/src/content/docs/fr/develop/Debug/vscode.mdx b/Source/content/docs/fr/develop/Debug/vscode.mdx similarity index 100% rename from src/content/docs/fr/develop/Debug/vscode.mdx rename to Source/content/docs/fr/develop/Debug/vscode.mdx diff --git a/src/content/docs/fr/develop/development-cycle.mdx b/Source/content/docs/fr/develop/development-cycle.mdx similarity index 100% rename from src/content/docs/fr/develop/development-cycle.mdx rename to Source/content/docs/fr/develop/development-cycle.mdx diff --git a/src/content/docs/fr/develop/updating-dependencies.mdx b/Source/content/docs/fr/develop/updating-dependencies.mdx similarity index 100% rename from src/content/docs/fr/develop/updating-dependencies.mdx rename to Source/content/docs/fr/develop/updating-dependencies.mdx diff --git a/src/content/docs/fr/distribute/debian.mdx b/Source/content/docs/fr/distribute/debian.mdx similarity index 100% rename from src/content/docs/fr/distribute/debian.mdx rename to Source/content/docs/fr/distribute/debian.mdx diff --git a/src/content/docs/fr/index.mdx b/Source/content/docs/fr/index.mdx similarity index 100% rename from src/content/docs/fr/index.mdx rename to Source/content/docs/fr/index.mdx diff --git a/src/content/docs/fr/plugin/index.mdx b/Source/content/docs/fr/plugin/index.mdx similarity index 100% rename from src/content/docs/fr/plugin/index.mdx rename to Source/content/docs/fr/plugin/index.mdx diff --git a/src/content/docs/fr/plugin/notification.mdx b/Source/content/docs/fr/plugin/notification.mdx similarity index 100% rename from src/content/docs/fr/plugin/notification.mdx rename to Source/content/docs/fr/plugin/notification.mdx diff --git a/src/content/docs/fr/start/frontend/index.mdx b/Source/content/docs/fr/start/frontend/index.mdx similarity index 100% rename from src/content/docs/fr/start/frontend/index.mdx rename to Source/content/docs/fr/start/frontend/index.mdx diff --git a/src/content/docs/fr/start/frontend/nextjs.mdx b/Source/content/docs/fr/start/frontend/nextjs.mdx similarity index 100% rename from src/content/docs/fr/start/frontend/nextjs.mdx rename to Source/content/docs/fr/start/frontend/nextjs.mdx diff --git a/src/content/docs/fr/start/frontend/nuxt.mdx b/Source/content/docs/fr/start/frontend/nuxt.mdx similarity index 100% rename from src/content/docs/fr/start/frontend/nuxt.mdx rename to Source/content/docs/fr/start/frontend/nuxt.mdx diff --git a/src/content/docs/fr/start/frontend/trunk.mdx b/Source/content/docs/fr/start/frontend/trunk.mdx similarity index 100% rename from src/content/docs/fr/start/frontend/trunk.mdx rename to Source/content/docs/fr/start/frontend/trunk.mdx diff --git a/src/content/docs/fr/start/migrate/from-tauri-1.mdx b/Source/content/docs/fr/start/migrate/from-tauri-1.mdx similarity index 100% rename from src/content/docs/fr/start/migrate/from-tauri-1.mdx rename to Source/content/docs/fr/start/migrate/from-tauri-1.mdx diff --git a/src/content/docs/fr/start/prerequisites.mdx b/Source/content/docs/fr/start/prerequisites.mdx similarity index 100% rename from src/content/docs/fr/start/prerequisites.mdx rename to Source/content/docs/fr/start/prerequisites.mdx diff --git a/src/content/docs/fr/start/visual-studio-build-tools-installer.png b/Source/content/docs/fr/start/visual-studio-build-tools-installer.png similarity index 100% rename from src/content/docs/fr/start/visual-studio-build-tools-installer.png rename to Source/content/docs/fr/start/visual-studio-build-tools-installer.png diff --git a/src/content/docs/index.mdx b/Source/content/docs/index.mdx similarity index 100% rename from src/content/docs/index.mdx rename to Source/content/docs/index.mdx diff --git a/Source/content/docs/it/develop/Debug/vscode.mdx b/Source/content/docs/it/develop/Debug/vscode.mdx new file mode 100644 index 0000000000..767fe2f77c --- /dev/null +++ b/Source/content/docs/it/develop/Debug/vscode.mdx @@ -0,0 +1,84 @@ +--- +title: Debug in VS Code +description: Suggerimenti e trucchi per il flusso di lavoro di debug +--- + +## Prerequisiti + +Installa l'estensione [`vscode-lldb`][]. + +## Configura launch.json + +Crea un file `.vscode/launch.json` e incolla il contenuto JSON sottostante in esso: + +```json title=".vscode/launch.json" +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "lldb", + "request": "launch", + "name": "Tauri Development Debug", + "cargo": { + "args": [ + "build", + "--manifest-path=./src-tauri/Cargo.toml", + "--no-default-features" + ] + }, + // task for the `beforeDevCommand` if used, must be configured in `.vscode/tasks.json` + "preLaunchTask": "ui:dev" + }, + { + "type": "lldb", + "request": "launch", + "name": "Tauri Production Debug", + "cargo": { + "args": ["build", "--release", "--manifest-path=./src-tauri/Cargo.toml"] + }, + // task for the `beforeBuildCommand` if used, must be configured in `.vscode/tasks.json` + "preLaunchTask": "ui:build" + } + ] +} +``` + +Questo utilizza `cargo` direttamente per costruire l'applicazione Rust e caricarlo sia in modalità di sviluppo che di produzione. + +Nota che non utilizza il Tauri CLI, quindi le esclusive funzioni CLI non vengono eseguite. Gli script `beforeDevCommand` e `beforeBuildCommand` devono essere eseguiti in anticipo o configurati come task nel campo `preLaunchTask`. Di seguito trovate come esempio il file `.vscode/tasks.json` che ha due task, uno per un `beforeDevCommand` che genera un server di sviluppo e uno per `beforeBuildCommand`: + +```json title=".vscode/tasks.json" +{ + // See https://go.microsoft.com/fwlink/?LinkId=733558 + // for the documentation about the tasks.json format + "version": "2.0.0", + "tasks": [ + { + "label": "ui:dev", + "type": "shell", + // `dev` keeps running in the background + // ideally you should also configure a `problemMatcher` + // see https://code.visualstudio.com/docs/editor/tasks#_can-a-background-task-be-used-as-a-prelaunchtask-in-launchjson + "isBackground": true, + // change this to your `beforeDevCommand`: + "command": "yarn", + "args": ["dev"] + }, + { + "label": "ui:build", + "type": "shell", + // change this to your `beforeBuildCommand`: + "command": "yarn", + "args": ["build"] + } + ] +} +``` + +Ora puoi impostare breakpoint in `src-tauri/src/main.rs` o in qualsiasi altro file Rust e iniziare il processo di debug premendo `F5`. + +[`vscode-lldb`]: https://marketplace.visualstudio.com/items?itemName=vadimcn.vscode-lldb +[Core Process of your Tauri app]: https://tauri.app/v1/reference/architecture/process-model#the-core-process diff --git a/src/content/docs/it/develop/index.mdx b/Source/content/docs/it/develop/index.mdx similarity index 100% rename from src/content/docs/it/develop/index.mdx rename to Source/content/docs/it/develop/index.mdx diff --git a/src/content/docs/learn/Security/capabilities-for-windows-and-platforms.mdx b/Source/content/docs/learn/Security/capabilities-for-windows-and-platforms.mdx similarity index 100% rename from src/content/docs/learn/Security/capabilities-for-windows-and-platforms.mdx rename to Source/content/docs/learn/Security/capabilities-for-windows-and-platforms.mdx diff --git a/src/content/docs/learn/Security/using-plugin-permissions.mdx b/Source/content/docs/learn/Security/using-plugin-permissions.mdx similarity index 100% rename from src/content/docs/learn/Security/using-plugin-permissions.mdx rename to Source/content/docs/learn/Security/using-plugin-permissions.mdx diff --git a/src/content/docs/learn/Security/writing-plugin-permissions.mdx b/Source/content/docs/learn/Security/writing-plugin-permissions.mdx similarity index 100% rename from src/content/docs/learn/Security/writing-plugin-permissions.mdx rename to Source/content/docs/learn/Security/writing-plugin-permissions.mdx diff --git a/src/content/docs/learn/index.mdx b/Source/content/docs/learn/index.mdx similarity index 100% rename from src/content/docs/learn/index.mdx rename to Source/content/docs/learn/index.mdx diff --git a/src/content/docs/learn/sidecar-nodejs.mdx b/Source/content/docs/learn/sidecar-nodejs.mdx similarity index 100% rename from src/content/docs/learn/sidecar-nodejs.mdx rename to Source/content/docs/learn/sidecar-nodejs.mdx diff --git a/src/content/docs/learn/splashscreen.mdx b/Source/content/docs/learn/splashscreen.mdx similarity index 100% rename from src/content/docs/learn/splashscreen.mdx rename to Source/content/docs/learn/splashscreen.mdx diff --git a/src/content/docs/learn/system-tray.mdx b/Source/content/docs/learn/system-tray.mdx similarity index 100% rename from src/content/docs/learn/system-tray.mdx rename to Source/content/docs/learn/system-tray.mdx diff --git a/src/content/docs/learn/window-customization.mdx b/Source/content/docs/learn/window-customization.mdx similarity index 100% rename from src/content/docs/learn/window-customization.mdx rename to Source/content/docs/learn/window-customization.mdx diff --git a/src/content/docs/plugin/autostart.mdx b/Source/content/docs/plugin/autostart.mdx similarity index 100% rename from src/content/docs/plugin/autostart.mdx rename to Source/content/docs/plugin/autostart.mdx diff --git a/src/content/docs/plugin/barcode-scanner.mdx b/Source/content/docs/plugin/barcode-scanner.mdx similarity index 100% rename from src/content/docs/plugin/barcode-scanner.mdx rename to Source/content/docs/plugin/barcode-scanner.mdx diff --git a/src/content/docs/plugin/biometric.mdx b/Source/content/docs/plugin/biometric.mdx similarity index 100% rename from src/content/docs/plugin/biometric.mdx rename to Source/content/docs/plugin/biometric.mdx diff --git a/src/content/docs/plugin/cli.mdx b/Source/content/docs/plugin/cli.mdx similarity index 100% rename from src/content/docs/plugin/cli.mdx rename to Source/content/docs/plugin/cli.mdx diff --git a/src/content/docs/plugin/clipboard.mdx b/Source/content/docs/plugin/clipboard.mdx similarity index 100% rename from src/content/docs/plugin/clipboard.mdx rename to Source/content/docs/plugin/clipboard.mdx diff --git a/src/content/docs/plugin/deep-linking.mdx b/Source/content/docs/plugin/deep-linking.mdx similarity index 100% rename from src/content/docs/plugin/deep-linking.mdx rename to Source/content/docs/plugin/deep-linking.mdx diff --git a/src/content/docs/plugin/dialog.mdx b/Source/content/docs/plugin/dialog.mdx similarity index 100% rename from src/content/docs/plugin/dialog.mdx rename to Source/content/docs/plugin/dialog.mdx diff --git a/src/content/docs/plugin/file-system.mdx b/Source/content/docs/plugin/file-system.mdx similarity index 100% rename from src/content/docs/plugin/file-system.mdx rename to Source/content/docs/plugin/file-system.mdx diff --git a/src/content/docs/plugin/global-shortcut.mdx b/Source/content/docs/plugin/global-shortcut.mdx similarity index 100% rename from src/content/docs/plugin/global-shortcut.mdx rename to Source/content/docs/plugin/global-shortcut.mdx diff --git a/src/content/docs/plugin/http-client.mdx b/Source/content/docs/plugin/http-client.mdx similarity index 100% rename from src/content/docs/plugin/http-client.mdx rename to Source/content/docs/plugin/http-client.mdx diff --git a/src/content/docs/plugin/index.mdx b/Source/content/docs/plugin/index.mdx similarity index 100% rename from src/content/docs/plugin/index.mdx rename to Source/content/docs/plugin/index.mdx diff --git a/src/content/docs/plugin/localhost.mdx b/Source/content/docs/plugin/localhost.mdx similarity index 100% rename from src/content/docs/plugin/localhost.mdx rename to Source/content/docs/plugin/localhost.mdx diff --git a/src/content/docs/plugin/logging.mdx b/Source/content/docs/plugin/logging.mdx similarity index 100% rename from src/content/docs/plugin/logging.mdx rename to Source/content/docs/plugin/logging.mdx diff --git a/src/content/docs/plugin/nfc.mdx b/Source/content/docs/plugin/nfc.mdx similarity index 100% rename from src/content/docs/plugin/nfc.mdx rename to Source/content/docs/plugin/nfc.mdx diff --git a/src/content/docs/plugin/notification.mdx b/Source/content/docs/plugin/notification.mdx similarity index 100% rename from src/content/docs/plugin/notification.mdx rename to Source/content/docs/plugin/notification.mdx diff --git a/src/content/docs/plugin/os-info.mdx b/Source/content/docs/plugin/os-info.mdx similarity index 100% rename from src/content/docs/plugin/os-info.mdx rename to Source/content/docs/plugin/os-info.mdx diff --git a/src/content/docs/plugin/persisted-scope.mdx b/Source/content/docs/plugin/persisted-scope.mdx similarity index 100% rename from src/content/docs/plugin/persisted-scope.mdx rename to Source/content/docs/plugin/persisted-scope.mdx diff --git a/src/content/docs/plugin/positioner.mdx b/Source/content/docs/plugin/positioner.mdx similarity index 100% rename from src/content/docs/plugin/positioner.mdx rename to Source/content/docs/plugin/positioner.mdx diff --git a/src/content/docs/plugin/process.mdx b/Source/content/docs/plugin/process.mdx similarity index 100% rename from src/content/docs/plugin/process.mdx rename to Source/content/docs/plugin/process.mdx diff --git a/src/content/docs/plugin/shell.mdx b/Source/content/docs/plugin/shell.mdx similarity index 100% rename from src/content/docs/plugin/shell.mdx rename to Source/content/docs/plugin/shell.mdx diff --git a/src/content/docs/plugin/single-instance.mdx b/Source/content/docs/plugin/single-instance.mdx similarity index 100% rename from src/content/docs/plugin/single-instance.mdx rename to Source/content/docs/plugin/single-instance.mdx diff --git a/src/content/docs/plugin/sql.mdx b/Source/content/docs/plugin/sql.mdx similarity index 100% rename from src/content/docs/plugin/sql.mdx rename to Source/content/docs/plugin/sql.mdx diff --git a/src/content/docs/plugin/store.mdx b/Source/content/docs/plugin/store.mdx similarity index 100% rename from src/content/docs/plugin/store.mdx rename to Source/content/docs/plugin/store.mdx diff --git a/src/content/docs/plugin/stronghold.mdx b/Source/content/docs/plugin/stronghold.mdx similarity index 100% rename from src/content/docs/plugin/stronghold.mdx rename to Source/content/docs/plugin/stronghold.mdx diff --git a/Source/content/docs/plugin/system-tray.mdx b/Source/content/docs/plugin/system-tray.mdx new file mode 100644 index 0000000000..9f77a1ff13 --- /dev/null +++ b/Source/content/docs/plugin/system-tray.mdx @@ -0,0 +1,316 @@ +--- +title: System Tray +sidebar: + order: 1 +tableOfContents: + maxHeadingLevel: 4 +--- + +import { Icon } from '@astrojs/starlight/components'; +import { Tabs, TabItem } from '@astrojs/starlight/components'; + +Tauri allows you to create and customize a system tray for your application. +This can enhance the user experience by providing quick access to common actions. + +## Configuration + +First of all, update your `Cargo.toml` to include the necessary feature for the system tray. + +```toml title="src-tauri/Cargo.toml" +tauri = { version = "2.0.0", features = [ "tray-icon" ] } +``` + +## Usage + +The tray API is available in both JavaScript and Rust. + +### Create a Tray Icon + + + +Use the [`TrayIcon.new`] static function to create a new tray icon: + +```javascript +import { TrayIcon } from '@tauri-apps/api/tray'; + +const options = { + // here you can add a tray menu, title, tooltip, event handler, etc +}; + +const tray = await TrayIcon.new(options); +``` + +See [`TrayIconOptions`] for more information on the customization options. + + + + + +```rust +use tauri::tray::TrayIconBuilder; + +tauri::Builder::default() +.setup(|app| { +let tray = TrayIconBuilder::new().build(app)?; +Ok(()) +}) + +``` + +See [`TrayIconBuilder`] for more information on customization options. + + + + +### Change the Tray Icon + +When creating the tray you can use the application icon as the tray icon: + + + + +```javascript +import { TrayIcon } from '@tauri-apps/api/tray'; +import { defaultWindowIcon } from '@tauri-apps/api/app'; + +const options = { + icon: await defaultWindowIcon(), +}; + +const tray = await TrayIcon.new(options); +``` + + + + + +```rust +let tray = TrayIconBuilder::new() + .icon(app.default_window_icon().unwrap().clone()) + .build(app)?; +``` + + + + +### Add a Menu + +To attach a menu that is displayed when the tray is clicked, you can use the `menu` option. + +:::note +By default the menu is displayed on both left and right clicks. + +To prevent the menu from popping up on left click, call the [`menu_on_left_click(false)`][TrayIconBuilder::menu_on_left_click] Rust function +or set the [`menuOnLeftClick`] JavaScript option to `false`. +::: + +{/* TODO: link to the menu plugin documentation page */} + + + + +```javascript +import { TrayIcon } from '@tauri-apps/api/tray'; +import { Menu } from '@tauri-apps/api/menu'; + +const menu = await Menu.new({ + items: [ + { + id: 'quit', + text: 'Quit', + }, + ], +}); + +const options = { + menu, + menuOnLeftClick: true, +}; + +const tray = await TrayIcon.new(options); +``` + + + + + +```rust +use tauri::{ + menu::{Menu, MenuItem}, + tray::TrayIconBuilder, +}; + +let quit_i = MenuItem::with_id(app, "quit", "Quit", true, None::<&str>)?; +let menu = Menu::with_items(app, &[&quit_i])?; + +let tray = TrayIconBuilder::new() + .menu(&menu) + .menu_on_left_click(true) + .build(app)?; +``` + + + + +#### Listen to Menu Events + + + +On JavaScript you can attach a menu click event listener directly to the menu item: + +- Using a shared menu click handler + + ```javascript + import { Menu } from '@tauri-apps/api/menu'; + + function onTrayMenuClick(itemId) { + // itemId === 'quit' + } + + const menu = await Menu.new({ + items: [ + { + id: 'quit', + text: 'Quit', + action: onTrayMenuClick, + }, + ], + }); + ``` + +- Using a dedicated menu click handler + + ```javascript + import { Menu } from '@tauri-apps/api/menu'; + + const menu = await Menu.new({ + items: [ + { + id: 'quit', + text: 'Quit', + action: () => { + console.log('quit pressed'); + }, + }, + ], + }); + ``` + + + + +Use the [`TrayIconBuilder::on_menu_event`] method to attach a tray menu click event listener: + +```rust +use tauri::tray::TrayIconBuilder; + +TrayIconBuilder::new() + .on_menu_event(|app, event| match event.id.as_ref() { + "quit" => { + println!("quit menu item was clicked"); + app.exit(0); + } + _ => { + println!("menu item {:?} not handled", event.id); + } + }) +``` + + + + +### Listen to Tray Events + +The tray icon emits events for the following mouse events: + +- click: triggered when the cursor receives a single left, right or middle click, including information on whether the mouse press was released or not +- Double click: triggered when the cursor receives a double left, right or middle click +- Enter: triggered when the cursor enters the tray icon area +- Move: triggered when the cursor moves around the tray icon area +- Leave: triggered when the cursor leaves the tray icon area + + + + +```javascript +import { TrayIcon } from '@tauri-apps/api/tray'; + +const options = { + action: (event) => { + switch (event.type) { + case 'Click': + console.log( + `mouse ${event.button} button pressed, state: ${event.buttonState}` + ); + break; + case 'DoubleClick': + console.log(`mouse ${event.button} button pressed`); + break; + case 'Enter': + console.log( + `mouse hovered tray at ${event.rect.position.x}, ${event.rect.position.y}` + ); + break; + case 'Move': + console.log( + `mouse moved on tray at ${event.rect.position.x}, ${event.rect.position.y}` + ); + break; + case 'Leave': + console.log( + `mouse left tray at ${event.rect.position.x}, ${event.rect.position.y}` + ); + break; + } + }, +}; + +const tray = await TrayIcon.new(options); +``` + +See [`TrayIconEvent`][js TrayIconEvent] for more information on the event payload. + + + + + +```rust +use tauri::{ + Manager, + tray::{MouseButton, MouseButtonState, TrayIconBuilder, TrayIconEvent} +}; + +TrayIconBuilder::new() + .on_tray_icon_event(|tray, event| match event { + TrayIconEvent::Click { + button: MouseButton::Left, + button_state: MouseButtonState::Up, + .. + } => { + println!("left click pressed and released"); + // in this example, let's show and focus the main window when the tray is clicked + let app = tray.app_handle(); + if let Some(window) = app.get_webview_window("main") { + let _ = window.show(); + let _ = window.set_focus(); + } + } + _ => { + println!("unhandled event {event:?}"); + } + }) +``` + +See [`TrayIconEvent`][rust TrayIconEvent] for more information on the event type. + + + + +[`TrayIcon.new`]: /reference/javascript/api/namespacetray/#new +[`TrayIconOptions`]: /reference/javascript/api/namespacetray/#trayiconoptions +[`TrayIconBuilder`]: https://docs.rs/tauri/2.0.0/tauri/tray/struct.TrayIconBuilder.html +[TrayIconBuilder::menu_on_left_click]: https://docs.rs/tauri/2.0.0/tauri/tray/struct.TrayIconBuilder.html#method.menu_on_left_click +[`menuOnLeftClick`]: /reference/javascript/api/namespacetray/#properties-1 +[`TrayIconBuilder::on_menu_event`]: https://docs.rs/tauri/2.0.0/tauri/tray/struct.TrayIconBuilder.html#method.on_menu_event +[js TrayIconEvent]: /reference/javascript/api/namespacetray/#trayiconevent +[rust TrayIconEvent]: https://docs.rs/tauri/2.0.0/tauri/tray/enum.TrayIconEvent.html diff --git a/src/content/docs/plugin/updater.mdx b/Source/content/docs/plugin/updater.mdx similarity index 100% rename from src/content/docs/plugin/updater.mdx rename to Source/content/docs/plugin/updater.mdx diff --git a/src/content/docs/plugin/upload.mdx b/Source/content/docs/plugin/upload.mdx similarity index 100% rename from src/content/docs/plugin/upload.mdx rename to Source/content/docs/plugin/upload.mdx diff --git a/src/content/docs/plugin/websocket.mdx b/Source/content/docs/plugin/websocket.mdx similarity index 100% rename from src/content/docs/plugin/websocket.mdx rename to Source/content/docs/plugin/websocket.mdx diff --git a/Source/content/docs/plugin/window-customization.mdx b/Source/content/docs/plugin/window-customization.mdx new file mode 100644 index 0000000000..3111c07879 --- /dev/null +++ b/Source/content/docs/plugin/window-customization.mdx @@ -0,0 +1,265 @@ +--- +title: Window Customization +sidebar: + order: 1 +tableOfContents: + maxHeadingLevel: 4 +--- + +import { Icon } from '@astrojs/starlight/components'; + +Tauri provides lots of options for customizing the look and feel of your app's window. You can create custom titlebars, have transparent windows, enforce size constraints, and more. + +## Configuration + +There are three ways to change the window configuration: + +- [Through + tauri.conf.json](/reference/config/#windowconfig) +- [Through the JavaScript + API](/reference/javascript/api/namespacewindow/#window) +- [Through the Window in + Rust](https://docs.rs/tauri/2.0.0/tauri/window/struct.Window.html) + +## Usage + +- [Creating a Custom Titlebar](#creating-a-custom-titlebar) +- [(macOS) Transparent Titlebar with Custom Window Background Color](#macos-transparent-titlebar-with-custom-window-background-color) + +### Creating a Custom Titlebar + +A common use of these window features is creating a custom titlebar. This short tutorial will guide you through that process. + +:::note +For macOS, using a custom titlebar will also lose some features provided by the system, such as [moving or aligning the window](https://support.apple.com/guide/mac-help/work-with-app-windows-mchlp2469/mac). Another approach to customizing the titlebar but keeping native functions could be making the titlebar transparent and setting the window background color. See the usage [(macOS) Transparent Titlebar with Custom Window Background Color](#macos-transparent-titlebar-with-custom-window-background-color). +::: + +#### tauri.conf.json + +Set `decorations` to `false` in your `tauri.conf.json`: + +```json title="tauri.conf.json" {4} +"tauri": { + "windows": [ + { + "decorations": false + } + ] +} +``` + +#### Permissions + +Add window permissions in capability file. + +By default, all plugin commands are blocked and cannot be accessed. You must define a list of permissions in your `capabilities` configuration. + +See the [Capabilities Overview](/security/capabilities/) for more information and the [step by step guide](/learn/security/using-plugin-permissions/) to use plugin permissions. + +```json title="src-tauri/capabilities/default.json" ins={6} +{ + "$schema": "../gen/schemas/desktop-schema.json", + "identifier": "main-capability", + "description": "Capability for the main window", + "windows": ["main"], + "permissions": ["core:window:default", "core:window:allow-start-dragging"] +} +``` + +| Permission | Description | +| -------------------------------------------- | ------------------------------------------------------------------------------ | +| `core:window:default` | Default permissions for the plugin. Except `window:allow-start-dragging`. | +| `core:window:allow-close` | Enables the close command without any pre-configured scope. | +| `core:window:allow-minimize` | Enables the minimize command without any pre-configured scope. | +| `core:window:allow-start-dragging` | Enables the start_dragging command without any pre-configured scope. | +| `core:window:allow-toggle-maximize` | Enables the toggle_maximize command without any pre-configured scope. | +| `core:window:allow-internal-toggle-maximize` | Enables the internal_toggle_maximize command without any pre-configured scope. | + +#### CSS + +Add this CSS sample to keep it at the top of the screen and style the buttons: + +```css +.titlebar { + height: 30px; + background: #329ea3; + user-select: none; + display: flex; + justify-content: flex-end; + position: fixed; + top: 0; + left: 0; + right: 0; +} +.titlebar-button { + display: inline-flex; + justify-content: center; + align-items: center; + width: 30px; + height: 30px; + user-select: none; + -webkit-user-select: none; +} +.titlebar-button:hover { + background: #5bbec3; +} +``` + +#### HTML + +Put this at the top of your `` tag: + +```html +
+
+ minimize +
+
+ maximize +
+
+ close +
+
+``` + +Note that you may need to move the rest of your content down so that the titlebar doesn't cover it. + +#### JavaScript + +Use this code snippet to make the buttons work: + +```javascript +import { getCurrentWindow } from '@tauri-apps/api/window'; + +// when using `"withGlobalTauri": true`, you may use +// const { getCurrentWindow } = window.__TAURI__.window; + +const appWindow = getCurrentWindow(); + +document + .getElementById('titlebar-minimize') + ?.addEventListener('click', () => appWindow.minimize()); +document + .getElementById('titlebar-maximize') + ?.addEventListener('click', () => appWindow.toggleMaximize()); +document + .getElementById('titlebar-close') + ?.addEventListener('click', () => appWindow.close()); +``` + +Note that if you are using a Rust-based frontend, you can copy the code above into a `