Skip to content

Commit 422f5ae

Browse files
author
Elemen
committed
Merge commit '449e8a33e2997c1f00f9eb514892e15f3c3643ad'
# Conflicts: # pubspec.yaml
2 parents 570a46d + 449e8a3 commit 422f5ae

27 files changed

+1780
-134
lines changed

README.md

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,14 @@
55
Shorey
66
<br>
77
</h1>
8-
这是一款开源笔记应用, 支持Android/iOS双平台, 使用Flutter 2开发, 体验Flutter的同时也希望做一个能成为个人知识中转站的应用, 任重道远 :)
8+
这是一款开源笔记应用, 支持Android/iOS双平台, 使用Flutter 2开发, 体验Flutter的同时也希望做一个能成为个人知识中转站的应用, 让你更方便的把平时收集到的信息记录下来, 最后沉淀到知识库中.
9+
10+
后边会先开发联动Notion, 让你的Notion成为后台知识库.
911

1012
Shorey is a simple note app which is built with Flutter 2 and supports both Android/iOS platforms. It provides me full experience of interacting with Flutter and in the meantime I hope it can be your knowledge/memory transition tool, and yes, there still much work to do.
1113

14+
Now I focus on linking Notion, in order to make Notion your backend knowledge database.
15+
1216
**特点:**
1317
* Google Material UI风格
1418
* 轻量化, 只有10m大小
@@ -20,17 +24,22 @@ Shorey is a simple note app which is built with Flutter 2 and supports both Andr
2024
* 国际化适配, 支持中英文切换
2125
* 更多功能开发中…
2226

27+
> 软件还在开发阶段,可能会有颠覆性的改变,请注意。It is still under developing, breaking changes may occur.
28+
29+
2330
## 分享
2431
[个人笔记软件Shorey开源(一) - 软件介绍/产品理念](https://mp.weixin.qq.com/s/W-3AhgCHSIQWLomPuyIPwA)
2532

33+
[个人笔记软件Shorey开源(二) - 使用Flutter开发App入门](https://mp.weixin.qq.com/s/_7Kl9nJLHaX6ZbZzLKREYQ)
34+
2635
## 马上开始
2736
**应用运行要求:**
28-
1. Android 5.0 +
37+
1. Android 5.0+
2938
2. iOS 10+
3039

3140
**项目编译要求:**
3241
1. Android SDK 28/Xcode 13
33-
2. Flutter SDK 2.5.3
42+
2. Flutter SDK 2.8.1
3443

3544
## 应用展示
3645
UI部分大量参考了Flutter官方的Gallery应用. 另外还在关于页埋了个小彩蛋, 希望喜欢.
@@ -44,7 +53,7 @@ Android: 可直接在Release板块下载apk体验.或使用下方二维码下载
4453
![lqHI](https://user-images.githubusercontent.com/10020581/140268740-ff2558a8-c8d3-4ae6-ac08-8b9bec2a1c10.png)
4554

4655

47-
iOS: 可下载源码使用 flutter run --release 编译体验, 后期考虑上testflight.
56+
iOS: 可下载源码使用 $ flutter run --release 编译体验, 后期考虑上testflight.
4857

4958

5059
## 技术架构

android/app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
android:theme="@style/LaunchTheme"
2929
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
3030
android:hardwareAccelerated="true"
31+
android:screenOrientation="portrait"
3132
android:windowSoftInputMode="adjustResize">
3233
<!-- Specifies an Android theme to apply to this Activity as soon as
3334
the Android process has started. This theme is visible to the user

lib/config/api.dart

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
///
2+
/// Author: Elemen
3+
/// Github: https://github.com/elementlo
4+
/// Date: 2022/1/13
5+
/// Description:
6+
///
7+
8+
const String notionUsers = 'v1/users';
9+
const String retrieveNotionDatabase = 'v1/databases';
10+
const String retrieveNotionPages = 'v1/pages';

lib/config/config.dart

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,22 @@ class Routes {
2323

2424
///mantra
2525
class Mantra {
26+
2627
static String mantra1 = S.current.mantra1;
2728
static String mantra2 = S.current.mantra2;
2829
static String mantra3 = S.current.mantra3;
2930
static String mantra4 = 'El psy kongroo.';
3031

31-
static List<String> mantraList = [mantra1, mantra2, mantra3, mantra4];
32+
static List<String> get mantraList => updateMantra();
33+
34+
static List<String> updateMantra(){
35+
mantra1 = S.current.mantra1;
36+
mantra2 = S.current.mantra2;
37+
mantra3 = S.current.mantra3;
38+
mantra4 = 'El psy kongroo.';
39+
return [mantra1, mantra2, mantra3, mantra4];
40+
}
41+
3242
}
3343

3444
class SColor {

lib/database/database.dart

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@ LazyDatabase _openConnection() {
9494
}
9595

9696
@DriftDatabase(tables: [ToDos, Categories, HeatGraph, ActionsHistory])
97-
class DbProvider extends _$DbProvider {
98-
DbProvider() : super(_openConnection());
97+
class DatabaseProvider extends _$DbProvider {
98+
DatabaseProvider() : super(_openConnection());
9999

100100
@override
101101
int get schemaVersion => 1;
@@ -158,15 +158,15 @@ class DbProvider extends _$DbProvider {
158158
return count;
159159
}
160160

161-
Future deleteCategory(int id) async {
161+
Future deleteCategory(int id) {
162162
return (delete(categories)..where((tbl) => tbl.id.equals(id))).go();
163163
}
164164

165-
Future insertCategory(CategoriesCompanion entity) async {
165+
Future insertCategory(CategoriesCompanion entity) {
166166
return into(categories).insert(entity);
167167
}
168168

169-
Future updateCategory(CategoriesCompanion entity) async {
169+
Future updateCategory(CategoriesCompanion entity) {
170170
return update(categories).replace(entity);
171171
}
172172

lib/generated/intl/messages_en.dart

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ class MessageLookup extends MessageLookupByLibrary {
3434
"archivedLess": MessageLookupByLibrary.simpleMessage("Archived less"),
3535
"archivedList": MessageLookupByLibrary.simpleMessage("Archived"),
3636
"archivedMore": MessageLookupByLibrary.simpleMessage("More"),
37+
"bindNotion": MessageLookupByLibrary.simpleMessage("Link Notion"),
3738
"cancelAlertTime":
3839
MessageLookupByLibrary.simpleMessage("Cleared alert time"),
3940
"categoryInformation":
@@ -56,6 +57,10 @@ class MessageLookup extends MessageLookupByLibrary {
5657
"itemAlert": MessageLookupByLibrary.simpleMessage("Title"),
5758
"itemRemark": MessageLookupByLibrary.simpleMessage("Remark"),
5859
"languages": MessageLookupByLibrary.simpleMessage("Languages"),
60+
"linkNotionDatabase":
61+
MessageLookupByLibrary.simpleMessage("Link root page"),
62+
"linkNotionInfo": MessageLookupByLibrary.simpleMessage(
63+
"Fill in the blanks to link Notion"),
5964
"mainCategory": MessageLookupByLibrary.simpleMessage("Category"),
6065
"mainFocusToday":
6166
MessageLookupByLibrary.simpleMessage("Main Focus Today"),
@@ -68,6 +73,9 @@ class MessageLookup extends MessageLookupByLibrary {
6873
"I am free and that is why I am lost."),
6974
"noAlert": MessageLookupByLibrary.simpleMessage("No alert"),
7075
"notificationTitle": MessageLookupByLibrary.simpleMessage("Retrospect"),
76+
"notion": MessageLookupByLibrary.simpleMessage("Notion account"),
77+
"notionPageId": MessageLookupByLibrary.simpleMessage("Page ID"),
78+
"notionToken": MessageLookupByLibrary.simpleMessage("Notion token"),
7179
"retrospect": MessageLookupByLibrary.simpleMessage("Retrospect"),
7280
"settings": MessageLookupByLibrary.simpleMessage("Settings"),
7381
"shoreyMomment": MessageLookupByLibrary.simpleMessage("Shorey moment"),

lib/generated/intl/messages_zh.dart

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ class MessageLookup extends MessageLookupByLibrary {
3333
"archivedLess": MessageLookupByLibrary.simpleMessage("归档较少"),
3434
"archivedList": MessageLookupByLibrary.simpleMessage("已归档"),
3535
"archivedMore": MessageLookupByLibrary.simpleMessage("较多"),
36+
"bindNotion": MessageLookupByLibrary.simpleMessage("关联Notion"),
3637
"cancelAlertTime": MessageLookupByLibrary.simpleMessage("已取消提醒时间"),
3738
"categoryInformation": MessageLookupByLibrary.simpleMessage("类别信息"),
3839
"categoryList": MessageLookupByLibrary.simpleMessage("类别"),
@@ -52,6 +53,9 @@ class MessageLookup extends MessageLookupByLibrary {
5253
"itemAlert": MessageLookupByLibrary.simpleMessage("标题"),
5354
"itemRemark": MessageLookupByLibrary.simpleMessage("备注"),
5455
"languages": MessageLookupByLibrary.simpleMessage("语言"),
56+
"linkNotionDatabase": MessageLookupByLibrary.simpleMessage("关联根页面"),
57+
"linkNotionInfo":
58+
MessageLookupByLibrary.simpleMessage("填写下面两项信息使Shorey与Notion连接"),
5559
"mainCategory": MessageLookupByLibrary.simpleMessage("类别"),
5660
"mainFocusToday": MessageLookupByLibrary.simpleMessage("今日聚焦"),
5761
"mantra": MessageLookupByLibrary.simpleMessage("格言"),
@@ -61,6 +65,9 @@ class MessageLookup extends MessageLookupByLibrary {
6165
"mantra3": MessageLookupByLibrary.simpleMessage("我是自由的, 那就是我迷失的原因."),
6266
"noAlert": MessageLookupByLibrary.simpleMessage("不提醒"),
6367
"notificationTitle": MessageLookupByLibrary.simpleMessage("回顾"),
68+
"notion": MessageLookupByLibrary.simpleMessage("Notion账户"),
69+
"notionPageId": MessageLookupByLibrary.simpleMessage("Page ID"),
70+
"notionToken": MessageLookupByLibrary.simpleMessage("Notion token"),
6471
"retrospect": MessageLookupByLibrary.simpleMessage("回顾"),
6572
"settings": MessageLookupByLibrary.simpleMessage("设置"),
6673
"shoreyMomment": MessageLookupByLibrary.simpleMessage("Shorey时刻"),

lib/generated/l10n.dart

Lines changed: 60 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/l10n/intl_en.arb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,5 +71,11 @@
7171
"deleteCategory": "Delete",
7272
"categoryInformation": "Category Information",
7373
"addCategoryName": "Name",
74-
"editCategory": "Edit"
74+
"editCategory": "Edit",
75+
"bindNotion": "Link Notion",
76+
"notion": "Notion account",
77+
"linkNotionDatabase": "Link root page",
78+
"notionToken": "Notion token",
79+
"linkNotionInfo": "Fill in the blanks to link Notion",
80+
"notionPageId": "Page ID"
7581
}

lib/l10n/intl_zh.arb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,5 +71,11 @@
7171
"deleteCategory": "删除",
7272
"categoryInformation": "类别信息",
7373
"addCategoryName": "名字",
74-
"editCategory": "编辑"
74+
"editCategory": "编辑",
75+
"bindNotion": "关联Notion",
76+
"notion": "Notion账户",
77+
"linkNotionDatabase": "关联根页面",
78+
"notionToken": "Notion token",
79+
"linkNotionInfo": "填写下面两项信息使Shorey与Notion连接",
80+
"notionPageId": "Page ID"
7581
}

0 commit comments

Comments
 (0)