|
|
@@ -115,21 +115,30 @@ const props = defineProps({
|
|
|
default: "#091d20",
|
|
|
},
|
|
|
});
|
|
|
-const titleText = ref("");
|
|
|
-const iconColor = ref("");
|
|
|
|
|
|
const route = useRoute();
|
|
|
|
|
|
-onMounted(() => {
|
|
|
- if (route.path.includes("opentalent_artist")) {
|
|
|
- titleText.value = "Présentation d'Opentalent Artist";
|
|
|
- iconColor.value = "#fac20a";
|
|
|
- } else if (route.path.includes("opentalent_school")) {
|
|
|
- titleText.value = "Présentation d'Opentalent School";
|
|
|
- iconColor.value = "rgba(32, 147, 190, 0.6)";
|
|
|
- } else if (route.path.includes("opentalent_manager")) {
|
|
|
- titleText.value = "Présentation d'Opentalent Manager";
|
|
|
- iconColor.value = "#d8050b";
|
|
|
+const titleText = computed(() => {
|
|
|
+ if (/opentalent_artist/.test(route.path)) {
|
|
|
+ return "Présentation d'Opentalent Artist";
|
|
|
+ } else if (/opentalent_school/.test(route.path)) {
|
|
|
+ return "Présentation d'Opentalent School";
|
|
|
+ } else if (/opentalent_manager/.test(route.path)) {
|
|
|
+ return "Présentation d'Opentalent Manager";
|
|
|
+ } else {
|
|
|
+ return "Titre par défaut";
|
|
|
+ }
|
|
|
+});
|
|
|
+
|
|
|
+const iconColor = computed(() => {
|
|
|
+ if (/opentalent_artist/.test(route.path)) {
|
|
|
+ return "#fac20a";
|
|
|
+ } else if (/opentalent_school/.test(route.path)) {
|
|
|
+ return "rgba(32, 147, 190, 0.6)";
|
|
|
+ } else if (/opentalent_manager/.test(route.path)) {
|
|
|
+ return "#d8050b";
|
|
|
+ } else {
|
|
|
+ return "rgba(32, 147, 190, 0.6)";
|
|
|
}
|
|
|
});
|
|
|
</script>
|