Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 12 additions & 9 deletions src/components/Task/GlobalTaskSearch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -275,13 +275,24 @@ const styles = StyleSheet.create({
backgroundColor: "#ffffff",
},
header: {
position: "relative",
paddingTop: 60, // Per lo spazio della status bar
paddingHorizontal: 16,
paddingBottom: 16,
backgroundColor: "#ffffff",
borderBottomWidth: 1,
borderBottomColor: "#e1e5e9",
},
dragHandle: {
position: "absolute",
top: 32,
alignSelf: "center",
width: 44,
height: 4,
borderRadius: 2,
backgroundColor: "#d1d5db",
marginBottom: 12,
},
headerTop: {
flexDirection: "row",
justifyContent: "space-between",
Expand All @@ -290,7 +301,7 @@ const styles = StyleSheet.create({
},
title: {
fontSize: 28,
fontWeight: "200",
fontWeight: "700",
color: "#000000",
fontFamily: "System",
letterSpacing: -1.5,
Expand All @@ -303,14 +314,6 @@ const styles = StyleSheet.create({
padding: 8,
marginLeft: 8,
},
statsContainer: {
marginTop: 12,
},
statsText: {
fontSize: 14,
color: "#666666",
fontFamily: "System",
},
content: {
flex: 1,
},
Expand Down
18 changes: 18 additions & 0 deletions src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -570,6 +570,19 @@
"friday": "Fri",
"saturday": "Sat",
"sunday": "Sun"
},
"commitmentsOf": "Events for",
"loadingEvents": "Loading events...",
"noEventsForDate": "No events for this date",
"syncing": "Sync...",
"defaultCategory": "Calendar",
"errors": {
"title": "Error",
"completeFailed": "Unable to complete the task. Please try again.",
"reopenFailed": "Unable to reopen the task. Please try again.",
"editFailed": "Unable to edit the task. Please try again.",
"warningTitle": "Warning",
"localSaveWarning": "Task added locally but error saving to server."
}
},
"calendar20": {
Expand Down Expand Up @@ -598,6 +611,11 @@
"categories": "Categories",
"showAll": "Show all",
"settings": "Settings"
},
"loadMore": "Load more",
"duration": {
"hour": "1 hour",
"hours": "{{count}} hours"
}
},
"statistics": {
Expand Down
21 changes: 20 additions & 1 deletion src/locales/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -571,6 +571,19 @@
"friday": "Ven",
"saturday": "Sab",
"sunday": "Dom"
},
"commitmentsOf": "Impegni del",
"loadingEvents": "Caricamento impegni...",
"noEventsForDate": "Nessun impegno per questa data",
"syncing": "Sincronizzazione...",
"defaultCategory": "Calendario",
"errors": {
"title": "Errore",
"completeFailed": "Impossibile completare il task. Riprova.",
"reopenFailed": "Impossibile riaprire il task. Riprova.",
"editFailed": "Impossibile modificare il task. Riprova.",
"warningTitle": "Attenzione",
"localSaveWarning": "Task aggiunto localmente ma errore nel salvataggio sul server."
}
},
"calendar20": {
Expand All @@ -597,7 +610,13 @@
"drawer": {
"views": "Viste",
"categories": "Categorie",
"showAll": "Mostra tutto"
"showAll": "Mostra tutto",
"settings": "Impostazioni"
},
"loadMore": "Carica altri",
"duration": {
"hour": "1 ora",
"hours": "{{count}} ore"
}
},
"statistics": {
Expand Down
49 changes: 31 additions & 18 deletions src/navigation/screens/Categories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { StatusBar } from 'expo-status-bar';
import { useFocusEffect } from "@react-navigation/native";
import CategoryList from "../../components/Category/CategoryList";
import AddCategoryButton from "../../components/Category/AddCategoryButton";
import SearchTasksButton from "../../components/UI/SearchTasksButton";
import GlobalTaskSearch from "../../components/Task/GlobalTaskSearch";
import { useTranslation } from "react-i18next";
import { TaskCacheService } from "../../services/TaskCacheService";
Expand All @@ -20,6 +19,7 @@ import {
ScreenContainer,
ScreenHeader,
} from "../../components/UI/foundation";
import { MaterialIcons } from "@expo/vector-icons";

export default function Categories() {
const { t } = useTranslation();
Expand Down Expand Up @@ -69,7 +69,20 @@ export default function Categories() {
<ScreenContainer>
<StatusBar style="dark" />

<ScreenHeader title={t("categories.title")} />
<ScreenHeader
title={t("categories.title")}
style={{ paddingEnd: 35 }}
rightActions={(
<TouchableOpacity
onPress={handleOpenSearch}
style={styles.searchIconButton}
accessibilityRole="button"
accessibilityLabel={t("globalTaskSearch.searchAllTasks")}
>
<MaterialIcons name="search" size={22} color="#333333" />
</TouchableOpacity>
)}
/>

<ScrollView
style={styles.content}
Expand All @@ -85,12 +98,6 @@ export default function Categories() {
}
>
<ContentContainer padded={false}>
<View style={styles.searchContainer}>
<SearchTasksButton
onPress={handleOpenSearch}
style={styles.searchButton}
/>
</View>
<CategoryList ref={categoryListRef} />
</ContentContainer>
<View style={styles.addButtonContainer}>
Expand All @@ -113,17 +120,23 @@ const styles = StyleSheet.create({
scrollContent: {
flexGrow: 1,
},
searchContainer: {
flexDirection: "row",
searchIconButton: {
width: 36,
height: 36,
borderRadius: 18,
backgroundColor: "#ffffff",
borderWidth: 1,
borderColor: "#e1e5e9",
justifyContent: "center",
alignItems: "center",
paddingHorizontal: 16,
marginVertical: 8,
},
searchButton: {
flex: 1,
marginHorizontal: 0, // Override default margin
marginRight: 10,
marginVertical: 0, // Override default margin
shadowColor: "#000",
shadowOffset: {
width: 0,
height: 2,
},
shadowOpacity: 0.04,
shadowRadius: 4,
elevation: 1,
},
reloadButton: {
width: 44,
Expand Down
Loading