feat: atualizar tema para indigo, corrigir textos e implementar AppContext

This commit is contained in:
Rodrigo Lopes dos Santos
2026-03-15 10:49:05 +00:00
parent d63c27ec12
commit 8ece90a37e
14 changed files with 209 additions and 244 deletions

View File

@@ -161,7 +161,7 @@ const styles = StyleSheet.create({
},
footerLink: {
fontSize: 14,
color: '#f59e0b',
color: '#6366f1',
fontWeight: '600',
},
});

View File

@@ -108,7 +108,7 @@ export default function AuthRegister() {
label="Nome da barbearia"
value={shopName}
onChangeText={setShopName}
placeholder="Barbearia XPTO"
placeholder="Ex: Minha Barbearia"
/>
)}
@@ -170,8 +170,8 @@ const styles = StyleSheet.create({
alignItems: 'center',
},
roleButtonActive: {
borderColor: '#f59e0b',
backgroundColor: '#fef3c7',
borderColor: '#6366f1',
backgroundColor: '#c7d2fe',
},
roleText: {
fontSize: 14,
@@ -179,7 +179,7 @@ const styles = StyleSheet.create({
color: '#64748b',
},
roleTextActive: {
color: '#f59e0b',
color: '#6366f1',
},
submitButton: {
width: '100%',
@@ -199,7 +199,7 @@ const styles = StyleSheet.create({
},
footerLink: {
fontSize: 14,
color: '#f59e0b',
color: '#6366f1',
fontWeight: '600',
},
});

View File

@@ -248,8 +248,8 @@ const styles = StyleSheet.create({
marginBottom: 8,
},
serviceButtonActive: {
borderColor: '#f59e0b',
backgroundColor: '#fef3c7',
borderColor: '#6366f1',
backgroundColor: '#e0e7ff',
},
serviceText: {
fontSize: 14,
@@ -258,7 +258,7 @@ const styles = StyleSheet.create({
marginBottom: 4,
},
serviceTextActive: {
color: '#f59e0b',
color: '#6366f1',
},
servicePrice: {
fontSize: 12,
@@ -278,8 +278,8 @@ const styles = StyleSheet.create({
borderColor: '#e2e8f0',
},
barberButtonActive: {
borderColor: '#f59e0b',
backgroundColor: '#f59e0b',
borderColor: '#6366f1',
backgroundColor: '#6366f1',
},
barberText: {
fontSize: 14,
@@ -303,8 +303,8 @@ const styles = StyleSheet.create({
borderColor: '#e2e8f0',
},
slotButtonActive: {
borderColor: '#f59e0b',
backgroundColor: '#f59e0b',
borderColor: '#6366f1',
backgroundColor: '#6366f1',
},
slotText: {
fontSize: 14,
@@ -339,7 +339,7 @@ const styles = StyleSheet.create({
summaryTotal: {
fontSize: 18,
fontWeight: 'bold',
color: '#f59e0b',
color: '#6366f1',
marginTop: 8,
},
submitButton: {

View File

@@ -181,7 +181,7 @@ const styles = StyleSheet.create({
total: {
fontSize: 18,
fontWeight: 'bold',
color: '#f59e0b',
color: '#6366f1',
},
item: {
flexDirection: 'row',

View File

@@ -126,7 +126,7 @@ export default function Dashboard() {
* Atualiza a quantidade de inventário de um produto iterando a variação (+1/-1).
* Desencadeia um update para a tabela products (ex: `supabase.from('products').update(...)`) evitando stocks negativos.
* @param {string} productId - O identificador único do produto afetado.
* @param {number} delta - A quantidade exata matemática a variar da realidade material.
* @param {number} delta - A quantidade exata matemática a variar do inventário.
*/
const updateProductStock = (productId: string, delta: number) => {
const product = shop.products.find((p) => p.id === productId);
@@ -206,7 +206,7 @@ export default function Dashboard() {
<Text style={styles.itemName}>{svc?.name ?? 'Serviço'}</Text>
<Text style={styles.itemDesc}>{barber?.name} · {a.date}</Text>
</View>
<Badge color={a.status === 'pendente' ? 'amber' : a.status === 'confirmado' ? 'green' : 'red'}>
<Badge color={a.status === 'pendente' ? 'indigo' : a.status === 'confirmado' ? 'green' : 'red'}>
{a.status}
</Badge>
</View>
@@ -247,7 +247,7 @@ export default function Dashboard() {
<Text style={styles.itemName}>{currency(o.total)}</Text>
<Text style={styles.itemDesc}>{new Date(o.createdAt).toLocaleString('pt-BR')}</Text>
</View>
<Badge color={o.status === 'pendente' ? 'amber' : o.status === 'confirmado' ? 'green' : 'red'}>
<Badge color={o.status === 'pendente' ? 'indigo' : o.status === 'confirmado' ? 'green' : 'red'}>
{o.status}
</Badge>
</View>
@@ -438,7 +438,7 @@ const styles = StyleSheet.create({
borderBottomColor: 'transparent',
},
tabActive: {
borderBottomColor: '#f59e0b',
borderBottomColor: '#6366f1',
},
tabText: {
fontSize: 14,
@@ -446,7 +446,7 @@ const styles = StyleSheet.create({
color: '#64748b',
},
tabTextActive: {
color: '#f59e0b',
color: '#6366f1',
},
content: {
flex: 1,
@@ -476,15 +476,15 @@ const styles = StyleSheet.create({
color: '#0f172a',
},
statValueWarning: {
color: '#f59e0b',
color: '#6366f1',
},
itemCard: {
marginBottom: 12,
padding: 16,
},
itemCardWarning: {
borderColor: '#fbbf24',
backgroundColor: '#fef3c7',
borderColor: '#c7d2fe',
backgroundColor: '#e0e7ff',
},
itemHeader: {
flexDirection: 'row',
@@ -506,7 +506,7 @@ const styles = StyleSheet.create({
itemPrice: {
fontSize: 18,
fontWeight: 'bold',
color: '#f59e0b',
color: '#6366f1',
},
statusSelector: {
marginTop: 8,
@@ -534,15 +534,15 @@ const styles = StyleSheet.create({
color: '#64748b',
},
alertCard: {
backgroundColor: '#fef3c7',
borderColor: '#fbbf24',
backgroundColor: '#e0e7ff',
borderColor: '#c7d2fe',
marginBottom: 16,
padding: 16,
},
alertText: {
fontSize: 14,
fontWeight: '600',
color: '#92400e',
color: '#4338ca',
},
formCard: {
marginTop: 16,

View File

@@ -35,7 +35,7 @@ export default function Explore() {
<Card style={styles.shopCard}>
<View style={styles.shopHeader}>
<Text style={styles.shopName}>{shop.name}</Text>
<Badge color="amber">{shop.rating.toFixed(1)} </Badge>
<Badge color="indigo">{shop.rating.toFixed(1)} </Badge>
</View>
<Text style={styles.shopAddress}>{shop.address}</Text>

View File

@@ -34,7 +34,7 @@ export default function Landing() {
Explorar barbearias
</Button>
{/* Botão nativo focado à inserção de utilizadores - Cria sessão no ecositema de Auth/BD */}
{/* Botão focado no registo de novos utilizadores */}
<Button
onPress={() => navigation.navigate('Register' as never)}
variant="outline"
@@ -80,7 +80,7 @@ const styles = StyleSheet.create({
padding: 16,
},
hero: {
backgroundColor: '#f59e0b',
backgroundColor: '#6366f1',
borderRadius: 16,
padding: 24,
marginBottom: 24,
@@ -99,7 +99,7 @@ const styles = StyleSheet.create({
},
heroDesc: {
fontSize: 16,
color: '#fef3c7',
color: '#e0e7ff',
marginBottom: 20,
},
buttons: {
@@ -126,5 +126,3 @@ const styles = StyleSheet.create({
lineHeight: 20,
},
});

View File

@@ -172,7 +172,7 @@ const styles = StyleSheet.create({
itemTotal: {
fontSize: 16,
fontWeight: 'bold',
color: '#f59e0b',
color: '#6366f1',
},
emptyCard: {
padding: 32,

View File

@@ -164,7 +164,7 @@ const styles = StyleSheet.create({
alignItems: 'center',
},
tabActive: {
borderColor: '#f59e0b',
borderColor: '#6366f1',
backgroundColor: '#fef3c7',
},
tabText: {
@@ -173,7 +173,7 @@ const styles = StyleSheet.create({
color: '#64748b',
},
tabTextActive: {
color: '#f59e0b',
color: '#6366f1',
},
list: {
gap: 12,
@@ -195,7 +195,7 @@ const styles = StyleSheet.create({
itemPrice: {
fontSize: 16,
fontWeight: 'bold',
color: '#f59e0b',
color: '#6366f1',
},
itemDesc: {
fontSize: 14,