File size: 3,465 Bytes
7d4338a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<html>

<head>
    <title>Install Plugin</title>
    <script type="module">
        import { store } from "/plugins/_plugin_installer/webui/pluginInstallStore.js";
    </script>
</head>

<body>
    <div x-data>
        <template x-if="$store.pluginInstallStore">
            <div x-create="$store.pluginInstallStore.setTab('store')">

                <ul class="nav nav-tabs" role="tablist">
                    <li class="nav-item" role="presentation">
                        <button class="nav-link" :class="{ active: $store.pluginInstallStore.activeTab === 'store' }"
                            type="button" role="tab" @click="$store.pluginInstallStore.setTab('store')">
                            <span class="material-symbols-outlined pi-tab-icon">store</span> Browse
                        </button>
                    </li>
                    <li class="nav-item" role="presentation">
                        <button class="nav-link" :class="{ active: $store.pluginInstallStore.activeTab === 'git' }"
                            type="button" role="tab" @click="$store.pluginInstallStore.setTab('git')">
                            <span class="material-symbols-outlined pi-tab-icon">terminal</span> Git
                        </button>
                    </li>
                    <li class="nav-item" role="presentation">
                        <button class="nav-link" :class="{ active: $store.pluginInstallStore.activeTab === 'zip' }"
                            type="button" role="tab" @click="$store.pluginInstallStore.setTab('zip')">
                            <span class="material-symbols-outlined pi-tab-icon">upload_file</span> ZIP
                        </button>
                    </li>
                </ul>

                <template x-if="$store.pluginInstallStore.activeTab === 'store'">
                    <x-component path="/plugins/_plugin_installer/webui/install-index.html"></x-component>
                </template>

                <template x-if="$store.pluginInstallStore.activeTab === 'git'">
                    <x-component path="/plugins/_plugin_installer/webui/install-git.html"></x-component>
                </template>

                <template x-if="$store.pluginInstallStore.activeTab === 'zip'">
                    <x-component path="/plugins/_plugin_installer/webui/install-zip.html"></x-component>
                </template>

            </div>
        </template>
    </div>

    <style>
        .nav {
            display: flex;
            padding-left: 0;
            margin: 0 0 1rem 0;
            list-style: none;
            border-bottom: 1px solid var(--color-border);
            gap: 0.25rem;
        }

        .nav-link {
            font-family: "Rubik", Arial, Helvetica, sans-serif;
            border: 1px solid transparent;
            border-top-left-radius: 4px;
            border-top-right-radius: 4px;
            padding: 0.4rem 0.7rem;
            background: transparent;
            color: var(--color-text-secondary);
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 0.3rem;
        }

        .nav-link.active {
            color: var(--color-text-primary);
            border-color: var(--color-border);
            border-bottom-color: transparent;
            background: var(--color-background);
        }

        .pi-tab-icon {
            font-size: 1.1rem;
        }
    </style>
</body>

</html>