upgraded ui

This commit is contained in:
Saifeddine ALOUI 2024-11-15 23:32:55 +01:00
parent f6f9c3ec21
commit 7681f7838c
9 changed files with 245 additions and 222 deletions

@ -1 +1 @@
Subproject commit ad926172001e75a961545db7268f43a929a16ed6
Subproject commit c97ce2e73656f300c98f6b8724715d15470ae47a

File diff suppressed because one or more lines are too long

8
web/dist/assets/index-DGsBdEiy.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

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-DszaGEWB.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-DjsrdSea.css">
<script type="module" crossorigin src="/assets/index-DFuqs0Ac.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-DGsBdEiy.css">
</head>
<body>
<div id="app"></div>

9
web/package-lock.json generated
View File

@ -26,7 +26,7 @@
"markdown-it-mathjax": "^2.0.0",
"markdown-it-multimd-table": "^4.2.3",
"markdown-it-texmath": "^1.0.0",
"marked": "^14.1.2",
"marked": "^14.1.4",
"mathjax": "^3.2.2",
"mermaid": "^11.2.1",
"monaco-editor": "^0.51.0",
@ -3566,9 +3566,10 @@
"license": "MIT"
},
"node_modules/marked": {
"version": "14.1.2",
"resolved": "https://registry.npmjs.org/marked/-/marked-14.1.2.tgz",
"integrity": "sha512-f3r0yqpz31VXiDB/wj9GaOB0a2PRLQl6vJmXiFrniNwjkKdvakqJRULhjFKJpxOchlCRiG5fcacoUZY5Xa6PEQ==",
"version": "14.1.4",
"resolved": "https://registry.npmjs.org/marked/-/marked-14.1.4.tgz",
"integrity": "sha512-vkVZ8ONmUdPnjCKc5uTRvmkRbx4EAi2OkTOXmfTDhZz3OFqMNBM1oTTWwTr4HY4uAEojhzPf+Fy8F1DWa3Sndg==",
"license": "MIT",
"bin": {
"marked": "bin/marked.js"
},

View File

@ -29,7 +29,7 @@
"markdown-it-mathjax": "^2.0.0",
"markdown-it-multimd-table": "^4.2.3",
"markdown-it-texmath": "^1.0.0",
"marked": "^14.1.2",
"marked": "^14.1.4",
"mathjax": "^3.2.2",
"mermaid": "^11.2.1",
"monaco-editor": "^0.51.0",

View File

@ -16,6 +16,10 @@
<p v-if="personality.creation_date" class="text-sm text-gray-600">Creation Date: {{ formatDate(personality.creation_date) }}</p>
<p v-if="personality.last_update_date" class="text-sm text-gray-600">Last update Date: {{ formatDate(personality.last_update_date) }}</p>
</div>
<!-- Add the help icon if help is available -->
<button v-if="personality.help" @click="showHelp" class="ml-2 text-blue-500 hover:text-blue-600 transition duration-300 ease-in-out" title="Help">
<i data-feather="help-circle" class="h-6 w-6"></i>
</button>
</div>
<div class="mb-4">
@ -50,15 +54,29 @@
class="fixed z-50 w-20 h-20 rounded-full overflow-hidden">
<img :src="getImgUrl()" class="w-full h-full object-fill">
</div>
<!-- Help Popup -->
<div v-if="showHelpPopup" class="fixed inset-0 bg-black bg-opacity-50 flex justify-center items-center">
<div class="bg-white p-4 rounded-lg shadow-lg w-[500px] h-[400px] flex flex-col">
<div class="flex justify-between items-center mb-2">
<h2 class="text-lg font-bold">Help</h2>
<button @click="closeHelp" class="text-red-500 hover:text-red-600">Close</button>
</div>
<div class="flex-grow overflow-auto">
<div v-html="renderedHelp"></div>
</div>
</div>
</div>
</div>
</template>
<script>
import { nextTick } from 'vue'
import feather from 'feather-icons'
import botImgPlaceholder from "../assets/logo.svg"
import userImgPlaceholder from "../assets/default_user.svg"
import InteractiveMenu from "@/components/InteractiveMenu.vue"
import { nextTick } from "vue";
import feather from "feather-icons";
import { marked } from "marked"; // Correct import for marked
import botImgPlaceholder from "../assets/logo.svg";
import userImgPlaceholder from "../assets/default_user.svg";
import InteractiveMenu from "@/components/InteractiveMenu.vue";
const bUrl = import.meta.env.VITE_LOLLMS_API_BASEURL
export default {
@ -88,7 +106,9 @@ export default {
isMounted: false,
name: this.personality.name,
thumbnailVisible: false,
thumbnailPosition: { x: 0, y: 0 }
thumbnailPosition: { x: 0, y: 0 },
showHelpPopup: false, // State for help popup visibility
renderedHelp: '' // Rendered markdown content
};
},
computed:{
@ -117,13 +137,11 @@ export default {
}
},
mounted() {
this.isMounted = this.personality.isMounted
console.log(this.personality)
nextTick(() => {
feather.replace()
})
},
methods: {
@ -192,14 +210,18 @@ export default {
toggleReinstall() {
this.onReinstall(this)
},
showHelp() {
this.renderedHelp = marked(this.personality.help); // Render markdown
this.showHelpPopup = true;
},
closeHelp() {
this.showHelpPopup = false;
}
},
watch: {
selected() {
nextTick(() => {
feather.replace()
})
}
}

@ -1 +1 @@
Subproject commit c9fb31a4a3d20f5328fe700aa2dac20b92bedfae
Subproject commit af98da30c9737dcfac71ad4486f5e992d9558e0f