update README
This commit is contained in:
1 parent
37a397b98d
commit
58f951f9ee
3 files changed
+50
-6
No files matched your search
@@ -2,9 +2,7 @@ Chinese grammar data manually copied and edited from <https://resources.allsetle
|
|||||||
|
|
||||||
## How it works for Android
|
## How it works for Android
|
||||||
|
|
||||||
Using Tauri, it runs on Android even with dev server down, with `tauri android run`. (while no hot-reloading)
|
Using Tauri, an extra CSS is needed for Android webview fix:-
|
||||||
|
|
||||||
An extra CSS is needed for Android webview fix:-
|
|
||||||
|
|
||||||
```css
|
```css
|
||||||
body {
|
body {
|
||||||
@@ -14,3 +12,49 @@ body {
|
|||||||
padding-right: env(safe-area-inset-right);
|
padding-right: env(safe-area-inset-right);
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Android without hot-reload
|
||||||
|
|
||||||
|
Tauri for Android target runs even with dev server down, with `tauri android run` (while no hot-reloading).
|
||||||
|
|
||||||
|
APK will be generated at `src-tauri/gen/android/app/build/outputs/apk/arm64/debug/app-arm64-debug.apk` which can be installed with
|
||||||
|
|
||||||
|
```sh
|
||||||
|
adb install -r src-tauri/gen/android/app/build/outputs/apk/arm64/debug/app-arm64-debug.apk
|
||||||
|
```
|
||||||
|
|
||||||
|
### Android hot-reload
|
||||||
|
|
||||||
|
When dev server is used, in addition to Android app won't work with dev server down, Firewall settings must also be allowed.
|
||||||
|
|
||||||
|
For Windows PowerShell,
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
New-NetFirewallRule -DisplayName "Vitepress Server" -Direction Inbound -Protocol TCP -LocalPort 5173 -Action Allow
|
||||||
|
```
|
||||||
|
|
||||||
|
In addition, dev server needs to bind to `0.0.0.0` or `TAURI_DEV_HOST` env var.
|
||||||
|
|
||||||
|
```ts
|
||||||
|
import { defineConfig, MarkdownOptions } from "vitepress";
|
||||||
|
|
||||||
|
const host = process.env.TAURI_DEV_HOST;
|
||||||
|
|
||||||
|
// https://vitepress.dev/reference/site-config
|
||||||
|
export default defineConfig({
|
||||||
|
vite: {
|
||||||
|
server: {
|
||||||
|
port: 5173,
|
||||||
|
strictPort: true,
|
||||||
|
host: host || false,
|
||||||
|
hmr: host
|
||||||
|
? {
|
||||||
|
protocol: "ws",
|
||||||
|
host,
|
||||||
|
port: 5174,
|
||||||
|
}
|
||||||
|
: undefined,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
```
|
||||||
@@ -65,8 +65,8 @@ In these examples "太不像话了," "真是了不起," "真是太不可思议
|
|||||||
|
|
||||||
## See also
|
## See also
|
||||||
|
|
||||||
- ["On the Contrary" with "反而"](https://resources.allsetlearning.com/chinese/grammar/%22On_the_Contrary%22_with_%22fan%27er%22)
|
- ["On the Contrary" with "反而"](../B2/反而.md)
|
||||||
- [The "However" Adverb "却"](https://resources.allsetlearning.com/chinese/grammar/The_%22However%22_Adverb_%22que%22)
|
- [The "However" Adverb "却"](../B2/却.md)
|
||||||
- [Expressing Contrariness with "倒"](../B2/倒.md)
|
- [Expressing Contrariness with "倒"](../B2/倒.md)
|
||||||
|
|
||||||
## Sources and further reading
|
## Sources and further reading
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
|
|
||||||
</TOC>
|
</TOC>
|
||||||
|
|
||||||
You can add the adverb 果然 (guǒrán) to add the sense that what you're about to say is entirely expected. It's kind of like starting a sentence with "just as we thought" or "just as we expected," but it's just one word in Chinese. It's kind of like the opposite of [竟然](./竟然.md) or [居然](https://resources.allsetlearning.com/chinese/grammar/%E5%B1%85%E7%84%B6).
|
You can add the adverb 果然 (guǒrán) to add the sense that what you're about to say is entirely expected. It's kind of like starting a sentence with "just as we thought" or "just as we expected," but it's just one word in Chinese. It's kind of like the opposite of [竟然](./竟然.md) or [居然](./居然&反而.md).
|
||||||
|
|
||||||
## Used before Predicate
|
## Used before Predicate
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user