-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #227 from unb-mds/217/front/ajustar-erros-e-melhor…
…ar-desenho 217/front/ajustar erros e melhorar desenho
- Loading branch information
Showing
16 changed files
with
195 additions
and
101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,18 @@ | ||
<template> | ||
<div class="flex flex-col items-center justify-center h-64 text-center"> | ||
<img :src="box" class="w-40 h-40 mb-4" /> | ||
<p class="text-cinza3 font-inter text-lg"> | ||
Parece que você não tem itens {{ message }} <span class="text-azul font-bold">{{ highlightText }}</span> | ||
</p> | ||
</div> | ||
<div class="flex flex-col items-center justify-center h-64 text-center"> | ||
<img :src="box" class="w-20 h-20 mb-4 opacity-15" /> | ||
<p class="text-cinza3 font-inter text-lg"> | ||
Parece que você não tem itens {{ message }} | ||
<span class="text-azul font-bold">{{ highlightText }}</span> | ||
</p> | ||
</div> | ||
</template> | ||
|
||
<script setup> | ||
import box from "@/assets/icons/found-and-lost-box.jpg"; // Caminho para a imagem | ||
import box from "@/assets/icons/box.svg"; // Caminho para a imagem | ||
defineProps({ | ||
message: String, // Parâmetro para personalizar a mensagem | ||
highlightText: String | ||
message: String, // Parâmetro para personalizar a mensagem | ||
highlightText: String, | ||
}); | ||
</script> | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,43 @@ | ||
<template> | ||
<div class="flex flex-col items-center justify-center h-64 text-center"> | ||
<img :src="box" class="w-40 h-40 mb-4" /> | ||
<p class="text-cinza3 font-inter text-lg"> | ||
Parece que o <span class="text-azul font-bold">AcheiUnB</span> {{ message }} | ||
</p> | ||
</div> | ||
<div class="flex flex-col items-center justify-center h-64 text-center"> | ||
<img :src="box" class="w-20 h-20 mb-4 opacity-15" /> | ||
<p class="text-cinza3 font-inter text-lg"> | ||
Parece que o <span class="text-azul font-bold">AcheiUnB</span> {{ computedMessage }} | ||
</p> | ||
</div> | ||
</template> | ||
|
||
<script setup> | ||
import box from "@/assets/icons/found-and-lost-box.jpg"; // Caminho para a imagem | ||
import { computed, toRefs } from "vue"; | ||
import { filtersState } from "@/store/filters"; // Importação corrigida sem Pinia | ||
import box from "@/assets/icons/box.svg"; | ||
defineProps({ | ||
message: String, // Parâmetro para personalizar a mensagem | ||
// Definição das propriedades recebidas | ||
const props = defineProps({ | ||
type: { | ||
type: String, | ||
required: true, // Obrigatório ("achado" ou "perdido") | ||
}, | ||
}); | ||
</script> | ||
const { searchQuery, activeCategory, activeLocation } = toRefs(filtersState); | ||
// Computed Property para modificar a mensagem dinamicamente | ||
const computedMessage = computed(() => { | ||
// Define a palavra correta com base no tipo de item | ||
const itemType = props.type === "achado" ? "achado" : "perdido"; | ||
// Verifica os filtros e retorna a mensagem correspondente | ||
if (searchQuery.value != "") { | ||
return `não encontrou resultados para "${searchQuery.value}" nos itens ${itemType}s.`; | ||
} | ||
if (activeCategory.value != null) { | ||
return `não encontrou itens ${itemType}s da categoria "${activeCategory.value}".`; | ||
} | ||
if (activeLocation.value != null) { | ||
return `não encontrou itens ${itemType}s no local "${activeLocation.value}".`; | ||
} | ||
return `está sem itens ${itemType}s... Você pode adicionar um!`; | ||
}); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.