Compare commits
133 Commits
feature/ch
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d144702763 | ||
|
|
caa5d2a68b | ||
|
|
b6f130bd19 | ||
|
|
3032a81693 | ||
|
|
707dd92ea6 | ||
|
|
0b349148d3 | ||
|
|
a959cf3973 | ||
|
|
064d81d468 | ||
|
|
f228489903 | ||
|
|
1c5ed1eb2c | ||
|
|
8bc43ed8c8 | ||
|
|
3e64cbee9a | ||
|
|
7d454cf9d4 | ||
|
|
699e3039b9 | ||
|
|
5af3164f21 | ||
|
|
cd585b8206 | ||
|
|
927c73567a | ||
|
|
09170c6636 | ||
|
|
8705f69725 | ||
|
|
9562e04ffe | ||
|
|
2ffb47b60c | ||
|
|
1208a78831 | ||
|
|
493ef92bd6 | ||
|
|
a51ffe4a82 | ||
|
|
0ea25f1e97 | ||
|
|
16bd0fe192 | ||
|
|
d75a495b19 | ||
|
|
a346a1477c | ||
|
|
c93ca94a61 | ||
|
|
4480c161d1 | ||
|
|
deb9b40949 | ||
|
|
fced009607 | ||
|
|
0890c1b9ff | ||
|
|
4b3816940b | ||
|
|
9ea23d6eba | ||
|
|
31ea303b88 | ||
|
|
7716cb516c | ||
|
|
70976c0554 | ||
|
|
5616c7ed96 | ||
|
|
13580a57d4 | ||
|
|
c9481fb0c2 | ||
|
|
5cda45740c | ||
|
|
84d1305796 | ||
|
|
336e3510fa | ||
|
|
25780e1664 | ||
|
|
e6fab84393 | ||
|
|
390acdeab7 | ||
|
|
ff7a5624e6 | ||
|
|
9b79f224d3 | ||
|
|
2f76e3776f | ||
|
|
026da47d82 | ||
|
|
29be052bf6 | ||
|
|
2fb7d97d33 | ||
|
|
76ebf8055b | ||
|
|
7b572cd657 | ||
|
|
61fa0f8484 | ||
|
|
935aaf2610 | ||
|
|
8ec53d6e06 | ||
|
|
e8b1a21a3b | ||
|
|
e6b89842a3 | ||
|
|
1fc5220405 | ||
|
|
5489406578 | ||
|
|
2b217e98c7 | ||
|
|
2c2e61a2fa | ||
|
|
c222b303df | ||
|
|
8f8c095ecd | ||
|
|
e31e84ff34 | ||
|
|
2c2b355a3e | ||
|
|
5461087ca0 | ||
|
|
57c7285b6e | ||
|
|
5c134c95cc | ||
|
|
8781653fe8 | ||
|
|
67ccc37c17 | ||
|
|
92caab03f5 | ||
|
|
dd3a57b3ae | ||
|
|
8df32b9c1d | ||
|
|
4b901d5015 | ||
|
|
fc5c62685a | ||
|
|
fbc98b2ff7 | ||
|
|
3502043176 | ||
|
|
2d0ad8d59e | ||
|
|
b5172df7a9 | ||
|
|
740d414d2d | ||
|
|
8db3e6c218 | ||
|
|
fb35b01d2e | ||
|
|
5fa6b1f73e | ||
|
|
c16f7401ea | ||
|
|
f260c5d2dd | ||
|
|
80e9f1a869 | ||
|
|
26096ba244 | ||
|
|
435a910ef9 | ||
|
|
68b9236d65 | ||
|
|
0148c12e08 | ||
|
|
34dc62aee6 | ||
|
|
54ae681f00 | ||
|
|
db40351fec | ||
|
|
2dd8e62f85 | ||
|
|
0937fbb619 | ||
|
|
32edab3289 | ||
|
|
fa96e68770 | ||
|
|
1681be4437 | ||
|
|
7f96c44e88 | ||
|
|
7d485c466c | ||
|
|
7869cbee6d | ||
|
|
c2ad681891 | ||
|
|
163f9ead18 | ||
|
|
611fc9953f | ||
|
|
fd95e99874 | ||
|
|
f5d0f993db | ||
|
|
b7e763d265 | ||
|
|
0afa6f402b | ||
|
|
eacce53775 | ||
|
|
47b1eb325e | ||
|
|
a145e2c24f | ||
|
|
862742cd3e | ||
|
|
d5f2d367dd | ||
|
|
b1f72f18b5 | ||
|
|
d4d86fb7eb | ||
|
|
056a059a68 | ||
|
|
12676d59cf | ||
|
|
bca2b300d3 | ||
|
|
406808ee58 | ||
|
|
a8aadb7f08 | ||
|
|
b810405573 | ||
|
|
6f62418426 | ||
|
|
88621dd1c8 | ||
|
|
12d9c1f49d | ||
|
|
30c2b8a2f9 | ||
|
|
8bc7069c4e | ||
|
|
737cd25539 | ||
|
|
2c50e5af67 | ||
|
|
ea677b4da5 | ||
|
|
4525443e39 |
@@ -1,6 +1,5 @@
|
||||
import React, { useState, useEffect, useRef } from "react";
|
||||
import React, { useState, useEffect } from "react";
|
||||
import {
|
||||
Alert,
|
||||
View,
|
||||
Text,
|
||||
ScrollView,
|
||||
@@ -12,7 +11,6 @@ import {
|
||||
import { Switch } from "@rneui/themed";
|
||||
import { useNavigation } from "@react-navigation/native";
|
||||
import { MaterialCommunityIcons } from "@expo/vector-icons";
|
||||
import Swipeable from "react-native-gesture-handler/Swipeable";
|
||||
import { SheetHeaderItem } from "@/components/atom/SheetHeaderItem";
|
||||
import { AS } from "../../storageControl";
|
||||
import { STORAGE_KEYS } from "@/constants";
|
||||
@@ -304,7 +302,6 @@ export const DataSourceSettings = () => {
|
||||
useState<JrDataSystemUiVariant>(
|
||||
getJrDataSystemUiVariant(DEFAULT_JR_DATA_SYSTEM_ENV),
|
||||
);
|
||||
const recordingSwipeRefs = useRef<Record<string, { close: () => void } | null>>({});
|
||||
|
||||
const applyJrDataSystemEnv = (env: JrDataSystemEnvironmentKey) => {
|
||||
setJrDataSystemEnv(env);
|
||||
@@ -361,28 +358,6 @@ export const DataSourceSettings = () => {
|
||||
applyJrDataSystemEnv(env);
|
||||
};
|
||||
|
||||
const closeRecordingSwipe = (id: string) => {
|
||||
recordingSwipeRefs.current[id]?.close();
|
||||
};
|
||||
|
||||
const confirmDeleteRecording = (id: string, label: string) => {
|
||||
closeRecordingSwipe(id);
|
||||
Alert.alert(
|
||||
"録画を削除",
|
||||
`${label} の録画を削除しますか?`,
|
||||
[
|
||||
{ text: "キャンセル", style: "cancel" },
|
||||
{
|
||||
text: "削除",
|
||||
style: "destructive",
|
||||
onPress: () => {
|
||||
void deleteRecording(id);
|
||||
},
|
||||
},
|
||||
],
|
||||
);
|
||||
};
|
||||
|
||||
return (
|
||||
<View style={[styles.container, { backgroundColor: fixed.primary }]}>
|
||||
<SheetHeaderItem
|
||||
@@ -578,16 +553,13 @@ export const DataSourceSettings = () => {
|
||||
month: 'numeric', day: 'numeric',
|
||||
hour: '2-digit', minute: '2-digit',
|
||||
});
|
||||
const recordingRow = (
|
||||
<TouchableOpacity
|
||||
onPress={() => startPlayback(rec.id)}
|
||||
disabled={isPlaying}
|
||||
activeOpacity={0.72}
|
||||
return (
|
||||
<View
|
||||
key={rec.id}
|
||||
style={{
|
||||
flexDirection: 'row', alignItems: 'center',
|
||||
backgroundColor: colors.backgroundSecondary,
|
||||
borderRadius: 8, padding: 12, gap: 10,
|
||||
opacity: isPlaying ? 0.6 : 1,
|
||||
borderRadius: 8, padding: 10, gap: 8,
|
||||
}}
|
||||
>
|
||||
<View style={{ flex: 1 }}>
|
||||
@@ -598,71 +570,29 @@ export const DataSourceSettings = () => {
|
||||
{rec.snapshotCount} コマ / {durationLabel}
|
||||
</Text>
|
||||
</View>
|
||||
<View style={{ alignItems: 'flex-end', gap: 4 }}>
|
||||
<View style={{ flexDirection: 'row', alignItems: 'center', gap: 4 }}>
|
||||
<MaterialCommunityIcons
|
||||
name={isPlaying ? 'pause-circle-outline' : 'play-circle-outline'}
|
||||
size={18}
|
||||
color={isPlaying ? colors.textTertiary : '#43a047'}
|
||||
/>
|
||||
<Text
|
||||
style={{
|
||||
color: isPlaying ? colors.textTertiary : colors.textPrimary,
|
||||
fontSize: 12,
|
||||
fontWeight: '600',
|
||||
}}
|
||||
>
|
||||
{isPlaying ? '再生中は操作不可' : 'タップで再生'}
|
||||
</Text>
|
||||
</View>
|
||||
{!isPlaying && (
|
||||
<Text style={{ color: colors.textTertiary, fontSize: 10 }}>
|
||||
左へスワイプで削除
|
||||
</Text>
|
||||
)}
|
||||
</View>
|
||||
<MaterialCommunityIcons
|
||||
name="chevron-right"
|
||||
size={18}
|
||||
color={colors.iconSecondary}
|
||||
/>
|
||||
</TouchableOpacity>
|
||||
);
|
||||
|
||||
if (isPlaying) {
|
||||
return <View key={rec.id}>{recordingRow}</View>;
|
||||
}
|
||||
|
||||
return (
|
||||
<Swipeable
|
||||
key={rec.id}
|
||||
ref={(instance) => {
|
||||
recordingSwipeRefs.current[rec.id] = instance;
|
||||
}}
|
||||
friction={2}
|
||||
overshootRight={false}
|
||||
rightThreshold={48}
|
||||
renderRightActions={() => (
|
||||
<View
|
||||
{!isPlaying && (
|
||||
<TouchableOpacity
|
||||
onPress={() => startPlayback(rec.id)}
|
||||
style={{
|
||||
width: 96,
|
||||
borderRadius: 8,
|
||||
backgroundColor: '#e53935',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
marginLeft: 6,
|
||||
backgroundColor: '#43a047', borderRadius: 6,
|
||||
paddingHorizontal: 10, paddingVertical: 6,
|
||||
}}
|
||||
>
|
||||
<MaterialCommunityIcons name="trash-can-outline" size={18} color="#fff" />
|
||||
<Text style={{ color: '#fff', fontSize: 11, fontWeight: 'bold', marginTop: 4 }}>
|
||||
削除
|
||||
</Text>
|
||||
</View>
|
||||
<Text style={{ color: '#fff', fontWeight: 'bold', fontSize: 12 }}>▶</Text>
|
||||
</TouchableOpacity>
|
||||
)}
|
||||
onSwipeableOpen={() => confirmDeleteRecording(rec.id, dateLabel)}
|
||||
>
|
||||
{recordingRow}
|
||||
</Swipeable>
|
||||
{!isPlaying && (
|
||||
<TouchableOpacity
|
||||
onPress={() => deleteRecording(rec.id)}
|
||||
style={{
|
||||
borderColor: '#e53935', borderWidth: 1, borderRadius: 6,
|
||||
paddingHorizontal: 10, paddingVertical: 6,
|
||||
}}
|
||||
>
|
||||
<Text style={{ color: '#e53935', fontSize: 12 }}>削除</Text>
|
||||
</TouchableOpacity>
|
||||
)}
|
||||
</View>
|
||||
);
|
||||
})}
|
||||
</View>
|
||||
|
||||
Reference in New Issue
Block a user