mirror of
https://github.com/ParisNeo/lollms-webui.git
synced 2024-12-19 20:37:51 +00:00
added uninstyalled apps selection
This commit is contained in:
parent
09de3b4e4a
commit
2b49ec2cd0
@ -225,6 +225,17 @@ async def get_app_file(app_name: str, file: str):
|
||||
raise HTTPException(status_code=404, detail="App file not found")
|
||||
return FileResponse(app_path)
|
||||
|
||||
@router.get("/apps/{app_name}/{subfolder}/{file}")
|
||||
async def get_app_file(app_name: str, subfolder: str, file: str):
|
||||
app_name=sanitize_path(app_name)
|
||||
subfolder=sanitize_path(subfolder)
|
||||
file=sanitize_path(file)
|
||||
app_path = lollmsElfServer.lollms_paths.apps_zoo_path / app_name / subfolder / file
|
||||
if not app_path.exists():
|
||||
raise HTTPException(status_code=404, detail="App file not found")
|
||||
return FileResponse(app_path)
|
||||
|
||||
|
||||
class AppNameInput(BaseModel):
|
||||
client_id: str
|
||||
app_name: str
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 295d4a9d00fc1b02d1359fc13794828bb56ee22d
|
||||
Subproject commit 2fcdb883964218ab33e454b29be89084e47e1722
|
File diff suppressed because one or more lines are too long
2
web/dist/index.html
vendored
2
web/dist/index.html
vendored
@ -6,7 +6,7 @@
|
||||
<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-TXQPtYpQ.js"></script>
|
||||
<script type="module" crossorigin src="/assets/index-svgg6vOM.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-Cnmm4GFs.css">
|
||||
</head>
|
||||
<body>
|
||||
|
@ -67,6 +67,15 @@
|
||||
>
|
||||
Show only installed apps
|
||||
</label>
|
||||
<label for="installed-only" class="font-semibold">
|
||||
<input
|
||||
id="uninstalled-only"
|
||||
type="checkbox"
|
||||
v-model="showOnlyUnInstalled"
|
||||
class="mr-2"
|
||||
>
|
||||
Show only non installed apps
|
||||
</label>
|
||||
</div>
|
||||
<div class="flex items-center space-x-4">
|
||||
<label for="sort-select" class="font-semibold">Sort by:</label>
|
||||
@ -176,6 +185,7 @@ export default {
|
||||
sortBy: 'update',
|
||||
sortOrder: 'desc',
|
||||
showOnlyInstalled: false,
|
||||
showOnlyUnInstalled: false,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -199,14 +209,20 @@ export default {
|
||||
},
|
||||
filteredApps() {
|
||||
return this.combinedApps.filter(app => {
|
||||
const matchesSearch = app.name.toLowerCase().includes(this.searchQuery.toLowerCase()) ||
|
||||
const matchesSearch = app.name.toLowerCase().includes(this.toLowerCase()) ||
|
||||
app.description.toLowerCase().includes(this.searchQuery.toLowerCase()) ||
|
||||
app.author.toLowerCase().includes(this.searchQuery.toLowerCase());
|
||||
const matchesCategory = this.selectedCategory === 'all' || app.category === this.selectedCategory;
|
||||
const matchesInstalled = !this.showOnlyInstalled || app.installed;
|
||||
|
||||
// Adjusting the installed logic to account for both showOnlyInstalled and showOnlyUnInstalled
|
||||
const matchesInstalled = (this.showOnlyInstalled && app.installed) ||
|
||||
(this.showOnlyUnInstalled && !app.installed) ||
|
||||
(!this.showOnlyInstalled && !this.showOnlyUnInstalled);
|
||||
|
||||
return matchesSearch && matchesCategory && matchesInstalled;
|
||||
});
|
||||
},
|
||||
|
||||
sortedAndFilteredApps() {
|
||||
return this.filteredApps.sort((a, b) => {
|
||||
let comparison = 0;
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 302416341efe683e9134549ee9771147c21194dd
|
||||
Subproject commit 43ae22ec9c0207a4e7de1303ca34483dce10b8f4
|
Loading…
Reference in New Issue
Block a user