This commit is contained in:
Daniel 2024-11-22 20:15:47 +08:00
parent 909b36d380
commit acbbd8ca5d
No known key found for this signature in database
GPG Key ID: 86211BA83DF03017
15 changed files with 59 additions and 38 deletions

View File

@ -58,4 +58,10 @@ Note: In the development environment, the kernel process will not be automatical
* `gomobile bind --tags fts5 -ldflags '-s -w' -v -o kernel.aar -target='android/arm64' -androidapi 24 ./mobile/` * `gomobile bind --tags fts5 -ldflags '-s -w' -v -o kernel.aar -target='android/arm64' -androidapi 24 ./mobile/`
* https://github.com/siyuan-note/siyuan-android * https://github.com/siyuan-note/siyuan-android
For the mobile-end, please refer to the corresponding project repository. ### Harmony
Only support compilation under Linux, need to install Harmony SDK, and need to modify Go source code, please refer to https://github.com/siyuan-note/siyuan/issues/13184
* `cd kernel/harmony`
* `./build.sh` (`./build-win.sh` for Windows Emulator)
* https://github.com/siyuan-note/siyuan-harmony

View File

@ -60,4 +60,10 @@ NPM 镜像:
* `gomobile bind --tags fts5 -ldflags '-s -w' -v -o kernel.aar -target='android/arm64' -androidapi 24 ./mobile/` * `gomobile bind --tags fts5 -ldflags '-s -w' -v -o kernel.aar -target='android/arm64' -androidapi 24 ./mobile/`
* https://github.com/siyuan-note/siyuan-android * https://github.com/siyuan-note/siyuan-android
移动端请参考对应项目仓库。 ### Harmony
仅支持在 Linux 下编译,需要安装鸿蒙 SDK并且需要修改 Go 源码,详情请参考 https://github.com/siyuan-note/siyuan/issues/13184
* `cd kernel/harmony`
* `./build.sh` Windows 模拟器使用 `./build-win.sh`
* https://github.com/siyuan-note/siyuan-harmony

View File

@ -100,7 +100,7 @@ Most features are free, even for commercial use.
* Multi-tab, drag and drop to split screen * Multi-tab, drag and drop to split screen
* Template snippet * Template snippet
* JavaScript/CSS snippet * JavaScript/CSS snippet
* Android/iOS App * Android/iOS/HarmonyOS App
* Docker deployment * Docker deployment
* [API](https://github.com/siyuan-note/siyuan/blob/master/API.md) * [API](https://github.com/siyuan-note/siyuan/blob/master/API.md)
* Community marketplace * Community marketplace
@ -120,6 +120,7 @@ Some features are only available to paid members, for more details please refer
| [petal](https://github.com/siyuan-note/petal) | Plugin API | ![GitHub forks](https://img.shields.io/github/forks/siyuan-note/petal) | ![GitHub Repo stars](https://img.shields.io/github/stars/siyuan-note/petal) | | [petal](https://github.com/siyuan-note/petal) | Plugin API | ![GitHub forks](https://img.shields.io/github/forks/siyuan-note/petal) | ![GitHub Repo stars](https://img.shields.io/github/stars/siyuan-note/petal) |
| [android](https://github.com/siyuan-note/siyuan-android) | Android App | ![GitHub forks](https://img.shields.io/github/forks/siyuan-note/siyuan-android) | ![GitHub Repo stars](https://img.shields.io/github/stars/siyuan-note/siyuan-android) | | [android](https://github.com/siyuan-note/siyuan-android) | Android App | ![GitHub forks](https://img.shields.io/github/forks/siyuan-note/siyuan-android) | ![GitHub Repo stars](https://img.shields.io/github/stars/siyuan-note/siyuan-android) |
| [ios](https://github.com/siyuan-note/siyuan-ios) | iOS App | ![GitHub forks](https://img.shields.io/github/forks/siyuan-note/siyuan-ios) | ![GitHub Repo stars](https://img.shields.io/github/stars/siyuan-note/siyuan-ios) | | [ios](https://github.com/siyuan-note/siyuan-ios) | iOS App | ![GitHub forks](https://img.shields.io/github/forks/siyuan-note/siyuan-ios) | ![GitHub Repo stars](https://img.shields.io/github/stars/siyuan-note/siyuan-ios) |
| [harmony](https://github.com/siyuan-note/siyuan-harmony) | HarmonyOS App | ![GitHub forks](https://img.shields.io/github/forks/siyuan-note/siyuan-harmony) | ![GitHub Repo stars](https://img.shields.io/github/stars/siyuan-note/siyuan-harmony) |
| [riff](https://github.com/siyuan-note/riff) | Spaced repetition | ![GitHub forks](https://img.shields.io/github/forks/siyuan-note/riff) | ![GitHub Repo stars](https://img.shields.io/github/stars/siyuan-note/riff) | | [riff](https://github.com/siyuan-note/riff) | Spaced repetition | ![GitHub forks](https://img.shields.io/github/forks/siyuan-note/riff) | ![GitHub Repo stars](https://img.shields.io/github/stars/siyuan-note/riff) |
## 🌟 Star History ## 🌟 Star History
@ -346,6 +347,7 @@ SiYuan is completely open source, and contributions are welcome:
* [User Interface and Kernel](https://github.com/siyuan-note/siyuan) * [User Interface and Kernel](https://github.com/siyuan-note/siyuan)
* [Android](https://github.com/siyuan-note/siyuan-android) * [Android](https://github.com/siyuan-note/siyuan-android)
* [iOS](https://github.com/siyuan-note/siyuan-ios) * [iOS](https://github.com/siyuan-note/siyuan-ios)
* [HarmonyOS](https://github.com/siyuan-note/siyuan-harmony)
* [Chrome Clipping Extension](https://github.com/siyuan-note/siyuan-chrome) * [Chrome Clipping Extension](https://github.com/siyuan-note/siyuan-chrome)
For more details, please refer to [Development Guide](https://github.com/siyuan-note/siyuan/blob/master/.github/CONTRIBUTING.md). For more details, please refer to [Development Guide](https://github.com/siyuan-note/siyuan/blob/master/.github/CONTRIBUTING.md).

View File

@ -99,7 +99,7 @@ SiYuanは、プライバシーを最優先とする個人の知識管理シス
* マルチタブ、ドラッグアンドドロップで分割画面 * マルチタブ、ドラッグアンドドロップで分割画面
* テンプレートスニペット * テンプレートスニペット
* JavaScript/CSSスニペット * JavaScript/CSSスニペット
* Android/iOSアプリ * Android/iOS/HarmonyOSアプリ
* Dockerデプロイメント * Dockerデプロイメント
* [API](https://github.com/siyuan-note/siyuan/blob/master/API.md) * [API](https://github.com/siyuan-note/siyuan/blob/master/API.md)
* コミュニティマーケットプレイス * コミュニティマーケットプレイス
@ -110,16 +110,17 @@ SiYuanは、プライバシーを最優先とする個人の知識管理シス
![SiYuan Arch](https://b3logfile.com/file/2023/05/SiYuan_Arch-Sgu8vXT.png "SiYuan Arch") ![SiYuan Arch](https://b3logfile.com/file/2023/05/SiYuan_Arch-Sgu8vXT.png "SiYuan Arch")
| プロジェクト | 説明 | フォーク | スター | | プロジェクト | 説明 | フォーク | スター |
|----------------------------------------------------------|-----------------------|---------------------------------------------------------------------------------|--------------------------------------------------------------------------------------| |----------------------------------------------------------|-----------------|---------------------------------------------------------------------------------|--------------------------------------------------------------------------------------|
| [lute](https://github.com/88250/lute) | エディタエンジン | ![GitHub forks](https://img.shields.io/github/forks/88250/lute) | ![GitHub Repo stars](https://img.shields.io/github/stars/88250/lute) | | [lute](https://github.com/88250/lute) | エディタエンジン | ![GitHub forks](https://img.shields.io/github/forks/88250/lute) | ![GitHub Repo stars](https://img.shields.io/github/stars/88250/lute) |
| [chrome](https://github.com/siyuan-note/siyuan-chrome) | Chrome/Edge拡張 | ![GitHub forks](https://img.shields.io/github/forks/siyuan-note/siyuan-chrome) | ![GitHub Repo stars](https://img.shields.io/github/stars/siyuan-note/siyuan-chrome) | | [chrome](https://github.com/siyuan-note/siyuan-chrome) | Chrome/Edge拡張 | ![GitHub forks](https://img.shields.io/github/forks/siyuan-note/siyuan-chrome) | ![GitHub Repo stars](https://img.shields.io/github/stars/siyuan-note/siyuan-chrome) |
| [bazaar](https://github.com/siyuan-note/bazaar) | コミュニティマーケットプレイス | ![GitHub forks](https://img.shields.io/github/forks/siyuan-note/bazaar) | ![GitHub Repo stars](https://img.shields.io/github/stars/siyuan-note/bazaar) | | [bazaar](https://github.com/siyuan-note/bazaar) | コミュニティマーケットプレイス | ![GitHub forks](https://img.shields.io/github/forks/siyuan-note/bazaar) | ![GitHub Repo stars](https://img.shields.io/github/stars/siyuan-note/bazaar) |
| [dejavu](https://github.com/siyuan-note/dejavu) | データリポジトリ | ![GitHub forks](https://img.shields.io/github/forks/siyuan-note/dejavu) | ![GitHub Repo stars](https://img.shields.io/github/stars/siyuan-note/dejavu) | | [dejavu](https://github.com/siyuan-note/dejavu) | データリポジトリ | ![GitHub forks](https://img.shields.io/github/forks/siyuan-note/dejavu) | ![GitHub Repo stars](https://img.shields.io/github/stars/siyuan-note/dejavu) |
| [petal](https://github.com/siyuan-note/petal) | プラグインAPI | ![GitHub forks](https://img.shields.io/github/forks/siyuan-note/petal) | ![GitHub Repo stars](https://img.shields.io/github/stars/siyuan-note/petal) | | [petal](https://github.com/siyuan-note/petal) | プラグインAPI | ![GitHub forks](https://img.shields.io/github/forks/siyuan-note/petal) | ![GitHub Repo stars](https://img.shields.io/github/stars/siyuan-note/petal) |
| [android](https://github.com/siyuan-note/siyuan-android) | Androidアプリ | ![GitHub forks](https://img.shields.io/github/forks/siyuan-note/siyuan-android) | ![GitHub Repo stars](https://img.shields.io/github/stars/siyuan-note/siyuan-android) | | [android](https://github.com/siyuan-note/siyuan-android) | Androidアプリ | ![GitHub forks](https://img.shields.io/github/forks/siyuan-note/siyuan-android) | ![GitHub Repo stars](https://img.shields.io/github/stars/siyuan-note/siyuan-android) |
| [ios](https://github.com/siyuan-note/siyuan-ios) | iOSアプリ | ![GitHub forks](https://img.shields.io/github/forks/siyuan-note/siyuan-ios) | ![GitHub Repo stars](https://img.shields.io/github/stars/siyuan-note/siyuan-ios) | | [ios](https://github.com/siyuan-note/siyuan-ios) | iOSアプリ | ![GitHub forks](https://img.shields.io/github/forks/siyuan-note/siyuan-ios) | ![GitHub Repo stars](https://img.shields.io/github/stars/siyuan-note/siyuan-ios) |
| [riff](https://github.com/siyuan-note/riff) | 間隔反復 | ![GitHub forks](https://img.shields.io/github/forks/siyuan-note/riff) | ![GitHub Repo stars](https://img.shields.io/github/stars/siyuan-note/riff) | | [harmony](https://github.com/siyuan-note/siyuan-harmony) | HarmonyOSアプリ | ![GitHub forks](https://img.shields.io/github/forks/siyuan-note/siyuan-harmony) | ![GitHub Repo stars](https://img.shields.io/github/stars/siyuan-note/siyuan-harmony) |
| [riff](https://github.com/siyuan-note/riff) | 間隔反復 | ![GitHub forks](https://img.shields.io/github/forks/siyuan-note/riff) | ![GitHub Repo stars](https://img.shields.io/github/stars/siyuan-note/riff) |
## 🌟 スター履歴 ## 🌟 スター履歴
@ -345,6 +346,7 @@ SiYuanは完全にオープンソースであり、貢献を歓迎します
* [ユーザーインターフェースとカーネル](https://github.com/siyuan-note/siyuan) * [ユーザーインターフェースとカーネル](https://github.com/siyuan-note/siyuan)
* [Android](https://github.com/siyuan-note/siyuan-android) * [Android](https://github.com/siyuan-note/siyuan-android)
* [iOS](https://github.com/siyuan-note/siyuan-ios) * [iOS](https://github.com/siyuan-note/siyuan-ios)
* [harmony](https://github.com/siyuan-note/siyuan-harmony)
* [Chromeクリッピング拡張](https://github.com/siyuan-note/siyuan-chrome) * [Chromeクリッピング拡張](https://github.com/siyuan-note/siyuan-chrome)
詳細については[開発ガイド](https://github.com/siyuan-note/siyuan/blob/master/.github/CONTRIBUTING.md)をご覧ください。 詳細については[開発ガイド](https://github.com/siyuan-note/siyuan/blob/master/.github/CONTRIBUTING.md)をご覧ください。

View File

@ -101,7 +101,7 @@
* Tesseract OCR * Tesseract OCR
* 模板片段 * 模板片段
* JavaScript/CSS 代码片段 * JavaScript/CSS 代码片段
* Android/iOS App * Android/iOS/鸿蒙 App
* Docker 部署 * Docker 部署
* [API](API_zh_CN.md) * [API](API_zh_CN.md)
* 社区集市 * 社区集市
@ -112,16 +112,17 @@
![思源笔记架构设计](https://b3logfile.com/file/2023/05/SiYuan_Arch-Sgu8vXT.png "思源笔记架构设计") ![思源笔记架构设计](https://b3logfile.com/file/2023/05/SiYuan_Arch-Sgu8vXT.png "思源笔记架构设计")
| Project | Description | Forks | Stars | | Project | Description | Forks | Stars |
|----------------------------------------------------------|----------------|---------------------------------------------------------------------------------|--------------------------------------------------------------------------------------| |----------------------------------------------------------|--------------|---------------------------------------------------------------------------------|--------------------------------------------------------------------------------------|
| [lute](https://github.com/88250/lute) | 编辑器引擎 | ![GitHub forks](https://img.shields.io/github/forks/88250/lute) | ![GitHub Repo stars](https://img.shields.io/github/stars/88250/lute) | | [lute](https://github.com/88250/lute) | 编辑器引擎 | ![GitHub forks](https://img.shields.io/github/forks/88250/lute) | ![GitHub Repo stars](https://img.shields.io/github/stars/88250/lute) |
| [chrome](https://github.com/siyuan-note/siyuan-chrome) | Chrome/Edge 扩展 | ![GitHub forks](https://img.shields.io/github/forks/siyuan-note/siyuan-chrome) | ![GitHub Repo stars](https://img.shields.io/github/stars/siyuan-note/siyuan-chrome) | | [chrome](https://github.com/siyuan-note/siyuan-chrome) | Chrome/Edge 扩展 | ![GitHub forks](https://img.shields.io/github/forks/siyuan-note/siyuan-chrome) | ![GitHub Repo stars](https://img.shields.io/github/stars/siyuan-note/siyuan-chrome) |
| [bazaar](https://github.com/siyuan-note/bazaar) | 社区集市 | ![GitHub forks](https://img.shields.io/github/forks/siyuan-note/bazaar) | ![GitHub Repo stars](https://img.shields.io/github/stars/siyuan-note/bazaar) | | [bazaar](https://github.com/siyuan-note/bazaar) | 社区集市 | ![GitHub forks](https://img.shields.io/github/forks/siyuan-note/bazaar) | ![GitHub Repo stars](https://img.shields.io/github/stars/siyuan-note/bazaar) |
| [dejavu](https://github.com/siyuan-note/dejavu) | 数据仓库 | ![GitHub forks](https://img.shields.io/github/forks/siyuan-note/dejavu) | ![GitHub Repo stars](https://img.shields.io/github/stars/siyuan-note/dejavu) | | [dejavu](https://github.com/siyuan-note/dejavu) | 数据仓库 | ![GitHub forks](https://img.shields.io/github/forks/siyuan-note/dejavu) | ![GitHub Repo stars](https://img.shields.io/github/stars/siyuan-note/dejavu) |
| [petal](https://github.com/siyuan-note/petal) | 插件 API | ![GitHub forks](https://img.shields.io/github/forks/siyuan-note/petal) | ![GitHub Repo stars](https://img.shields.io/github/stars/siyuan-note/petal) | | [petal](https://github.com/siyuan-note/petal) | 插件 API | ![GitHub forks](https://img.shields.io/github/forks/siyuan-note/petal) | ![GitHub Repo stars](https://img.shields.io/github/stars/siyuan-note/petal) |
| [android](https://github.com/siyuan-note/siyuan-android) | Android App | ![GitHub forks](https://img.shields.io/github/forks/siyuan-note/siyuan-android) | ![GitHub Repo stars](https://img.shields.io/github/stars/siyuan-note/siyuan-android) | | [android](https://github.com/siyuan-note/siyuan-android) | Android App | ![GitHub forks](https://img.shields.io/github/forks/siyuan-note/siyuan-android) | ![GitHub Repo stars](https://img.shields.io/github/stars/siyuan-note/siyuan-android) |
| [ios](https://github.com/siyuan-note/siyuan-ios) | iOS App | ![GitHub forks](https://img.shields.io/github/forks/siyuan-note/siyuan-ios) | ![GitHub Repo stars](https://img.shields.io/github/stars/siyuan-note/siyuan-ios) | | [ios](https://github.com/siyuan-note/siyuan-ios) | iOS App | ![GitHub forks](https://img.shields.io/github/forks/siyuan-note/siyuan-ios) | ![GitHub Repo stars](https://img.shields.io/github/stars/siyuan-note/siyuan-ios) |
| [riff](https://github.com/siyuan-note/riff) | 间隔重复 | ![GitHub forks](https://img.shields.io/github/forks/siyuan-note/riff) | ![GitHub Repo stars](https://img.shields.io/github/stars/siyuan-note/riff) | | [harmony](https://github.com/siyuan-note/siyuan-harmony) | 鸿蒙 App | ![GitHub forks](https://img.shields.io/github/forks/siyuan-note/siyuan-harmony) | ![GitHub Repo stars](https://img.shields.io/github/stars/siyuan-note/siyuan-harmony) |
| [riff](https://github.com/siyuan-note/riff) | 间隔重复 | ![GitHub forks](https://img.shields.io/github/forks/siyuan-note/riff) | ![GitHub Repo stars](https://img.shields.io/github/stars/siyuan-note/riff) |
## 🌟 星标历史 ## 🌟 星标历史
@ -381,6 +382,7 @@ Publish parameters: --accessAuthCode=******(访问授权码)
* [界面和内核](https://github.com/siyuan-note/siyuan) * [界面和内核](https://github.com/siyuan-note/siyuan)
* [Android 端](https://github.com/siyuan-note/siyuan-android) * [Android 端](https://github.com/siyuan-note/siyuan-android)
* [iOS 端](https://github.com/siyuan-note/siyuan-ios) * [iOS 端](https://github.com/siyuan-note/siyuan-ios)
* [鸿蒙端](https://github.com/siyuan-note/siyuan-harmony)
* [Chrome 剪藏扩展](https://github.com/siyuan-note/siyuan-chrome) * [Chrome 剪藏扩展](https://github.com/siyuan-note/siyuan-chrome)
更多细节请参考[开发指南](https://github.com/siyuan-note/siyuan/blob/master/.github/CONTRIBUTING_zh_CN.md)。 更多细节请参考[开发指南](https://github.com/siyuan-note/siyuan/blob/master/.github/CONTRIBUTING_zh_CN.md)。

View File

@ -195,7 +195,7 @@ func getMobileWorkspaces(c *gin.Context) {
ret := gulu.Ret.NewResult() ret := gulu.Ret.NewResult()
defer c.JSON(http.StatusOK, ret) defer c.JSON(http.StatusOK, ret)
if util.ContainerIOS != util.Container && util.ContainerAndroid != util.Container { if util.ContainerIOS != util.Container && util.ContainerAndroid != util.Container && util.ContainerHarmony != util.Container {
return return
} }
@ -315,7 +315,7 @@ func setWorkspaceDir(c *gin.Context) {
return return
} }
if util.ContainerAndroid == util.Container || util.ContainerIOS == util.Container { if util.ContainerAndroid == util.Container || util.ContainerIOS == util.Container || util.ContainerHarmony == util.Container {
util.PushMsg(model.Conf.Language(42), 1000*15) util.PushMsg(model.Conf.Language(42), 1000*15)
time.Sleep(time.Second * 1) time.Sleep(time.Second * 1)
model.Close(false, false, 1) model.Close(false, false, 1)

View File

@ -269,6 +269,8 @@ func getCurrentBackend() string {
return "ios" return "ios"
case util.ContainerAndroid: case util.ContainerAndroid:
return "android" return "android"
case util.ContainerHarmony:
return "harmony"
default: default:
return runtime.GOOS return runtime.GOOS
} }

View File

@ -765,7 +765,7 @@ func (parser *PdfAssetParser) getTextPageWorker(id int, instance pdfium.Pdfium,
// Parse will parse a PDF document using PDFium webassembly module using a worker pool // Parse will parse a PDF document using PDFium webassembly module using a worker pool
func (parser *PdfAssetParser) Parse(absPath string) (ret *AssetParseResult) { func (parser *PdfAssetParser) Parse(absPath string) (ret *AssetParseResult) {
if util.ContainerIOS == util.Container || util.ContainerAndroid == util.Container { if util.ContainerIOS == util.Container || util.ContainerAndroid == util.Container || util.ContainerHarmony == util.Container {
// PDF asset content searching is not supported on mobile platforms // PDF asset content searching is not supported on mobile platforms
return return
} }

View File

@ -33,7 +33,7 @@ import (
var assetsWatcher *fsnotify.Watcher var assetsWatcher *fsnotify.Watcher
func WatchAssets() { func WatchAssets() {
if util.ContainerAndroid == util.Container || util.ContainerIOS == util.Container { if util.ContainerAndroid == util.Container || util.ContainerIOS == util.Container || util.ContainerHarmony == util.Container {
return return
} }

View File

@ -284,7 +284,7 @@ func RecentUpdatedBlocks() (ret []*Block) {
ret = []*Block{} ret = []*Block{}
sqlStmt := "SELECT * FROM blocks WHERE type = 'p' AND length > 1" sqlStmt := "SELECT * FROM blocks WHERE type = 'p' AND length > 1"
if util.ContainerIOS == util.Container || util.ContainerAndroid == util.Container { if util.ContainerIOS == util.Container || util.ContainerAndroid == util.Container || util.ContainerHarmony == util.Container {
sqlStmt = "SELECT * FROM blocks WHERE type = 'd'" sqlStmt = "SELECT * FROM blocks WHERE type = 'd'"
} }

View File

@ -134,7 +134,7 @@ func InitConf() {
if "" != util.Lang { if "" != util.Lang {
initialized := false initialized := false
if util.ContainerAndroid == util.Container || util.ContainerIOS == util.Container { if util.ContainerAndroid == util.Container || util.ContainerIOS == util.Container || util.ContainerHarmony == util.Container {
// 移动端以上次设置的外观语言为准 // 移动端以上次设置的外观语言为准
if "" != Conf.Lang && util.Lang != Conf.Lang { if "" != Conf.Lang && util.Lang != Conf.Lang {
util.Lang = Conf.Lang util.Lang = Conf.Lang
@ -485,7 +485,7 @@ func InitConf() {
// 上次未正常完成数据索引 // 上次未正常完成数据索引
go func() { go func() {
util.WaitForUILoaded() util.WaitForUILoaded()
if util.ContainerIOS == util.Container || util.ContainerAndroid == util.Container { if util.ContainerIOS == util.Container || util.ContainerAndroid == util.Container || util.ContainerHarmony == util.Container {
task.AppendAsyncTaskWithDelay(task.PushMsg, 2*time.Second, util.PushMsg, Conf.language(245), 15000) task.AppendAsyncTaskWithDelay(task.PushMsg, 2*time.Second, util.PushMsg, Conf.language(245), 15000)
} else { } else {
task.AppendAsyncTaskWithDelay(task.PushMsg, 2*time.Second, util.PushMsg, Conf.language(244), 15000) task.AppendAsyncTaskWithDelay(task.PushMsg, 2*time.Second, util.PushMsg, Conf.language(244), 15000)

View File

@ -32,7 +32,7 @@ import (
var emojisWatcher *fsnotify.Watcher var emojisWatcher *fsnotify.Watcher
func WatchEmojis() { func WatchEmojis() {
if util.ContainerAndroid == util.Container || util.ContainerIOS == util.Container { if util.ContainerAndroid == util.Container || util.ContainerIOS == util.Container || util.ContainerHarmony == util.Container {
return return
} }

View File

@ -372,7 +372,7 @@ func subscribeSQLEvents() {
// util.ContextPushMsg(context, msg) // util.ContextPushMsg(context, msg)
//}) //})
eventbus.Subscribe(eventbus.EvtSQLInsertBlocksFTS, func(context map[string]interface{}, blockCount int, hash string) { eventbus.Subscribe(eventbus.EvtSQLInsertBlocksFTS, func(context map[string]interface{}, blockCount int, hash string) {
if util.ContainerAndroid == util.Container || util.ContainerIOS == util.Container { if util.ContainerAndroid == util.Container || util.ContainerIOS == util.Container || util.ContainerHarmony == util.Container {
// Android/iOS 端不显示数据索引和搜索索引状态提示 https://github.com/siyuan-note/siyuan/issues/6392 // Android/iOS 端不显示数据索引和搜索索引状态提示 https://github.com/siyuan-note/siyuan/issues/6392
return return
} }
@ -384,7 +384,7 @@ func subscribeSQLEvents() {
util.ContextPushMsg(context, msg) util.ContextPushMsg(context, msg)
}) })
eventbus.Subscribe(eventbus.EvtSQLDeleteBlocks, func(context map[string]interface{}, rootID string) { eventbus.Subscribe(eventbus.EvtSQLDeleteBlocks, func(context map[string]interface{}, rootID string) {
if util.ContainerAndroid == util.Container || util.ContainerIOS == util.Container { if util.ContainerAndroid == util.Container || util.ContainerIOS == util.Container || util.ContainerHarmony == util.Container {
return return
} }
@ -395,7 +395,7 @@ func subscribeSQLEvents() {
util.ContextPushMsg(context, msg) util.ContextPushMsg(context, msg)
}) })
eventbus.Subscribe(eventbus.EvtSQLUpdateBlocksHPaths, func(context map[string]interface{}, blockCount int, hash string) { eventbus.Subscribe(eventbus.EvtSQLUpdateBlocksHPaths, func(context map[string]interface{}, blockCount int, hash string) {
if util.ContainerAndroid == util.Container || util.ContainerIOS == util.Container { if util.ContainerAndroid == util.Container || util.ContainerIOS == util.Container || util.ContainerHarmony == util.Container {
return return
} }
@ -407,7 +407,7 @@ func subscribeSQLEvents() {
}) })
eventbus.Subscribe(eventbus.EvtSQLInsertHistory, func(context map[string]interface{}) { eventbus.Subscribe(eventbus.EvtSQLInsertHistory, func(context map[string]interface{}) {
if util.ContainerAndroid == util.Container || util.ContainerIOS == util.Container { if util.ContainerAndroid == util.Container || util.ContainerIOS == util.Container || util.ContainerHarmony == util.Container {
return return
} }
@ -419,7 +419,7 @@ func subscribeSQLEvents() {
}) })
eventbus.Subscribe(eventbus.EvtSQLInsertAssetContent, func(context map[string]interface{}) { eventbus.Subscribe(eventbus.EvtSQLInsertAssetContent, func(context map[string]interface{}) {
if util.ContainerAndroid == util.Container || util.ContainerIOS == util.Container { if util.ContainerAndroid == util.Container || util.ContainerIOS == util.Container || util.ContainerHarmony == util.Container {
return return
} }

View File

@ -238,7 +238,7 @@ func CheckAuth(c *gin.Context) {
return return
} }
if strings.HasPrefix(c.Request.RequestURI, "/api/sync/performSync") { if strings.HasPrefix(c.Request.RequestURI, "/api/sync/performSync") {
if util.ContainerIOS == util.Container || util.ContainerAndroid == util.Container { if util.ContainerIOS == util.Container || util.ContainerAndroid == util.Container || util.ContainerHarmony == util.Container {
c.Set(RoleContextKey, RoleAdministrator) c.Set(RoleContextKey, RoleAdministrator)
c.Next() c.Next()
return return

View File

@ -351,7 +351,7 @@ var (
AccessAuthCode string AccessAuthCode string
Lang = "" Lang = ""
Container string // docker, android, ios, std Container string // docker, android, ios, harmony, std
ISMicrosoftStore bool // 桌面端是否是微软商店版 ISMicrosoftStore bool // 桌面端是否是微软商店版
) )
@ -360,6 +360,7 @@ const (
ContainerDocker = "docker" // Docker 容器端 ContainerDocker = "docker" // Docker 容器端
ContainerAndroid = "android" // Android 端 ContainerAndroid = "android" // Android 端
ContainerIOS = "ios" // iOS 端 ContainerIOS = "ios" // iOS 端
ContainerHarmony = "harmony" // 鸿蒙端
LocalHost = "127.0.0.1" // 伺服地址 LocalHost = "127.0.0.1" // 伺服地址
FixedPort = "6806" // 固定端口 FixedPort = "6806" // 固定端口