feat: site restructuring (#2082)

* merge conflicts resolved

* fix: link validation

* fix: ordering

* fix: js renamed to javascript

* fix: removed accidentally committed generated files

* fix: removed tauri

* fix: added tauri

* fix: releases should only be built in prod
This commit is contained in:
Simon Hyll
2024-04-22 21:33:22 +02:00
committed by GitHub
parent 2e826c783b
commit dfc1f3bc5c
210 changed files with 936 additions and 1329 deletions

9
.gitmodules vendored
View File

@@ -1,13 +1,10 @@
[submodule "packages/tauri-v2"]
path = packages/tauri-v2
url = https://github.com/tauri-apps/tauri.git
[submodule "packages/plugins-workspace"]
path = packages/plugins-workspace
url = https://github.com/tauri-apps/plugins-workspace.git
branch = v2
[submodule "packages/tauri-v1"]
path = packages/tauri-v1
url = https://github.com/tauri-apps/tauri.git
[submodule "packages/awesome-tauri"]
path = packages/awesome-tauri
url = https://github.com/tauri-apps/awesome-tauri
[submodule "packages/tauri"]
path = packages/tauri
url = https://github.com/tauri-apps/tauri.git

View File

@@ -93,6 +93,12 @@ export default defineConfig({
tag: 'meta',
attrs: { property: 'twitter:image', content: site + '/og.png?v=1' },
},
{
tag: 'script',
attrs: {
src: '/navigate.js'
}
},
],
// TODO: Be sure this is updated when the branch is switched
editLink: {
@@ -102,175 +108,44 @@ export default defineConfig({
sidebar: [
{
label: 'Quick Start',
translations: {
'zh-CN': '快速开始',
},
collapsed: true,
items: [
{
label: 'What is Tauri?',
translations: {
'zh-CN': '什么是 Tauri?',
},
link: 'guides',
},
{
label: 'Prerequisites',
translations: {
es: 'Prerrequisitos',
'zh-CN': '前置条件',
},
link: 'guides/prerequisites',
},
{
label: 'Create a Project',
translations: {
'zh-CN': '创建项目',
},
link: 'guides/create',
},
{
label: 'Frontend Configuration',
translations: {
es: 'Configuración del Frontend',
'zh-CN': '前端配置',
},
link: 'guides/frontend',
},
{
label: 'Upgrade & Migrate',
translations: {
'zh-CN': '升级和迁移',
},
link: 'guides/upgrade-migrate',
},
{
label: 'Core Concepts',
translations: {
'zh-CN': '核心概念',
},
link: 'concepts',
},
{
label: 'Troubleshooting',
translations: {
'zh-CN': '故障排除',
},
link: 'guides/troubleshoot',
},
],
autogenerate: { directory: 'start' },
},
{
label: 'Guides',
translations: {
'zh-CN': '指引',
},
label: 'Core Concepts',
collapsed: true,
items: [
{
label: 'Develop',
translations: {
'zh-CN': '开发',
},
link: 'guides/develop/',
},
{
label: 'Debug',
translations: {
'zh-CN': '调试',
},
link: 'guides/debug/',
},
{
label: 'Test',
translations: {
'zh-CN': '测试',
},
link: 'guides/test',
},
{
label: 'Build',
translations: {
'zh-CN': '构建',
},
link: 'guides/build',
},
{
label: 'Distribute',
translations: {
'zh-CN': '分发',
},
link: 'guides/distribute',
},
{
label: 'Plugin Development',
translations: {
'zh-CN': '插件开发',
},
link: 'guides/plugins',
},
],
autogenerate: { directory: 'concepts' },
},
{
label: 'References',
translations: {
'zh-CN': '参考',
},
label: 'Security',
collapsed: true,
items: [
{
label: 'List of References',
translations: {
'zh-CN': '参考列表',
},
link: '/references',
},
{
label: 'Tauri Configuration',
translations: {
'zh-CN': 'Tauri 配置',
},
link: '/references/v2/config',
},
{
label: 'Access Control List',
translations: {
'zh-CN': '访问控制列表ACL',
},
link: '/references/v2/acl',
},
{
label: 'Command Line Interface (CLI)',
translations: {
'zh-CN': '命令行接口CLI',
},
link: '/references/v2/cli',
},
{
label: 'JavaScript API',
translations: {
'zh-CN': 'JavaScript 接口',
},
link: '/references/v2/js',
},
{
label: 'Rust API (via Docs.rs)',
translations: {
'zh-CN': 'Rust 接口',
},
// TODO: Is there a way to link this to the latest pre-released version?
link: 'https://docs.rs/tauri/~2.0.0-beta',
},
],
autogenerate: { directory: 'security' },
},
{
label: 'Develop',
collapsed: true,
autogenerate: { directory: 'develop' },
},
{
label: 'Test',
collapsed: true,
autogenerate: { directory: 'test' },
},
{
label: 'Distribute',
collapsed: true,
autogenerate: { directory: 'distribute' },
},
{
label: 'Features & Recipes',
translations: {
'zh-CN': '功能和秘诀',
},
collapsed: true,
autogenerate: { directory: 'features' },
},
{
label: 'References',
collapsed: true,
autogenerate: { directory: 'references' },
},
],
locales,
lastUpdated: true,
@@ -331,7 +206,7 @@ export default defineConfig({
...i18nRedirect('/v1/guides/testing/webdriver/introduction', '/guides/test/webdriver/'),
...i18nRedirect(
'/v1/guides/testing/webdriver/example/setup',
'/guides/test/webdriver/example/setup'
'/guides/test/webdriver/example/'
),
...i18nRedirect(
'/v1/guides/testing/webdriver/example/selenium',
@@ -339,7 +214,7 @@ export default defineConfig({
),
...i18nRedirect(
'/v1/guides/testing/webdriver/example/webdriverio',
'/guides/test/webdriver/example/webdriverio'
'/test/webdriver/example/webdriverio'
),
// v1 /references

View File

@@ -6,10 +6,9 @@
"version": "0.0.1",
"scripts": {
"dev:setup:submodules": "git submodule update --init",
"dev:setup:tauri-v1": "yarn --cwd packages/tauri-v1/tooling/api",
"dev:setup:tauri-v2": "yarn --cwd packages/tauri-v2/tooling/api",
"dev:setup:tauri": "yarn --cwd packages/tauri/tooling/api",
"dev:setup:plugins-workspace": "pnpm --prefix packages/plugins-workspace install",
"dev:setup": "pnpm dev:setup:submodules && pnpm dev:setup:tauri-v1 && pnpm dev:setup:tauri-v2 && pnpm dev:setup:plugins-workspace",
"dev:setup": "pnpm dev:setup:submodules && pnpm dev:setup:tauri && pnpm dev:setup:plugins-workspace",
"dev": "astro dev",
"format": "prettier -w --cache --plugin prettier-plugin-astro .",
"build:references": "pnpm --filter js-api-generator run build",

View File

@@ -3,12 +3,8 @@ import { existsSync, writeFileSync } from 'node:fs';
import { slug } from 'github-slugger';
buildConfig(
'../tauri-v1/core/tauri-config-schema/schema.json',
'../../src/content/docs/references/v1/config.md'
);
buildConfig(
'../tauri-v2/core/tauri-config-schema/schema.json',
'../../src/content/docs/references/v2/config.md'
'../tauri/core/tauri-config-schema/schema.json',
'../../src/content/docs/references/config.md'
);
async function buildConfig(schemaFile: string, outputFile: string) {
@@ -19,7 +15,7 @@ async function buildConfig(schemaFile: string, outputFile: string) {
let schema: JSONSchema7 = (await import(schemaFile)).default;
const output = [
'---\n# NOTE: This file is auto-generated in packages/config-generator/build.ts\n# For corrections please edit https://github.com/tauri-apps/tauri/blob/dev/core/tauri-utils/src/config.rs directly\n\ntitle: Configuration\n---',
'---\n# NOTE: This file is auto-generated in packages/config-generator/build.ts\n# For corrections please edit https://github.com/tauri-apps/tauri/blob/dev/core/tauri-utils/src/config.rs directly\n\ntitle: Configuration\nsidebar:\n order: 1\n---',
];
output.push(

View File

@@ -45,28 +45,12 @@ const typeDocConfigBaseOptions: Partial<TypeDocOptions | PluginOptions> = {
};
async function generator() {
if (existsSync('../tauri-v1/tooling/api/node_modules')) {
if (existsSync('../tauri/tooling/api/node_modules')) {
const coreJsOptions: Partial<TypeDocOptions> = {
entryPoints: ['../tauri-v1/tooling/api/src/index.ts'],
tsconfig: '../tauri-v1/tooling/api/tsconfig.json',
gitRevision: '1.x',
baseUrl: '/references/v1/js/',
...typeDocConfigBaseOptions,
};
await generateDocs(coreJsOptions);
} else {
console.log(
'Tauri V1 submodule is not initialized, respective API routes will not be rendered.'
);
}
if (existsSync('../tauri-v2/tooling/api/node_modules')) {
const coreJsOptions: Partial<TypeDocOptions> = {
entryPoints: ['../tauri-v2/tooling/api/src/index.ts'],
tsconfig: '../tauri-v2/tooling/api/tsconfig.json',
entryPoints: ['../tauri/tooling/api/src/index.ts'],
tsconfig: '../tauri/tooling/api/tsconfig.json',
gitRevision: 'dev',
baseUrl: '/references/v2/js/core/',
baseUrl: '/references/javascript/api/',
...typeDocConfigBaseOptions,
};
@@ -111,7 +95,7 @@ async function generator() {
entryPoints: [`../plugins-workspace/plugins/${plugin}/guest-js/index.ts`],
tsconfig: `../plugins-workspace/plugins/${plugin}/tsconfig.json`,
gitRevision: 'v2',
baseUrl: `/references/v2/js/${plugin}`,
baseUrl: `/references/javascript/${plugin}`,
...typeDocConfigBaseOptions,
};

1
packages/tauri Submodule

Submodule packages/tauri added at 198f11ae7b

45
public/navigate.js Normal file
View File

@@ -0,0 +1,45 @@
async function chapterNavigation() {
let navigating = false
document.addEventListener("keydown", function (e) {
if (navigating) return
if (e.altKey || e.ctrlKey || e.metaKey) {
return;
}
if (window.search && document.activeElement === window.search) {
return;
}
switch (e.key) {
case "ArrowLeft":
e.preventDefault();
let previousButton = document.querySelector('a[rel="prev"]');
if (!previousButton && window.location.pathname !== '/') previousButton = { href: '/' }
if (document.referrer.includes(window.location.host))
if (previousButton) {
window.location.href = previousButton.href;
navigating = true;
}
break;
case "ArrowRight":
e.preventDefault();
let nextButton = document.querySelector('a[rel="next"]');
if (!nextButton && window.location.pathname === '/') nextButton = { href: "/start/" }
if (nextButton) {
window.location.href = nextButton.href;
navigating = true;
}
break;
}
});
};
window.addEventListener('DOMContentLoaded', () => {
chapterNavigation()
})
window.onload = function () {
document.body.setAttribute('tabindex', '-1');
document.body.focus();
};

View File

@@ -80,7 +80,7 @@ en Rust:
### JavaScript
Consulta todas las [Opciones de diálogo](/references/v2/js/dialog/) en la referencia de la API de JavaScript.
Consulta todas las [Opciones de diálogo](/references/javascript/dialog/) en la referencia de la API de JavaScript.
{/* ASK */}

View File

@@ -18,21 +18,21 @@ Si un framework no aparece en esta lista puede que funcione con Tauri sin necesi
## JavaScript
<CardGrid>
<LinkCard title="Next.js" href="/guides/frontend/nextjs" />
<LinkCard title="Nuxt" href="/guides/frontend/nuxt" />
<LinkCard title="Qwik" href="/guides/frontend/qwik" />
<LinkCard title="Svelte" href="/guides/frontend/svelte" />
<LinkCard title="Vite" href="/guides/frontend/vite" />
<LinkCard title="Webpack" href="/guides/frontend/webpack" />
<LinkCard title="Next.js" href="/start/frontend/nextjs" />
<LinkCard title="Nuxt" href="/start/frontend/nuxt" />
<LinkCard title="Qwik" href="/start/frontend/qwik" />
<LinkCard title="Svelte" href="/start/frontend/svelte" />
<LinkCard title="Vite" href="/start/frontend/vite" />
<LinkCard title="Webpack" href="/start/frontend/webpack" />
</CardGrid>
## Rust
<CardGrid>
<LinkCard title="Leptos" href="/guides/frontend/leptos" />
<LinkCard title="Sycamore" href="/guides/frontend/sycamore" />
<LinkCard title="Trunk" href="/guides/frontend/trunk" />
<LinkCard title="Yew" href="/guides/frontend/yew" />
<LinkCard title="Leptos" href="/start/frontend/leptos" />
<LinkCard title="Sycamore" href="/start/frontend/sycamore" />
<LinkCard title="Trunk" href="/start/frontend/trunk" />
<LinkCard title="Yew" href="/start/frontend/yew" />
</CardGrid>
## Checklist de Configuración

View File

@@ -191,7 +191,7 @@ Aquí está el archivo como un script plano: [rustup.sh](https://sh.rustup.rs/)
Asegúrate de reiniciar tu Terminal (y en algunos casos tu sistema) para que los cambios surtan efecto.
Siguiente: [Configurar para Móvil](#configurar-para-móvil) si deseas construir para Android e iOS. De lo contrario, [Crea un Proyecto](/guides/create/).
Siguiente: [Configurar para Móvil](#configurar-para-móvil) si deseas construir para Android e iOS. De lo contrario, [Crea un Proyecto](/start/create-project).
## Configurar para Móvil
@@ -291,7 +291,7 @@ rustup target add aarch64-linux-android armv7-linux-androideabi i686-linux-andro
</TabItem>
</Tabs>
Siguiente: [Configurar para iOS](#ios) o [Crear un proyecto](/guides/create/).
Siguiente: [Configurar para iOS](#ios) o [Crear un proyecto](/start/create-project).
### iOS
@@ -319,14 +319,14 @@ Asegúrate de haber instalado Xcode y no Xcode Command Line Tools en la [secció
brew install cocoapods
```
Siguiente: [Crear un proyecto](/guides/create/).
Siguiente: [Crear un proyecto](/start/create-project).
## Solución de Problemas
Si tienes algún problema durante la instalación, asegúrate de revisar la [Guía de Solución de Problemas](/guides/troubleshoot) o comunícate en el [Discord de Tauri](https://discord.com/invite/tauri).
Si tienes algún problema durante la instalación, asegúrate de revisar la [Guía de Solución de Problemas](/develop/debug) o comunícate en el [Discord de Tauri](https://discord.com/invite/tauri).
<Card title="Siguientes Pasos" icon="rocket">
¡Ahora que has instalado todos los prerequisitos estás listo para [crear tu primer proyecto Tauri](/guides/create/)!
¡Ahora que has instalado todos los prerequisitos estás listo para [crear tu primer proyecto Tauri](/start/create-project)!
</Card>

View File

@@ -102,6 +102,6 @@ tauri = { version = "...", features = ["...", "devtools"] }
Le processus Core est alimenté par Rust, vous pouvez donc utiliser GDB ou LLDB pour le déboguer. Vous pouvez suivre le guide [Débogage dans VS Code][] pour apprendre à utiliser l'extension LLDB VS Code pour déboguer le processus principal des applications Tauri.
[Débogage dans VS Code]: /fr/guides/debug/vs-code
[Débogage dans VS Code]: /fr/develop/debug/vscode
[`WebviewWindow::open_devtools`]: https://docs.rs/tauri/2.0.0-beta/tauri/webview/struct.WebviewWindow.html#method.open_devtools
[`WebviewWindow::close_devtools`]: https://docs.rs/tauri/2.0.0-beta/tauri/webview/struct.WebviewWindow.html#method.close_devtools

View File

@@ -10,6 +10,6 @@ import { LinkCard, CardGrid } from '@astrojs/starlight/components';
title="Débogage de l'application"
href="/fr/guides/debug/application/"
/>
<LinkCard title="Débogage dans VS Code" href="/fr/guides/debug/vs-code" />
<LinkCard title="Débogage dans VS Code" href="/fr/develop/debug/vscode" />
<LinkCard title="Debug in CLion" href="/fr/guides/debug/clion" />
</CardGrid>

View File

@@ -19,21 +19,21 @@ Un framework manque à la liste ? Il peut fonctionner avec Tauri sans configurat
## JavaScript
<CardGrid>
<LinkCard title="Next.js" href="/fr/guides/frontend/nextjs" />
<LinkCard title="Nuxt" href="/fr/guides/frontend/nuxt" />
<LinkCard title="Qwik" href="/fr/guides/frontend/qwik" />
<LinkCard title="Svelte" href="/fr/guides/frontend/svelte" />
<LinkCard title="Vite" href="/fr/guides/frontend/vite" />
<LinkCard title="Webpack" href="/fr/guides/frontend/webpack" />
<LinkCard title="Next.js" href="/fr/start/frontend-configuration/nextjs" />
<LinkCard title="Nuxt" href="/fr/start/frontend-configuration/nuxt" />
<LinkCard title="Qwik" href="/fr/start/frontend-configuration/qwik" />
<LinkCard title="Svelte" href="/fr/start/frontend-configuration/svelte" />
<LinkCard title="Vite" href="/fr/start/frontend-configuration/vite" />
<LinkCard title="Webpack" href="/fr/start/frontend-configuration/webpack" />
</CardGrid>
## Rust
<CardGrid>
<LinkCard title="Leptos" href="/fr/guides/frontend/leptos" />
<LinkCard title="Sycamore" href="/fr/guides/frontend/sycamore" />
<LinkCard title="Trunk" href="/fr/guides/frontend/trunk" />
<LinkCard title="Yew" href="/fr/guides/frontend/yew" />
<LinkCard title="Leptos" href="/fr/start/frontend-configuration/leptos" />
<LinkCard title="Sycamore" href="/fr/start/frontend-configuration/sycamore" />
<LinkCard title="Trunk" href="/fr/start/frontend-configuration/trunk" />
<LinkCard title="Yew" href="/fr/start/frontend-configuration/yew" />
</CardGrid>
## Instructions de Configuration

View File

@@ -194,7 +194,7 @@ Voici le fichier contenant le script: [rustup.sh](https://sh.rustup.rs/)
Assurez-vous de relancer votre terminal (et parfois votre système) pour que les modifications prennent effet.
Suivant: [Configuration pour Mobile](#configuration-pour-mobile) si vous voulez construire une application pour Android et iOS. Dans le cas contraire, [Create a Project](/guides/create/).
Suivant: [Configuration pour Mobile](#configuration-pour-mobile) si vous voulez construire une application pour Android et iOS. Dans le cas contraire, [Create a Project](/start/create-project).
## Configuration pour Mobile
@@ -286,7 +286,7 @@ rustup target add aarch64-linux-android armv7-linux-androideabi i686-linux-andro
</TabItem>
</Tabs>
Suivant: [Installation pour Android](#ios) ou [Create a project](/guides/create/).
Suivant: [Installation pour Android](#ios) ou [Create a project](/start/create-project).
### iOS
@@ -302,14 +302,14 @@ rustup target add aarch64-apple-ios x86_64-apple-ios aarch64-apple-ios-sim
Assurez-vous d'avoir installé Xcode et non Xcode Command Line Tools dans la section [Dépendances systèmes macOS](#macos).
Suivant: [Create a project](/guides/create/).
Suivant: [Create a project](/start/create-project).
## Problèmes
Si vous rencontrez un problème durant l'installation, assurez-vous de consulter le [guide de résolution de problèmes](/guides/troubleshoot/) ou rejoignez le [Discord de Tauri](https://discord.com/invite/tauri)
Si vous rencontrez un problème durant l'installation, assurez-vous de consulter le [guide de résolution de problèmes](/develop/debug/) ou rejoignez le [Discord de Tauri](https://discord.com/invite/tauri)
<Card title="Next Steps" icon="rocket">
Maintenant que vous avez installé tous les prérequis, vous êtes fin prêt pour [créer votre premier projet Tauri](/guides/create/) !
Maintenant que vous avez installé tous les prérequis, vous êtes fin prêt pour [créer votre premier projet Tauri](/start/create-project) !
</Card>

View File

@@ -26,7 +26,7 @@ Tauri v2 contient la commande `migrate` qui simplifie votre migration:
{/* TODO: 2.0 */}
Apprenez-en plus à-propos de la commande `migrate` dans l'[interface de référence des commandes](/references/v2/cli#migrate)
Apprenez-en plus à-propos de la commande `migrate` dans l'[interface de référence des commandes](/references/cli#migrate)
## Sommaire des Changements
@@ -42,7 +42,7 @@ Voici ci-dessous un sommaire des changement entre Tauri 1.0 et Tauri 2.0:
- `tauri > updater > endpoints` déplacé vers `plugins > updater`.
- `tauri > systemTray` renomé en `tauri > trayIcon`.
[Référence de l'API de configuration de Tauri 2.0](/references/v2/config)
[Référence de l'API de configuration de Tauri 2.0](/references/config)
### Nouvelles Fonctionnalités de Cargo

View File

@@ -103,6 +103,6 @@ tauri = { version = "...", features = ["...", "devtools"] }
핵심 프로세스는 Rust로 구동되므로 GDB 또는 LLDB를 사용하여 디버깅할 수 있습니다. [VS Code에서 디버깅][] 가이드에 따라 LLDB VS Code 확장을 사용하여 Tauri 애플리케이션의 핵심 프로세스를 디버깅하는 방법을 알아볼 수 있습니다.
[VS Code에서 디버깅]: /ko/guides/debug/vs-code
[VS Code에서 디버깅]: /ko/develop/debug/vscode
[`WebviewWindow::open_devtools`]: https://docs.rs/tauri/2.0.0-beta/tauri/webview/struct.WebviewWindow.html#method.open_devtools
[`WebviewWindow::close_devtools`]: https://docs.rs/tauri/2.0.0-beta/tauri/webview/struct.WebviewWindow.html#method.close_devtools

View File

@@ -9,5 +9,5 @@ import { LinkCard, CardGrid } from '@astrojs/starlight/components';
<CardGrid>
<LinkCard title="Tauri API 모킹" href="/ko/guides/test/mocking/" />
<LinkCard title="WebDriver" href="/ko/guides/test/webdriver" />
<LinkCard title="WebDriver" href="/ko/test/webdriver" />
</CardGrid>

View File

@@ -91,7 +91,7 @@ jobs:
working-directory: webdriver/webdriverio
```
[previously built together]: /ko/guides/test/webdriver/example/webdriverio
[previously built together]: /ko/test/webdriver/example/webdriverio
[webdriver]: https://www.w3.org/TR/webdriver/
[`tauri-driver`]: https://crates.io/crates/tauri-driver
[webdriverio]: https://webdriver.io/

View File

@@ -64,7 +64,7 @@ simply with
## Testing
Unlike the [WebdriverIO Test Suite](/ko/guides/test/webdriver/example/webdriverio#config), Selenium does not come out of the box with a Test Suite and
Unlike the [WebdriverIO Test Suite](/ko/test/webdriver/example/webdriverio#config), Selenium does not come out of the box with a Test Suite and
leaves it up to the developer to build those out. We chose [Mocha], which is pretty neutral and not related to WebDrivers, so our script will need to do a bit of work to set up everything for us in the correct order. [Mocha] expects a
testing file at `test/test.js` by default, so let's create that file now.
@@ -156,7 +156,7 @@ describe('Hello Tauri', () => {
If you are familiar with JS testing frameworks, `describe`, `it`, and `expect` should look familiar. We also have
semi-complex `before()` and `after()` callbacks to set up and teardown mocha. Lines that are not the tests themselves
have comments explaining the setup and teardown code. If you were familiar with the Spec file from the
[WebdriverIO example](/ko/guides/test/webdriver/example/webdriverio#spec), you notice a lot more code that isn't tests, as we have to set up a few
[WebdriverIO example](/ko/test/webdriver/example/webdriverio#spec), you notice a lot more code that isn't tests, as we have to set up a few
more WebDriver related items.
## Running the Test Suite
@@ -190,7 +190,7 @@ tests!
With [Selenium] and some hooking up to a test suite, we just enabled e2e testing without modifying our Tauri
application at all!
[example application setup]: /ko/guides/test/webdriver/example/setup
[example application setup]: /ko/test/webdriver/example/
[selenium]: https://selenium.dev/
[finished example project]: https://github.com/chippers/hello_tauri
[mocha]: https://mochajs.org/

View File

@@ -40,14 +40,14 @@ Make sure to grab the version of [Microsoft Edge Driver][] that matches your Win
import { LinkCard, CardGrid } from '@astrojs/starlight/components';
<CardGrid>
<LinkCard title="예제 설정" href="/ko/guides/test/webdriver/example/setup" />
<LinkCard title="예제 설정" href="/ko/test/webdriver/example/" />
<LinkCard
title="Selenium"
href="/ko/guides/test/webdriver/example/selenium"
href="/ko/test/webdriver/example/selenium"
/>
<LinkCard
title="WebdriverIO"
href="/ko/guides/test/webdriver/example/webdriverio"
href="/ko/test/webdriver/example/webdriverio"
/>
</CardGrid>
@@ -55,7 +55,7 @@ import { LinkCard, CardGrid } from '@astrojs/starlight/components';
The above examples also comes with a CI script to test with GitHub actions, but you may still be interested in the below WebDriver CI guide as it explains the concept a bit more.
<LinkCard title="지속적 통합 (CI)" href="/ko/guides/test/webdriver/ci" />
<LinkCard title="지속적 통합 (CI)" href="/ko/test/webdriver/ci" />
[webdriver]: https://www.w3.org/TR/webdriver/
[`tauri-driver`]: https://crates.io/crates/tauri-driver

View File

@@ -120,7 +120,7 @@ fn run() {
默认情况下,所有插件命令都被阻止,无法访问。
你必须在你的 `capabilities` 配置中定义一个权限列表。
更多信息请参见[访问控制列表](/zh-cn/references/v2/acl)。
更多信息请参见[访问控制列表](/zh-cn/references/acl)。
```json title="src-tauri/capabilities/main.json"
{

View File

@@ -85,7 +85,7 @@ scan({ windowed: true, formats: [Format.QRCode] });
默认情况下,所有插件命令都被阻止,无法访问。
你必须在你的 `capabilities` 配置中定义一个权限列表。
更多信息请参见[访问控制列表](/zh-cn/references/v2/acl)。
更多信息请参见[访问控制列表](/zh-cn/references/acl)。
```json title="src-tauri/capabilities/mobile.json"
{

View File

@@ -260,7 +260,7 @@ fn run() {
默认情况下,所有插件命令都被阻止,无法访问。
你必须在你的 `capabilities` 配置中定义一个权限列表。
更多信息请参见[访问控制列表](/zh-cn/references/v2/acl)。
更多信息请参见[访问控制列表](/zh-cn/references/acl)。
```json title="src-tauri/capabilities/main.json" ins={6}
{

View File

@@ -197,7 +197,7 @@ fn run() {
默认情况下,所有插件命令都被阻止,无法访问。
你必须在你的 `capabilities` 配置中定义一个权限列表。
更多信息请参见[访问控制列表](/zh-cn/references/v2/acl)。
更多信息请参见[访问控制列表](/zh-cn/references/acl)。
```json title="src-tauri/capabilities/main.json" ins={9}
{

View File

@@ -80,7 +80,7 @@ import CommandTabs from '@components/CommandTabs.astro';
### JavaScript
可以在 JavaScript API 参考中查看所有 [Dialog 选项](/references/v2/js/dialog/)。
可以在 JavaScript API 参考中查看所有 [Dialog 选项](/references/javascript/dialog/)。
{/* ASK */}

View File

@@ -115,13 +115,13 @@ fn run() {
这个模块阻止路径遍历,不允许绝对路径或父目录组件(即 `/usr/path/to/file` 或 `../path/to/file` 路径是不允许的)。使用这个 API 访问的路径必须相对于一个基本目录,因此如果你需要访问任意的文件系统路径,你必须在核心层上编写这样的逻辑。
更多信息请参见 [@tauri-apps/plugin-fs - Security](/references/v2/js/fs/#security)。
更多信息请参见 [@tauri-apps/plugin-fs - Security](/references/javascript/fs/#security)。
## 权限
默认情况下,所有插件命令都被阻止,无法访问。你必须在你的 `capabilities` 配置中定义一个权限列表。
更多信息请参见[访问控制列表](/zh-cn/references/v2/acl)。
更多信息请参见[访问控制列表](/zh-cn/references/acl)。
```json title="src-tauri/capabilities/main.json" ins={7-11}
{

View File

@@ -124,7 +124,7 @@ fn run() {
默认情况下,所有插件命令都被阻止,无法访问。你必须在你的 `capabilities` 配置中定义一个权限列表。
更多信息请参见[访问控制列表](/zh-cn/references/v2/acl)。
更多信息请参见[访问控制列表](/zh-cn/references/acl)。
```json title="src-tauri/capabilities/main.json" ins={7-9}
{

View File

@@ -62,7 +62,7 @@ http 插件既有 JavaScript API 版本,也有 Rust [reqwest](https://docs.rs/
### JavaScript
1. 为了保证你的应用安全,请配置允许的作用域。更多信息请参阅 [JavaScript API 参考](/references/v2/js/http/#security)。
1. 为了保证你的应用安全,请配置允许的作用域。更多信息请参阅 [JavaScript API 参考](/references/javascript/http/#security)。
```json
//tauri.conf.json

View File

@@ -116,7 +116,7 @@ detach();
默认情况下,所有插件命令都被阻止,无法访问。你必须在你的 `capabilities` 配置中定义一个权限列表。
更多信息请参见[访问控制列表](/zh-cn/references/v2/acl)。
更多信息请参见[访问控制列表](/zh-cn/references/acl)。
```json title="src-tauri/capabilities/main.json" ins={6}
{

View File

@@ -58,7 +58,7 @@ import CommandTabs from '@components/CommandTabs.astro';
## 用法
通过这个插件,您可以查询当前操作系统的多个信息。请参阅 [JavaScript API](/references/v2/js/os/) 或 [Rust API](https://docs.rs/tauri-plugin-os/) 参考资料中的所有可用函数。
通过这个插件,您可以查询当前操作系统的多个信息。请参阅 [JavaScript API](/references/javascript/os/) 或 [Rust API](https://docs.rs/tauri-plugin-os/) 参考资料中的所有可用函数。
{/* TODO: Link to which language to use, frontend vs. backend guide when it's made */}

View File

@@ -129,7 +129,7 @@ let _ = win.as_ref().window().move_window(Position::TopRight);
默认情况下,所有插件命令都被阻止,无法访问。你必须在你的 `capabilities` 配置中定义一个权限列表。
更多信息请参见[访问控制列表](/zh-cn/references/v2/acl)。
更多信息请参见[访问控制列表](/zh-cn/references/acl)。
```json title="src-tauri/capabilities/main.json" ins={4}
{

View File

@@ -117,7 +117,7 @@ if output.status.success() {
默认情况下,所有插件命令都被阻止,无法访问。你必须在你的 `capabilities` 配置中定义一个权限列表。
更多信息请参见[访问控制列表](/zh-cn/references/v2/acl)。
更多信息请参见[访问控制列表](/zh-cn/references/acl)。
```json title="src-tauri/capabilities/main.json" ins={6-23}
{

View File

@@ -138,7 +138,7 @@ pub fn run() {
默认情况下,所有插件命令都被阻止,无法访问。你必须在你的 `capabilities` 配置中定义一个权限列表。
更多信息请参见[访问控制列表](/zh-cn/references/v2/acl)。
更多信息请参见[访问控制列表](/zh-cn/references/acl)。
```json title="src-tauri/capabilities/main.json" ins={6-11}
{

View File

@@ -190,7 +190,7 @@ await store.remove(key);
默认情况下,所有插件命令都被阻止,无法访问。你必须在你的 `capabilities` 配置中定义一个权限列表。
更多信息请参见[访问控制列表](/zh-cn/references/v2/acl)。
更多信息请参见[访问控制列表](/zh-cn/references/acl)。
```json title="src-tauri/capabilities/main.json" ins={8-14}
{

View File

@@ -95,7 +95,7 @@ await ws.disconnect();
默认情况下,所有插件命令都被阻止,无法访问。你必须在你的 `capabilities` 配置中定义一个权限列表。
更多信息请参见[访问控制列表](/zh-cn/references/v2/acl)。
更多信息请参见[访问控制列表](/zh-cn/references/acl)。
```json title="src-tauri/capabilities/main.json" ins={6}
{

View File

@@ -12,8 +12,8 @@ Tauri 提供了许多自定义应用程序窗口外观的选项。您可以创
有三种方法可以修改 Window 的配置。
- <Icon name="external" class="inline-icon" /> [通过 tauri.conf.json](/references/v2/config/#windowconfig)
- <Icon name="external" class="inline-icon" /> [通过 JavaScript API](/references/v2/js/core/namespacewindow/#window)
- <Icon name="external" class="inline-icon" /> [通过 tauri.conf.json](/references/config/#windowconfig)
- <Icon name="external" class="inline-icon" /> [通过 JavaScript API](/references/javascript/api/namespacewindow/#window)
- <Icon name="external" class="inline-icon" /> [通过 Rust 的 Window](https://docs.rs/tauri/2.0.0-beta/tauri/window/struct.Window.html)
## 用法
@@ -50,7 +50,7 @@ Tauri 提供了许多自定义应用程序窗口外观的选项。您可以创
默认情况下,所有插件命令都被阻止,无法访问。你必须在你的 `capabilities` 配置中定义一个权限列表。
更多信息请参见[访问控制列表](/zh-cn/references/v2/acl)。
更多信息请参见[访问控制列表](/zh-cn/references/acl)。
```json title="src-tauri/capabilities/main.json" ins={7-8}
{

View File

@@ -122,7 +122,7 @@ window.restore_state(StateFlags::all()); // 将从磁盘恢复窗口的状态
默认情况下,所有插件命令都被阻止,无法访问。
你必须在你的 `capabilities` 配置中定义一个权限列表。
更多信息请参见[访问控制列表](/zh-cn/references/v2/acl)。
更多信息请参见[访问控制列表](/zh-cn/references/acl)。
```json title="src-tauri/capabilities/main.json" ins={4-5}
{

View File

@@ -108,6 +108,6 @@ tauri = { version = "...", features = ["...", "devtools"] }
核心进程由 Rust 支持,因此您可以使用 GDB 或 LLDB 进行调试。您可以按照[在 VS Code 中调试]指南学习如何使用 LLDB VS 代码扩展来调试 Tauri 应用程序的核心进程。
[在 VS Code 中调试]: /guides/debug/vs-code
[在 VS Code 中调试]: /develop/debug/vscode
[`WebviewWindow::open_devtools`]: https://docs.rs/tauri/2.0.0-beta/tauri/webview/struct.WebviewWindow.html#method.open_devtools
[`WebviewWindow::close_devtools`]: https://docs.rs/tauri/2.0.0-beta/tauri/webview/struct.WebviewWindow.html#method.close_devtools

View File

@@ -7,6 +7,6 @@ import { LinkCard, CardGrid } from '@astrojs/starlight/components';
<CardGrid>
<LinkCard title="应用调试" href="/zh-cn/guides/debug/application/" />
<LinkCard title="在 VS Code 中调试" href="/zh-cn/guides/debug/vs-code" />
<LinkCard title="在 CLion 中调试" href="/guides/debug/clion" />
<LinkCard title="在 VS Code 中调试" href="/zh-cn/develop/debug/vscode" />
<LinkCard title="在 CLion 中调试" href="/start/debug/clion" />
</CardGrid>

View File

@@ -18,21 +18,21 @@ Tauri 与前端无关,支持大多数开箱即用的前端框架。但是,
## JavaScript
<CardGrid>
<LinkCard title="Next.js" href="/zh-cn/guides/frontend/nextjs" />
<LinkCard title="Nuxt" href="/zh-cn/guides/frontend/nuxt" />
<LinkCard title="Qwik" href="/zh-cn/guides/frontend/qwik" />
<LinkCard title="Svelte" href="/zh-cn/guides/frontend/svelte" />
<LinkCard title="Vite" href="/zh-cn/guides/frontend/vite" />
<LinkCard title="Webpack" href="/zh-cn/guides/frontend/webpack" />
<LinkCard title="Next.js" href="/zh-cn/start/frontend-configuration/nextjs" />
<LinkCard title="Nuxt" href="/zh-cn/start/frontend-configuration/nuxt" />
<LinkCard title="Qwik" href="/zh-cn/start/frontend-configuration/qwik" />
<LinkCard title="Svelte" href="/zh-cn/start/frontend-configuration/svelte" />
<LinkCard title="Vite" href="/zh-cn/start/frontend-configuration/vite" />
<LinkCard title="Webpack" href="/zh-cn/start/frontend-configuration/webpack" />
</CardGrid>
## Rust
<CardGrid>
<LinkCard title="Leptos" href="/zh-cn/guides/frontend/leptos" />
<LinkCard title="Sycamore" href="/zh-cn/guides/frontend/sycamore" />
<LinkCard title="Trunk" href="/zh-cn/guides/frontend/trunk" />
<LinkCard title="Yew" href="/zh-cn/guides/frontend/yew" />
<LinkCard title="Leptos" href="/zh-cn/start/frontend-configuration/leptos" />
<LinkCard title="Sycamore" href="/zh-cn/start/frontend-configuration/sycamore" />
<LinkCard title="Trunk" href="/zh-cn/start/frontend-configuration/trunk" />
<LinkCard title="Yew" href="/zh-cn/start/frontend-configuration/yew" />
</CardGrid>
## 配置清单

View File

@@ -11,7 +11,7 @@ i18nReady: true
Tauri 是一个构建适用于所有主流桌面和移动平台的轻快二进制文件的框架。开发者们可以集成任何用于创建用户界面的可以被编译成 HTML、JavaScript 和 CSS 的前端框架,同时可以在必要时使用 Rust、Swift 和 Kotlin 等语言编写后端逻辑。
你可以使用下面的任意一个命令以利用 [`create-tauri-app`](https://github.com/tauri-apps/create-tauri-app) 创建一个新的项目。请务必参考[前置要求文档](/zh-cn/guides/prerequisites/)安装所有 Tauri 必须的依赖,并阅读[前端配置指南](/zh-cn/guides/frontend/)了解推荐的前端配置方案。
你可以使用下面的任意一个命令以利用 [`create-tauri-app`](https://github.com/tauri-apps/create-tauri-app) 创建一个新的项目。请务必参考[前置要求文档](/zh-cn/start/prerequisites/)安装所有 Tauri 必须的依赖,并阅读[前端配置指南](/zh-cn/start/frontend-configuration/)了解推荐的前端配置方案。
import Cta from '../../_fragments/cta.mdx';
@@ -45,9 +45,9 @@ Tauri 利用了已经存在于每一个用户系统的 webview。Tauri 应用中
### 灵活的架构
由于 Tauri 使用了 web 技术,这也意味着几乎所有的前端框架都与 Tauri 兼容。[前端配置指南](/zh-cn/guides/frontend/)中涵盖了热门前端框架的通用配置;[渲染概念](/concepts/rendering)中讨论了哪些渲染技术(如单页应用 SPA 和服务端生成 SSG最适合 Tauri。
由于 Tauri 使用了 web 技术,这也意味着几乎所有的前端框架都与 Tauri 兼容。[前端配置指南](/zh-cn/start/frontend-configuration/)中涵盖了热门前端框架的通用配置;[渲染概念](/concepts/rendering)中讨论了哪些渲染技术(如单页应用 SPA 和服务端生成 SSG最适合 Tauri。
开发者可以在 JavaScript 中使用 `invoke` 函数实现 JavaScript 与 Rust 绑定,而 Swift 和 Kotlin 绑定则是作为 [Tauri 插件](/zh-cn/guides/plugins/)
开发者可以在 JavaScript 中使用 `invoke` 函数实现 JavaScript 与 Rust 绑定,而 Swift 和 Kotlin 绑定则是作为 [Tauri 插件](/zh-cn/develop/plugins/)
[TAO](https://github.com/tauri-apps/tao) 被用于管理 Tauri 窗口创建,[WRY](https://github.com/tauri-apps/wry) 则被用于管理 webview 渲染。这些库由 Tauri 维护,并且如果需要 Tauri 没有暴露的更深入的系统集成时可以直接使用。

View File

@@ -5,7 +5,7 @@ i18nReady: true
:::tip[插件开发]
确保你已经熟悉[插件开发](/zh-cn/guides/plugins)中的概念,因为本指南大量使用基于那篇文章的概念。
确保你已经熟悉[插件开发](/zh-cn/develop/plugins)中的概念,因为本指南大量使用基于那篇文章的概念。
:::
@@ -14,7 +14,7 @@ i18nReady: true
## 初始化插件项目
按照[插件开发](/zh-cn/guides/plugins/#初始化插件项目)中的步骤初始化新的插件项目。
按照[插件开发](/zh-cn/develop/plugins/#初始化插件项目)中的步骤初始化新的插件项目。
如果你有一个现有的插件,并且想添加安卓或 iOS 的功能,你可以使用 `plugin android init` 和 `plugin ios init`来添加构建移动端插件项目,并指导你完成所需的更改。
@@ -49,7 +49,7 @@ Tauri 使用 Kotlin 作为默认的安卓插件实现,但是你也可以使用
## 插件配置
前往插件开发指南的[插件配置](/zh-cn/guides/plugins/#插件配置)章节以获取更多关于插件开发的配置信息。
前往插件开发指南的[插件配置](/zh-cn/develop/plugins/#插件配置)章节以获取更多关于插件开发的配置信息。
移动设备上的插件实例具有用于插件配置的获取器:
@@ -86,7 +86,7 @@ class ExamplePlugin: Plugin {
- [`load`](#load):当插件被加载到 webview 中时触发
- [`onNewIntent`](#onnewintent):(仅安卓)当活动被重启时触发
在插件开发指南中还有一些其他[插件生命周期事件](/zh-cn/guides/plugins#生命周期事件)的介绍。
在插件开发指南中还有一些其他[插件生命周期事件](/zh-cn/develop/plugins#生命周期事件)的介绍。
### `load`
@@ -368,7 +368,7 @@ class ExamplePlugin: Plugin {
</TabItem>
</Tabs>
辅助函数可以通过使用 [`addPluginListener`](/references/v2/js/core/namespacecore/#addpluginlistener) 函数在 NPM 包中找到并使用。
辅助函数可以通过使用 [`addPluginListener`](/references/javascript/api/namespacecore/#addpluginlistener) 函数在 NPM 包中找到并使用。
```javascript
import { addPluginListener, PluginListener } from '@tauri-apps/api/tauri';

View File

@@ -22,7 +22,7 @@ Tauri 提供了一个基于 webview 功能的视窗系统,一个在 Rust 进
一个 Tauri 插件由一个 Cargo 包和一个可选的 NPM 包(用于提供命令和事件 API 绑定)构成。
同时,一个插件项目可以包含一个 Android 库项目和/或一个用于 iOS 的 Swift 包。
你可以查阅[移动端插件开发指南](/zh-cn/guides/plugins/develop-mobile)以获取更多关于开发安卓或 iOS 插件的信息。
你可以查阅[移动端插件开发指南](/zh-cn/develop/plugins/develop-mobile)以获取更多关于开发安卓或 iOS 插件的信息。
{/* TODO: https://github.com/tauri-apps/tauri/issues/7749 */}
@@ -31,7 +31,7 @@ Tauri 提供了一个基于 webview 功能的视窗系统,一个在 Rust 进
{/* TODO: Add link to allowlist */}
Tauri 插件具有一个前缀Rust 包使用 `tauri-plugin-` 前缀NPM 包使用 `@tauri-apps/plugin-` 前缀),随后是插件名称。
插件名称由插件配置中的 [`tauri.conf.json > plugin`](/references/v2/config/#pluginconfig) 和许可列表中的配置确定。
插件名称由插件配置中的 [`tauri.conf.json > plugin`](/references/config/#pluginconfig) 和许可列表中的配置确定。
默认情况下Tauri 会在你的插件 crate 前面加上 `tauri-plugin-`。这有助于你的插件被 Tauri 社区发现,但不是必须的。初始化新插件项目时,必须提供其名称。生成包名称将为 `tauri-plugin-{plugin-name}`JavaScript NPM 包名称为 `tauri-plugin-{plugin-name}-api`(尽管我们建议使用 [NPM 范围](https://docs.npmjs.com/about-scopes)如果可能的话。NPM 包的 Tauri 命名约定是 `@scope-name/plugin-{plugin-name}`。
@@ -71,7 +71,7 @@ Tauri 插件具有一个前缀Rust 包使用 `tauri-plugin-` 前缀NPM 包
插件可以运行用 Kotlin或 Java和 Swift 编写的本地移动代码。默认的插件模板包括一个使用 Kotlin 的 Android 库项目和一个 Swift 包。它包括一个示例移动端命令,展示了如何从 Rust 代码触发其执行。
在[移动端插件开发指南](/guides/plugins/develop-mobile)中阅读更多关于开发移动端插件的信息。
在[移动端插件开发指南](/develop/plugins/develop-mobile)中阅读更多关于开发移动端插件的信息。
## 插件配置
@@ -124,7 +124,7 @@ pub fn init<R: Runtime>() -> TauriPlugin<R> {
- [`on_event`](#on_event): 事件循环
- [`on_drop`](#on_drop): 插件被析构时
还有一些特定的[移动端插件生命周期事件](/zh-cn/guides/plugins/develop-mobile#生命周期事件)。
还有一些特定的[移动端插件生命周期事件](/zh-cn/develop/plugins/develop-mobile#生命周期事件)。
### `setup`
@@ -265,7 +265,7 @@ tauri::Builder::default()
## 添加命令
命令在 `command.rs` 文件中定义。它们是常规的 Tauri 应用程序命令。它们可以直接访问 `AppHandle` 和 `Window` 实例,获取状态,并以与应用命令同样的方式获取输入。
阅读[命令指南](/features/commands/)以获取更多关于 Tauri 命令的信息。
阅读[命令指南](/develop/calling-rust/)以获取更多关于 Tauri 命令的信息。
这个命令展示了如何使用依赖注入访问 `AppHandle` 和 `Window` 实例,并接受两个输入参数(`on_progress` 和 `url`
@@ -304,4 +304,4 @@ export async function upload(url: string, onProgressHandler: (progress: number)
## 管理状态
插件可以像 Tauri 应用程序一样管理状态。阅读[状态管理指南](/guides/state-management)以获取更多信息。
插件可以像 Tauri 应用程序一样管理状态。阅读[状态管理指南](/develop/state-management)以获取更多信息。

View File

@@ -193,7 +193,7 @@ curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | sh
请务必重新启动终端(在某些情况下重新启动系统)以使更改生效。
下一步:如果你想要在 Android 或 iOS 上开发应用,前往[配置移动端](#移动端配置)。否则前往[创建新项目](/guides/create/)。
下一步:如果你想要在 Android 或 iOS 上开发应用,前往[配置移动端](#移动端配置)。否则前往[创建新项目](/start/create-project)。
## 移动端配置
@@ -285,7 +285,7 @@ rustup target add aarch64-linux-android armv7-linux-androideabi i686-linux-andro
</TabItem>
</Tabs>
下一步:[配置 iOS](#ios)或[创建新项目](/guides/create/)。
下一步:[配置 iOS](#ios)或[创建新项目](/start/create-project)。
### iOS
@@ -313,14 +313,14 @@ rustup target add aarch64-apple-ios x86_64-apple-ios aarch64-apple-ios-sim
brew install cocoapods
```
下一步:[创建新项目](/guides/create/)。
下一步:[创建新项目](/start/create-project)。
## 故障排除
如果你在安装过程中遇到任何问题,请务必查看[故障诊断指南](/guides/troubleshoot/)或联系 [Tauri Discord](https://discord.com/invite/tauri) 以寻求帮助。
如果你在安装过程中遇到任何问题,请务必查看[故障诊断指南](/develop/debug/)或联系 [Tauri Discord](https://discord.com/invite/tauri) 以寻求帮助。
<Card title="下一步" icon="rocket">
现在,你已经安装了所有前置要求,你可以准备好[创建你的第一个 Tauri 应用程序](/guides/create/)
现在,你已经安装了所有前置要求,你可以准备好[创建你的第一个 Tauri 应用程序](/start/create-project)
</Card>

View File

@@ -9,5 +9,5 @@ import { LinkCard, CardGrid } from '@astrojs/starlight/components';
<CardGrid>
<LinkCard title="Mocking" href="/zh-cn/guides/test/mocking/" />
<LinkCard title="WebDriver" href="/zh-cn/guides/test/webdriver" />
<LinkCard title="WebDriver" href="/zh-cn/test/webdriver" />
</CardGrid>

View File

@@ -91,7 +91,7 @@ jobs:
working-directory: webdriver/webdriverio
```
[previously built together]: /zh-cn/guides/test/webdriver/example/webdriverio
[previously built together]: /zh-cn/test/webdriver/example/webdriverio
[webdriver]: https://www.w3.org/TR/webdriver/
[`tauri-driver`]: https://crates.io/crates/tauri-driver
[webdriverio]: https://webdriver.io/

View File

@@ -186,7 +186,7 @@ tests!
With [Selenium] and some hooking up to a test suite, we just enabled e2e testing without modifying our Tauri
application at all!
[示例应用程序设置]: /guides/test/webdriver/example/setup
[示例应用程序设置]: /test/webdriver/example/
[Selenium]: https://selenium.dev/
[已完成的示例项目]: https://github.com/chippers/hello_tauri
[Mocha]: https://mochajs.org/

View File

@@ -40,14 +40,14 @@ Make sure to grab the version of [Microsoft Edge Driver][] that matches your Win
import { LinkCard, CardGrid } from '@astrojs/starlight/components';
<CardGrid>
<LinkCard title="Setup" href="/zh-cn/guides/test/webdriver/example/setup" />
<LinkCard title="Setup" href="/zh-cn/test/webdriver/example/" />
<LinkCard
title="Selenium"
href="/zh-cn/guides/test/webdriver/example/selenium"
href="/zh-cn/test/webdriver/example/selenium"
/>
<LinkCard
title="WebdriverIO"
href="/zh-cn/guides/test/webdriver/example/webdriverio"
href="/zh-cn/test/webdriver/example/webdriverio"
/>
</CardGrid>
@@ -55,7 +55,7 @@ import { LinkCard, CardGrid } from '@astrojs/starlight/components';
The above examples also comes with a CI script to test with GitHub actions, but you may still be interested in the below WebDriver CI guide as it explains the concept a bit more.
<LinkCard title="持续集成 (CI)" href="/guides/test/webdriver/ci" />
<LinkCard title="持续集成 (CI)" href="/start/test/webdriver/ci" />
[webdriver]: https://www.w3.org/TR/webdriver/
[`tauri-driver`]: https://crates.io/crates/tauri-driver

View File

@@ -64,7 +64,7 @@ Tauri v2 的命令行工具包括一个 `migrate` 命令,可自动执行大部
{/* TODO: 2.0 */}
在[命令行界面参考](/references/v2/cli#migrate)中了解有关 `migrate` 命令的更多信息。
在[命令行界面参考](/references/cli#migrate)中了解有关 `migrate` 命令的更多信息。
## 变化摘要
@@ -94,7 +94,7 @@ Tauri v2 的命令行工具包括一个 `migrate` 命令,可自动执行大部
- `build > distDir` 被重命名为 `frontendDist`。
- `build > devPath` 被重命名为 `devUrl`。
[Tauri 2.0 配置 API 参考资料](/references/v2/config)
[Tauri 2.0 配置 API 参考资料](/references/config)
### 全新的 Cargo 功能
@@ -1173,4 +1173,4 @@ tauri::Builder::default()
`migrate` 命令行工具命令会自动解析你的授权许可列表 v1 并生成相关的许可配置文件。
要了解有关权限和功能的更多信息,请参阅[该文档](/references/v2/acl)。
要了解有关权限和功能的更多信息,请参阅[该文档](/references/acl)。

View File

@@ -2,7 +2,7 @@
title: 访问控制列表
---
每个 Tauri [命令](/features/commands)都向 JavaScript 层公开一个 Rust 函数,该函数可以使用操作系统 API 执行任意操作,默认情况下,该层使用 Web 标准进行沙箱化。
每个 Tauri [命令](/develop/calling-rust)都向 JavaScript 层公开一个 Rust 函数,该函数可以使用操作系统 API 执行任意操作,默认情况下,该层使用 Web 标准进行沙箱化。
如果攻击者可以执行访问 Tauri 命令的代码,这将给您的应用程序带来风险。
为了缓解这种情况Tauri 使用访问控制列表Access Control ListACL来限制插件命令的访问。默认情况下所有插件命令都被阻止无法访问。若要启用对应用程序所需命令的访问必须定义需要访问的权限列表。

View File

@@ -4,7 +4,7 @@ title: About Tauri
:::tip
If you're looking for a quick technical overview and to start building an app then visit the [What is Tauri page](/guides). If you'd like to learn more about the project's philosophy then keep reading.
If you're looking for a quick technical overview and to start building an app then visit the [What is Tauri page](/start). If you'd like to learn more about the project's philosophy then keep reading.
:::

View File

@@ -46,7 +46,7 @@ The 1.4.0 release includes several NSIS bundle enhancements:
- If your application is installed via WiX, the installer will prompt the user to uninstall it
- Improved support to updater install modes
See the [installer customization guide](https://tauri.app/v1/guides/building/windows#customizing-the-nsis-installer-template) and [installer internationalization](https://tauri.app/v1/guides/building/windows#internationalization) for more information.
See the [installer customization guide](https://tauri.app/v1/guides/developing/windows#customizing-the-nsis-installer-template) and [installer internationalization](https://tauri.app/v1/guides/developing/windows#internationalization) for more information.
### MSRV change

View File

@@ -1,5 +1,9 @@
---
title: Brownfield Pattern
sidebar:
badge:
text: WIP
variant: caution
---
_**This is the default pattern.**_

View File

@@ -1,5 +1,11 @@
---
title: Inter-Process Communication
sidebar:
label: Overview
order: 1
badge:
text: WIP
variant: caution
---
import { CardGrid, LinkCard } from '@astrojs/starlight/components';

View File

@@ -1,5 +1,9 @@
---
title: Isolation Pattern
sidebar:
badge:
text: WIP
variant: caution
---
The Isolation pattern is a way to intercept and modify Tauri API messages sent by the frontend before they get to Tauri Core, all with JavaScript. The secure JavaScript code that is injected by the Isolation pattern is referred to as the Isolation application.
@@ -105,8 +109,8 @@ Let's assume that our main frontend `distDir` is set to `../dist`. We also outpu
```
[transport_layer_security]: https://en.wikipedia.org/wiki/Transport_Layer_Security
[security: threat models]: /concepts/security/development
[events]: /references/v2/js/core/namespaceevent
[security: threat models]: /security/development
[events]: /references/javascript/api/namespaceevent
[subtlecrypto]: https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto
[brownfield pattern]: /concepts/inter-process-communication/brownfield
[integration testing with webdriver]: /guides/test/webdriver
[integration testing with webdriver]: /test/webdriver

View File

@@ -1,12 +1,17 @@
---
title: Tauri Architecture
sidebar:
order: 0
badge:
text: WIP
variant: caution
---
## Introduction
Tauri is a polyglot and generic toolkit that is very composable and allows engineers to make a wide variety of applications. It is used for building applications for desktop computers using a combination of Rust tools and HTML rendered in a Webview. Apps built with Tauri can ship with any number of pieces of an optional JS API and Rust API so that webviews can control the system via message passing. Developers can extend the default API with their own functionality and bridge the Webview and Rust-based backend easily.
Tauri apps can have [custom menus](../../guides/features/menu) and [tray-type interfaces](../../guides/features/system-tray). They can be [updated](../../guides/distribution/updater) and are managed by the user's operating system as expected. They are very small because they use the OS's webview. They do not ship a runtime since the final binary is compiled from Rust. This makes the [reversing of Tauri apps not a trivial task](/concepts/security).
Tauri apps can have [custom menus](../../guides/features/menu) and [tray-type interfaces](../../guides/features/system-tray). They can be [updated](../../guides/distribution/updater) and are managed by the user's operating system as expected. They are very small because they use the OS's webview. They do not ship a runtime since the final binary is compiled from Rust. This makes the [reversing of Tauri apps not a trivial task](/security).
### What Tauri is Not
@@ -22,7 +27,7 @@ Tauri is not a VM or virtualized environment. Instead, it is an application tool
[View on GitHub](https://github.com/tauri-apps/tauri/tree/dev/core/tauri)
This is the major crate that holds everything together. It brings the runtimes, macros, utilities and API into one final product. It reads the [`tauri.conf.json`](/references/v2/config) file at compile time to bring in features and undertake the actual configuration of the app (and even the `Cargo.toml` file in the project's folder). It handles script injection (for polyfills / prototype revision) at runtime, hosts the API for systems interaction, and even manages the updating process.
This is the major crate that holds everything together. It brings the runtimes, macros, utilities and API into one final product. It reads the [`tauri.conf.json`](/references/config) file at compile time to bring in features and undertake the actual configuration of the app (and even the `Cargo.toml` file in the project's folder). It handles script injection (for polyfills / prototype revision) at runtime, hosts the API for systems interaction, and even manages the updating process.
### tauri-runtime
@@ -52,7 +57,7 @@ Applies the macros at build-time to rig some special features needed by `cargo`.
[View on GitHub](https://github.com/tauri-apps/tauri/tree/dev/core/tauri-codegen)
Embeds, hashes, and compresses assets, including icons for the app as well as the system tray. Parses [`tauri.conf.json`](/references/v2/config) at compile time and generates the Config struct.
Embeds, hashes, and compresses assets, including icons for the app as well as the system tray. Parses [`tauri.conf.json`](/references/config) at compile time and generates the Config struct.
### tauri-runtime-wry
@@ -131,7 +136,7 @@ Allows you to very quickly install Tauri in a vue-cli project.
## Plugins
[Tauri Plugin Guide](/guides/plugins)
[Tauri Plugin Guide](/develop/plugins)
Generally speaking, plugins are authored by third parties (even though there may be official, supported plugins). A plugin generally does 3 things:

View File

@@ -1,5 +1,11 @@
---
title: Concepts
title: Core Concepts
sidebar:
order: 0
label: Overview
badge:
text: WIP
variant: caution
---
import Stub from '@components/Stub.astro';
@@ -18,7 +24,7 @@ import { CardGrid, LinkCard } from '@astrojs/starlight/components';
title="Inter-Process Communication (IPC)"
href="/concepts/inter-process-communication"
/>
<LinkCard title="Security" href="/concepts/security" />
<LinkCard title="Security" href="/security" />
<LinkCard title="Process Model" href="/concepts/process-model" />
<LinkCard title="App Size" href="/concepts/size" />
<LinkCard title="Rendering" href="/concepts/rendering" />

View File

@@ -1,5 +1,10 @@
---
title: Process Model
sidebar:
order: 0
badge:
text: WIP
variant: caution
---
Tauri employs a multi-process architecture similar to Electron or many modern web browsers. This guide explores the reasons behind the design choice and why it is key to writing secure applications.

View File

@@ -1,5 +1,10 @@
---
title: Rendering
sidebar:
order: 0
badge:
text: WIP
variant: caution
---
import Stub from '@components/Stub.astro';

Some files were not shown because too many files have changed in this diff Show More