| 1 | <html> |
| 2 | |
| 3 | <head> |
| 4 | <title>Install Plugin</title> |
| 5 | <script type="module"> |
| 6 | import { store } from "/plugins/_plugin_installer/webui/pluginInstallStore.js"; |
| 7 | </script> |
| 8 | </head> |
| 9 | |
| 10 | <body> |
| 11 | <div x-data> |
| 12 | <template x-if="$store.pluginInstallStore"> |
| 13 | <div x-create="$store.pluginInstallStore.setTab('store')"> |
| 14 | |
| 15 | <ul class="nav nav-tabs" role="tablist"> |
| 16 | <li class="nav-item" role="presentation"> |
| 17 | <button class="nav-link" :class="{ active: $store.pluginInstallStore.activeTab === 'store' }" |
| 18 | type="button" role="tab" @click="$store.pluginInstallStore.setTab('store')"> |
| 19 | <x-icon class="pi-tab-icon" name="store"></x-icon> Browse |
| 20 | </button> |
| 21 | </li> |
| 22 | <li class="nav-item" role="presentation"> |
| 23 | <button class="nav-link" :class="{ active: $store.pluginInstallStore.activeTab === 'git' }" |
| 24 | type="button" role="tab" @click="$store.pluginInstallStore.setTab('git')"> |
| 25 | <x-icon class="pi-tab-icon" name="terminal"></x-icon> Git |
| 26 | </button> |
| 27 | </li> |
| 28 | <li class="nav-item" role="presentation"> |
| 29 | <button class="nav-link" :class="{ active: $store.pluginInstallStore.activeTab === 'zip' }" |
| 30 | type="button" role="tab" @click="$store.pluginInstallStore.setTab('zip')"> |
| 31 | <x-icon class="pi-tab-icon" name="upload_file"></x-icon> ZIP |
| 32 | </button> |
| 33 | </li> |
| 34 | </ul> |
| 35 | |
| 36 | <template x-if="$store.pluginInstallStore.activeTab === 'store'"> |
| 37 | <x-component path="/plugins/_plugin_installer/webui/install-index.html"></x-component> |
| 38 | </template> |
| 39 | |
| 40 | <template x-if="$store.pluginInstallStore.activeTab === 'git'"> |
| 41 | <x-component path="/plugins/_plugin_installer/webui/install-git.html"></x-component> |
| 42 | </template> |
| 43 | |
| 44 | <template x-if="$store.pluginInstallStore.activeTab === 'zip'"> |
| 45 | <x-component path="/plugins/_plugin_installer/webui/install-zip.html"></x-component> |
| 46 | </template> |
| 47 | |
| 48 | </div> |
| 49 | </template> |
| 50 | </div> |
| 51 | |
| 52 | <style> |
| 53 | .nav { |
| 54 | display: flex; |
| 55 | padding-left: 0; |
| 56 | margin: 0 0 1rem 0; |
| 57 | list-style: none; |
| 58 | border-bottom: 1px solid var(--color-border); |
| 59 | gap: 0.25rem; |
| 60 | } |
| 61 | |
| 62 | .nav-link { |
| 63 | font-family: "Rubik", Arial, Helvetica, sans-serif; |
| 64 | border: 1px solid transparent; |
| 65 | border-top-left-radius: 4px; |
| 66 | border-top-right-radius: 4px; |
| 67 | padding: 0.4rem 0.7rem; |
| 68 | background: transparent; |
| 69 | color: var(--color-text-secondary); |
| 70 | cursor: pointer; |
| 71 | display: inline-flex; |
| 72 | align-items: center; |
| 73 | gap: 0.3rem; |
| 74 | } |
| 75 | |
| 76 | .nav-link.active { |
| 77 | color: var(--color-text-primary); |
| 78 | border-color: var(--color-border); |
| 79 | border-bottom-color: transparent; |
| 80 | background: var(--color-background); |
| 81 | } |
| 82 | |
| 83 | .pi-tab-icon { |
| 84 | font-size: 1.1rem; |
| 85 | } |
| 86 | </style> |
| 87 | </body> |
| 88 | |
| 89 | </html> |