Skip to content

Commit

Permalink
Merge pull request #347 from UM-ARK/3-1-0
Browse files Browse the repository at this point in the history
3.1.0更新
  • Loading branch information
yyyyyyounger authored Aug 8, 2024
2 parents 927ca1e + 9ccb4ca commit 0233b4c
Show file tree
Hide file tree
Showing 16 changed files with 215 additions and 89 deletions.
4 changes: 4 additions & 0 deletions App.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -121,6 +123,8 @@ class App extends Component {
this.setState({ isLogin: false });
}
this.checkLanguage();
// 檢查APP靜態文件的課程更新時間和緩存數據新舊,取最新
checkLocalCourseVersion();
} catch (e) {
console.error('App error', e);
}
Expand Down
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand Down
12 changes: 6 additions & 6 deletions ios/UMALL.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "umall",
"version": "3.0.0",
"version": "3.1.0",
"private": true,
"scripts": {
"android": "react-native run-android",
Expand Down
4 changes: 3 additions & 1 deletion src/Tabbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'}>

Expand Down Expand Up @@ -95,7 +97,7 @@ class Tabbar extends Component {
focused={focused}
/>
),
title: t('Wiki'),
title: t('百科'),
}}
listeners={() => ({
tabPress: () => trigger()
Expand Down
1 change: 1 addition & 0 deletions src/i18n/en-us.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export default {

"資訊": "Info",
"搵課": "Courses",
"百科": "Wiki",
"課表": "Timetable",
"服務": "Services",
"組織": "Club",
Expand Down
11 changes: 6 additions & 5 deletions src/pages/TabbarPages/courseSim/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'];

Expand Down Expand Up @@ -464,6 +464,7 @@ export default class courseSim extends Component {
// }}
onPress={() => {
trigger('rigid');
this.setState({ addMode: false });
}}
delayLongPress={300}
>
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -1019,7 +1020,7 @@ E11-0000
<TouchableOpacity style={{
position: 'absolute',
right: scale(10),
backgroundColor: this.state.addMode ? themeColorUltraLight : themeColor,
backgroundColor: this.state.addMode ? secondThemeColor : themeColor,
borderRadius: scale(5),
padding: scale(5),
}}
Expand All @@ -1032,7 +1033,7 @@ E11-0000
>
<Text style={{
...uiStyle.defaultText,
color: this.state.addMode ? themeColor : white,
color: white,
fontWeight: 'bold'
}}>{this.state.addMode ? t('關閉', { ns: 'timetable' }) : t('搵課/加課', { ns: 'timetable' })}</Text>
</TouchableOpacity>
Expand All @@ -1041,7 +1042,7 @@ E11-0000
<ScrollView
ref={this.verScroll}
contentContainerStyle={{ flexDirection: 'row', width: '100%' }}
showsVerticalScrollIndicator={false}
// showsVerticalScrollIndicator={false}
>
{/* 課表 / 首次使用提示 */}
<View style={{ width: this.state.addMode ? '65%' : '100%' }}>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/TabbarPages/features/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -800,7 +800,7 @@ class Index extends Component {
}}
/>

<ScrollView showsVerticalScrollIndicator={false}>
<ScrollView showsVerticalScrollIndicator={true}>
<View style={{ flexDirection: 'row', alignItems: 'center', justifyContent: 'center', }}>
{/* ARK Logo */}
<FastImage
Expand Down
2 changes: 1 addition & 1 deletion src/pages/TabbarPages/info/AboutPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export default class AboutPage extends Component {
render() {
return (
<View style={{ flex: 1, backgroundColor: COLOR_DIY.bg_color, alignItems: 'center' }}>
<ScrollView showsVerticalScrollIndicator={false}>
<ScrollView showsVerticalScrollIndicator={true}>
<View style={{
alignSelf: 'center',
alignItems: 'center', justifyContent: 'center',
Expand Down
2 changes: 1 addition & 1 deletion src/pages/TabbarPages/info/ClubPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ class ClubPage extends Component {

{/* 組織展示 */}
<ScrollView
showsVerticalScrollIndicator={false}
// showsVerticalScrollIndicator={false}
refreshControl={
<RefreshControl
colors={[themeColor]}
Expand Down
110 changes: 57 additions & 53 deletions src/pages/TabbarPages/info/home/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import {
MAIL,
ARK_WIKI,
ARK_WIKI_RANDOM_TITLE,
UM_Moodle,
} from '../../../../utils/pathMap.js';
import EventPage from './EventPage.js';
import ModalBottom from '../../../../components/ModalBottom.js';
Expand All @@ -33,6 +34,7 @@ import { UMCalendar } from '../../../../static/UMCalendar/UMCalendar.js';
import HomeCard from './components/HomeCard.js';
import { screenWidth } from '../../../../utils/stylesKits.js';
import { trigger } from '../../../../utils/trigger.js';
import { logToFirebase } from '../../../../utils/firebaseAnalytics.js';

import Ionicons from 'react-native-vector-icons/Ionicons';
import MaterialCommunityIcons from 'react-native-vector-icons/MaterialCommunityIcons';
Expand All @@ -47,6 +49,7 @@ import FastImage from 'react-native-fast-image';
import moment from 'moment';
import TouchableScale from "react-native-touchable-scale";
import { t } from "i18next";
import { openLink } from '../../../../utils/browser.js';

const { white, bg_color, black, themeColor, themeColorLight, themeColorUltraLight, viewShadow } = COLOR_DIY;
const iconSize = verticalScale(25);
Expand Down Expand Up @@ -164,19 +167,13 @@ class HomeScreen extends Component {
},
},
{
icon_name: 'coffee',
icon_name: 'alpha-m-circle-outline',
icon_type: iconTypes.materialCommunityIcons,
function_name: t('支持我們', { ns: 'home' }),
function_name: t('Moodle', { ns: 'home' }),
func: () => {
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);
},
},
{
Expand All @@ -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);
},
},
{
Expand Down Expand Up @@ -675,27 +679,29 @@ class HomeScreen extends Component {
onScroll={this.handleScroll}
scrollEventThrottle={400}
>
<View style={{
alignSelf: 'center',
alignItems: 'center', justifyContent: 'center',
flexDirection: 'row',
marginTop: verticalScale(10),
}}>
{/* ARK Logo */}
<FastImage
source={require('../../../../static/img/logo.png')}
style={{
height: iconSize, width: iconSize,
borderRadius: scale(5),
}}
/>
<Text style={{
fontSize: verticalScale(18),
color: themeColor,
fontWeight: 'bold',
marginLeft: verticalScale(5),
}}>ARK ALL 澳大方舟</Text>
</View>
{false && (
<View style={{
alignSelf: 'center',
alignItems: 'center', justifyContent: 'center',
flexDirection: 'row',
marginTop: verticalScale(10),
}}>
{/* ARK Logo */}
<FastImage
source={require('../../../../static/img/logo.png')}
style={{
height: iconSize, width: iconSize,
borderRadius: scale(5),
}}
/>
<Text style={{
fontSize: verticalScale(18),
color: themeColor,
fontWeight: 'bold',
marginLeft: verticalScale(5),
}}>ARK ALL 澳大方舟</Text>
</View>
)}

{/* 校曆列表 */}
{cal && cal.length > 0 ? (
Expand Down Expand Up @@ -796,22 +802,20 @@ class HomeScreen extends Component {
}

{/* 快捷功能圖標 */}
{false &&
<FlatGrid
style={{
alignSelf: 'center',
backgroundColor: white, borderRadius: scale(10),
marginTop: scale(5),
}}
maxItemsPerRow={6}
itemDimension={scale(50)}
spacing={scale(5)}
data={this.state.functionArray}
renderItem={({ item }) => this.GetFunctionIcon(item)}
showsVerticalScrollIndicator={false}
scrollEnabled={false}
/>
}
<FlatGrid
style={{
alignSelf: 'center',
backgroundColor: white, borderRadius: scale(10),
marginTop: scale(5),
}}
maxItemsPerRow={6}
itemDimension={scale(50)}
spacing={scale(5)}
data={this.state.functionArray}
renderItem={({ item }) => this.GetFunctionIcon(item)}
showsVerticalScrollIndicator={false}
scrollEnabled={false}
/>

{/* 更新提示 */}
{
Expand Down Expand Up @@ -903,9 +907,9 @@ class HomeScreen extends Component {
{this.state.networkError ? (
<Text style={{ alignSelf: 'center', marginTop: verticalScale(3), ...uiStyle.defaultText, color: black.third, }}>網絡錯誤,請手動刷新!</Text>
) : null
// (<>
// <Text style={{ alignSelf: 'center', marginTop: verticalScale(3), ...uiStyle.defaultText, color: black.third, }}>各組織可自行操作發佈活動! 立即進駐ARK!</Text>
// </>)
// (<>
// <Text style={{ alignSelf: 'center', marginTop: verticalScale(3), ...uiStyle.defaultText, color: black.third, }}>各組織可自行操作發佈活動! 立即進駐ARK!</Text>
// </>)
}
<EventPage ref={this.eventPage} />

Expand Down
Loading

0 comments on commit 0233b4c

Please sign in to comment.