@nakamura-123/pages 1.4.5 → 1.4.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -29,11 +29,11 @@ const ArticleRow = ({ title, kind, isContinued, isRead, flagColor, borderColor,
29
29
  isContinued && styles.continued,
30
30
  borderColor && { borderColor: lib_1.colors[borderColor], borderWidth: 2 },
31
31
  ]}>
32
- {!isRead && (<react_native_1.View style={styles.ribbon} pointerEvents="none">
33
- <react_native_1.Text style={styles.ribbonText}>{t("article.unread")}</react_native_1.Text>
34
- </react_native_1.View>)}
35
32
  <react_native_1.View style={styles.leftIconWrap}>
36
33
  <common_1.Icon5 name="file-alt" size={18} color="darkGray"/>
34
+ {/* 未読は書類のアイコンの右上の赤い点。前は角の斜めの帯に「未読」と書いたが、
35
+ ほかの言語では帯に入りきらず読めなかった(2026-11-18、本人) */}
36
+ {!isRead && (<react_native_1.View style={styles.unreadDot} pointerEvents="none" accessibilityLabel={t("article.unread")}/>)}
37
37
  </react_native_1.View>
38
38
  <common_1.MyText fsize="sm" color="text" style={styles.title}>
39
39
  {title}
@@ -50,7 +50,6 @@ const styles = react_native_1.StyleSheet.create({
50
50
  width: "100%",
51
51
  flexDirection: "row",
52
52
  alignItems: "center",
53
- // 左は未読の帯の分あけておく(既読でも位置がそろうように常にあける)
54
53
  paddingLeft: 30,
55
54
  paddingRight: 15,
56
55
  borderWidth: 1,
@@ -65,23 +64,17 @@ const styles = react_native_1.StyleSheet.create({
65
64
  leftIconWrap: {
66
65
  marginRight: 8,
67
66
  },
68
- // 未読:左上の角に斜めの帯。行の高さが変わっても角に収まるよう上からの位置で決める。
69
- // アイコンから8pt以上離れる位置
70
- ribbon: {
67
+ // アイコンの右上に少し重ねる。地の色の縁で、アイコンの線と混ざらないようにする
68
+ unreadDot: {
71
69
  position: "absolute",
72
- top: 4,
73
- left: -22,
74
- width: 64,
75
- paddingVertical: 1,
76
- alignItems: "center",
70
+ top: -3,
71
+ right: -5,
72
+ width: 10,
73
+ height: 10,
74
+ borderRadius: 5,
77
75
  backgroundColor: lib_1.colors.red,
78
- transform: [{ rotate: "-45deg" }],
79
- },
80
- ribbonText: {
81
- color: lib_1.colors.white,
82
- fontSize: 10,
83
- fontWeight: "700",
84
- letterSpacing: 0.5,
76
+ borderWidth: 1.5,
77
+ borderColor: lib_1.colors.bkBeige,
85
78
  },
86
79
  title: {
87
80
  flex: 1,
@@ -47,12 +47,19 @@ const GAnswer = ({ navigation }) => {
47
47
  }
48
48
  // 意味を取る問題:わかった/わからなかった。今解いている問題なら、答えたあとも押し直せる
49
49
  const canAnswer = mode === "quiz" || (mode === "check" && turn === activeTurn);
50
+ // 否定を左・肯定を右に置く(「いいえ・はい」と同じ並び)。字だけでなく?と✓の形でも分かるようにする(2026-11-18、本人)
50
51
  const cards = [
51
- { ok: true, label: t("quiz.result.understood"), color: "red" },
52
52
  {
53
53
  ok: false,
54
54
  label: t("quiz.grammar.notUnderstood"),
55
55
  color: "blue",
56
+ icon: "question-circle",
57
+ },
58
+ {
59
+ ok: true,
60
+ label: t("quiz.result.understood"),
61
+ color: "red",
62
+ icon: "check-circle",
56
63
  },
57
64
  ];
58
65
  return (<react_native_1.View>
@@ -60,7 +67,7 @@ const GAnswer = ({ navigation }) => {
60
67
  <GGuideBtn_1.default navigation={navigation}/>
61
68
  </react_native_1.View>
62
69
  <react_native_1.View style={styles.container}>
63
- {cards.map(({ ok, label, color }) => {
70
+ {cards.map(({ ok, label, color, icon }) => {
64
71
  const isOn = mode !== "quiz" && question.isCorrected === ok;
65
72
  return (<common_1.DoubleTapWrapper key={label} onPress={() => canAnswer && handleAnswer(ok)} isDoublePress={isDoublePress}>
66
73
  <react_native_1.View style={Object.assign(Object.assign({}, styles.choice), { borderColor: isOn ? lib_1.colors[color] : lib_1.colors.light })}>
@@ -71,7 +78,10 @@ const GAnswer = ({ navigation }) => {
71
78
  {ok ? t("quiz.result.understood") : t("quiz.grammar.again")}
72
79
  <common_1.Icon5 name={pawIcon} size={15} color={color}/>
73
80
  </common_1.BoundText>)}
74
- <common_1.MyText>{label}</common_1.MyText>
81
+ <react_native_1.View style={styles.labelRow}>
82
+ <common_1.Icon5 name={icon} size={18} color={color} solid style={styles.labelIcon}/>
83
+ <common_1.MyText>{label}</common_1.MyText>
84
+ </react_native_1.View>
75
85
  </react_native_1.View>
76
86
  </common_1.DoubleTapWrapper>);
77
87
  })}
@@ -80,10 +90,19 @@ const GAnswer = ({ navigation }) => {
80
90
  };
81
91
  const styles = react_native_1.StyleSheet.create({
82
92
  // 単語の問題画面の Repeat・Search・Guide の段と同じ位置。音声(Repeat)は段7で足す
93
+ // ガイドのボタンが出たときに選択肢の枠とくっつかないよう、下を空ける(2026-11-18、本人)
83
94
  btnRow: {
84
95
  flexDirection: "row",
85
96
  marginHorizontal: 10,
86
97
  minHeight: 40,
98
+ marginBottom: 10,
99
+ },
100
+ labelRow: {
101
+ flexDirection: "row",
102
+ alignItems: "center",
103
+ },
104
+ labelIcon: {
105
+ marginRight: 6,
87
106
  },
88
107
  container: {
89
108
  justifyContent: "space-between",
@@ -28,6 +28,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
29
  const react_1 = __importStar(require("react"));
30
30
  const react_native_1 = require("react-native");
31
+ const react_redux_1 = require("react-redux");
31
32
  const lib_1 = require("@nakamura-123/lib");
32
33
  const common_1 = require("@nakamura-123/common");
33
34
  const QuizCnt_1 = __importDefault(require("../jQuestion/QuizCnt"));
@@ -42,6 +43,9 @@ const GQuestion = ({ navigation }) => {
42
43
  const question = (0, quizHook_1.useQuestionDataG)();
43
44
  const mode = (0, quizHook_1.useGetMode)();
44
45
  const trans = (0, quizHook_1.useGrammarTrans)(question === null || question === void 0 ? void 0 : question.quizId);
46
+ // 訳は例文と同じ大きさ(設定の文字の大きさ)にする。前はsm(13)で固定で、
47
+ // 日本語の字体ではローマ字が一回り小さく見えるので、英語などは小さすぎた(2026-11-18、本人)
48
+ const fsize = (0, react_redux_1.useSelector)((state) => state.quizCfg.inQuizOption.fsize);
45
49
  // 訳を見た問題。問題が替わったら閉じる
46
50
  const [peekId, setPeekId] = (0, react_1.useState)(null);
47
51
  if (!question)
@@ -59,7 +63,7 @@ const GQuestion = ({ navigation }) => {
59
63
  </RubyText_1.default>
60
64
  </react_native_1.View>
61
65
  <react_native_1.View style={styles.bottom}>
62
- {showTrans && trans && (<common_1.MyText fsize="sm" style={styles.trans}>
66
+ {showTrans && trans && (<common_1.MyText fsize={fsize} style={styles.trans}>
63
67
  {(0, renderTransUdl_1.renderTransUdl)(trans, isBlank ? styles.udlRed : styles.udlBlue)}
64
68
  </common_1.MyText>)}
65
69
  {isQuiz && !isBlank && !isPeek && (<react_native_1.Pressable style={styles.peek} onPress={() => setPeekId(question.quizId)}>