Skip to content

Commit

Permalink
Merge pull request #34 from ZhuJHua/dev
Browse files Browse the repository at this point in the history
Release v2.4.8-rc
  • Loading branch information
ZhuJHua authored Nov 12, 2024
2 parents 304a65b + a843b51 commit 77dd89a
Show file tree
Hide file tree
Showing 170 changed files with 6,708 additions and 2,613 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@
*.swp
.DS_Store
.atom/
.build/
.buildlog/
.history
.svn/
.swiftpm/
migrate_working_dir/

# IntelliJ related
Expand Down
12 changes: 6 additions & 6 deletions .metadata
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# This file should be version controlled and should not be manually edited.

version:
revision: "7c6b7e9ca485f7eaaed913c6bb50f4be6da47e30"
revision: "2e2c358c9b14765c90343af9df11e12c5dfc3e6c"
channel: "beta"

project_type: app
Expand All @@ -13,11 +13,11 @@ project_type: app
migration:
platforms:
- platform: root
create_revision: 7c6b7e9ca485f7eaaed913c6bb50f4be6da47e30
base_revision: 7c6b7e9ca485f7eaaed913c6bb50f4be6da47e30
- platform: windows
create_revision: 7c6b7e9ca485f7eaaed913c6bb50f4be6da47e30
base_revision: 7c6b7e9ca485f7eaaed913c6bb50f4be6da47e30
create_revision: 2e2c358c9b14765c90343af9df11e12c5dfc3e6c
base_revision: 2e2c358c9b14765c90343af9df11e12c5dfc3e6c
- platform: macos
create_revision: 2e2c358c9b14765c90343af9df11e12c5dfc3e6c
base_revision: 2e2c358c9b14765c90343af9df11e12c5dfc3e6c

# User provided section

Expand Down
26 changes: 20 additions & 6 deletions README.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,27 @@ QQ Group: 760014526
- **Multimedia accessories**:📷 You can add pictures, audio, video or even draw a picture to your diary.
- **Search and classification**:🔍 Easily manage your diary by full-text search and categorization.
- **Custom theme**:🌈 Supports light and dark modes, as well as a variety of color schemes.
- **Data security**:🔒 Keep your diary safe with a password.
- **Data security**:🔒 Keep your diary safe with a password, supports biometric unlocking.
- **Export and share**:🧾 Support all data import/export, as well as single diary sharing.
- **Cloud synchronization**:☁ Support for synchronizing diaries across multiple devices (coming soon).
- **Natural Language Processing (NLP)**:🤖 Let your diary more understand you.
- **Backup and synchronization**:☁ Support for LAN synchronization and WebDav backup (coming soon).
- **Footprint Map** : 🗺️ See your footprints on a map. Every step of your life is worth documenting.
- **Intelligent assistant**:💬 Supports access to third-party large models, provides Q&A, sentiment
analysis and other functions.
- **Local Natural Language Processing (NLP)**:🤖 A more secure intelligent assistant that lets your
diary know you better.

(Note: Cross-platform capabilities are provided by Flutter, platforms with * may require more testing)

## 🔧 Main Technology stack

- [Flutter](https://github.com/flutter/flutter)
- [Isar](https://github.com/isar/isar)
- [GetX](https://github.com/jonataslaw/getx)
- [Flutter](https://github.com/flutter/flutter) ( Cross-platform UI framework )
- [Isar](https://github.com/isar/isar) ( High performance local database )
- [GetX](https://github.com/jonataslaw/getx) ( State management framework )

## 📸 Application screenshot

> The application is constantly updated, and the interface may change slightly in the new version
### Mobile

![Mobile](res/screenshot/mobile.webp)
Expand All @@ -49,6 +55,14 @@ Some capabilities need to apply for third-party SDKS, and the following service

- [QWeather](https://dev.qweather.com/docs/api/)

#### Map service

- [Tianditu](http://lbs.tianditu.gov.cn/server/MapService.html)

#### Intelligent assistant

- [Tencent Hunyuan](https://cloud.tencent.com/document/product/1729/97731)

### Direct mounting

Use it by downloading the compiled installation package in Release, or manually compiling it if you don't have the platform you need.
Expand Down
24 changes: 18 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,25 @@ QQ 交流群:760014526
- **多媒体附件**:📷 可以为你的日记添加图片、音频、视频甚至画一张画。
- **搜索和分类**:🔍 轻松通过全文搜索及分类管理你的日记。
- **自定义主题**:🌈 支持浅色和深色模式,以及多种配色的主题。
- **数据安全**:🔒 通过密码来保障你的日记安全。
- **数据安全**:🔒 通过密码来保障你的日记安全,支持通过生物识别解锁
- **导出和分享**:🧾 支持所有数据的导入/导出,以及单篇日记的分享。
- **云同步**:☁ 支持在多个设备间同步日记(即将支持)。
- **自然语言处理(NLP)**:🤖 让你的日记更懂你。
- **备份与同步**:☁ 支持局域网同步,快速在设备间同步数据,以及 WebDav 备份(即将支持)。
- **足迹地图**:🗺️ 在地图上查看你足迹,生活中的每一步都值得被记录。
- **智能助手**:💬 支持接入第三方大模型,提供问答、情绪分析等功能。
- **本地自然语言处理(NLP)**:🤖 更安全的智能助手,让你的日记更懂你。

(注:跨平台能力由 Flutter 提供,带 * 号的平台可能需要更多测试)

## 🔧 主要技术栈

- [Flutter](https://github.com/flutter/flutter)
- [Isar](https://github.com/isar/isar)
- [GetX](https://github.com/jonataslaw/getx)
- [Flutter](https://github.com/flutter/flutter)(跨平台 UI 框架)
- [Isar](https://github.com/isar/isar)(高性能本地数据库)
- [GetX](https://github.com/jonataslaw/getx)(状态管理框架)

## 📸 应用截图

> 应用持续更新中,新版本界面可能稍有变化
### 移动端

![移动端](res/screenshot/mobile.webp)
Expand All @@ -49,6 +53,14 @@ QQ 交流群:760014526

- [和风天气](https://dev.qweather.com/docs/api/)

#### 地图服务

- [天地图](http://lbs.tianditu.gov.cn/server/MapService.html)

#### 智能助手

- [腾讯混元大模型](https://cloud.tencent.com/document/product/1729/97731)

### 直接安装

通过下载 Release 中已编译好的安装包来使用,如果没有你所需要的平台,请使用手动编译。
Expand Down
4 changes: 0 additions & 4 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ android {
}
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId = "cn.yooss.moodiary"
// You can update the following values to match your application needs.
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
Expand All @@ -63,7 +62,6 @@ android {
buildTypes {
release {
signingConfig = signingConfigs.config

minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
Expand All @@ -81,8 +79,6 @@ flutter {
source = "../.."
}
dependencies {
implementation 'com.tencent.shiply:upgrade:2.2.0'
implementation 'com.tencent.shiply:upgrade-diff-pkg-patch:2.2.0'
implementation 'com.github.gzu-liyujiang:Android_CN_OAID:4.2.9'
}

This file was deleted.

73 changes: 6 additions & 67 deletions android/app/src/main/kotlin/cn/yooss/mood_diary/MainActivity.kt
Original file line number Diff line number Diff line change
@@ -1,57 +1,21 @@
package cn.yooss.mood_diary

import android.graphics.Color
import androidx.core.view.ViewCompat
import androidx.core.view.WindowCompat
import android.os.Bundle
import androidx.activity.enableEdgeToEdge
import com.github.gzuliyujiang.oaid.DeviceID
import com.tencent.shiply.processor.DiffPkgHandler
import com.tencent.shiply.processor.OriginBasePkgFile
import com.tencent.upgrade.bean.UpgradeConfig
import com.tencent.upgrade.core.UpgradeManager
import io.flutter.embedding.android.FlutterFragmentActivity
import io.flutter.embedding.engine.FlutterEngine
import io.flutter.plugin.common.MethodChannel


class MainActivity : FlutterFragmentActivity() {

override fun onCreate(savedInstanceState: Bundle?) {
enableEdgeToEdge()
super.onCreate(savedInstanceState)
}

override fun configureFlutterEngine(flutterEngine: FlutterEngine) {
super.configureFlutterEngine(flutterEngine)
MethodChannel(
flutterEngine.dartExecutor.binaryMessenger, "view_channel"
).setMethodCallHandler { call, result ->
if (call.method == "setSystemUIVisibility") {
setSystemUIVisibility()
result.success(null)
} else {
result.notImplemented()
}
}
MethodChannel(
flutterEngine.dartExecutor.binaryMessenger, "shiply_channel"
).setMethodCallHandler { call, result ->
when (call.method) {
"initShiply" -> {
initShiply()
result.success(null)
}


"checkUpdate" -> {
checkUpdate(result)
}

"startDownload" -> {
startDownload()
result.success(null)
}

else -> {
result.notImplemented()
}
}
}
MethodChannel(
flutterEngine.dartExecutor.binaryMessenger, "oaid_channel"
).setMethodCallHandler { call, result ->
Expand All @@ -68,35 +32,10 @@ class MainActivity : FlutterFragmentActivity() {

}


private fun checkUpdate(result: MethodChannel.Result) {
UpgradeManager.getInstance().checkUpgrade(true, null, HandleUpgradeCallback(result))
}

private fun startDownload() {
UpgradeManager.getInstance().startDownload()
}

private fun initShiply() {
val builder: UpgradeConfig.Builder = UpgradeConfig.Builder()
val config: UpgradeConfig =
builder.appId("").appKey("")
.diffPkgHandler(DiffPkgHandler()).basePkgFileForDiffUpgrade(OriginBasePkgFile())
.cacheExpireTime(1000 * 60 * 60 * 6).userId("").build()
UpgradeManager.getInstance().init(application, config)
}

private fun getOAID(resultCallback: MethodChannel.Result) {
if (DeviceID.supportedOAID(application)) {
DeviceID.getOAID(application, HandleGetOAID(resultCallback));
}
}

private fun setSystemUIVisibility() {
val windowInsetsController = ViewCompat.getWindowInsetsController(window.decorView)
WindowCompat.setDecorFitsSystemWindows(window, false)
//window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS)
window.navigationBarColor = Color.TRANSPARENT
}

}
3 changes: 3 additions & 0 deletions devtools_options.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
description: This file stores settings for Dart & Flutter DevTools.
documentation: https://docs.flutter.dev/tools/devtools/extensions#configure-extension-enablement-states
extensions:
1 change: 1 addition & 0 deletions ios/Flutter/Debug.xcconfig
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
#include "Generated.xcconfig"
1 change: 1 addition & 0 deletions ios/Flutter/Release.xcconfig
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
#include "Generated.xcconfig"
Loading

0 comments on commit 77dd89a

Please sign in to comment.