@pi-spi/app 1.5.1 → 1.6.0
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.
- package/lib/module/l10n/app_localizations.js.map +1 -1
- package/lib/module/l10n/app_localizations_en.js +12 -1
- package/lib/module/l10n/app_localizations_en.js.map +1 -1
- package/lib/module/l10n/app_localizations_fr.js +12 -1
- package/lib/module/l10n/app_localizations_fr.js.map +1 -1
- package/lib/module/l10n/app_localizations_pt.js +12 -1
- package/lib/module/l10n/app_localizations_pt.js.map +1 -1
- package/lib/module/modules/alias/presentation/pages/alias_delete_btn_widget.js +15 -19
- package/lib/module/modules/alias/presentation/pages/alias_delete_btn_widget.js.map +1 -1
- package/lib/module/modules/alias/presentation/pages/alias_page_claim.js +4 -11
- package/lib/module/modules/alias/presentation/pages/alias_page_claim.js.map +1 -1
- package/lib/module/modules/compte/presentation/pages/compte_details_widget.js +6 -7
- package/lib/module/modules/compte/presentation/pages/compte_details_widget.js.map +1 -1
- package/lib/module/modules/profile/presentation/pages/compte/profile_compte_page.js +25 -11
- package/lib/module/modules/profile/presentation/pages/compte/profile_compte_page.js.map +1 -1
- package/lib/module/modules/profile/presentation/pages/parametre/profile_parametre_page.js +12 -18
- package/lib/module/modules/profile/presentation/pages/parametre/profile_parametre_page.js.map +1 -1
- package/lib/module/modules/profile/presentation/pages/parametre/profile_parametre_page_notifications.js +109 -103
- package/lib/module/modules/profile/presentation/pages/parametre/profile_parametre_page_notifications.js.map +1 -1
- package/lib/module/modules/profile/presentation/pages/parametre/profile_parametre_page_notifications_son.js +55 -72
- package/lib/module/modules/profile/presentation/pages/parametre/profile_parametre_page_notifications_son.js.map +1 -1
- package/lib/module/modules/profile/presentation/pages/parametre/profile_parametre_page_qrcode.js +31 -45
- package/lib/module/modules/profile/presentation/pages/parametre/profile_parametre_page_qrcode.js.map +1 -1
- package/lib/module/modules/profile/presentation/pages/parametre/profile_parametre_page_theme.js +103 -67
- package/lib/module/modules/profile/presentation/pages/parametre/profile_parametre_page_theme.js.map +1 -1
- package/lib/module/modules/profile/presentation/pages/profile_app_bar.js +26 -0
- package/lib/module/modules/profile/presentation/pages/profile_app_bar.js.map +1 -0
- package/lib/module/modules/profile/presentation/pages/profile_menu.js +143 -34
- package/lib/module/modules/profile/presentation/pages/profile_menu.js.map +1 -1
- package/lib/module/modules/profile/presentation/pages/profile_page.js +95 -63
- package/lib/module/modules/profile/presentation/pages/profile_page.js.map +1 -1
- package/lib/module/modules/profile/presentation/pages/profile_page_avatar.js +97 -45
- package/lib/module/modules/profile/presentation/pages/profile_page_avatar.js.map +1 -1
- package/lib/module/modules/profile/presentation/pages/profile_page_contacts.js +9 -8
- package/lib/module/modules/profile/presentation/pages/profile_page_contacts.js.map +1 -1
- package/lib/module/modules/search/presentation/pages/search_fonctionnalites.js +26 -2
- package/lib/module/modules/search/presentation/pages/search_fonctionnalites.js.map +1 -1
- package/lib/module/modules/search/presentation/pages/search_page.js +0 -1
- package/lib/module/modules/search/presentation/pages/search_page.js.map +1 -1
- package/lib/module/modules/transactions/presentation/pages/transaction_rtp/transaction_rtp_page.js +4 -11
- package/lib/module/modules/transactions/presentation/pages/transaction_rtp/transaction_rtp_page.js.map +1 -1
- package/lib/module/modules/transactions/presentation/pages/transaction_rtp/transaction_rtp_page_actions.js +13 -10
- package/lib/module/modules/transactions/presentation/pages/transaction_rtp/transaction_rtp_page_actions.js.map +1 -1
- package/lib/module/shared/utils/color.js +15 -0
- package/lib/module/shared/utils/color.js.map +1 -0
- package/lib/module/shared/widgets/error_card_widget.js +70 -0
- package/lib/module/shared/widgets/error_card_widget.js.map +1 -0
- package/lib/module/shared/widgets/selection.js +136 -0
- package/lib/module/shared/widgets/selection.js.map +1 -0
- package/lib/typescript/src/l10n/app_localizations.d.ts +22 -0
- package/lib/typescript/src/l10n/app_localizations.d.ts.map +1 -1
- package/lib/typescript/src/l10n/app_localizations_en.d.ts.map +1 -1
- package/lib/typescript/src/l10n/app_localizations_fr.d.ts.map +1 -1
- package/lib/typescript/src/l10n/app_localizations_pt.d.ts.map +1 -1
- package/lib/typescript/src/modules/alias/presentation/pages/alias_delete_btn_widget.d.ts.map +1 -1
- package/lib/typescript/src/modules/alias/presentation/pages/alias_page_claim.d.ts.map +1 -1
- package/lib/typescript/src/modules/compte/presentation/pages/compte_details_widget.d.ts.map +1 -1
- package/lib/typescript/src/modules/profile/presentation/pages/compte/profile_compte_page.d.ts.map +1 -1
- package/lib/typescript/src/modules/profile/presentation/pages/parametre/profile_parametre_page.d.ts.map +1 -1
- package/lib/typescript/src/modules/profile/presentation/pages/parametre/profile_parametre_page_notifications.d.ts.map +1 -1
- package/lib/typescript/src/modules/profile/presentation/pages/parametre/profile_parametre_page_notifications_son.d.ts.map +1 -1
- package/lib/typescript/src/modules/profile/presentation/pages/parametre/profile_parametre_page_qrcode.d.ts.map +1 -1
- package/lib/typescript/src/modules/profile/presentation/pages/parametre/profile_parametre_page_theme.d.ts.map +1 -1
- package/lib/typescript/src/modules/profile/presentation/pages/profile_app_bar.d.ts +5 -0
- package/lib/typescript/src/modules/profile/presentation/pages/profile_app_bar.d.ts.map +1 -0
- package/lib/typescript/src/modules/profile/presentation/pages/profile_menu.d.ts +31 -4
- package/lib/typescript/src/modules/profile/presentation/pages/profile_menu.d.ts.map +1 -1
- package/lib/typescript/src/modules/profile/presentation/pages/profile_page.d.ts +4 -1
- package/lib/typescript/src/modules/profile/presentation/pages/profile_page.d.ts.map +1 -1
- package/lib/typescript/src/modules/profile/presentation/pages/profile_page_avatar.d.ts +1 -1
- package/lib/typescript/src/modules/profile/presentation/pages/profile_page_avatar.d.ts.map +1 -1
- package/lib/typescript/src/modules/profile/presentation/pages/profile_page_contacts.d.ts.map +1 -1
- package/lib/typescript/src/modules/search/presentation/pages/search_fonctionnalites.d.ts.map +1 -1
- package/lib/typescript/src/modules/transactions/presentation/pages/transaction_rtp/transaction_rtp_page.d.ts.map +1 -1
- package/lib/typescript/src/modules/transactions/presentation/pages/transaction_rtp/transaction_rtp_page_actions.d.ts.map +1 -1
- package/lib/typescript/src/shared/utils/color.d.ts +7 -0
- package/lib/typescript/src/shared/utils/color.d.ts.map +1 -0
- package/lib/typescript/src/shared/widgets/error_card_widget.d.ts +11 -0
- package/lib/typescript/src/shared/widgets/error_card_widget.d.ts.map +1 -0
- package/lib/typescript/src/shared/widgets/selection.d.ts +21 -0
- package/lib/typescript/src/shared/widgets/selection.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/l10n/app_localizations.ts +22 -0
- package/src/l10n/app_localizations_en.ts +11 -0
- package/src/l10n/app_localizations_fr.ts +11 -0
- package/src/l10n/app_localizations_pt.ts +11 -0
- package/src/modules/alias/presentation/pages/alias_delete_btn_widget.tsx +13 -12
- package/src/modules/alias/presentation/pages/alias_page_claim.tsx +5 -4
- package/src/modules/compte/presentation/pages/compte_details_widget.tsx +3 -4
- package/src/modules/profile/presentation/pages/compte/profile_compte_page.tsx +15 -7
- package/src/modules/profile/presentation/pages/parametre/profile_parametre_page.tsx +10 -12
- package/src/modules/profile/presentation/pages/parametre/profile_parametre_page_notifications.tsx +89 -68
- package/src/modules/profile/presentation/pages/parametre/profile_parametre_page_notifications_son.tsx +84 -54
- package/src/modules/profile/presentation/pages/parametre/profile_parametre_page_qrcode.tsx +28 -24
- package/src/modules/profile/presentation/pages/parametre/profile_parametre_page_theme.tsx +77 -44
- package/src/modules/profile/presentation/pages/profile_app_bar.tsx +21 -0
- package/src/modules/profile/presentation/pages/profile_menu.tsx +126 -33
- package/src/modules/profile/presentation/pages/profile_page.tsx +90 -66
- package/src/modules/profile/presentation/pages/profile_page_avatar.tsx +69 -28
- package/src/modules/profile/presentation/pages/profile_page_contacts.tsx +5 -4
- package/src/modules/search/presentation/pages/search_fonctionnalites.ts +40 -7
- package/src/modules/search/presentation/pages/search_page.tsx +1 -1
- package/src/modules/transactions/presentation/pages/transaction_rtp/transaction_rtp_page.tsx +2 -4
- package/src/modules/transactions/presentation/pages/transaction_rtp/transaction_rtp_page_actions.tsx +13 -6
- package/src/shared/utils/color.ts +14 -0
- package/src/shared/widgets/error_card_widget.tsx +58 -0
- package/src/shared/widgets/selection.tsx +98 -0
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { MaterialIcons } from '@expo/vector-icons';
|
|
4
4
|
import { useState } from 'react';
|
|
5
|
-
import {
|
|
5
|
+
import { ScrollView, StyleSheet, Text, View } from 'react-native';
|
|
6
6
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
7
7
|
import { Images } from "../../../../../core/assets.js";
|
|
8
8
|
import { useBloc } from "../../../../../core/bloc_react.js";
|
|
@@ -11,11 +11,12 @@ import { SoundManager } from "../../../../../core/sounds.js";
|
|
|
11
11
|
import { useTheme } from "../../../../../core/theme.js";
|
|
12
12
|
import { useAppLocalizations } from "../../../../../l10n/localizations.js";
|
|
13
13
|
import { TextButton } from "../../../../../shared/material/buttons.js";
|
|
14
|
-
import {
|
|
14
|
+
import { AppBar } from "../../../../../shared/material/scaffold.js";
|
|
15
15
|
import { ConfigBloc } from "../../../../config/adapters/ui/bloc/config_bloc.js";
|
|
16
16
|
import { ConfigChangeEvent } from "../../../../config/adapters/ui/bloc/config_event.js";
|
|
17
17
|
import { ConfigKey } from "../../../../config/domain/models/config_keys.js";
|
|
18
|
-
import {
|
|
18
|
+
import { ProfileMenuTile, ProfilePageMenu } from "../profile_menu.js";
|
|
19
|
+
import { SwitchThemed } from "./settings_widgets.js";
|
|
19
20
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
20
21
|
const NONE = 'NONE';
|
|
21
22
|
|
|
@@ -41,55 +42,53 @@ export function ProfileParametrePageNotificationsSon() {
|
|
|
41
42
|
AppRouter.pop(router);
|
|
42
43
|
}
|
|
43
44
|
};
|
|
45
|
+
const basculer = () => setSelectedSound(enabled ? NONE : SoundManager.liste[0]?.path ?? null);
|
|
44
46
|
return /*#__PURE__*/_jsxs(View, {
|
|
45
47
|
style: [styles.flex, {
|
|
46
48
|
paddingBottom: insets.bottom
|
|
47
49
|
}],
|
|
48
|
-
children: [/*#__PURE__*/
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
style:
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
size: 24,
|
|
58
|
-
color: theme.colorScheme.onSurface
|
|
59
|
-
})
|
|
60
|
-
}), /*#__PURE__*/_jsx(View, {
|
|
50
|
+
children: [/*#__PURE__*/_jsx(AppBar, {
|
|
51
|
+
backgroundColor: "transparent",
|
|
52
|
+
onBack: () => AppRouter.pop(router),
|
|
53
|
+
title: /*#__PURE__*/_jsx(Text, {
|
|
54
|
+
numberOfLines: 1,
|
|
55
|
+
style: theme.textTheme.headlineMedium,
|
|
56
|
+
children: traductions.appSettingPageMenuNotificationSonPageTitle
|
|
57
|
+
}),
|
|
58
|
+
actions: /*#__PURE__*/_jsx(View, {
|
|
61
59
|
style: styles.save,
|
|
62
60
|
children: /*#__PURE__*/_jsx(TextButton, {
|
|
63
61
|
onPress: save,
|
|
64
62
|
children: traductions.btnTextSave
|
|
65
63
|
})
|
|
66
|
-
})
|
|
64
|
+
})
|
|
67
65
|
}), /*#__PURE__*/_jsxs(ScrollView, {
|
|
68
66
|
style: styles.flex,
|
|
69
67
|
contentContainerStyle: styles.content,
|
|
70
|
-
children: [/*#__PURE__*/_jsx(
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
68
|
+
children: [/*#__PURE__*/_jsx(ProfilePageMenu, {
|
|
69
|
+
items: [/*#__PURE__*/_jsx(ProfileMenuTile, {
|
|
70
|
+
image: Images.iconsCloche,
|
|
71
|
+
titre: traductions.notificationPageTitle,
|
|
72
|
+
onPress: basculer,
|
|
73
|
+
trailing: /*#__PURE__*/_jsx(SwitchThemed, {
|
|
74
|
+
value: enabled,
|
|
75
|
+
onChange: basculer
|
|
76
|
+
})
|
|
77
|
+
}, "son")]
|
|
80
78
|
}), /*#__PURE__*/_jsx(View, {
|
|
81
|
-
style: styles.
|
|
82
|
-
}), /*#__PURE__*/_jsx(
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
79
|
+
style: styles.gap24
|
|
80
|
+
}), /*#__PURE__*/_jsx(ProfilePageMenu, {
|
|
81
|
+
titre: traductions.appSettingPageMenuNotificationSonTitle,
|
|
82
|
+
items: [
|
|
83
|
+
/*#__PURE__*/
|
|
84
|
+
// Aucun
|
|
85
|
+
_jsx(SoundRow, {
|
|
86
|
+
icone: "music-off",
|
|
89
87
|
label: traductions.appSettingPageMenuNotificationStyleNone,
|
|
90
88
|
checked: selectedSound === NONE,
|
|
91
89
|
onPress: () => setSelectedSound(NONE)
|
|
92
|
-
}), SoundManager.liste.map(sound => /*#__PURE__*/_jsx(SoundRow, {
|
|
90
|
+
}, NONE), ...SoundManager.liste.map(sound => /*#__PURE__*/_jsx(SoundRow, {
|
|
91
|
+
icone: "music-note",
|
|
93
92
|
label: sound.name,
|
|
94
93
|
checked: selectedSound === sound.path,
|
|
95
94
|
onPress: () => {
|
|
@@ -103,63 +102,47 @@ export function ProfileParametrePageNotificationsSon() {
|
|
|
103
102
|
})]
|
|
104
103
|
});
|
|
105
104
|
}
|
|
105
|
+
|
|
106
|
+
/** Son de la liste, coché quand il est choisi */
|
|
106
107
|
function SoundRow({
|
|
108
|
+
icone,
|
|
107
109
|
label,
|
|
108
110
|
checked,
|
|
109
111
|
onPress
|
|
110
112
|
}) {
|
|
111
113
|
const theme = useTheme();
|
|
112
|
-
return /*#__PURE__*/
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
checked
|
|
116
|
-
},
|
|
114
|
+
return /*#__PURE__*/_jsx(ProfileMenuTile, {
|
|
115
|
+
icone: icone,
|
|
116
|
+
titre: label,
|
|
117
117
|
onPress: onPress,
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
} :
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
children: label
|
|
126
|
-
}), checked && /*#__PURE__*/_jsx(MaterialIcons, {
|
|
127
|
-
name: "check",
|
|
128
|
-
size: 18,
|
|
129
|
-
color: theme.colorScheme.onSurface
|
|
130
|
-
})]
|
|
118
|
+
trailing: checked ? /*#__PURE__*/_jsx(MaterialIcons, {
|
|
119
|
+
name: "check-circle",
|
|
120
|
+
size: 22,
|
|
121
|
+
color: theme.colorScheme.primary
|
|
122
|
+
}) : /*#__PURE__*/_jsx(View, {
|
|
123
|
+
style: styles.vide
|
|
124
|
+
})
|
|
131
125
|
});
|
|
132
126
|
}
|
|
133
127
|
const styles = StyleSheet.create({
|
|
134
128
|
flex: {
|
|
135
129
|
flex: 1
|
|
136
130
|
},
|
|
137
|
-
bar: {
|
|
138
|
-
flexDirection: 'row',
|
|
139
|
-
alignItems: 'center',
|
|
140
|
-
justifyContent: 'space-between'
|
|
141
|
-
},
|
|
142
|
-
back: {
|
|
143
|
-
padding: 12
|
|
144
|
-
},
|
|
145
131
|
save: {
|
|
146
132
|
paddingRight: 12
|
|
147
133
|
},
|
|
148
134
|
content: {
|
|
149
|
-
paddingTop:
|
|
150
|
-
paddingHorizontal:
|
|
135
|
+
paddingTop: 8,
|
|
136
|
+
paddingHorizontal: 20
|
|
151
137
|
},
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
alignItems: 'center',
|
|
155
|
-
paddingHorizontal: 16,
|
|
156
|
-
minHeight: 52
|
|
157
|
-
},
|
|
158
|
-
gap10: {
|
|
159
|
-
height: 10
|
|
138
|
+
vide: {
|
|
139
|
+
width: 22
|
|
160
140
|
},
|
|
161
141
|
gap20: {
|
|
162
142
|
height: 20
|
|
143
|
+
},
|
|
144
|
+
gap24: {
|
|
145
|
+
height: 24
|
|
163
146
|
}
|
|
164
147
|
});
|
|
165
148
|
//# sourceMappingURL=profile_parametre_page_notifications_son.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["MaterialIcons","useState","
|
|
1
|
+
{"version":3,"names":["MaterialIcons","useState","ScrollView","StyleSheet","Text","View","useSafeAreaInsets","Images","useBloc","AppRouter","useAppRouter","SoundManager","useTheme","useAppLocalizations","TextButton","AppBar","ConfigBloc","ConfigChangeEvent","ConfigKey","ProfileMenuTile","ProfilePageMenu","SwitchThemed","jsx","_jsx","jsxs","_jsxs","NONE","ProfileParametrePageNotificationsSon","traductions","theme","router","insets","configBloc","selectedSound","setSelectedSound","state","configParams","params","notificationAlertSound","enabled","save","add","pop","basculer","liste","path","style","styles","flex","paddingBottom","bottom","children","backgroundColor","onBack","title","numberOfLines","textTheme","headlineMedium","appSettingPageMenuNotificationSonPageTitle","actions","onPress","btnTextSave","contentContainerStyle","content","items","image","iconsCloche","titre","notificationPageTitle","trailing","value","onChange","gap24","appSettingPageMenuNotificationSonTitle","SoundRow","icone","label","appSettingPageMenuNotificationStyleNone","checked","map","sound","name","playSound","gap20","size","color","colorScheme","primary","vide","create","paddingRight","paddingTop","paddingHorizontal","width","height"],"sourceRoot":"../../../../../../../src","sources":["modules/profile/presentation/pages/parametre/profile_parametre_page_notifications_son.tsx"],"mappings":";;AAAA,SAASA,aAAa,QAAQ,oBAAoB;AAClD,SAASC,QAAQ,QAA6B,OAAO;AACrD,SAASC,UAAU,EAAEC,UAAU,EAAEC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AACjE,SAASC,iBAAiB,QAAQ,gCAAgC;AAElE,SAASC,MAAM,QAAQ,+BAA4B;AACnD,SAASC,OAAO,QAAQ,mCAAgC;AACxD,SAASC,SAAS,EAAEC,YAAY,QAAQ,+BAA4B;AACpE,SAASC,YAAY,QAAQ,+BAA4B;AACzD,SAASC,QAAQ,QAAQ,8BAA2B;AACpD,SAASC,mBAAmB,QAAQ,sCAAmC;AACvE,SAASC,UAAU,QAAQ,2CAAwC;AACnE,SAASC,MAAM,QAAQ,4C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KAAK,CAACyD,WAAW,CAACC;IAAQ,CAAE,CAAC,gBAEjFhE,IAAA,CAAClB,IAAI;MAACyC,KAAK,EAAEC,MAAM,CAACyC;IAAK,CAAE;EAE9B,CACF,CAAC;AAEN;AAEA,MAAMzC,MAAM,GAAG5C,UAAU,CAACsF,MAAM,CAAC;EAC/BzC,IAAI,EAAE;IAAEA,IAAI,EAAE;EAAE,CAAC;EACjBR,IAAI,EAAE;IAAEkD,YAAY,EAAE;EAAG,CAAC;EAC1B3B,OAAO,EAAE;IAAE4B,UAAU,EAAE,CAAC;IAAEC,iBAAiB,EAAE;EAAG,CAAC;EACjDJ,IAAI,EAAE;IAAEK,KAAK,EAAE;EAAG,CAAC;EACnBV,KAAK,EAAE;IAAEW,MAAM,EAAE;EAAG,CAAC;EACrBtB,KAAK,EAAE;IAAEsB,MAAM,EAAE;EAAG;AACtB,CAAC,CAAC","ignoreList":[]}
|
package/lib/module/modules/profile/presentation/pages/parametre/profile_parametre_page_qrcode.js
CHANGED
|
@@ -1,70 +1,56 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
3
|
+
import { StyleSheet, Text, View } from 'react-native';
|
|
5
4
|
import { Images } from "../../../../../core/assets.js";
|
|
6
5
|
import { useBloc, useBlocBuilder } from "../../../../../core/bloc_react.js";
|
|
7
|
-
import { useTheme } from "../../../../../core/theme.js";
|
|
6
|
+
import { Themer, useTheme } from "../../../../../core/theme.js";
|
|
8
7
|
import { useAppLocalizations } from "../../../../../l10n/localizations.js";
|
|
8
|
+
import { SbSelectionSheet } from "../../../../../shared/widgets/selection.js";
|
|
9
9
|
import { ConfigBloc } from "../../../../config/adapters/ui/bloc/config_bloc.js";
|
|
10
10
|
import { ConfigChangeEvent } from "../../../../config/adapters/ui/bloc/config_event.js";
|
|
11
11
|
import { ConfigLoadedState } from "../../../../config/adapters/ui/bloc/config_state.js";
|
|
12
12
|
import { ConfigKey } from "../../../../config/domain/models/config_keys.js";
|
|
13
|
-
import {
|
|
13
|
+
import { ProfileMenuTile, ProfilePageMenu } from "../profile_menu.js";
|
|
14
|
+
import { SwitchThemed } from "./settings_widgets.js";
|
|
14
15
|
|
|
15
16
|
/** Feuille « Mon QR code » : afficher ou non le QR code de l'alias sur l'accueil. */
|
|
16
|
-
import { jsx as _jsx
|
|
17
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
17
18
|
export function ProfileParametrePageQRcode() {
|
|
18
19
|
const traductions = useAppLocalizations();
|
|
19
20
|
const theme = useTheme();
|
|
20
|
-
const insets = useSafeAreaInsets();
|
|
21
|
-
const {
|
|
22
|
-
height
|
|
23
|
-
} = useWindowDimensions();
|
|
24
21
|
const configBloc = useBloc(ConfigBloc);
|
|
25
22
|
const state = useBlocBuilder(configBloc, (_p, current) => current instanceof ConfigLoadedState && current.updatedKey === ConfigKey.showQRcode);
|
|
26
23
|
const showQRcode = state.configParams.params[ConfigKey.showQRcode] !== '0';
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
contentContainerStyle: [styles.content, {
|
|
34
|
-
paddingBottom: 20 + insets.bottom
|
|
24
|
+
const basculer = () => configBloc.add(new ConfigChangeEvent(ConfigKey.showQRcode, showQRcode ? '0' : '1'));
|
|
25
|
+
return /*#__PURE__*/_jsx(SbSelectionSheet, {
|
|
26
|
+
titre: traductions.appSettingPageMenuQrCodeTitle,
|
|
27
|
+
entete: /*#__PURE__*/_jsx(Text, {
|
|
28
|
+
style: [theme.textTheme.displaySmall, {
|
|
29
|
+
color: Themer.neural03Color
|
|
35
30
|
}],
|
|
36
|
-
children:
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
})]
|
|
31
|
+
children: showQRcode ? traductions.appSettingPageMenuQrCodeDeselectTitle : traductions.appSettingPageMenuQrCodeSelectTitle
|
|
32
|
+
}),
|
|
33
|
+
contenu: /*#__PURE__*/_jsx(View, {
|
|
34
|
+
style: styles.contenu,
|
|
35
|
+
children: /*#__PURE__*/_jsx(ProfilePageMenu, {
|
|
36
|
+
items: [/*#__PURE__*/_jsx(ProfileMenuTile, {
|
|
37
|
+
image: Images.homeFooterQrcode,
|
|
38
|
+
titre: traductions.appSettingPageMenuQrCodeTitle,
|
|
39
|
+
onPress: basculer,
|
|
40
|
+
trailing: /*#__PURE__*/_jsx(SwitchThemed, {
|
|
41
|
+
value: showQRcode,
|
|
42
|
+
onChange: basculer
|
|
43
|
+
})
|
|
44
|
+
}, "qrcode")]
|
|
45
|
+
})
|
|
52
46
|
})
|
|
53
47
|
});
|
|
54
48
|
}
|
|
55
49
|
const styles = StyleSheet.create({
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
content: {
|
|
61
|
-
padding: 20
|
|
62
|
-
},
|
|
63
|
-
gap8: {
|
|
64
|
-
height: 8
|
|
65
|
-
},
|
|
66
|
-
gap15: {
|
|
67
|
-
height: 15
|
|
50
|
+
contenu: {
|
|
51
|
+
paddingHorizontal: 20,
|
|
52
|
+
paddingTop: 8,
|
|
53
|
+
paddingBottom: 20
|
|
68
54
|
}
|
|
69
55
|
});
|
|
70
56
|
//# sourceMappingURL=profile_parametre_page_qrcode.js.map
|
package/lib/module/modules/profile/presentation/pages/parametre/profile_parametre_page_qrcode.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["StyleSheet","Text","View","Images","useBloc","useBlocBuilder","Themer","useTheme","useAppLocalizations","SbSelectionSheet","ConfigBloc","ConfigChangeEvent","ConfigLoadedState","ConfigKey","ProfileMenuTile","ProfilePageMenu","SwitchThemed","jsx","_jsx","ProfileParametrePageQRcode","traductions","theme","configBloc","state","_p","current","updatedKey","showQRcode","configParams","params","basculer","add","titre","appSettingPageMenuQrCodeTitle","entete","style","textTheme","displaySmall","color","neural03Color","children","appSettingPageMenuQrCodeDeselectTitle","appSettingPageMenuQrCodeSelectTitle","contenu","styles","items","image","homeFooterQrcode","onPress","trailing","value","onChange","create","paddingHorizontal","paddingTop","paddingBottom"],"sourceRoot":"../../../../../../../src","sources":["modules/profile/presentation/pages/parametre/profile_parametre_page_qrcode.tsx"],"mappings":";;AAAA,SAASA,UAAU,EAAEC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AAErD,SAASC,MAAM,QAAQ,+BAA4B;AACnD,SAASC,OAAO,EAAEC,cAAc,QAAQ,mCAAgC;AACxE,SAASC,MAAM,EAAEC,QAAQ,QAAQ,8BAA2B;AAC5D,SAASC,mBAAmB,QAAQ,sCAAmC;AACvE,SAASC,gBAAgB,QAAQ,4CAAyC;AAC1E,SAASC,UAAU,QAAQ,oDAAiD;AAC5E,SAASC,iBAAiB,QAAQ,qDAAkD;AACpF,SAASC,iBAAiB,QAAQ,qDAAkD;AACpF,SAASC,SAAS,QAAQ,iDAA8C;AACxE,SAASC,eAAe,EAAEC,eAAe,QAAQ,oBAAiB;AAClE,SAASC,YAAY,QAAQ,uBAAoB;;AAEjD;AAAA,SAAAC,GAAA,IAAAC,IAAA;AACA,OAAO,SAASC,0BAA0BA,CAAA,EAAG;EAC3C,MAAMC,WAAW,GAAGZ,mBAAmB,CAAC,CAAC;EACzC,MAAMa,KAAK,GAAGd,QAAQ,CAAC,CAAC;EACxB,MAAMe,UAAU,GAAGlB,OAAO,CAACM,UAAU,CAAC;EACtC,MAAMa,KAAK,GAAGlB,cAAc,CAC1BiB,UAAU,EACV,CAACE,EAAE,EAAEC,OAAO,KAAKA,OAAO,YAAYb,iBAAiB,IAAIa,OAAO,CAACC,UAAU,KAAKb,SAAS,CAACc,UAC5F,CAAC;EACD,MAAMA,UAAU,GAAG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ametre_page_theme.js
CHANGED
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
import { MaterialIcons } from '@expo/vector-icons';
|
|
3
4
|
import { Image } from 'expo-image';
|
|
5
|
+
import { useState } from 'react';
|
|
4
6
|
import { Pressable, ScrollView, StyleSheet, Text, View } from 'react-native';
|
|
5
7
|
import { Images } from "../../../../../core/assets.js";
|
|
6
8
|
import { useBloc, useBlocBuilder } from "../../../../../core/bloc_react.js";
|
|
7
|
-
import { AppRouter, useAppRouter } from "../../../../../core/router.js";
|
|
8
9
|
import { Themer, Themes, useTheme } from "../../../../../core/theme.js";
|
|
9
10
|
import { useAppLocalizations } from "../../../../../l10n/localizations.js";
|
|
10
11
|
import { Card } from "../../../../../shared/material/card.js";
|
|
11
|
-
import {
|
|
12
|
+
import { Scaffold } from "../../../../../shared/material/scaffold.js";
|
|
12
13
|
import { MyPageContainer } from "../../../../../shared/widgets/my_page_container.js";
|
|
13
14
|
import { ConfigBloc } from "../../../../config/adapters/ui/bloc/config_bloc.js";
|
|
14
15
|
import { ConfigChangeEvent } from "../../../../config/adapters/ui/bloc/config_event.js";
|
|
15
16
|
import { ConfigLoadedState } from "../../../../config/adapters/ui/bloc/config_state.js";
|
|
16
17
|
import { ConfigKey } from "../../../../config/domain/models/config_keys.js";
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
18
|
+
import { ProfileAppBar } from "../profile_app_bar.js";
|
|
19
|
+
import { ProfileSectionTitre } from "../profile_menu.js";
|
|
20
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
19
21
|
function themeIcon(theme) {
|
|
20
22
|
switch (theme) {
|
|
21
23
|
case Themes.light:
|
|
@@ -47,47 +49,48 @@ function themeTitle(traductions, theme) {
|
|
|
47
49
|
/** Choix du thème de l'application (route `profileParametreTheme`). */
|
|
48
50
|
export function ProfileParametrePageTheme() {
|
|
49
51
|
const traductions = useAppLocalizations();
|
|
50
|
-
const theme = useTheme();
|
|
51
|
-
const router = useAppRouter();
|
|
52
52
|
const configBloc = useBloc(ConfigBloc);
|
|
53
53
|
const state = useBlocBuilder(configBloc, (_p, current) => current instanceof ConfigLoadedState && current.updatedKey === ConfigKey.preferedTheme);
|
|
54
54
|
const currentTheme = state.configParams.params[ConfigKey.preferedTheme];
|
|
55
|
+
const [largeurGrille, setLargeurGrille] = useState(0);
|
|
56
|
+
// Trois aperçus par ligne
|
|
57
|
+
// Arrondi vers le bas : sinon la troisième colonne peut passer à la ligne
|
|
58
|
+
const largeur = Math.floor((largeurGrille - 2 * ESPACE) / 3);
|
|
55
59
|
return /*#__PURE__*/_jsx(Scaffold, {
|
|
56
|
-
appBar: /*#__PURE__*/_jsx(
|
|
57
|
-
|
|
60
|
+
appBar: /*#__PURE__*/_jsx(ProfileAppBar, {
|
|
61
|
+
titre: traductions.appSettingPageMenuThemePageTitle
|
|
58
62
|
}),
|
|
59
63
|
children: /*#__PURE__*/_jsx(MyPageContainer, {
|
|
60
64
|
children: /*#__PURE__*/_jsxs(ScrollView, {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}), /*#__PURE__*/_jsx(View, {
|
|
65
|
-
style: styles.gap20
|
|
66
|
-
}), /*#__PURE__*/_jsx(Text, {
|
|
67
|
-
style: theme.textTheme.headlineMedium,
|
|
68
|
-
children: traductions.appSettingPageMenuThemeTitle
|
|
69
|
-
}), /*#__PURE__*/_jsx(View, {
|
|
70
|
-
style: styles.gap10
|
|
65
|
+
contentContainerStyle: styles.contenu,
|
|
66
|
+
children: [/*#__PURE__*/_jsx(ProfileSectionTitre, {
|
|
67
|
+
titre: traductions.appSettingPageMenuThemeTitle
|
|
71
68
|
}), /*#__PURE__*/_jsx(Card, {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
69
|
+
style: styles.card,
|
|
70
|
+
children: /*#__PURE__*/_jsx(View, {
|
|
71
|
+
style: styles.grille,
|
|
72
|
+
onLayout: e => setLargeurGrille(e.nativeEvent.layout.width - 2 * 14),
|
|
73
|
+
children: largeurGrille > 0 && /*#__PURE__*/_jsxs(_Fragment, {
|
|
74
|
+
children: [Themer.customTheme != null && /*#__PURE__*/_jsx(ThemeOption, {
|
|
75
|
+
largeur: largeur,
|
|
76
|
+
title: traductions.appSettingPageMenuThemeCustom,
|
|
77
|
+
selected: currentTheme === Themer.customThemeCode,
|
|
78
|
+
onSelect: () => configBloc.add(new ConfigChangeEvent(ConfigKey.preferedTheme, Themer.customThemeCode)),
|
|
79
|
+
preview: /*#__PURE__*/_jsx(CustomThemePreview, {
|
|
80
|
+
theme: Themer.customTheme
|
|
81
|
+
})
|
|
82
|
+
}), Themes.list().map(item => /*#__PURE__*/_jsx(ThemeOption, {
|
|
83
|
+
largeur: largeur,
|
|
84
|
+
title: themeTitle(traductions, item),
|
|
85
|
+
selected: currentTheme === item,
|
|
86
|
+
onSelect: () => configBloc.add(new ConfigChangeEvent(ConfigKey.preferedTheme, item)),
|
|
87
|
+
preview: /*#__PURE__*/_jsx(Image, {
|
|
88
|
+
source: themeIcon(item),
|
|
89
|
+
style: styles.flex,
|
|
90
|
+
contentFit: "cover"
|
|
91
|
+
})
|
|
92
|
+
}, item))]
|
|
93
|
+
})
|
|
91
94
|
})
|
|
92
95
|
})]
|
|
93
96
|
})
|
|
@@ -95,8 +98,9 @@ export function ProfileParametrePageTheme() {
|
|
|
95
98
|
});
|
|
96
99
|
}
|
|
97
100
|
|
|
98
|
-
/** Une option de thème : aperçu,
|
|
101
|
+
/** Une option de thème : aperçu, entouré et coché quand il est choisi, puis son nom */
|
|
99
102
|
function ThemeOption({
|
|
103
|
+
largeur,
|
|
100
104
|
title,
|
|
101
105
|
selected,
|
|
102
106
|
onSelect,
|
|
@@ -105,25 +109,41 @@ function ThemeOption({
|
|
|
105
109
|
const theme = useTheme();
|
|
106
110
|
return /*#__PURE__*/_jsxs(Pressable, {
|
|
107
111
|
accessibilityRole: "button",
|
|
112
|
+
accessibilityState: {
|
|
113
|
+
selected
|
|
114
|
+
},
|
|
108
115
|
disabled: selected,
|
|
109
116
|
onPress: onSelect,
|
|
110
|
-
style: styles.item,
|
|
117
|
+
style: [styles.item, {
|
|
118
|
+
width: largeur
|
|
119
|
+
}],
|
|
111
120
|
children: [/*#__PURE__*/_jsx(View, {
|
|
112
|
-
style: [styles.
|
|
113
|
-
|
|
121
|
+
style: [styles.cadre, {
|
|
122
|
+
borderColor: selected ? theme.colorScheme.primary : 'transparent'
|
|
114
123
|
}],
|
|
115
|
-
children:
|
|
116
|
-
|
|
117
|
-
|
|
124
|
+
children: /*#__PURE__*/_jsx(View, {
|
|
125
|
+
style: [styles.apercu, {
|
|
126
|
+
backgroundColor: theme.colorScheme.surface
|
|
127
|
+
}],
|
|
128
|
+
children: preview
|
|
129
|
+
})
|
|
130
|
+
}), selected && /*#__PURE__*/_jsx(View, {
|
|
131
|
+
style: [styles.coche, {
|
|
132
|
+
backgroundColor: theme.colorScheme.primary,
|
|
133
|
+
borderColor: theme.colorScheme.surface
|
|
134
|
+
}],
|
|
135
|
+
children: /*#__PURE__*/_jsx(MaterialIcons, {
|
|
136
|
+
name: "check",
|
|
137
|
+
size: 14,
|
|
138
|
+
color: theme.colorScheme.onPrimary
|
|
139
|
+
})
|
|
118
140
|
}), /*#__PURE__*/_jsx(Text, {
|
|
119
|
-
style: theme.textTheme.displayMedium,
|
|
141
|
+
style: [theme.textTheme.displayMedium, styles.libelle, {
|
|
142
|
+
fontWeight: selected ? '700' : '500'
|
|
143
|
+
}, selected ? null : {
|
|
144
|
+
color: Themer.neural03Color
|
|
145
|
+
}],
|
|
120
146
|
children: title
|
|
121
|
-
}), /*#__PURE__*/_jsx(View, {
|
|
122
|
-
style: styles.gap5
|
|
123
|
-
}), /*#__PURE__*/_jsx(CheckedDot, {
|
|
124
|
-
value: selected
|
|
125
|
-
}), /*#__PURE__*/_jsx(View, {
|
|
126
|
-
style: styles.gap20
|
|
127
147
|
})]
|
|
128
148
|
});
|
|
129
149
|
}
|
|
@@ -182,6 +202,7 @@ function CustomThemePreview({
|
|
|
182
202
|
}, i))]
|
|
183
203
|
});
|
|
184
204
|
}
|
|
205
|
+
const ESPACE = 12;
|
|
185
206
|
const styles = StyleSheet.create({
|
|
186
207
|
flex: {
|
|
187
208
|
flex: 1
|
|
@@ -232,31 +253,46 @@ const styles = StyleSheet.create({
|
|
|
232
253
|
gap14: {
|
|
233
254
|
height: 14
|
|
234
255
|
},
|
|
235
|
-
|
|
236
|
-
|
|
256
|
+
contenu: {
|
|
257
|
+
paddingTop: 8,
|
|
258
|
+
paddingBottom: 16
|
|
259
|
+
},
|
|
260
|
+
card: {
|
|
261
|
+
margin: 0
|
|
262
|
+
},
|
|
263
|
+
grille: {
|
|
264
|
+
padding: 14,
|
|
237
265
|
flexDirection: 'row',
|
|
238
266
|
flexWrap: 'wrap',
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
rowGap: 10
|
|
267
|
+
columnGap: ESPACE,
|
|
268
|
+
rowGap: 16
|
|
242
269
|
},
|
|
243
270
|
item: {
|
|
244
271
|
alignItems: 'center'
|
|
245
272
|
},
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
273
|
+
cadre: {
|
|
274
|
+
alignSelf: 'stretch',
|
|
275
|
+
padding: 3,
|
|
276
|
+
borderWidth: 2,
|
|
277
|
+
borderRadius: 14
|
|
251
278
|
},
|
|
252
|
-
|
|
253
|
-
|
|
279
|
+
apercu: {
|
|
280
|
+
width: '100%',
|
|
281
|
+
aspectRatio: 0.6,
|
|
282
|
+
borderRadius: 10,
|
|
283
|
+
overflow: 'hidden'
|
|
254
284
|
},
|
|
255
|
-
|
|
256
|
-
|
|
285
|
+
coche: {
|
|
286
|
+
position: 'absolute',
|
|
287
|
+
top: 8,
|
|
288
|
+
right: 8,
|
|
289
|
+
borderRadius: 12,
|
|
290
|
+
borderWidth: 2,
|
|
291
|
+
padding: 1
|
|
257
292
|
},
|
|
258
|
-
|
|
259
|
-
|
|
293
|
+
libelle: {
|
|
294
|
+
marginTop: 8,
|
|
295
|
+
textAlign: 'center'
|
|
260
296
|
}
|
|
261
297
|
});
|
|
262
298
|
//# sourceMappingURL=profile_parametre_page_theme.js.map
|