Skip to content

Commit

Permalink
Merge pull request #364 from HydrogenC/old-main
Browse files Browse the repository at this point in the history
Improve branding and add teahouse
  • Loading branch information
ivanfei-1 committed Jun 29, 2024
2 parents 5569f6e + 45c9700 commit 96191c4
Show file tree
Hide file tree
Showing 87 changed files with 643 additions and 636 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
- 快速显示复活码(支持 Apple Watch 显示)
- 空教室查询
- 刷锻次数查询
- FDU Hole 树洞
- 茶楼
- 课表查阅与导出至系统日历等
- 显示教务处通知
- 查询期中/期末考试日程与导出至系统日历等
Expand Down
2 changes: 1 addition & 1 deletion README_EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Maybe the best all-rounded service app for Fudan University students!
- Dining hall traffic
- Shortcut for Fudan QR Code (with support for Apple Watch)
- View empty classrooms
- Tree Hole
- Student forum
- View compulsory-exercise records
- View timetable and export as .ics file
- Show Notices from Academic Affairs Office
Expand Down
6 changes: 3 additions & 3 deletions assets/texts/tips.dat
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
请勿引战、钓鱼
政治相关讨论必须严格遵守我国法律法规和社区公约
性相关属于敏感话题,只支持学术性讨论
反馈旦夕、树洞问题和建议请到站务分区
你有权通过电子邮件上诉 FDUHole 管理团队的处罚决定
反馈旦夕、茶楼问题和建议请到站务分区
你有权通过电子邮件上诉管理团队的处罚决定
请在正确的分区发帖
发帖时请打好合适的 Tag
旦夕开发团队的邮箱是 dev@fduhole.com
树洞编辑器支持自动保存草稿,但退出旦夕会清空草稿
编辑器支持自动保存草稿,但退出旦夕会清空草稿
对某些帖子不感兴趣?去设置屏蔽一下吧
29 changes: 15 additions & 14 deletions lib/common/constant.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import 'package:dan_xi/feature/feature_map.dart';
import 'package:dan_xi/generated/l10n.dart';
import 'package:dan_xi/model/dashboard_card.dart';
import 'package:dan_xi/page/dashboard/dashboard_reorder.dart';
import 'package:dan_xi/page/opentreehole/hole_editor.dart';
import 'package:dan_xi/page/forum/hole_editor.dart';
import 'package:dan_xi/page/subpage_settings.dart';
import 'package:dan_xi/provider/settings_provider.dart';
import 'package:dan_xi/repository/app/announcement_repository.dart';
Expand All @@ -46,7 +46,7 @@ class Constant {
static const SUPPORT_QQ_GROUP = "941342818";

/// The division name of the curriculum page. We use this to determine whether
/// we should show the curriculum page (instead of a normal treehole division).
/// we should show the curriculum page (instead of a normal forum division).
///
/// See also:
///
Expand All @@ -58,17 +58,17 @@ class Constant {
/// The default user agent used by the app.
///
/// Note that this is not the same as the user agent used by the WebView, or the
/// treehole's [Dio]. Those two are set by WebView and [OpenTreeHoleRepository].
/// forum's [Dio]. Those two are set by WebView and [ForumRepository].
static const String DEFAULT_USER_AGENT =
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.51 Safari/537.36";

static const String APPSTORE_APPID = '1568629997';

/// A link to the "forget password" page of FDUHole.
static const String OPEN_TREEHOLE_FORGOT_PASSWORD_URL =
static const String FORUM_FORGOT_PASSWORD_URL =
"https://auth.fduhole.com/register?type=forget_password";

static const String OPEN_TREEHOLE_REGISTER_URL =
static const String FORUM_REGISTER_URL =
"https://auth.fduhole.com/register";

/// The default start date of a semester.
Expand All @@ -79,9 +79,10 @@ class Constant {
static const String UIS_URL = "https://uis.fudan.edu.cn/authserver/login";
static const String UIS_HOST = "uis.fudan.edu.cn";

/// The default URLs of [OpenTreeHoleRepository] and [CurriculumBoardHoleRepository].
/// The default URLs of [ForumRepository] and [CurriculumBoardHoleRepository].
///
static const String FDUHOLE_BASE_URL = "https://www.fduhole.com/api";
static const String FORUM_BASE_URL_LEGACY = "https://www.fduhole.com/api";
static const String FORUM_BASE_URL = "https://forum.fduhole.com/api";
static const String AUTH_BASE_URL = "https://auth.fduhole.com/api";
static const String IMAGE_BASE_URL = "https://image.fduhole.com";
static const String DANKE_BASE_URL = "https://danke.fduhole.com/api";
Expand All @@ -95,7 +96,7 @@ class Constant {
/// Client version descriptor.
///
/// It is used to identify the client in the HTTP request header.
/// Currently, it is used in the [OpenTreeHoleRepository] to tell the server
/// Currently, it is used in the [ForumRepository] to tell the server
/// about the client version.
static String get version {
if (PlatformX.isWeb) {
Expand All @@ -107,7 +108,7 @@ class Constant {
}

/// The tips to be shown as hints in the [BBSEditorWidget].
static List<String> fduHoleTips = [];
static List<String> forumTips = [];

/// Load in the tips in the [BBSEditorWidget].
static Future<List<String>> _loadTips() async {
Expand All @@ -118,7 +119,7 @@ class Constant {
/// The stop words to be determined in the [BBSEditorWidget].
///
/// Stop words are used to warn the user when he/she is about to post
/// something that is not encouraged by the treehole community.
/// something that is not encouraged by the community.
static List<String> _stopWords = [];

/// The care words to be determined in the [BBSEditorWidget] and [OTSearchPage].
Expand Down Expand Up @@ -191,13 +192,13 @@ class Constant {
/// Get a random tip from [_loadTips].
///
/// If failed to get, return an empty string.
static Future<String> get randomFDUHoleTip async {
if (fduHoleTips.isEmpty) fduHoleTips = await _loadTips();
static Future<String> get randomForumTip async {
if (forumTips.isEmpty) forumTips = await _loadTips();

if (fduHoleTips.isEmpty) {
if (forumTips.isEmpty) {
return '';
} else {
return fduHoleTips[Random().nextInt(fduHoleTips.length)];
return forumTips[Random().nextInt(forumTips.length)];
}
}

Expand Down
4 changes: 2 additions & 2 deletions lib/feature/lan_connection_notification.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
import 'package:dan_xi/feature/base_feature.dart';
import 'package:dan_xi/generated/l10n.dart';
import 'package:dan_xi/util/browser_util.dart';
import 'package:dan_xi/widget/opentreehole/post_render.dart';
import 'package:dan_xi/widget/opentreehole/render/render_impl.dart';
import 'package:dan_xi/widget/forum/post_render.dart';
import 'package:dan_xi/widget/forum/render/render_impl.dart';
import 'package:flutter/material.dart';
import 'package:flutter_platform_widgets/flutter_platform_widgets.dart';

Expand Down
80 changes: 40 additions & 40 deletions lib/l10n/intl_en.arb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"Dest1n1_description": "FDUHole Frontend Developer",
"Dest1n1_description": "Forum Frontend Developer",
"Frankstein73_description": "DanXi Developer",
"KYLN24_description": "FDUHole Frontend Developer",
"KYLN24_description": "Forum Frontend Developer",
"abnormal_entry_permission": "No rights",
"about": "About This App",
"about_to_delete_floor": "You are about to delete floor #{floor}",
Expand Down Expand Up @@ -42,7 +42,7 @@
"authors": "Developers",
"background_image": "Background Image",
"background_image_already_set": "A background image is already set, do you wish to remove it?",
"background_image_description": "Choose an image as FDUHole background",
"background_image_description": "Choose an image as forum background",
"ban_post_until": "You are not allowed to post in this division until {date}",
"before_enabled": "Before",
"boreas618_description": "DanXi Developer",
Expand Down Expand Up @@ -143,16 +143,16 @@
"failed_exam_no_grade": "Please check JWFW for make-up exam grades.",
"fatal_error": "Error",
"favorites": "Favorites",
"fduhole_clean_mode": "Clean Mode",
"fduhole_clean_mode_description": "Hide unfriendly emojis in FDUHole",
"fduhole_clean_mode_detail": "When Clean Mode is enabled, emojis that are widely considered \"unfriendly\" will be hidden.",
"fduhole_hidden_tags": "Blocked Tags",
"fduhole_hidden_tags_description": "Hide posts with specific tags",
"fduhole_hidden_tags_title": "Blocked Tags",
"fduhole_nsfw_behavior": "NSFW Content",
"fduhole_show_banner": "Show campaigns",
"fduhole_show_banner_description": "Show some non-invasive campaigns and announcements",
"fduhole_user_id": "Online (ID: {id})",
"forum_clean_mode": "Clean Mode",
"forum_clean_mode_description": "Hide unfriendly emojis in Forum",
"forum_clean_mode_detail": "When Clean Mode is enabled, emojis that are widely considered \"unfriendly\" will be hidden.",
"forum_hidden_tags": "Blocked Tags",
"forum_hidden_tags_description": "Hide posts with specific tags",
"forum_hidden_tags_title": "Blocked Tags",
"forum_nsfw_behavior": "NSFW Content",
"forum_show_banner": "Show campaigns",
"forum_show_banner_description": "Show some non-invasive campaigns and announcements",
"forum_user_id": "Online (ID: {id})",
"feedback_email": "dev@fduhole.com",
"fenglin_campus": "Fenglin",
"filtering_by_tag": "Filtering by \"{tag}\"",
Expand All @@ -164,7 +164,7 @@
"forgot_password": "Forget Password",
"format_exception": "An error occurred while parsing data",
"formula": "[Formula]",
"forum": "FDUHole",
"forum": "Forum",
"forum_post_enter_content": "Post",
"free_select": "Copy Selected",
"fsy2001_description": "DanXi Developer",
Expand All @@ -182,7 +182,7 @@
"fudan_qr_code": "Fudan QR Code",
"fudan_staff": "FDU Staffs",
"fudan_uis_email_login": "Login with UIS email",
"function_not_implemented": "This feature is unavailable yet, please wait for Treehole backend to develop.",
"function_not_implemented": "This feature is unavailable yet, please wait for forum backend to develop.",
"get_started": "Get Started",
"good_afternoon": "The afternoon knows what the morning never suspected.",
"good_morning": "Every dawn is a new sunrise.",
Expand All @@ -192,14 +192,14 @@
"handan_campus": "Handan",
"has_stop_words": "You are using some inappropriate words: {stopWord}.\nWe do not recommend sending such words as they are not suitable for a rational discussion and are therefore more likely to attract unfriendly comments. Do you really want to send?",
"has_stop_words_title": "Inappropriate words",
"hasbai_description": "FDUHole Founder / Developer",
"hasbai_description": "Forum Founder / Developer",
"hidden_widgets": "Hidden",
"hide": "Hide",
"hide_hole": "Hide Hole",
"hide_hole_confirm": "Sure you want to hide this hole permanently? Once hidden, this hole will not be visible in the list of posts unless you reinstall the app.",
"hide_hole_success": "Hole hidden. Effect will take place after refreshing.",
"hide_hole": "Hide Post",
"hide_hole_confirm": "Sure you want to hide this post permanently? Once hidden, this post will not be visible in the list of posts unless you reinstall the app.",
"hide_hole_success": "Post hidden. Effect will take place after refreshing.",
"hide_notification_description": "Do you want to hide this notification permanently? You can always unhide all hidden notifications in Settings.",
"high_contrast_color_description": "Empty Classroom View and FDUHole Tags",
"high_contrast_color_description": "Empty Classroom View and forum Tags",
"history": "History",
"history_altered_by": "Altered By: {user}",
"history_of": "History of ##{floor}",
Expand All @@ -222,10 +222,10 @@
"input_your_email_secure_code": "Input your OTP code",
"invalid_course_info": "Please provide valid information about course slots",
"invalid_format": "Invalid format",
"ivanfei_description": "FDUHole Frontend Developer",
"ivanfei_description": "Forum Frontend Developer",
"japanese_languae": "Japanese",
"jiangwan_campus": "Jiangwan",
"jingyijun_description": "FDUhole Backend Developer",
"jingyijun_description": "Forum Backend Developer",
"jump_to_hole": "Locate",
"koowz_description": "DanXi Developer",
"lan_connection_issue_1": "Failed to connect to the Campus Intranet",
Expand Down Expand Up @@ -258,7 +258,7 @@
"login": "Login",
"login_as_others": "Login as...",
"login_by_email_password": "Login by DanXi Account",
"login_from_treehole_page": "Please login from FDUHole page.",
"login_from_forum_page": "Please login from the forum page.",
"login_issue_1": "Failed to log in through UIS system.\nIf you has attempted to log in with wrong passwords for several times, you might need to complete a successful login through a browser manually.",
"login_issue_1_action": "Open UIS Login Page",
"login_issue_2": "Failed to fetch information related to the semester from the server, please retry. \nIf you skip directly, there may be problems with date calculation for course schedules.",
Expand All @@ -271,7 +271,7 @@
"login_with_uis": "Sign in anonymously as:",
"logining": "Logging in...",
"logout": "Logout",
"logout_fduhole": "You are logging out of FDUHole",
"logout_forum": "You are logging out of the forum",
"logout_prompt": "You need to restart this app for changes to take effect.",
"logout_question_prompt": "All data stored locally will be deleted.",
"logout_question_prompt_title": "Are you sure?",
Expand Down Expand Up @@ -336,7 +336,7 @@
"parse_fatal_error": "A fatal error occurred when parsing this post.",
"password": "Password",
"pe_exercises": "PE Exercises",
"pin_unpin_hole": "Pin/Unpin Hole",
"pin_unpin_hole": "Pin/Unpin Post",
"pinned": "Pinned",
"post_does_not_exist": "The requested post does not exist.",
"post_failed": "Failed to post",
Expand Down Expand Up @@ -389,7 +389,7 @@
"school_bus_showing_all": "Showing all buses",
"school_bus_tap_to_not_show_all": "Tap to filter buses scheduled after {hh}:{mm}",
"school_bus_tap_to_show_all": "Tap this reminder to show all",
"screenshot_warning": "To ensure data security and to protect the privacy of other users, please do not send screenshots to non-FDUHole users. Thank you for your cooperation.",
"screenshot_warning": "To ensure data security and to protect the privacy of other users, please do not send screenshots to non-forum users. Thank you for your cooperation.",
"screenshot_warning_title": "Screenshot Detected",
"scroll_to_end": "Go to Bottom",
"search": "Search",
Expand All @@ -415,7 +415,7 @@
"send_email": "Send Email",
"set_password": "Set A Password",
"set_semester_start_date": "Set Start Date",
"set_your_fduhole_password": "Set a password for your DanXi Account",
"set_your_danxi_password": "Set a password for your DanXi Account",
"settings": "Settings",
"share": "Share",
"share_as_ics": "Export as ICS",
Expand All @@ -434,7 +434,7 @@
"skip": "Skip",
"sort_order": "Sort order",
"sponsor_us": "Support Us 🍀",
"sponsor_us_detail": "Thank you so much for your kindness to enable it! Danxi and FDUHole have been operating as independent projects for a long time. However, in the long run, we are a bit overwhelmed by the high server costs.\n\nRather than direct donations, we chose a more modest way - to display some ads provided by Google in Danxi. These ads won't interfere with your browsing, but they will bring us real income and motivate us to keep going.",
"sponsor_us_detail": "Thank you so much for your kindness to enable it! Danxi and the forum have been operating as independent projects for a long time. However, in the long run, we are a bit overwhelmed by the high server costs.\n\nRather than direct donations, we chose a more modest way - to display some ads provided by Google in Danxi. These ads won't interfere with your browsing, but they will bring us real income and motivate us to keep going.",
"sponsor_us_disabled": "If you like our project, you can support us by turning on Ads. You can opt out at any time.",
"sponsor_us_enabled": "Thank you :) You may opt out at any time.",
"submit": "Submit",
Expand Down Expand Up @@ -462,9 +462,9 @@
"ticking": "Checking in...",
"timetable": "Agenda",
"timetable_refresh_error": "Timetable for the new semester is available. However, we are unable to retrieve it from Fudan Servers.\n\nPlease make sure you are connected to the campus intranet, and try manually refreshing the timetable.\n\nTip: You can pull down at the Agenda page to refresh the timetable manually.",
"tip_that_fduhole_is_not_fdu": "Note: Your DanXi Account is not your UIS or Edu-email account.",
"tip_that_danxi_is_not_fdu": "Note: Your DanXi Account is not your UIS or Edu-email account.",
"today_course": "Courses Today",
"try_visitor_mode": "Don't want to login UIS? Try FDUHole Only mode",
"try_visitor_mode": "Don't want to login UIS? Try Forum Only mode",
"unable_to_access_url": "Test connection failed\nCan't to connect to this website, please check your URL.",
"unable_to_connect_to_server": "Unable to connect the server, please retry later.",
"unable_to_find_quote": "Unable to find the quoted reply.",
Expand All @@ -482,7 +482,7 @@
"view_count": "Views: {view}",
"view_history": "View History",
"view_ossl": "This app is made possible thanks to various open-source software. View ",
"visitor": "FDUHole Only",
"visitor": "Forum Only",
"w568w_description": "DanXi Founder / Developer",
"warning": "Warning",
"weak_password": "Login failed. Unknown error.\nNote: DanXi does not support weak password. If UIS warns of weak password at login, please change your password at UIS Portal and try again.",
Expand All @@ -497,8 +497,8 @@
"welcome_3s": "Use LaTeX and Markdown in your posts",
"welcome_back": "Welcome back",
"welcome_feature": "Welcome",
"welcome_title": "The All-New FDUHole Experience",
"welcome_to_fduhole": "Welcome to FDUHole",
"welcome_title": "The All-New Forum Experience",
"welcome_to_forum": "Welcome to the forum",
"windows_auto_start_description": "Automatically start DanXi on boot",
"windows_auto_start_title": "Auto start",
"windows_auto_start_wait_dialog_message": "You should have seen the UAC Permission Confirm window. \n After allowing, click \"OK\" below to confirm the setup.",
Expand All @@ -509,8 +509,8 @@
"zhangjiang_campus": "Zhangjiang",
"forum_message": "Message",
"share_floor": "Share Floor",
"share_hole": "Share Hole",
"shareHoleSuccess": "Share Hole success! Please check your clipboard.",
"share_hole": "Share Post",
"shareHoleSuccess": "Share Post success! Please check your clipboard.",
"shareFloorSuccess": "Share floor success! Please check your clipboard.",
"invalidUri": "Invalid uri",
"elementNotFound": "No element found to jump to",
Expand All @@ -522,8 +522,8 @@
"multiple_select_mode_enter": "Start Multi-Select",
"copy_floor_id": "Copy Floor ID",
"copy_floor_id_success": "Copy Floor ID success! Please check your clipboard. ",
"copy_hole_id": "Copy Hole ID",
"copy_hole_id_success": "Copy Hole ID success! Please check your clipboard. ",
"copy_hole_id": "Copy Post ID",
"copy_hole_id_success": "Copy Post ID success! Please check your clipboard. ",
"choose_semester": "Choose semester:",
"choose_semester_message": "Select the semester you want to view. ",
"manually_add_course": "Add lesson manually:",
Expand All @@ -532,11 +532,11 @@
"start_date_select_message": "You must select the start date of the semester to view your class schedule. Not selecting will result in a date error. \nTip: Start date is the Monday of the first week. ",
"empty_classroom_warning": "Not connected to the campus intranet, so classroom usage information may not be accurate.\nPlease connect to the campus intranet for accurate information. ",
"start_quiz": "Start quiz",
"quiz_not_answered": "You haven't read the community convention yet. Click the link below to read and then finish a mini-quiz. After answering all the questions correctly, you may continue to the treehole. ",
"quiz_completed": "You have finished studying the community convention. Please keep observing it while using the treehole. ",
"quiz_not_answered": "You haven't read the community convention yet. Click the link below to read and then finish a mini-quiz. After answering all the questions correctly, you may continue to the forum. ",
"quiz_completed": "You have finished studying the community convention. Please keep observing it while using the forum. ",
"quiz_has_errors": "In the quiz, you've answered {count} questions wrong. Please press the button to redo. ",
"redo_incorrect_questions": "Redo the questions",
"enter_treehole": "Go on to the treehole",
"enter_forum": "Go on to the forum",
"next_question": "Next",
"prev_question": "Previous",
"sticker": "Stickers",
Expand Down
Loading

0 comments on commit 96191c4

Please sign in to comment.