Repository: louislam/uptime-kuma
File: src/pages/SetupDatabase.vue (Vue)

Code before:
                        <label for="floatingInput">{{ $t("Password") }}</label>
                    </div>

                    <div class="form-floating mt-3 short">
                        <input id="floatingInput" v-model="dbConfig.dbName" type="text" class="form-control" required />
                        <label for="floatingInput">{{ $t("dbName") }}</label>
                    </div>

                    <div class="mt-3 short text-start">
                        <div class="form-check form-switch ps-0" style="height: auto; display: block; padding: 0">
                            <div class="d-flex align-items-center">
                                <input
                                    id="sslCheck"
                                    v-model="dbConfig.ssl"
                                    type="checkbox"
                                    role="switch"
                                    class="form-check-input ms-0 me-2"
                                    style="float: none"
                                />
                                <label class="form-check-label fw-bold" for="sslCheck">
                                    {{ $t("enableSSL") }}
                                    <span class="fw-normal text-muted" style="font-size: 0.9em">(Optional)</span>
                                </label>
                            </div>
                            <div class="form-text mt-1" style="font-size: 0.85em; opacity: 0.8">
                                {{ $t("sslExplanation") }}
                            </div>
                        </div>
                    </div>

                    <template v-if="dbConfig.ssl">
                        <div class="form-floating mt-3 short">
                            <textarea
                                id="caInput"
                                v-model="dbConfig.ca"
                                class="form-control"
                                placeholder="-----BEGIN CERTIFICATE-----"
                                style="height: 120px; font-family: monospace; font-size: 11px"
                            ></textarea>
                            <label for="caInput">{{ $t("caCertificate") }}</label>
                        </div>

                        <div class="short text-start mt-1">
                            <div
                                class="alert alert-secondary py-2 px-3 mb-0"
                                role="alert"
                                style="font-size: 0.8rem; line-height: 1.3"
                            >
                                <font-awesome-icon icon="info-circle" class="me-1" />
                                <strong>{{ $t("selfSigned") }}?</strong>
                                {{ $t("caFormatInstruction") }}

Review comment (refactor):
lets simplify to this

```suggestion
                        <div class="form-check form-switch">
                            <input
                                id="sslCheck"
                                v-model="dbConfig.ssl"
                                type="checkbox"
                                role="switch"
                                class="form-check-input"
                            />
                            <label class="form-check-label fw-bold" for="sslCheck">
                                {{ $t("enableSSL") }}
                                <span class="fw-normal text-muted">{{ $t("optional") }}</span>
                            </label>
                        </div>
```

Code after:
                        <label for="floatingInput">{{ $t("Password") }}</label>
                    </div>

                    <div class="form-floating mt-3 short">
                        <input id="floatingInput" v-model="dbConfig.dbName" type="text" class="form-control" required />
                        <label for="floatingInput">{{ $t("dbName") }}</label>
                    </div>

                    <div class="mt-3 short text-start">
                        <div class="form-check form-switch ps-0" style="height: auto; display: block; padding: 0">
                            <div class="d-flex align-items-center">
                                <input
                                    id="sslCheck"
                                    v-model="dbConfig.ssl"
                                    type="checkbox"
                                    role="switch"
                                    class="form-check-input ms-0 me-2"
                                    style="float: none"
                                />
                                <label class="form-check-label fw-bold" for="sslCheck">
                                    {{ $t("enableSSL") }}
                                    <span class="fw-normal text-muted" style="font-size: 0.9em">
                                        ({{ $t("Optional") }})
                                    </span>
                                </label>
                            </div>
                            <div class="form-text mt-1">
                                {{ $t("mariadbUseSSLHelptext") }}
                            </div>
                        </div>
                    </div>

                    <div v-if="dbConfig.ssl" class="form-floating mt-3 short">
                        <textarea
                            id="caInput"
                            v-model="dbConfig.ca"
                            class="form-control"
                            placeholder="-----BEGIN CERTIFICATE-----"
                            style="height: 120px"
                        ></textarea>
                        <label for="caInput">{{ $t("mariadbCaCertificateLabel") }}</label>
                        <div class="form-text">{{ $t("mariadbCaCertificateHelptext") }}</div>
                    </div>
                </template>

                <button class="btn btn-primary mt-4 short" type="submit" :disabled="disabledButton">
                    {{ $t("Next") }}
                </button>
            </template>
        </form>
    </div>