Skip to content

Commit 1b08453

Browse files
committed
chore: now really ready for 1.5.0
1 parent 638c043 commit 1b08453

File tree

15 files changed

+113
-46
lines changed

15 files changed

+113
-46
lines changed

.github/workflows/release_for_linux.yml

Lines changed: 37 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,15 @@ jobs:
1818
sudo apt update
1919
sudo apt install build-essential
2020
sudo apt install ninja-build
21-
sudo apt install -y libgtk-3-dev
21+
sudo apt install -y libgtk-3-dev libfuse2
2222
java -version
2323
24+
- name: Install appimagetool
25+
run: |
26+
wget -O appimagetool "https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage"
27+
chmod +x appimagetool
28+
mv appimagetool /usr/local/bin/
29+
2430
- name: Install Flutter
2531
run: |
2632
git submodule update --init --recursive
@@ -30,25 +36,50 @@ jobs:
3036
.flutter/bin/flutter config --no-analytics
3137
.flutter/bin/flutter pub get
3238
33-
- name: Build APP
39+
- name: Build Linux Tarball
3440
run: |
3541
.flutter/bin/flutter build linux --release
3642
37-
- name: Package Executable
43+
- name: Package Linux Tarball
3844
run: 7z a -r "../../../../../build/app/watermeter-linux-release-amd64.zip" *
3945
working-directory: build/linux/x64/release/bundle
4046

41-
- name: Upload artifact
47+
- name: Upload Linux Tarball
4248
uses: actions/upload-artifact@v4
4349
with:
4450
name: Watermeter_Linux
4551
path: build/app/watermeter-linux-release-amd64.zip
4652

47-
48-
- name: Release
53+
- name: Release Linux Tarball
4954
uses: softprops/action-gh-release@v1
5055
with:
5156
files: build/app/watermeter-linux-release-amd64.zip
5257
prerelease: false
5358
tag_name: ${{ github.event.inputs.tag_name }}
5459
token: ${{ secrets.RELEASE_TOKEN }}
60+
61+
- name: Build Appimage
62+
run: |
63+
export PATH=$PATH:$PWD/.flutter/bin/
64+
dart pub global activate fastforge
65+
export PATH=$PATH:$HOME/.pub-cache/bin
66+
fastforge package --platform=linux --targets=appimage
67+
68+
- name: Find Appimage Executable
69+
run: |
70+
export dir=$(find ./ -name watermeter-*)
71+
cp $dir ./watermeter.Appimage
72+
73+
- name: Upload Appimage
74+
uses: actions/upload-artifact@v4
75+
with:
76+
name: Watermeter_Appimage
77+
path: watermeter.Appimage
78+
79+
- name: Release
80+
uses: softprops/action-gh-release@v1
81+
with:
82+
files: build/app/watermeter.Appimage
83+
prerelease: false
84+
tag_name: ${{ github.event.inputs.tag_name }}
85+
token: ${{ secrets.RELEASE_TOKEN }}

README.md

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,21 @@ Traintime PDA,又称 XDYou,是为西电学生设计的开源信息查询软
1717

1818
## 特性概览
1919

20-
1. 支持本科生和研究生查看课表,成绩,考试信息。
21-
2. 查看日程表:包括课程信息,考试信息。顺便把你偶像的图片设成背景。(以及导入你对象的课表,写完真虐心啊)
22-
3. 查看体育信息:体育课程信息和体测成绩记录。(打卡机在人世间完成了一个轮回)
23-
4. 查看宿舍电量,也许顺手交了电费。(研究生需要自行输入电费账号)
24-
5. 查看成绩,包括可以自行选择科目计算均分。(本程序首创,研究生不可用均分计算)
20+
1. 支持查看本科生和研究生的课程信息,成绩信息,考试信息。
21+
2. 查看日程表:包括课程信息,考试信息。顺便把你偶像的图片设成背景。以及导入你对象的课表,写完真虐心啊
22+
3. 查看体育信息:体育课程信息和体测成绩记录。打卡机在人世间完成了一个轮回
23+
4. 查看宿舍电量,顺手交电费同时可以查看过去七次获取的记录。(研究生需要自行输入电费账号)
24+
5. 查看成绩,包括可以自行选择科目计算均分。
2525
6. 考试安排查询。
26-
7. 查询空闲教室。(研究生不可用)
27-
8. 图书馆信息查询个人借书状况和学校书库状况。
28-
9. 校园卡流水查询,也就是在学校食堂的流水啦
26+
7. 查询空闲教室。
27+
8. 图书馆信息查询个人借书状况和学校书库状况。
28+
9. 校园卡流水查询以及直接扣除校园卡余额的付款码
2929
10. 其他小功能:请假,报修之类。
3030
11. XDU Planet:查看同学的博客。
3131
12. 物理实验查看功能。
32-
13. 查询校园网用量
32+
13. 查询校园网用量,包括目前在线账号和用户自己的账号。(用户自己账号需要输入密码方可查询)
3333
14. Android 和 iOS 特有的日程查看桌面小部件。
34+
15. 完备的国际化支持:支持繁体中文和英语。
3435

3536
## 其他特性
3637

@@ -54,14 +55,12 @@ Traintime PDA,又称 XDYou,是为西电学生设计的开源信息查询软
5455
## 编译环境
5556

5657
```bash
57-
Flutter 3.29.3 • channel stable • https://github.com/flutter/flutter.git
58-
Framework • revision ea121f8859 (3 weeks ago) • 2025-04-11 19:10:07 +0000
59-
Engine • revision cf56914b32
60-
Tools • Dart 3.7.2 • DevTools 2.42.3
58+
Flutter 3.32.2 • channel stable • https://github.com/flutter/flutter.git
59+
Framework • revision 8defaa71a7 (5 天前) • 2025-06-04 11:02:51 -0700
60+
Engine • revision 1091508939 (9 天前) • 2025-05-30 12:17:36 -0700
61+
Tools • Dart 3.8.1 • DevTools 2.45.1
6162
```
6263

63-
注意:要编译此项目,Dart 编译器必须在 3.0 以上。
64-
6564
## 授权信息
6665

6766
本程序源代码按照 MPLv2 授权,部分文件有 MIT / Apache-2.0 授权。

assets/flutter_i18n/en_US.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,7 @@ homepage:
238238
on_weekday: "Currently week {current}"
239239
loading_message: "Refreshing information..."
240240
postgraduate_notice: "Postgraduate features activated!"
241+
linux_notice: "Linux version is under testing, feel free to feedback!"
241242
# home.dart
242243
homepage: "Homepage"
243244
planet: "Blog Planet"

assets/flutter_i18n/zh_CN.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,7 @@ homepage:
229229
on_weekday: "当前为第 {current} 周"
230230
loading_message: "请稍候,正在刷新信息"
231231
postgraduate_notice: "研究生功能已经激活!"
232+
linux_notice: "Linux 版本正在测试,欢迎反馈!"
232233
# home.dart
233234
homepage: "主页"
234235
planet: "博客星球"

assets/flutter_i18n/zh_TW.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,7 @@ homepage:
205205
on_weekday: 當前為第 {current} 周
206206
loading_message: 請稍候,正在刷新信息
207207
postgraduate_notice: 研究生功能已經激活!
208+
linux_notice: Linux 版本正在測試,歡迎反饋!
208209
homepage: 主頁
209210
planet: 博客星球
210211
setting: 設置
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
1. Rewrite Android Applet with Jetpack Compose Glance @BenderBlog
2+
2. Payment QR Code @xeondes
3+
3. Language detect fix @BenderBlog
4+
English translate fix @Pairman @Nancuncloud @MrBrilliant2046
5+
4. Reconstruct the score page @BenderBlog
6+
5. Serveral performance optimization and SDK upgrade
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
"Traintime PDA" is an open-source personal data assistant for XDU students.
1+
"Traintime PDA" is a Free and Open Source personal data assistant for XDU students.
22

33
The XDYou app in the Apple App Store have the same codebase as this.
44

55
- Both undergraduates and postgraduates are supported.
66
- View classtable with exam arrangement and experiment arrangement, also set your idol as the background, or exchange the classtable with your sweetie.
77
- View sport related data: sport class detail and test score. (Punch machine will be sorely missed)
8-
- Check your dorm's electricity balance and (maybe) pay your electricty fee. (Postgraduates shall enter the electricity account manually)
9-
- View your grade and easily calculate GPA and average score by choosing the subjects. (Postgraduates cannot count your GPA and average score, sry)
10-
- View the exam schedule by semester.
8+
- Check your dorm's electricity balance, (maybe) pay your electricty fee and check your historical electricity usage. (Postgraduates shall enter the electricity account manually)
9+
- View your grade, easily calculate GPA and average score by choosing the subjects.
10+
- View the exam schedule.
1111
- View the due time of the borrowed books and query the details of the books in the library.
12-
- View the bill you spent in the cafeteria.
13-
- Empty classroom check. (Not avaliable for postgraduates)
14-
- Physics experiment schedule check and output to iCalendar.
12+
- View the bill you spent in the cafeteria, use the payment code if your card have money.
13+
- Empty classroom check.
14+
- Physics experiment schedule check and output it to iCalendar.
1515
- Other tools such as call for repairing, school email, etc.
1616
- XDU Planet: Look around the blogs of your schoolmates.
17-
- Physics experiment check.
1817
- Schoolnet Query.
1918
- Homepage widget.
19+
- i18n support with Traditional Chinese and English.
2020

2121
If you got some idea about it, contact me freely.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Open Source data assistant for XDU students.
1+
Free and Open Source data assistant for XDU students.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
1. 安卓小部件重构 @BenderBlog
2+
2. 校园卡付款二维码 @xeondes
3+
3. 本地化侦测优化 @BenderBlog
4+
和翻译优化 @Pairman @Nancuncloud @MrBrilliant2046
5+
4. 成绩页面重构 @BenderBlog
6+
5. 若干性能优化,SDK 更新
Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
1-
Traintime PDA 是为西电学生设计的开源信息查询软件。(PDA 指个人信息管理工具)
1+
Traintime PDA 是为西电学生设计的自由开源信息查询软件。(PDA 指个人信息管理工具)
22

33
本程序和 iOS 平台的 XDYou 系出同样的代码库。
44

5-
1. 支持本科生和研究生查看课表,成绩,考试信息。
6-
2. 查看日程表:包括课程信息,考试信息。顺便把你偶像的图片设成背景。(以及导入你对象的课表,写完真虐心啊)
7-
3. 查看体育信息:体育课程信息和体测成绩记录。(打卡机在人世间完成了一个轮回)
8-
4. 查看宿舍电量,也许顺手交了电费。(研究生需要自行输入电费账号)
9-
5. 查看成绩,包括可以自行选择科目计算均分。(本程序首创,研究生不可用均分计算)
5+
1. 支持查看本科生和研究生的课程信息,成绩信息,考试信息。
6+
2. 查看日程表:包括课程信息,考试信息。顺便把你偶像的图片设成背景。以及导入你对象的课表,写完真虐心啊
7+
3. 查看体育信息:体育课程信息和体测成绩记录。打卡机在人世间完成了一个轮回
8+
4. 查看宿舍电量,顺手交电费同时可以查看过去七次获取的记录。(研究生需要自行输入电费账号)
9+
5. 查看成绩,包括可以自行选择科目计算均分。
1010
6. 考试安排查询。
11-
7. 查询空闲教室。(研究生不可用)
12-
8. 图书馆信息查询个人借书状况和学校书库状况。
13-
9. 校园卡流水查询,也就是在学校食堂的流水啦
11+
7. 查询空闲教室。
12+
8. 图书馆信息查询个人借书状况和学校书库状况。
13+
9. 校园卡流水查询以及直接扣除校园卡余额的付款码
1414
10. 其他小功能:请假,报修之类。
1515
11. XDU Planet:查看同学的博客。
1616
12. 物理实验查看功能。
17-
13. 查询校园网用量。
18-
13. Android 和 iOS 特有的日程查看桌面小部件。
17+
13. 查询校园网用量,包括目前在线账号和用户自己的账号。(用户自己账号需要输入密码方可查询)
18+
14. Android 日程查看桌面小部件。
19+
15. 完备的国际化支持:支持繁体中文和英语。
1920

2021
如果你对本程序啥想法,欢迎向我提出。
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
开源的西电学生信息查询软件
1+
自由开源的西电学生信息查询软件

lib/page/homepage/homepage.dart

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
// Copyright 2025 Traintime PDA authors.
33
// SPDX-License-Identifier: MPL-2.0
44

5+
import 'dart:io';
6+
57
import 'package:extended_nested_scroll_view/extended_nested_scroll_view.dart';
68
import 'package:flutter/material.dart';
79
import 'package:flutter_i18n/flutter_i18n.dart';
@@ -193,6 +195,20 @@ class _MainPageState extends State<MainPage> {
193195
const HeaderLocator(),
194196
<Widget>[
195197
const NoticeCard(),
198+
if (Platform.isLinux)
199+
Text(
200+
FlutterI18n.translate(
201+
context,
202+
"homepage.linux_notice",
203+
),
204+
)
205+
.center()
206+
.constrained(height: 30)
207+
.paddingDirectional(
208+
horizontal: 16,
209+
vertical: 14,
210+
)
211+
.withHomeCardStyle(context),
196212
if (prefs.getBool(prefs.Preference.role))
197213
Text(
198214
FlutterI18n.translate(

lib/page/public_widget/toast.dart

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import 'dart:io';
66

77
import 'package:flutter/material.dart';
88
import 'package:fluttertoast/fluttertoast.dart';
9+
import 'package:watermeter/repository/logger.dart';
910

1011
void showToast({
1112
required BuildContext context,
@@ -14,8 +15,12 @@ void showToast({
1415
if (Platform.isAndroid || Platform.isIOS) {
1516
Fluttertoast.showToast(msg: msg);
1617
} else {
17-
ScaffoldMessenger.of(context).showSnackBar(SnackBar(
18-
content: Text(msg),
19-
));
18+
try {
19+
ScaffoldMessenger.of(context).showSnackBar(SnackBar(
20+
content: Text(msg),
21+
));
22+
} catch (e) {
23+
log.error("Show snackbar failed, ignore it!", e);
24+
}
2025
}
2126
}

0 commit comments

Comments
 (0)