Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V2 #20

Merged
merged 110 commits into from
Apr 9, 2024
Merged

V2 #20

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
110 commits
Select commit Hold shift + click to select a range
edeea4b
📖Implement
Cierra-Runis Jan 7, 2024
6b1ce29
📖Store enum of tags instead icon data
Cierra-Runis Jan 7, 2024
f8b92cb
📖Revise
Cierra-Runis Jan 13, 2024
6789256
📖Move app code to ./app/
Cierra-Runis Jan 13, 2024
9d7db7b
📖Reimport
Cierra-Runis Jan 13, 2024
7b10008
📖Init dart server code
Cierra-Runis Jan 13, 2024
d863190
📖Move codes
Cierra-Runis Jan 13, 2024
10da493
📖Move codes
Cierra-Runis Jan 13, 2024
d2fd81f
📖Init go server code
Cierra-Runis Jan 13, 2024
d2f79c8
📖Update package
Cierra-Runis Jan 19, 2024
17ead58
📖Improve localization
Cierra-Runis Jan 19, 2024
d547fe2
📖Improve data structure
Cierra-Runis Jan 19, 2024
7e1b1e1
🌍Add accentColor to settings
Cierra-Runis Jan 19, 2024
84aaafe
🔧Fix expand error
Cierra-Runis Jan 19, 2024
0d3b27d
📖Improve code quality
Cierra-Runis Jan 19, 2024
d914c0a
📖Now close button not hide more
Cierra-Runis Jan 19, 2024
7d39524
🔧Fix state losing when resizing window
Cierra-Runis Jan 19, 2024
040802b
🌍Redesign `DiaryPageItem`
Cierra-Runis Jan 19, 2024
9a315a9
📖Disable some function temporary
Cierra-Runis Jan 19, 2024
e9a1108
📖Improve code quality
Cierra-Runis Jan 19, 2024
718afdb
📖Add `imageDirectory` to `Paths`
Cierra-Runis Jan 19, 2024
fb22152
📖Upgrade `compileSdkVersion`
Cierra-Runis Jan 20, 2024
fe54643
📖Remove comments
Cierra-Runis Jan 20, 2024
89af127
📖Improve `context.pushDialog`
Cierra-Runis Jan 20, 2024
ec7b40a
📖Remove paddings
Cierra-Runis Jan 20, 2024
a922b51
🔧Fix file select
Cierra-Runis Jan 20, 2024
f253131
📖Remove comments
Cierra-Runis Jan 20, 2024
2b925e9
📖Improve localization
Cierra-Runis Jan 20, 2024
7a5bf65
📖Enable `ImageView` now
Cierra-Runis Jan 20, 2024
1e85bc4
🌍Redesign `EditorPage` & `DiaryPageItem`
Cierra-Runis Jan 20, 2024
1ac96d4
🔧Fix colorScheme error
Cierra-Runis Jan 20, 2024
98eab05
📖Re-implement `EditorToolbar`
Cierra-Runis Jan 20, 2024
15d39bd
🌍Add sync entry
Cierra-Runis Jan 20, 2024
5d51059
📖Remove divider of `BasedSplitView`
Cierra-Runis Jan 20, 2024
b0e63c2
🔧Fix `thisDayLastYear`
Cierra-Runis Jan 20, 2024
43451d8
📖Update settings.json
Cierra-Runis Jan 20, 2024
1af5a73
🔧Fix new diary ID
Cierra-Runis Jan 21, 2024
a139ef3
📖Add new extension
Cierra-Runis Jan 27, 2024
aac9b93
🔧Fix weird error
Cierra-Runis Jan 27, 2024
2a23b0d
📖Improve code quality
Cierra-Runis Jan 27, 2024
e4aef82
📖Improve language codes
Cierra-Runis Jan 27, 2024
4c11c44
📖Use `Json` instead `Map<String, dynamic>`
Cierra-Runis Jan 27, 2024
0b34a29
📖Improve localization
Cierra-Runis Jan 29, 2024
484cc6d
🔧Fix type error & 📖Improve `Diary().plainText`
Cierra-Runis Jan 29, 2024
d6b2262
📖Improve code quality
Cierra-Runis Jan 29, 2024
9b94e63
📖Improve code quality
Cierra-Runis Jan 29, 2024
5225d85
📖Improve code quality
Cierra-Runis Jan 29, 2024
0ed508d
🌍Enable impeller for `Android`
Cierra-Runis Jan 29, 2024
6aa762e
📖Update `pubspec.yaml`
Cierra-Runis Jan 29, 2024
5a42839
📖Rename `fileName` to `filename`
Cierra-Runis Jan 29, 2024
7234a4f
📖Now `ThirdPartyLicense` & `PrivacyPolicy` link to GitHub
Cierra-Runis Jan 29, 2024
eae7de8
📖Improve code quality
Cierra-Runis Jan 29, 2024
42b038b
🌍Import v1 file import tile
Cierra-Runis Jan 29, 2024
df07e47
📖Remove `.gitignore`
Cierra-Runis Jan 29, 2024
e3ec5ab
🔧Fix issues
Cierra-Runis Jan 29, 2024
19df4fb
📖Move `DiaryShareButton` to `_DiaryShareButton`
Cierra-Runis Jan 30, 2024
cee17e0
📖Update packages
Cierra-Runis Jan 30, 2024
2149326
🔧Fix `Gallery` error when deleting photo
Cierra-Runis Jan 30, 2024
a777d02
📖Code clean
Cierra-Runis Jan 30, 2024
9f869ef
📖Bringing image insertion back
Cierra-Runis Jan 30, 2024
d8b0a14
🔧Fix `_EditingDialog` doesn't push `EditorPage`
Cierra-Runis Jan 30, 2024
59e373c
📖Update `pubspec.yaml`
Cierra-Runis Jan 30, 2024
a42ee24
🔧Fix sort error
Cierra-Runis Feb 1, 2024
64fd329
📖Improve embeds
Cierra-Runis Feb 1, 2024
12638d6
🌍Add search function
Cierra-Runis Feb 1, 2024
53af3ed
📖Remove unnecessary `ConsumerWidget`
Cierra-Runis Feb 3, 2024
34a4b28
🌍Improve search function
Cierra-Runis Feb 3, 2024
d0bad1f
📖Improve code quality
Cierra-Runis Feb 3, 2024
ad69ab7
🔧Fix apk size issue
Cierra-Runis Feb 14, 2024
94e25d8
📖Update `pubspec.yaml`
Cierra-Runis Feb 14, 2024
efe7d99
📖Remove /platform
Cierra-Runis Feb 14, 2024
0c5b2af
📖Improve code quality
Cierra-Runis Feb 14, 2024
090c98a
📖Improve extension
Cierra-Runis Feb 14, 2024
d8d9c50
📖Reimport path package
Cierra-Runis Feb 14, 2024
6eb1e06
📖Rename `RootView` to `RootPage`
Cierra-Runis Feb 14, 2024
8862959
📖Improve code quality
Cierra-Runis Feb 14, 2024
f11a340
📖Others
Cierra-Runis Feb 14, 2024
e37aef6
📖Update to Flutter 3.19
Cierra-Runis Feb 16, 2024
6ed3e84
📖Update packages
Cierra-Runis Feb 16, 2024
99c4379
📖Remove border of search textfield
Cierra-Runis Feb 16, 2024
3730416
📖Use SVG as icon
Cierra-Runis Feb 18, 2024
fbc3d36
📖Use `ExpansionTile` instead sticky header
Cierra-Runis Feb 18, 2024
eb75567
📖Add opacity to `DiaryListItem`
Cierra-Runis Feb 18, 2024
2ccfeb1
📖Make `HomePage` & `MorePage` keep alive
Cierra-Runis Feb 18, 2024
ef39d7a
📖Extract widget
Cierra-Runis Feb 18, 2024
ad27397
📖Update packages
Cierra-Runis Feb 18, 2024
3e36b95
📖Move logic
Cierra-Runis Feb 18, 2024
7dfd601
⚠️`belongTo` replaces `createAt` responsibility in `Diary`
Cierra-Runis Feb 20, 2024
6f592bd
📖Make `moodType` & `weatherType` nullable
Cierra-Runis Feb 20, 2024
400cf29
📖Rename `github`
Cierra-Runis Feb 20, 2024
3ecbfb8
📖Improve code quality
Cierra-Runis Feb 21, 2024
c557983
📖Update packages
Cierra-Runis Feb 21, 2024
914e464
🌍Implement based_snap_assist
Cierra-Runis Feb 22, 2024
d232a27
📖Improve the spacing of `_EditorToolbar`
Cierra-Runis Feb 22, 2024
fa9ebfc
📖Improve code quality
Cierra-Runis Feb 23, 2024
99d1586
🌍Implement advance search
Cierra-Runis Feb 23, 2024
af249a8
📖Set `_ScrollBehavior()` to `_ScrollBehavior.noScrollBar`
Cierra-Runis Feb 23, 2024
a6ce918
📖Update macOS
Cierra-Runis Feb 25, 2024
e7b5177
🔧Fix keyboard blocking actions
Cierra-Runis Feb 28, 2024
92819d5
📖Use `_ScrollBehavior()`
Cierra-Runis Mar 6, 2024
45a69ff
📖Move code
Cierra-Runis Mar 6, 2024
5d48137
📖Update iOS & macOS
Cierra-Runis Mar 6, 2024
03d3931
📖Improve _BottomActions
Cierra-Runis Mar 6, 2024
a93f8a2
🔧Fix controller dispose
Cierra-Runis Mar 16, 2024
c7c7c25
🔧Fix button logic
Cierra-Runis Apr 8, 2024
2ec2828
📖Use new grammar
Cierra-Runis Apr 8, 2024
87d327b
🌍Improve performance of GalleryCard
Cierra-Runis Apr 8, 2024
e8a58e2
📖Get API key and built time from environment
Cierra-Runis Apr 8, 2024
e685b61
📖Use New storeFile address
Cierra-Runis Apr 8, 2024
d018fec
📖Update packages
Cierra-Runis Apr 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion README_ja.md → .github/README_ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<p>『 Mercurius - 日記を書きましょう!』</p>

<a href="https://github.com/Cierra-Runis/mercurius/blob/master/README.md">English</a> | <a href="https://github.com/Cierra-Runis/mercurius/blob/master/README_zh.md">中文</a> | <a href="https://github.com/Cierra-Runis/mercurius/blob/master/README_ja.md">日本語</a>
<a href="https://github.com/Cierra-Runis/mercurius/blob/master/README.md">English</a> | <a href="https://github.com/Cierra-Runis/mercurius/blob/master/.github/README_zh.md">中文</a> | <a href="https://github.com/Cierra-Runis/mercurius/blob/master/.github/README_ja.md">日本語</a>

</div>

Expand Down
File renamed without changes.
55 changes: 54 additions & 1 deletion .github/image/icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 16 additions & 12 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"blockquote",
"Buildless",
"checkmark",
"CRDT",
"Cupertino",
"diarys",
"displaymode",
Expand All @@ -15,6 +16,7 @@
"hitokoto",
"horiz",
"keframe",
"keypress",
"lerp",
"LTRB",
"mercurius",
Expand All @@ -25,6 +27,7 @@
"riverpod",
"Saira",
"salomon",
"scrollbars",
"startfile",
"syncfusion",
"timeago",
Expand All @@ -46,20 +49,21 @@
"**/.next": true,
"**/*.g.dart": true,
"**/*.freezed.dart": true,
"custom_lint.log": true,
"mercurius.iml": true,
".metadata": true,
".flutter-plugins": true,
".flutter-plugins-dependencies": true,
"build": true,
".idea": true,
".dart_tool": true,
"splitMap": true,
"lib/l10n/intl": true,
"lib/l10n/**/*.dart": true
"**/custom_lint.log": true,
"**/mercurius.iml": true,
"**/.metadata": true,
"**/.flutter-plugins": true,
"**/.flutter-plugins-dependencies": true,
"**/build": true,
"**/.idea": true,
"**/.dart_tool": true,
"**/splitMap": true,
"**/lib/l10n/intl": true,
"**/lib/l10n/**/*.dart": true
},
"commentTranslate.hover.string": true,
"commentTranslate.hover.variable": true,
"commentTranslate.multiLineMerge": true,
"explorerExclude.backup": {}
"explorerExclude.backup": {},
"java.configuration.updateBuildConfiguration": "automatic"
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<p>『 Mercurius - Write Some Diaries!』</p>

<a href="https://github.com/Cierra-Runis/mercurius/blob/master/README.md">English</a> | <a href="https://github.com/Cierra-Runis/mercurius/blob/master/README_zh.md">中文</a> | <a href="https://github.com/Cierra-Runis/mercurius/blob/master/README_ja.md">日本語</a>
<a href="https://github.com/Cierra-Runis/mercurius/blob/master/README.md">English</a> | <a href="https://github.com/Cierra-Runis/mercurius/blob/master/.github/README_zh.md">中文</a> | <a href="https://github.com/Cierra-Runis/mercurius/blob/master/.github/README_ja.md">日本語</a>

</div>

Expand Down
22 changes: 22 additions & 0 deletions SYNC.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
## Sync

`A => B`

| id | createAt | editAt | hash | 情形 | 处理 |
| :-: | :------: | :----: | :--: | :------------------: | :-----------------------------------: |
| `=` | `=` | `=` | `=` | 两方完全相同 | 不做处理,两者步进 `id` |
| `=` | `=` | `=` | `!=` | 各自创建日记 | 两者新建错开,两者步进 `id` |
| `=` | `=` | `!=` | `=` | 各自修改未更新 | 两者都取 `editAt` 大者,两者步进 `id` |
| `=` | `=` | `!=` | `!=` | 各自修改更新 | 两者新建错开,两者步进 `id` |
| `=` | `!=` | `=` | `=` | 各自创建日记 | 两者新建错开,两者步进 `id` |
| `=` | `!=` | `=` | `!=` | 各自创建日记 | 两者新建错开,两者步进 `id` |
| `=` | `!=` | `!=` | `=` | 各自创建日记 | 两者新建错开,两者步进 `id` |
| `=` | `!=` | `!=` | `!=` | 各自创建日记 | 两者新建错开,两者步进 `id` |
| `>` | `-` | `-` | `-` | `A` 删除小 `id` 日记 | `B` 删除小 `id` 日记,`B` 步进 `id` |
| `<` | `-` | `-` | `-` | `A` 新建小 `id` 日记 | `B` 新增小 `id` 日记,`A` 步进 `id` |

## NOTE

- [关于离线优先应用的多端同步的思考和总结](https://www.auroras.xyz/blog/post/关于离线优先应用的多端同步的思考和总结/)
- [Isar CRDT](https://github.com/kerero/isar-crdt)
- [数据同步原理](https://segmentfault.com/a/1190000004887200)
11 changes: 0 additions & 11 deletions android/settings.gradle

This file was deleted.

7 changes: 3 additions & 4 deletions .gitignore → app/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,10 @@ app.*.map.json
/android/app/profile
/android/app/release

# release_tool
.release_tool/*
assets/fonts/**

*.g.dart
*.freezed.dart
lib/l10n/**/*.dart
lib/common/key.dart

.release_tool/
.env
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
40 changes: 21 additions & 19 deletions android/app/build.gradle → app/android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
plugins {
id "com.android.application"
id "kotlin-android"
id "dev.flutter.flutter-gradle-plugin"
}


def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
Expand All @@ -6,11 +13,6 @@ if (localPropertiesFile.exists()) {
}
}

def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}

def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
Expand All @@ -21,12 +23,8 @@ if (flutterVersionName == null) {
flutterVersionName = '1.0'
}

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion 33
compileSdkVersion 34
ndkVersion flutter.ndkVersion

compileOptions {
Expand All @@ -53,34 +51,38 @@ android {
}

signingConfigs{
debug{
keyAlias 'key_alias'
keyPassword 'key_alias_password'
storeFile file('C:\\click\\key_alias.jks')
storePassword 'key_alias_password'
}
release{
keyAlias 'key_alias'
keyPassword 'key_alias_password'
storeFile file('C:\\click\\key_alias.jks')
storeFile file('D:\\Desktop\\Default\\key_alias.jks')
storePassword 'key_alias_password'
}
}

buildTypes {
debug {
signingConfig signingConfigs.debug
applicationIdSuffix ".debug"
}
release {
signingConfig signingConfigs.release
}
}

/// TIPS: https://juejin.cn/post/7330471268033478666
packagingOptions {
dex {
useLegacyPackaging true
}
jniLibs {
useLegacyPackaging true
}
}
}

flutter {
source '../..'
}

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.20"
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
<style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
<item name="android:windowBackground">?android:colorBackground</item>
</style>
</resources>
</resources>
15 changes: 2 additions & 13 deletions android/build.gradle → app/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,16 +1,3 @@
buildscript {
ext.kotlin_version = '1.7.20'
repositories {
google()
mavenCentral()
}

dependencies {
classpath 'com.android.tools.build:gradle:7.1.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}

allprojects {
repositories {
google()
Expand All @@ -21,6 +8,8 @@ allprojects {
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}

Expand Down
File renamed without changes.
26 changes: 26 additions & 0 deletions app/android/settings.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
pluginManagement {
def flutterSdkPath = {
def properties = new Properties()
file("local.properties").withInputStream { properties.load(it) }
def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
return flutterSdkPath
}
settings.ext.flutterSdkPath = flutterSdkPath()

includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle")

repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}

plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "7.1.3" apply false
id "org.jetbrains.kotlin.android" version "1.7.20" apply false
}

include ":app"
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added app/assets/fonts/MiSans/MiSans-Bold.ttf
Binary file not shown.
Binary file added app/assets/fonts/MiSans/MiSans-Demibold.ttf
Binary file not shown.
Binary file added app/assets/fonts/MiSans/MiSans-ExtraLight.ttf
Binary file not shown.
Binary file added app/assets/fonts/MiSans/MiSans-Heavy.ttf
Binary file not shown.
Binary file added app/assets/fonts/MiSans/MiSans-Light.ttf
Binary file not shown.
Binary file added app/assets/fonts/MiSans/MiSans-Medium.ttf
Binary file not shown.
Binary file added app/assets/fonts/MiSans/MiSans-Normal.ttf
Binary file not shown.
Binary file added app/assets/fonts/MiSans/MiSans-Regular.ttf
Binary file not shown.
Binary file added app/assets/fonts/MiSans/MiSans-Semibold.ttf
Binary file not shown.
Binary file added app/assets/fonts/MiSans/MiSans-Thin.ttf
Binary file not shown.
Binary file added app/assets/fonts/Saira/Saira-Black.ttf
Binary file not shown.
Binary file added app/assets/fonts/Saira/Saira-BlackItalic.ttf
Binary file not shown.
Binary file added app/assets/fonts/Saira/Saira-Bold.ttf
Binary file not shown.
Binary file added app/assets/fonts/Saira/Saira-BoldItalic.ttf
Binary file not shown.
Binary file added app/assets/fonts/Saira/Saira-ExtraBold.ttf
Binary file not shown.
Binary file added app/assets/fonts/Saira/Saira-ExtraBoldItalic.ttf
Binary file not shown.
Binary file added app/assets/fonts/Saira/Saira-ExtraLight.ttf
Binary file not shown.
Binary file added app/assets/fonts/Saira/Saira-ExtraLightItalic.ttf
Binary file not shown.
Binary file added app/assets/fonts/Saira/Saira-Italic.ttf
Binary file not shown.
Binary file added app/assets/fonts/Saira/Saira-Light.ttf
Binary file not shown.
Binary file added app/assets/fonts/Saira/Saira-LightItalic.ttf
Binary file not shown.
Binary file added app/assets/fonts/Saira/Saira-Medium.ttf
Binary file not shown.
Binary file added app/assets/fonts/Saira/Saira-MediumItalic.ttf
Binary file not shown.
Binary file added app/assets/fonts/Saira/Saira-Regular.ttf
Binary file not shown.
Binary file added app/assets/fonts/Saira/Saira-SemiBold.ttf
Binary file not shown.
Binary file added app/assets/fonts/Saira/Saira-SemiBoldItalic.ttf
Binary file not shown.
Binary file added app/assets/fonts/Saira/Saira-Thin.ttf
Binary file not shown.
Binary file added app/assets/fonts/Saira/Saira-ThinItalic.ttf
Binary file not shown.
Loading