diff --git a/App.js b/App.js
index 7ad7d574..d3592c00 100644
--- a/App.js
+++ b/App.js
@@ -7,6 +7,8 @@ import RootStore from './src/mobx';
import { COLOR_DIY, isLight, uiStyle, } from './src/utils/uiMap';
import { BASE_HOST } from './src/utils/pathMap';
import { setLanguage, setLocalStorage } from './src/i18n/i18n';
+import { checkLocalCourseVersion, } from './src/utils/checkCoursesKits';
+
import { Provider } from 'mobx-react';
import AnimatedSplash from 'react-native-animated-splash-screen';
@@ -121,6 +123,8 @@ class App extends Component {
this.setState({ isLogin: false });
}
this.checkLanguage();
+ // 檢查APP靜態文件的課程更新時間和緩存數據新舊,取最新
+ checkLocalCourseVersion();
} catch (e) {
console.error('App error', e);
}
diff --git a/android/app/build.gradle b/android/app/build.gradle
index 95dd23fc..c7b839c3 100644
--- a/android/app/build.gradle
+++ b/android/app/build.gradle
@@ -139,8 +139,8 @@ android {
applicationId "one.umall"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
- versionCode 58
- versionName "3.0.0"
+ versionCode 59
+ versionName "3.1.0"
buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()
if (isNewArchitectureEnabled()) {
diff --git a/ios/UMALL.xcodeproj/project.pbxproj b/ios/UMALL.xcodeproj/project.pbxproj
index 26b7309f..22a7fa86 100644
--- a/ios/UMALL.xcodeproj/project.pbxproj
+++ b/ios/UMALL.xcodeproj/project.pbxproj
@@ -623,18 +623,18 @@
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = UMALL/UMALL.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
- CURRENT_PROJECT_VERSION = 3.0.0;
+ CURRENT_PROJECT_VERSION = 3.1.0;
DEVELOPMENT_TEAM = UVSHNJYJWU;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = UMALL/Info.plist;
- INFOPLIST_KEY_CFBundleDisplayName = 3.0.0;
+ INFOPLIST_KEY_CFBundleDisplayName = 3.1.0;
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.utilities";
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
- MARKETING_VERSION = 3.0.0;
+ MARKETING_VERSION = 3.1.0;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
@@ -661,17 +661,17 @@
CODE_SIGN_ENTITLEMENTS = UMALL/UMALL.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "Apple Development";
- CURRENT_PROJECT_VERSION = 3.0.0;
+ CURRENT_PROJECT_VERSION = 3.1.0;
DEVELOPMENT_TEAM = UVSHNJYJWU;
INFOPLIST_FILE = UMALL/Info.plist;
- INFOPLIST_KEY_CFBundleDisplayName = 3.0.0;
+ INFOPLIST_KEY_CFBundleDisplayName = 3.1.0;
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.utilities";
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
- MARKETING_VERSION = 3.0.0;
+ MARKETING_VERSION = 3.1.0;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
diff --git a/package.json b/package.json
index 9e3adb2f..540fe1c6 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "umall",
- "version": "3.0.0",
+ "version": "3.1.0",
"private": true,
"scripts": {
"android": "react-native run-android",
diff --git a/src/Tabbar.js b/src/Tabbar.js
index da6d91c3..c2402cd2 100644
--- a/src/Tabbar.js
+++ b/src/Tabbar.js
@@ -52,6 +52,8 @@ class Tabbar extends Component {
activeTabBackgrounds: COLOR_DIY.themeColor,
activeColors: COLOR_DIY.white,
tabBarBackground: COLOR_DIY.bg_color,
+ whenInactiveShow: 'both',
+ tabButtonLayout: 'vertical',
}}
initialRouteName={isClub ? 'MeTabbar' : 'NewsTabbar'}>
@@ -95,7 +97,7 @@ class Tabbar extends Component {
focused={focused}
/>
),
- title: t('Wiki'),
+ title: t('百科'),
}}
listeners={() => ({
tabPress: () => trigger()
diff --git a/src/i18n/en-us.js b/src/i18n/en-us.js
index 3f2d5f76..6bf708a0 100644
--- a/src/i18n/en-us.js
+++ b/src/i18n/en-us.js
@@ -8,6 +8,7 @@ export default {
"資訊": "Info",
"搵課": "Courses",
+ "百科": "Wiki",
"課表": "Timetable",
"服務": "Services",
"組織": "Club",
diff --git a/src/pages/TabbarPages/courseSim/index.js b/src/pages/TabbarPages/courseSim/index.js
index 6002dbad..8a80c9c5 100644
--- a/src/pages/TabbarPages/courseSim/index.js
+++ b/src/pages/TabbarPages/courseSim/index.js
@@ -33,7 +33,7 @@ import { UM_ISW, ARK_WIKI_SEARCH, WHAT_2_REG, OFFICIAL_COURSE_SEARCH, } from "..
import { logToFirebase } from "../../../utils/firebaseAnalytics";
import { trigger } from "../../../utils/trigger";
-const { themeColor, themeColorUltraLight, black, white, bg_color, unread, } = COLOR_DIY;
+const { themeColor, themeColorUltraLight, secondThemeColor, black, white, bg_color, unread, } = COLOR_DIY;
const iconSize = scale(25);
const dayList = ['MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT', 'SUN'];
@@ -464,6 +464,7 @@ export default class courseSim extends Component {
// }}
onPress={() => {
trigger('rigid');
+ this.setState({ addMode: false });
}}
delayLongPress={300}
>
@@ -634,7 +635,7 @@ export default class courseSim extends Component {
onChangeText={text => {
this.setState({ importTimeTableText: text });
}}
- placeholder={`Example:
+ placeholder={`Click here and enter your timetable:\nExample:
TimeDay Mon Tue Wed Thur Fri Sat Sun
9:00 09:00-10:45 ECEN0000(001)
E11-0000
@@ -1019,7 +1020,7 @@ E11-0000
{this.state.addMode ? t('關閉', { ns: 'timetable' }) : t('搵課/加課', { ns: 'timetable' })}
@@ -1041,7 +1042,7 @@ E11-0000
{/* 課表 / 首次使用提示 */}
diff --git a/src/pages/TabbarPages/features/index.js b/src/pages/TabbarPages/features/index.js
index 3e1152a7..380811a5 100644
--- a/src/pages/TabbarPages/features/index.js
+++ b/src/pages/TabbarPages/features/index.js
@@ -800,7 +800,7 @@ class Index extends Component {
}}
/>
-
+
{/* ARK Logo */}
-
+
{
trigger();
- let webview_param = {
- url: GITHUB_DONATE,
- title: '支持我們',
- text_color: white,
- bg_color_diy: themeColor,
- isBarStyleBlack: false,
- };
- this.props.navigation.navigate('Webviewer', webview_param);
+ logToFirebase('openPage', { page: 'moodle' });
+ openLink(UM_Moodle);
},
},
{
@@ -193,12 +190,19 @@ class HomeScreen extends Component {
},
},
{
- icon_name: 'file-document-edit',
+ icon_name: 'coffee',
icon_type: iconTypes.materialCommunityIcons,
- function_name: t('方舟百科', { ns: 'home' }),
+ function_name: t('支持我們', { ns: 'home' }),
func: () => {
trigger();
- this.props.navigation.navigate('Wiki');
+ let webview_param = {
+ url: GITHUB_DONATE,
+ title: '支持我們',
+ text_color: white,
+ bg_color_diy: themeColor,
+ isBarStyleBlack: false,
+ };
+ this.props.navigation.navigate('Webviewer', webview_param);
},
},
{
@@ -675,27 +679,29 @@ class HomeScreen extends Component {
onScroll={this.handleScroll}
scrollEventThrottle={400}
>
-
- {/* ARK Logo */}
-
- ARK ALL 澳大方舟
-
+ {false && (
+
+ {/* ARK Logo */}
+
+ ARK ALL 澳大方舟
+
+ )}
{/* 校曆列表 */}
{cal && cal.length > 0 ? (
@@ -796,22 +802,20 @@ class HomeScreen extends Component {
}
{/* 快捷功能圖標 */}
- {false &&
- this.GetFunctionIcon(item)}
- showsVerticalScrollIndicator={false}
- scrollEnabled={false}
- />
- }
+ this.GetFunctionIcon(item)}
+ showsVerticalScrollIndicator={false}
+ scrollEnabled={false}
+ />
{/* 更新提示 */}
{
@@ -903,9 +907,9 @@ class HomeScreen extends Component {
{this.state.networkError ? (
網絡錯誤,請手動刷新!
) : null
- // (<>
- // 各組織可自行操作發佈活動! 立即進駐ARK!
- // >)
+ // (<>
+ // 各組織可自行操作發佈活動! 立即進駐ARK!
+ // >)
}
diff --git a/src/pages/TabbarPages/what2Reg/index.js b/src/pages/TabbarPages/what2Reg/index.js
index 5611426f..46f1d7ab 100644
--- a/src/pages/TabbarPages/what2Reg/index.js
+++ b/src/pages/TabbarPages/what2Reg/index.js
@@ -13,7 +13,7 @@ import {
Alert,
} from "react-native";
-import { UMEH_URI, UMEH_API, WHAT_2_REG, USER_AGREE, ARK_WIKI_SEARCH, OFFICIAL_COURSE_SEARCH, } from "../../../utils/pathMap";
+import { UMEH_URI, UMEH_API, WHAT_2_REG, USER_AGREE, ARK_WIKI_SEARCH, OFFICIAL_COURSE_SEARCH, WHAT_2_REG_SEARCH, } from "../../../utils/pathMap";
import { COLOR_DIY, uiStyle, } from '../../../utils/uiMap';
import { trigger } from '../../../utils/trigger';
import { logToFirebase } from '../../../utils/firebaseAnalytics';
@@ -71,6 +71,8 @@ const depaMap = {
'DHIST': '歷史系',
'DPHIL': '哲學及宗教學系',
'DPT': '葡文系',
+ 'DJP': '日文系',
+ 'DAD': '藝術設計系',
'ELC': '英語中心',
// FBA
@@ -815,6 +817,12 @@ export default class index extends Component {
this.props.navigation.navigate('Wiki', { url: URL });
break;
+ case 'what2reg':
+ trigger();
+ // 進入選咩課搜索模式
+ openLink(`${WHAT_2_REG_SEARCH}${encodeURIComponent(inputText)}`);
+ break;
+
case 'official':
trigger();
let courseCode = encodeURIComponent(inputText);
@@ -836,6 +844,11 @@ export default class index extends Component {
title: '查 ARK Wiki !!! ε٩(๑> ₃ <)۶з',
titleColor: themeColor,
},
+ {
+ id: 'what2reg',
+ title: '查 選咩課',
+ titleColor: black.third,
+ },
{
id: 'official',
title: '查 官方',
@@ -1045,7 +1058,7 @@ export default class index extends Component {
ref={this.scrollViewRef}
style={{ width: '100%' }}
stickyHeaderIndices={[1]}
- showsVerticalScrollIndicator={false}
+ // showsVerticalScrollIndicator={false}
>
{/* 頁面標題欄 */}
diff --git a/src/static/UMCourses/coursePlan.json b/src/static/UMCourses/coursePlan.json
index 2de847ef..0e8e3bfa 100644
--- a/src/static/UMCourses/coursePlan.json
+++ b/src/static/UMCourses/coursePlan.json
@@ -2884,7 +2884,7 @@
"Time From": "10:00",
"Time To": "12:45",
"Classroom": "E22-2018",
- "Course Title Chi": "以學科為基礎的教學方法(中學數學)II"
+ "Course Title Chi": "基於學科的教學方法(中學數學)II"
},
{
"Offering Unit": "FED",
@@ -4991,7 +4991,7 @@
"Course Title": "Advanced History Writing I",
"Section": "001",
"Medium of Instruction": "English",
- "Teacher Information": "WANG DI",
+ "Teacher Information": "KWAN CHING-YIN NATHAN",
"Lecture / Lab": "Lecture",
"Course Title Chi": "高級歷史寫作Ⅰ"
},
@@ -5533,7 +5533,7 @@
"Time To": "11:15",
"Classroom": "E22-G004",
"\"Class For / Class Not For\" Information": "Class for :\n - FBA - IIR17-GMM17-FOURTH YEAR / IIR20-GMM20-THIRD YEAR / IIR20-GMM20-FOURTH YEAR\n",
- "Course Title Chi": "遊戲管理實習"
+ "Course Title Chi": "博彩管理實習"
},
{
"Offering Unit": "FBA",
@@ -7493,7 +7493,7 @@
"Day": "MON",
"Time From": "14:30",
"Time To": "15:45",
- "Classroom": "E21-1031",
+ "Classroom": "E22-3015",
"Course Title Chi": "佛教哲學"
},
{
@@ -8129,7 +8129,7 @@
"Time From": "11:30",
"Time To": "12:45",
"Classroom": "E22-4015",
- "Course Title Chi": "遊戲社會學"
+ "Course Title Chi": "博彩社會學"
},
{
"Offering Unit": "FSS",
@@ -8327,7 +8327,7 @@
"Course Title Chi": "大學英文II(教程)"
}
],
- "updateTime": "2024-08-05",
+ "updateTime": "2024-08-07",
"academicYear": "24/25",
"sem": "1",
"remark": "用於Add Drop期間的數據,帶課表時間"
diff --git a/src/static/UMCourses/coursePlanTime.json b/src/static/UMCourses/coursePlanTime.json
index 0c3a17b1..ce417be2 100644
--- a/src/static/UMCourses/coursePlanTime.json
+++ b/src/static/UMCourses/coursePlanTime.json
@@ -8245,7 +8245,7 @@
"Notes for Course Enrolment": "Course for students admitted in AY2021/2022 and onwards; Class for (RC=MLC)",
"Teacher Information": "VÉNUS TERESA VIANA",
"Lecture / Lab": "Lecture",
- "Course Title Chi": "住宿學院社區團隊計畫"
+ "Course Title Chi": "住宿學院社區團隊專案"
},
{
"Offering Unit": "FST",
@@ -10580,7 +10580,7 @@
"Time From": "10:00",
"Time To": "12:45",
"Classroom": "E22-2018",
- "Course Title Chi": "以學科為基礎的教學方法(中學數學)II"
+ "Course Title Chi": "基於學科的教學方法(中學數學)II"
},
{
"Offering Unit": "FED",
@@ -25138,7 +25138,7 @@
"Course Title": "Advanced History Writing I",
"Section": "001",
"Medium of Instruction": "English",
- "Teacher Information": "WANG DI",
+ "Teacher Information": "KWAN CHING-YIN NATHAN",
"Lecture / Lab": "Lecture",
"Course Title Chi": "高級歷史寫作Ⅰ"
},
@@ -25204,7 +25204,7 @@
"Course Title": "Advanced History Writing I",
"Section": "007",
"Medium of Instruction": "English",
- "Teacher Information": "WU DONGMING",
+ "Teacher Information": "GUILLERMO FRANCISCO RICHARD RUIZ STOVEL",
"Lecture / Lab": "Lecture",
"Course Title Chi": "高級歷史寫作Ⅰ"
},
@@ -25241,6 +25241,39 @@
"Lecture / Lab": "Lecture",
"Course Title Chi": "研究計畫"
},
+ {
+ "Offering Unit": "FAH",
+ "Offering Department": "DHIST",
+ "Course Code": "HIST4003",
+ "Course Title": "Research Project",
+ "Section": "004",
+ "Medium of Instruction": "English",
+ "Teacher Information": "KWAN CHING-YIN NATHAN",
+ "Lecture / Lab": "Lecture",
+ "Course Title Chi": "研究計畫"
+ },
+ {
+ "Offering Unit": "FAH",
+ "Offering Department": "DHIST",
+ "Course Code": "HIST4003",
+ "Course Title": "Research Project",
+ "Section": "005",
+ "Medium of Instruction": "English",
+ "Teacher Information": "WU DONGMING",
+ "Lecture / Lab": "Lecture",
+ "Course Title Chi": "研究計畫"
+ },
+ {
+ "Offering Unit": "FAH",
+ "Offering Department": "DHIST",
+ "Course Code": "HIST4003",
+ "Course Title": "Research Project",
+ "Section": "006",
+ "Medium of Instruction": "English",
+ "Teacher Information": "JOSHUA PARR EHRLICH",
+ "Lecture / Lab": "Lecture",
+ "Course Title Chi": "研究計畫"
+ },
{
"Offering Unit": "HC",
"Course Code": "HONR2003",
@@ -26359,7 +26392,7 @@
"Time To": "11:15",
"Classroom": "E22-G004",
"\"Class For / Class Not For\" Information": "Class for :\n - FBA - IIR17-GMM17-FOURTH YEAR / IIR20-GMM20-THIRD YEAR / IIR20-GMM20-FOURTH YEAR\n",
- "Course Title Chi": "遊戲管理實習"
+ "Course Title Chi": "博彩管理實習"
},
{
"Offering Unit": "FBA",
@@ -26375,7 +26408,7 @@
"Time To": "11:15",
"Classroom": "E22-G004",
"\"Class For / Class Not For\" Information": "Class for :\n - FBA - IIR17-GMM17-FOURTH YEAR / IIR20-GMM20-THIRD YEAR / IIR20-GMM20-FOURTH YEAR\n",
- "Course Title Chi": "遊戲管理實習"
+ "Course Title Chi": "博彩管理實習"
},
{
"Offering Unit": "FBA",
@@ -32423,7 +32456,7 @@
"Day": "MON",
"Time From": "14:30",
"Time To": "15:45",
- "Classroom": "E21-1031",
+ "Classroom": "E22-3015",
"Course Title Chi": "佛教哲學"
},
{
@@ -32438,7 +32471,7 @@
"Day": "THU",
"Time From": "14:30",
"Time To": "15:45",
- "Classroom": "E21-1031",
+ "Classroom": "E22-3015",
"Course Title Chi": "佛教哲學"
},
{
@@ -35223,6 +35256,38 @@
"\"Class For / Class Not For\" Information": "Class for :\n - FAH - PTS19\n",
"Course Title Chi": "專業實用寫作 I"
},
+ {
+ "Offering Unit": "FAH",
+ "Offering Department": "DPT",
+ "Course Code": "PORT3002",
+ "Course Title": "Practical Writing for Professional Purposes I",
+ "Section": "002",
+ "Medium of Instruction": "Portuguese",
+ "Teacher Information": "JÚLIO REIS JATOBÁ",
+ "Lecture / Lab": "Lecture",
+ "Day": "TUE",
+ "Time From": "16:00",
+ "Time To": "17:15",
+ "Classroom": "E21-1045",
+ "\"Class For / Class Not For\" Information": "Class for :\n - FAH - PTS19\n",
+ "Course Title Chi": "專業實用寫作 I"
+ },
+ {
+ "Offering Unit": "FAH",
+ "Offering Department": "DPT",
+ "Course Code": "PORT3002",
+ "Course Title": "Practical Writing for Professional Purposes I",
+ "Section": "002",
+ "Medium of Instruction": "Portuguese",
+ "Teacher Information": "JÚLIO REIS JATOBÁ",
+ "Lecture / Lab": "Lecture",
+ "Day": "FRI",
+ "Time From": "16:00",
+ "Time To": "17:15",
+ "Classroom": "E21-1045",
+ "\"Class For / Class Not For\" Information": "Class for :\n - FAH - PTS19\n",
+ "Course Title Chi": "專業實用寫作 I"
+ },
{
"Offering Unit": "FAH",
"Offering Department": "DPT",
@@ -36556,7 +36621,7 @@
"Time From": "11:30",
"Time To": "12:45",
"Classroom": "E22-4015",
- "Course Title Chi": "遊戲社會學"
+ "Course Title Chi": "博彩社會學"
},
{
"Offering Unit": "FSS",
@@ -36571,7 +36636,7 @@
"Time From": "11:30",
"Time To": "12:45",
"Classroom": "E22-4015",
- "Course Title Chi": "遊戲社會學"
+ "Course Title Chi": "博彩社會學"
},
{
"Offering Unit": "FSS",
diff --git a/src/utils/checkCoursesKits.js b/src/utils/checkCoursesKits.js
new file mode 100644
index 00000000..f727f8be
--- /dev/null
+++ b/src/utils/checkCoursesKits.js
@@ -0,0 +1,35 @@
+import moment from 'moment';
+import { getLocalStorage, setLocalStorage, logAllStorage } from './storageKits';
+import offerCourses from '../static/UMCourses/offerCourses';
+import coursePlan from '../static/UMCourses/coursePlan';
+import coursePlanTime from '../static/UMCourses/coursePlanTime';
+
+
+export async function checkLocalCourseVersion() {
+ const storageOfferCourses = await getLocalStorage('offer_courses');
+ if (storageOfferCourses) {
+ if (moment(storageOfferCourses.updateTime).isBefore(moment(offerCourses.updateTime))) {
+ // 新APP需覆蓋舊版APP的本地緩存
+ const saveResult = await setLocalStorage('offer_courses', offerCourses);
+ if (saveResult != 'ok') { Alert.alert('Error', JSON.stringify(saveResult)); }
+ }
+ } else {
+ const saveResult = await setLocalStorage('offer_courses', offerCourses);
+ if (saveResult != 'ok') { Alert.alert('Error', JSON.stringify(saveResult)); }
+ }
+
+ const storageCoursePlan = await getLocalStorage('course_plan');
+ if (storageCoursePlan) {
+ if (moment(storageCoursePlan.updateTime).isBefore(moment(coursePlan.updateTime))) {
+ // 新APP需覆蓋舊版APP的本地緩存
+ // console.log('修改本地緩存日期為', coursePlan.updateTime);
+ let saveResult = await setLocalStorage('course_plan', coursePlan);
+ if (saveResult != 'ok') { Alert.alert('Error', JSON.stringify(saveResult)); }
+ saveResult = await setLocalStorage('course_plan_time', coursePlanTime);
+ if (saveResult != 'ok') { Alert.alert('Error', JSON.stringify(saveResult)); }
+ }
+ } else {
+ const saveResult = await setLocalStorage('course_plan', coursePlan);
+ if (saveResult != 'ok') { Alert.alert('Error', JSON.stringify(saveResult)); }
+ }
+}
\ No newline at end of file
diff --git a/src/utils/pathMap.js b/src/utils/pathMap.js
index 49d80147..7792bac7 100644
--- a/src/utils/pathMap.js
+++ b/src/utils/pathMap.js
@@ -112,6 +112,7 @@ export const USUAL_Q = 'https://umall.one/qa.html';
// Webview 服務
// 選咩課
export const WHAT_2_REG = 'https://www.umeh.top';
+export const WHAT_2_REG_SEARCH = 'https://www.umeh.top/search/course/';
// 澳大討論區
export const UM_WHOLE = 'https://umbbs.xyz';