mirror of
https://github.com/Adamcake/Bolt.git
synced 2026-04-21 17:36:53 -04:00
app: add BrowseData + BrowseConfig plugin buttons
This commit is contained in:
7
app/dist/assets/index-DfbfRdRN.js
vendored
7
app/dist/assets/index-DfbfRdRN.js
vendored
File diff suppressed because one or more lines are too long
9
app/dist/assets/index-alD2Jr-l.js
vendored
Normal file
9
app/dist/assets/index-alD2Jr-l.js
vendored
Normal file
File diff suppressed because one or more lines are too long
2
app/dist/index.html
vendored
2
app/dist/index.html
vendored
@@ -4,7 +4,7 @@
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Bolt Launcher</title>
|
||||
<script type="module" crossorigin src="/assets/index-DfbfRdRN.js"></script>
|
||||
<script type="module" crossorigin src="/assets/index-alD2Jr-l.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-B7SJFKRr.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -423,7 +423,46 @@
|
||||
<br />
|
||||
{/await}
|
||||
<button
|
||||
class="mx-auto mb-1 w-[min(144px,_25%)] rounded-lg p-2 font-bold text-black duration-200 enabled:bg-rose-500 enabled:hover:opacity-75 disabled:bg-gray-500"
|
||||
class="mx-auto mb-1 w-[min(144px,_25%)] rounded-lg bg-blue-500 p-2 font-bold text-black duration-200 hover:opacity-75"
|
||||
on:click={() => {
|
||||
const path = bolt.pluginConfig[selectedPlugin].path;
|
||||
if (path) {
|
||||
fetch('/browse-directory?'.concat(new URLSearchParams({ path }).toString()));
|
||||
} else {
|
||||
fetch(
|
||||
'/browse-plugin-data?'.concat(
|
||||
new URLSearchParams({ id: selectedPlugin }).toString()
|
||||
)
|
||||
);
|
||||
}
|
||||
}}
|
||||
>
|
||||
Browse data
|
||||
</button>
|
||||
|
||||
<button
|
||||
class="mx-auto mb-1 w-[min(144px,_25%)] rounded-lg bg-blue-500 p-2 font-bold text-black duration-200 hover:opacity-75"
|
||||
on:click={() =>
|
||||
fetch(
|
||||
'/browse-plugin-config?'.concat(
|
||||
new URLSearchParams({ id: selectedPlugin }).toString()
|
||||
)
|
||||
)}
|
||||
>
|
||||
Browse config
|
||||
</button>
|
||||
<br />
|
||||
{#if selectedPluginMeta.updaterURL}
|
||||
<button
|
||||
class="m-1 mx-auto w-[min(144px,_25%)] rounded-lg p-2 font-bold text-black duration-200 enabled:bg-blue-500 enabled:hover:opacity-75 disabled:bg-gray-500"
|
||||
on:click={() => updatePlugin(selectedPluginMeta, selectedPlugin)}
|
||||
>
|
||||
Check updates
|
||||
</button>
|
||||
|
||||
{/if}
|
||||
<button
|
||||
class="m-1 mx-auto w-[min(144px,_25%)] rounded-lg p-2 font-bold text-black duration-200 enabled:bg-rose-500 enabled:hover:opacity-75 disabled:bg-gray-500"
|
||||
on:click={() => {
|
||||
managementPluginPromise = null;
|
||||
GlobalState.pluginConfigHasPendingChanges = true;
|
||||
@@ -434,8 +473,7 @@
|
||||
'/uninstall-plugin?'.concat(
|
||||
new URLSearchParams({
|
||||
id: selectedPlugin,
|
||||
delete_data_dir:
|
||||
typeof list[selectedPlugin].updaterURL === 'string' ? '1' : '0'
|
||||
delete_data_dir: typeof meta.path === 'string' ? '0' : '1'
|
||||
}).toString()
|
||||
)
|
||||
);
|
||||
@@ -446,15 +484,6 @@
|
||||
>
|
||||
Remove
|
||||
</button>
|
||||
{#if selectedPluginMeta.updaterURL}
|
||||
|
||||
<button
|
||||
class="mx-auto mb-1 w-[min(144px,_25%)] rounded-lg p-2 font-bold text-black duration-200 enabled:bg-blue-500 enabled:hover:opacity-75 disabled:bg-gray-500"
|
||||
on:click={() => updatePlugin(selectedPluginMeta, selectedPlugin)}
|
||||
>
|
||||
Check updates
|
||||
</button>
|
||||
{/if}
|
||||
{/if}
|
||||
{:else}
|
||||
<p>
|
||||
|
||||
Reference in New Issue
Block a user