Update pankow which now has Dropdown replaced with SingleSelect

This commit is contained in:
Johannes Zellner
2025-04-02 15:02:31 +02:00
parent 5527926508
commit 2104df5a83
15 changed files with 78 additions and 75 deletions
+14 -14
View File
@@ -1,7 +1,7 @@
<script setup>
import { ref, useTemplateRef, onMounted, computed, watch } from 'vue';
import { Button, InputGroup, Dialog, Dropdown, FormGroup, TextInput, Checkbox, PasswordInput, NumberInput } from 'pankow';
import { Button, InputGroup, Dialog, SingleSelect, FormGroup, TextInput, Checkbox, PasswordInput, NumberInput } from 'pankow';
import { prettyBinarySize } from 'pankow/utils';
import { BACKUP_FORMATS, STORAGE_PROVIDERS, REGIONS_CONTABO, REGIONS_VULTR, REGIONS_UPCLOUD, REGIONS_IONOS, REGIONS_OVH, REGIONS_LINODE, REGIONS_SCALEWAY, REGIONS_EXOSCALE, REGIONS_DIGITALOCEAN, REGIONS_HETZNER, REGIONS_WASABI, REGIONS_S3 } from '../constants.js';
import BackupsModel from '../models/BackupsModel.js';
@@ -342,7 +342,7 @@ defineExpose({
<FormGroup>
<label for="providerInput">{{ $t('backups.configureBackupStorage.provider') }} <sup><a href="https://docs.cloudron.io/backups/#storage-providers" class="help" target="_blank"><i class="fa fa-question-circle"></i></a></sup></label>
<p class="small text-info" v-show="config.provider !== provider">Backups in the old storage location have to be removed manually.</p>
<Dropdown id="providerInput" v-model="provider" :options="storageProviders" option-key="value" option-label="name" />
<SingleSelect id="providerInput" v-model="provider" :options="storageProviders" option-key="value" option-label="name" />
</FormGroup>
<!-- Noop -->
@@ -391,7 +391,7 @@ defineExpose({
<!-- Disk -->
<FormGroup v-if="provider === 'disk'">
<label class="control-label">{{ $t('backups.configureBackupStorage.diskPath') }}</label>
<Dropdown v-model="disk" :options="blockDevices" option-label="label" option-key="path" required />
<SingleSelect v-model="disk" :options="blockDevices" option-label="label" option-key="path" required />
</FormGroup>
<!-- SSHFS -->
@@ -461,17 +461,17 @@ defineExpose({
"
>
<label for="regionInput">{{ $t('backups.configureBackupStorage.region') }}</label>
<Dropdown id="regionInput" v-if="provider === 's3'" v-model="region" :options="REGIONS_S3" option-label="name" option-key="value" required />
<Dropdown id="regionInput" v-if="provider === 'digitalocean-spaces'" v-model="endpoint" :options="REGIONS_DIGITALOCEAN" option-label="name" option-key="value" required />
<Dropdown id="regionInput" v-if="provider === 'hetzner-objectstorage'" v-model="endpoint" :options="REGIONS_HETZNER" option-label="name" option-key="value" required />
<Dropdown id="regionInput" v-if="provider === 'exoscale-sos'" v-model="endpoint" :options="REGIONS_EXOSCALE" option-label="name" option-key="value" required />
<Dropdown id="regionInput" v-if="provider === 'wasabi'" v-model="endpoint" :options="REGIONS_WASABI" option-label="name" option-key="value" required />
<Dropdown id="regionInput" v-if="provider === 'scaleway-objectstorage'" v-model="endpoint" :options="REGIONS_SCALEWAY" option-label="name" option-key="value" required />
<Dropdown id="regionInput" v-if="provider === 'linode-objectstorage'" v-model="endpoint" :options="REGIONS_LINODE" option-label="name" option-key="value" required />
<Dropdown id="regionInput" v-if="provider === 'ovh-objectstorage'" v-model="endpoint" :options="REGIONS_OVH" option-label="name" option-key="value" required />
<Dropdown id="regionInput" v-if="provider === 'ionos-objectstorage'" v-model="endpoint" :options="REGIONS_IONOS" option-label="name" option-key="value" required />
<Dropdown id="regionInput" v-if="provider === 'vultr-objectstorage'" v-model="endpoint" :options="REGIONS_VULTR" option-label="name" option-key="value" required />
<Dropdown id="regionInput" v-if="provider === 'contabo-objectstorage'" v-model="endpoint" :options="REGIONS_CONTABO" option-label="name" option-key="value" required />
<SingleSelect id="regionInput" v-if="provider === 's3'" v-model="region" :options="REGIONS_S3" option-label="name" option-key="value" required />
<SingleSelect id="regionInput" v-if="provider === 'digitalocean-spaces'" v-model="endpoint" :options="REGIONS_DIGITALOCEAN" option-label="name" option-key="value" required />
<SingleSelect id="regionInput" v-if="provider === 'hetzner-objectstorage'" v-model="endpoint" :options="REGIONS_HETZNER" option-label="name" option-key="value" required />
<SingleSelect id="regionInput" v-if="provider === 'exoscale-sos'" v-model="endpoint" :options="REGIONS_EXOSCALE" option-label="name" option-key="value" required />
<SingleSelect id="regionInput" v-if="provider === 'wasabi'" v-model="endpoint" :options="REGIONS_WASABI" option-label="name" option-key="value" required />
<SingleSelect id="regionInput" v-if="provider === 'scaleway-objectstorage'" v-model="endpoint" :options="REGIONS_SCALEWAY" option-label="name" option-key="value" required />
<SingleSelect id="regionInput" v-if="provider === 'linode-objectstorage'" v-model="endpoint" :options="REGIONS_LINODE" option-label="name" option-key="value" required />
<SingleSelect id="regionInput" v-if="provider === 'ovh-objectstorage'" v-model="endpoint" :options="REGIONS_OVH" option-label="name" option-key="value" required />
<SingleSelect id="regionInput" v-if="provider === 'ionos-objectstorage'" v-model="endpoint" :options="REGIONS_IONOS" option-label="name" option-key="value" required />
<SingleSelect id="regionInput" v-if="provider === 'vultr-objectstorage'" v-model="endpoint" :options="REGIONS_VULTR" option-label="name" option-key="value" required />
<SingleSelect id="regionInput" v-if="provider === 'contabo-objectstorage'" v-model="endpoint" :options="REGIONS_CONTABO" option-label="name" option-key="value" required />
</FormGroup>
<FormGroup v-if="provider === 's3-v4-compat'">