|
78 | 78 | {/if} |
79 | 79 |
|
80 | 80 | <div class="index-info"> |
81 | | - <div class="info-row"> |
| 81 | + <div class="index-row"> |
82 | 82 | <span class="info-label">Index size</span> |
83 | | - <span class="info-value"> |
84 | | - {#if dbFileSize != null} |
85 | | - {formatFileSize(dbFileSize)} |
86 | | - {:else} |
87 | | - No index |
88 | | - {/if} |
89 | | - </span> |
| 83 | + <div class="index-controls"> |
| 84 | + <Button |
| 85 | + variant="secondary" |
| 86 | + size="mini" |
| 87 | + onclick={handleClearIndex} |
| 88 | + disabled={clearing || dbFileSize == null} |
| 89 | + > |
| 90 | + {clearing ? 'Clearing...' : 'Clear index'} |
| 91 | + </Button> |
| 92 | + <span class="info-value"> |
| 93 | + {#if dbFileSize != null} |
| 94 | + {formatFileSize(dbFileSize)} |
| 95 | + {:else} |
| 96 | + No index |
| 97 | + {/if} |
| 98 | + </span> |
| 99 | + </div> |
90 | 100 | </div> |
91 | 101 |
|
92 | | - <div class="clear-action"> |
93 | | - <Button |
94 | | - variant="secondary" |
95 | | - size="mini" |
96 | | - onclick={handleClearIndex} |
97 | | - disabled={clearing || dbFileSize == null} |
98 | | - > |
99 | | - {clearing ? 'Clearing...' : 'Clear index'} |
100 | | - </Button> |
101 | | - <span class="clear-description"> |
102 | | - Deletes the index database. A fresh scan starts next time indexing is enabled. |
103 | | - </span> |
104 | | - </div> |
| 102 | + <p class="clear-description">Deletes the index database. A fresh scan starts next time indexing is enabled.</p> |
105 | 103 |
|
106 | 104 | {#if clearError} |
107 | 105 | <div class="clear-error">{clearError}</div> |
|
112 | 110 | <style> |
113 | 111 | .index-info { |
114 | 112 | padding: var(--spacing-sm) 0; |
| 113 | + border-bottom: 1px solid var(--color-border-subtle); |
115 | 114 | } |
116 | 115 |
|
117 | | - .info-row { |
118 | | - display: flex; |
| 116 | + .index-row { |
| 117 | + display: grid; |
| 118 | + grid-template-columns: 1fr 1fr; |
119 | 119 | align-items: center; |
120 | | - justify-content: space-between; |
121 | | - padding: var(--spacing-xs) 0; |
| 120 | + gap: var(--spacing-md); |
122 | 121 | } |
123 | 122 |
|
124 | 123 | .info-label { |
125 | 124 | font-weight: 500; |
126 | 125 | color: var(--color-text-primary); |
127 | 126 | } |
128 | 127 |
|
| 128 | + .index-controls { |
| 129 | + display: flex; |
| 130 | + align-items: center; |
| 131 | + justify-content: space-between; |
| 132 | + gap: var(--spacing-sm); |
| 133 | + } |
| 134 | +
|
129 | 135 | .info-value { |
130 | 136 | color: var(--color-text-secondary); |
131 | 137 | font-family: var(--font-mono); |
132 | 138 | font-size: var(--font-size-sm); |
133 | 139 | } |
134 | 140 |
|
135 | | - .clear-action { |
136 | | - display: flex; |
137 | | - align-items: center; |
138 | | - gap: var(--spacing-sm); |
139 | | - margin-top: var(--spacing-sm); |
140 | | - } |
141 | | -
|
142 | 141 | .clear-description { |
143 | | - color: var(--color-text-tertiary); |
| 142 | + margin: var(--spacing-xs) 0 0; |
| 143 | + color: var(--color-text-secondary); |
144 | 144 | font-size: var(--font-size-sm); |
| 145 | + line-height: 1.4; |
145 | 146 | } |
146 | 147 |
|
147 | 148 | .clear-error { |
|
0 commit comments