fix beceause >I'm not bad

This commit is contained in:
Saifeddine ALOUI 2025-04-01 18:21:31 +02:00
parent ed999f57bb
commit e745a8bce1
6 changed files with 115 additions and 208 deletions

View File

@ -61,15 +61,7 @@
<p class="text-xl text-progress opacity-95">
Together, we're making AI interaction... well, certainly *something* different. Let's see what happens!
</p>
<div class="pt-4">
<!-- Links might be slightly different for April Fools' -->
<a href="#" class="inline-block bg-purple-600 hover:bg-purple-500 text-white font-bold py-2 px-5 rounded-lg transition-colors duration-300 shadow-md hover:shadow-lg mx-2">
Read the *Real* Notes?
</a>
<a href="#" class="inline-block bg-teal-600 hover:bg-teal-500 text-white font-bold py-2 px-5 rounded-lg transition-colors duration-300 shadow-md hover:shadow-lg mx-2">
Try the Wobbly Settings!
</a>
</div>
</div>
</div>

26
web/dist/assets/index-CWI0YyLv.css vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

4
web/dist/index.html vendored
View File

@ -6,8 +6,8 @@
<script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>LoLLMS WebUI</title>
<script type="module" crossorigin src="/assets/index-D1pG4HIR.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-z0A7Tlec.css">
<script type="module" crossorigin src="/assets/index-m7-kGF9C.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-CWI0YyLv.css">
</head>
<body>
<div id="app"></div>

View File

@ -1,57 +1,57 @@
<template>
<div class="flex flex-col items-center justify-center w-full h-full min-h-screen p-8">
<div class="flex flex-col items-center justify-center w-full h-full min-h-screen p-8 bg-gradient-welcome">
<div class="text-center max-w-4xl">
<div class="flex items-center justify-center gap-8 mb-12">
<div class="relative w-24 h-24">
<img
:src="logoSrc"
alt="LoLLMS Logo"
class="w-24 h-24 rounded-full absolute animate-rolling-ball"
<img
:src="logoSrc"
alt="LoLLMS Logo"
class="w-24 h-24 rounded-full absolute animate-rolling-ball shadow-lg border-2 border-blue-300 dark:border-blue-600"
>
</div>
<div v-if="$store.state.config!=null&&$store.state.config.app_custom_name!=null&&$store.state.config.app_custom_name!=''" class="flex flex-col items-start">
<h1 class="text-6xl font-bold text-transparent bg-clip-text bg-gradient-to-r from-indigo-600 to-purple-600 dark:from-indigo-400 dark:to-purple-400">
<h1 class="text-6xl font-bold text-gradient-title">
{{$store.state.config.app_custom_name}}
</h1>
</div>
<div v-else class="flex flex-col items-start">
<h1 class="text-6xl font-bold text-transparent bg-clip-text bg-gradient-to-r from-indigo-600 to-purple-600 dark:from-indigo-400 dark:to-purple-400">
<h1 class="text-6xl font-bold text-gradient-title">
{{$store.state.theme_vars.lollms_title}}
</h1>
<p class="text-2xl italic mt-2">
<p class="text-2xl italic mt-2 text-subtitle">
Lord of Large Language And Multimodal Systems
</p>
</div>
</div>
<div v-if="$store.state.config!=null&&$store.state.config.app_custom_name!=null&&$store.state.config.app_custom_name!=''" class="space-y-8 animate-fade-in-up">
<p v-html="$store.state.config.app_custom_welcome_message">
<p class="text-lg md:text-xl text-blue-700 dark:text-blue-200" v-html="$store.state.config.app_custom_welcome_message">
</p>
</div>
<div v-else class="space-y-8 animate-fade-in-up">
<h2 class="text-4xl font-semibold">
<h2 class="text-4xl font-semibold text-blue-700 dark:text-blue-200">
{{$store.state.theme_vars.lollms_welcome_short_message}}
</h2>
<p class="text-xl max-w-3xl mx-auto">
<p class="text-lg md:text-xl max-w-3xl mx-auto text-blue-800 dark:text-blue-300">
{{$store.state.theme_vars.lollms_welcome_message}}
</p>
<!-- New section for latest news -->
<div v-if="latestNews" class="mt-12 p-6 rounded-lg shadow-md animate-fade-in-up overflow-y-scroll scrollbar-thin">
<h3>Latest LoLLMS News</h3>
<p v-html="latestNews"></p>
<div v-if="latestNews" class="mt-12 p-6 card animate-fade-in-up max-h-60 overflow-y-auto scrollbar">
<h3 class="text-2xl font-medium text-blue-600 dark:text-blue-300 mb-3 border-b border-blue-300 dark:border-blue-600 pb-2">Latest LoLLMS News</h3>
<p class="text-base text-blue-700 dark:text-blue-300" v-html="latestNews"></p>
</div>
</div>
<div v-if="error" class="mt-6 text-red-500">{{ error }}</div>
<div v-if="error" class="mt-6 text-red-500 dark:text-red-400">{{ error }}</div>
</div>
<!-- Floating button for latest ParisNeo video -->
<div v-if="showVideoButton" class="floating-button-container">
<a :href="videoUrl" target="_blank" class="floating-button" @click="handleClick">
<span class="tooltip">New ParisNeo Video!</span>
<img
:src="getImageForVideoType"
:alt="'New ' + videoType"
<img
:src="getImageForVideoType"
:alt="'New ' + videoType"
class="w-full h-full object-cover"
>
</a>
@ -59,87 +59,8 @@
</div>
</template>
<script>
import storeLogo from '@/assets/logo.png'
import axios from 'axios'
export default {
name: 'WelcomeComponent',
data() {
return {
videoUrl: "",
videoType: "",
latestNews: "",
error: "",
showVideoButton: false,
lastVideoUrl: ""
}
},
computed: {
getImageForVideoType() {
switch (this.videoType.toLowerCase()) {
case 'podcast':
return '/podcast.png';
case 'music':
return '/music.png';
case 'movie':
return '/movie.png';
case 'tutorial':
return '/tutorial.png';
default:
return '/play_video.png'; // fallback to default image
}
},
logoSrc() {
if (!this.$store.state.config) return storeLogo
return this.$store.state.config.app_custom_logo
? `/user_infos/${this.$store.state.config.app_custom_logo}`
: storeLogo
}
},
methods: {
async fetchLatestNews() {
try {
const response = await axios.get('/get_news');
this.latestNews = response.data;
} catch (err) {
console.error('Failed to fetch latest news:', err);
this.error = 'Unable to fetch the latest news. Please try again later.';
}
},
async fetchVideoUrl() {
try {
const response = await axios.get('/get_last_video_url');
this.videoUrl = response.data.url;
this.videoType = response.data.type;
this.checkVideoUpdate();
} catch (err) {
console.error('Failed to fetch video information:', err);
this.error = 'Unable to fetch the latest video information. Please try again later.';
}
},
async handleClick() {
await axios.post("/set_last_viewed_video_url",{client_id:this.$store.state.client_id, last_viewed_video_url:this.videoUrl});
this.showVideoButton = false;
},
async checkVideoUpdate() {
const response = await axios.get("/get_last_viewed_video_url");
const storedVideoUrl = response.data
console.log("storedVideoUrl");
console.log(storedVideoUrl);
if (this.videoUrl !== storedVideoUrl) {
this.showVideoButton = true;
}
}
},
mounted() {
this.fetchLatestNews();
this.fetchVideoUrl();
}
}
</script>
<style scoped>
/* Keep existing animations and floating button styles as they are custom */
@keyframes rolling-ball {
0% { transform: translateX(-50px) rotate(0deg); }
25% { transform: translateX(0) rotate(90deg); }
@ -176,25 +97,23 @@ export default {
position: fixed;
bottom: 30px;
right: 30px;
z-index: 9999;
z-index: 9999; /* Ensure it's above other content */
}
.floating-button {
position: fixed;
bottom: 30px;
right: 30px;
position: relative; /* Changed from fixed to relative to container */
width: 100px;
height: 100px;
border-radius: 50%;
background-color: rgba(255, 69, 0, 0.9);
background-color: rgba(255, 69, 0, 0.9); /* Keeping custom color for distinction */
display: flex;
justify-content: center;
align-items: center;
box-shadow: 0 0 30px rgba(255, 69, 0, 0.8);
animation: pulse 1.5s infinite, glow 2s infinite, wobble 3s infinite;
overflow: hidden;
z-index: 9999;
overflow: hidden; /* Keep overflow hidden for image */
transition: all 0.3s ease;
cursor: pointer;
}
.floating-button:hover {
@ -204,7 +123,7 @@ export default {
.tooltip {
position: absolute;
background-color: rgba(0, 0, 0, 0.8);
background-color: rgba(0, 0, 0, 0.8); /* Keeping custom tooltip style */
color: white;
padding: 8px 12px;
border-radius: 8px;
@ -214,7 +133,7 @@ export default {
opacity: 0;
transition: opacity 0.3s ease, transform 0.3s ease;
pointer-events: none;
top: -50px;
top: -50px; /* Position above the button */
left: 50%;
transform: translateX(-50%) scale(0.9);
}
@ -240,8 +159,4 @@ export default {
0%, 100% { transform: rotate(-3deg); }
50% { transform: rotate(3deg); }
}
.hidden {
display: none;
}
</style>
</style>