diff --git a/src/models/settings.ts b/src/models/settings.ts index b31da7c..7dd7ef9 100644 --- a/src/models/settings.ts +++ b/src/models/settings.ts @@ -44,6 +44,7 @@ class SettingsStore { markStyle: 'background' | 'border' = 'background' showMarkWeightTip = true collapseLongAssignmentText = false + targetMarkCompact = false /** * Map containing per student overrides diff --git a/src/screens/settings/marks/Marks.tsx b/src/screens/settings/marks/Marks.tsx index ae405dc..34841ee 100644 --- a/src/screens/settings/marks/Marks.tsx +++ b/src/screens/settings/marks/Marks.tsx @@ -42,6 +42,11 @@ export default observer(function Notifications( title='"Вес: " перед весом оценки' setting="showMarkWeightTip" /> + {student && ( diff --git a/src/screens/totals/term/MarksInline.tsx b/src/screens/totals/term/MarksInline.tsx index 4dcf622..dea2931 100644 --- a/src/screens/totals/term/MarksInline.tsx +++ b/src/screens/totals/term/MarksInline.tsx @@ -1,7 +1,7 @@ import { observer } from 'mobx-react-lite' import React, { useMemo } from 'react' import { ScrollView, StyleProp, View, ViewStyle } from 'react-native' -import { Text } from 'react-native-paper' +import { Chip, Text } from 'react-native-paper' import Loading from '~components/Loading' import Mark from '~components/Mark' import { styles } from '~constants' @@ -155,35 +155,53 @@ export default observer(function SubjectMarksInline( style={{ padding: Spacings.s2, alignSelf: 'center' }} /> - - {toGetTarget && ( - - До - - нужно {toGetTarget}x - - - - )} - + {toGetTarget && ( + + {Settings.targetMarkCompact && ( + + + Нужно + + {toGetTarget}x + + + + )} + {!Settings.targetMarkCompact && ( + + До + + нужно + + {toGetTarget}x + + + + + )} + + )} ) })