Keep secret switch inline on desktop

This commit is contained in:
shi.changliang 2026-06-05 12:45:07 +08:00
parent 050405bcee
commit 72eba50955
2 changed files with 14 additions and 11 deletions

View file

@ -1,5 +1,5 @@
<script setup lang="ts">
import { setIcon } from "obsidian";
import { Platform, setIcon } from "obsidian";
import { computed, ref, watchEffect } from "vue";
type ObsyncSettings = {
@ -33,6 +33,7 @@ const emit = defineEmits<{
const showSecretAccessKey = ref(false);
const includeSecrets = ref(false);
const isMobile = Platform.isMobile;
const secretAccessKeyButton = ref<HTMLButtonElement | null>(null);
const connectionConfigPreview = computed(() => {
if (!includeSecrets.value) {
@ -59,7 +60,7 @@ watchEffect(() => {
</script>
<template>
<main class="obsync-panel">
<main class="obsync-panel" :class="{ 'is-mobile': isMobile }">
<header class="obsync-header">
<div>
<h2 class="obsync-title">Obsync 设置</h2>

View file

@ -321,14 +321,6 @@
@apply items-start;
}
.obsync-row-block .obsync-row-title {
@apply flex-col;
}
.obsync-row-block .obsync-inline-switch {
@apply self-start;
}
.obsync-row:not(.obsync-toggle-row) .obsync-inline-switch .obsync-switch {
@apply mt-0;
}
@ -356,11 +348,21 @@
@apply mt-2;
}
.obsync-row:not(.obsync-toggle-row) .obsync-switch {
.obsync-row:not(.obsync-toggle-row) > .obsync-switch {
@apply mt-2;
}
}
.obsync-panel.is-mobile {
.obsync-row-block .obsync-row-title {
@apply flex-col;
}
.obsync-row-block .obsync-inline-switch {
@apply self-start;
}
}
@media (max-width: 560px) {
.obsync-title {
@apply text-xl;