@nakamura-123/pages 1.3.2 → 1.3.3
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/dist/component/OnlineInput/OnlineInputFnc.d.ts +1 -1
- package/dist/component/OnlineInput/OnlineInputFnc.js +5 -2
- package/dist/component/OnlineInput/PasswardModal.js +12 -9
- package/dist/component/OnlineInput/PasswordIdModal.js +13 -8
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
|
@@ -28,7 +28,10 @@ const checkId = (id) => {
|
|
|
28
28
|
return true;
|
|
29
29
|
};
|
|
30
30
|
exports.checkId = checkId;
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
// iOSではAlert表示中にModalを閉じると透明なModalが残りタッチを奪うため、OK押下後に閉じる
|
|
32
|
+
const correctAlart = (onOk) => {
|
|
33
|
+
react_native_1.Alert.alert("保存完了", "オンラインバックアップが完了しました。", [
|
|
34
|
+
{ text: "OK", onPress: onOk },
|
|
35
|
+
]);
|
|
33
36
|
};
|
|
34
37
|
exports.correctAlart = correctAlart;
|
|
@@ -78,22 +78,22 @@ const PasswordModal = ({ isVisible, onClose }) => {
|
|
|
78
78
|
type: "setting/deleteOnlineSave",
|
|
79
79
|
payload: res.deleteIds || [],
|
|
80
80
|
});
|
|
81
|
-
(0, OnlineInputFnc_1.correctAlart)();
|
|
82
81
|
dispatch(stores_1.settingStorage.saveSetting());
|
|
82
|
+
setLoading(false);
|
|
83
|
+
(0, OnlineInputFnc_1.correctAlart)(() => {
|
|
84
|
+
onClose();
|
|
85
|
+
setPassword("");
|
|
86
|
+
});
|
|
83
87
|
}
|
|
84
88
|
catch (error) {
|
|
85
89
|
// エラーの種類に応じた処理
|
|
86
90
|
console.error("エラーが発生しました:", error);
|
|
87
|
-
}
|
|
88
|
-
finally {
|
|
89
|
-
// ローディング状態の解除とモーダルのクローズ
|
|
90
91
|
setLoading(false);
|
|
91
92
|
onClose();
|
|
92
93
|
setPassword("");
|
|
93
94
|
}
|
|
94
95
|
});
|
|
95
96
|
return (<common_1.BaseModal isVisible={isVisible} onClose={onClose}>
|
|
96
|
-
<common_1.Spinner loading={loading}/>
|
|
97
97
|
<react_native_1.View style={styles.msgBox}>
|
|
98
98
|
<common_1.MyText fsize="lg" style={{ alignSelf: "center", marginBottom: 10 }}>
|
|
99
99
|
パスワードを入力してください
|
|
@@ -105,10 +105,10 @@ const PasswordModal = ({ isVisible, onClose }) => {
|
|
|
105
105
|
<react_native_1.View style={styles.inputBox}>
|
|
106
106
|
<react_native_1.TextInput style={styles.input} placeholder="pass123" value={password} onChangeText={(text) => setPassword(text)}/>
|
|
107
107
|
</react_native_1.View>
|
|
108
|
-
<react_native_1.View style={styles.btnBox}>
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
108
|
+
{loading ? (<react_native_1.ActivityIndicator size="large" style={styles.indicator}/>) : (<react_native_1.View style={styles.btnBox}>
|
|
109
|
+
<common_1.MiniIconBtn onPress={onClose} icon="times" title="キャンセル" color="ltBlack"/>
|
|
110
|
+
<common_1.MiniIconBtn onPress={() => handleSave()} icon="cloud-upload-alt" title="保存する" color="green"/>
|
|
111
|
+
</react_native_1.View>)}
|
|
112
112
|
</common_1.BaseModal>);
|
|
113
113
|
};
|
|
114
114
|
function getOldIds(dataList) {
|
|
@@ -137,5 +137,8 @@ const styles = react_native_1.StyleSheet.create({
|
|
|
137
137
|
alignItems: "center",
|
|
138
138
|
paddingVertical: 5,
|
|
139
139
|
},
|
|
140
|
+
indicator: {
|
|
141
|
+
paddingVertical: 5,
|
|
142
|
+
},
|
|
140
143
|
});
|
|
141
144
|
exports.default = PasswordModal;
|
|
@@ -57,12 +57,15 @@ const PasswordIdModal = ({ isVisible, onClose, id, setId }) => {
|
|
|
57
57
|
const res = yield stores_1.inputApi.inputLoadApi({ id, password, appKey }, loadUrl);
|
|
58
58
|
// 成功レスポンスの処理
|
|
59
59
|
db_1.InputModel.updateSaveText(realm, res.data);
|
|
60
|
-
(
|
|
60
|
+
setLoading(false);
|
|
61
|
+
(0, OnlineInputFnc_1.correctAlart)(() => {
|
|
62
|
+
onClose();
|
|
63
|
+
setId("");
|
|
64
|
+
setPassword("");
|
|
65
|
+
});
|
|
61
66
|
}
|
|
62
67
|
catch (error) {
|
|
63
68
|
console.error("エラーが発生しました:", error);
|
|
64
|
-
}
|
|
65
|
-
finally {
|
|
66
69
|
setLoading(false);
|
|
67
70
|
onClose();
|
|
68
71
|
setId("");
|
|
@@ -70,7 +73,6 @@ const PasswordIdModal = ({ isVisible, onClose, id, setId }) => {
|
|
|
70
73
|
}
|
|
71
74
|
});
|
|
72
75
|
return (<common_1.BaseModal isVisible={isVisible} onClose={onClose}>
|
|
73
|
-
<common_1.Spinner loading={loading}/>
|
|
74
76
|
<react_native_1.View style={styles.msgBox}>
|
|
75
77
|
<common_1.MyText>IDとパスワードを入力してください</common_1.MyText>
|
|
76
78
|
</react_native_1.View>
|
|
@@ -78,10 +80,10 @@ const PasswordIdModal = ({ isVisible, onClose, id, setId }) => {
|
|
|
78
80
|
<react_native_1.TextInput style={styles.input} placeholder="ID(セーブ時に発行された8文字)" value={id} onChangeText={(text) => setId(text)}/>
|
|
79
81
|
<react_native_1.TextInput style={styles.input} placeholder="Password(4文字以上)" value={password} onChangeText={(text) => setPassword(text)}/>
|
|
80
82
|
</react_native_1.View>
|
|
81
|
-
<react_native_1.View style={styles.btnBox}>
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
83
|
+
{loading ? (<react_native_1.ActivityIndicator size="large" style={styles.indicator}/>) : (<react_native_1.View style={styles.btnBox}>
|
|
84
|
+
<common_1.MiniIconBtn onPress={onClose} icon="times" title="キャンセル" color="ltBlack"/>
|
|
85
|
+
<common_1.MiniIconBtn onPress={() => handleSave()} icon="cloud-download-alt" title="読み込む" color="blue"/>
|
|
86
|
+
</react_native_1.View>)}
|
|
85
87
|
</common_1.BaseModal>);
|
|
86
88
|
};
|
|
87
89
|
const styles = react_native_1.StyleSheet.create({
|
|
@@ -105,5 +107,8 @@ const styles = react_native_1.StyleSheet.create({
|
|
|
105
107
|
alignItems: "center",
|
|
106
108
|
paddingVertical: 5,
|
|
107
109
|
},
|
|
110
|
+
indicator: {
|
|
111
|
+
paddingVertical: 5,
|
|
112
|
+
},
|
|
108
113
|
});
|
|
109
114
|
exports.default = PasswordIdModal;
|