Skip to content

Commit

Permalink
style: QuickSettingsDrawer h2 in accent color
Browse files Browse the repository at this point in the history
  • Loading branch information
Leo310 committed Mar 26, 2024
1 parent 201c6f7 commit 6b5abb6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions src/components/Chat/QuickSettingsDrawer.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
<div class="flex h-full w-full max-w-[500px] flex-col items-center justify-center">
{#if isOpen}
{#if $papaState === 'uninitialized'}
<h3 class="text-center">{$t('quick_settings.initialize')}</h3>
<h3 class="text-center text-primary">{$t('quick_settings.initialize')}</h3>
<button
aria-label={$t('quick_settings.initialize')}
on:click={() => $plugin.s2b.init()}
Expand All @@ -105,7 +105,7 @@
{:else if $papaState === 'loading'}
<LoadingAnimation />
{:else if $papaState === 'indexing' || $papaState === 'indexing-pause'}
<h3 class="m-0">{$t('quick_settings.indexing_vault')}</h3>
<h3 class="m-0 text-primary">{$t('quick_settings.indexing_vault')}</h3>
<output class={$papaState === 'indexing' && $papaIndexingTimeLeft > 0 ? '' : 'invisible'}>{formatTime($papaIndexingTimeLeft)}</output>
<ProgressBar progress={$papaIndexingProgress} />
<div
Expand Down Expand Up @@ -137,13 +137,13 @@
</div>
{:else if $papaState === 'error'}
{#if $errorState === 'ollama-gen-model-not-installed'}
<h3 class="text-center">{$t('install_model', { values: { model: $data.ollamaGenModel.model } })}</h3>
<h3 class="text-center text-primary">{$t('install_model', { values: { model: $data.ollamaGenModel.model } })}</h3>
<PullOllamaModel pullModel={$data.ollamaEmbedModel.model} onSuccessfulPull={() => ($papaState = 'settings-change')} />
{:else if $errorState === 'ollama-embed-model-not-installed'}}
<h3 class="text-center">{$t('install_model', { values: { model: $data.ollamaEmbedModel.model } })}</h3>
<h3 class="text-center text-primary">{$t('install_model', { values: { model: $data.ollamaEmbedModel.model } })}</h3>
<PullOllamaModel pullModel={$data.ollamaEmbedModel.model} onSuccessfulPull={() => ($papaState = 'settings-change')} />
{:else}
<h3 class="text-center">{$t('quick_settings.error.other')}</h3>
<h3 class="text-center text-primary">{$t('quick_settings.error.other')}</h3>
<button
aria-label={$t('quick_settings.retry_initialization')}
on:click={() => $plugin.s2b.init()}
Expand All @@ -152,23 +152,23 @@
/>
{/if}
{:else if $papaState === 'mode-change'}
<h3 class="text-center">{$t('quick_settings.mode_changed')}{$data.isIncognitoMode ? 'Ollama' : 'OpenAI'}.</h3>
<h3 class="text-center text-primary">{$t('quick_settings.mode_changed')}{$data.isIncognitoMode ? 'Ollama' : 'OpenAI'}.</h3>
<button
aria-label={$t('quick_settings.reinitialize')}
on:click={() => initSecondBrain()}
class="h-8 rounded-l-md px-4 py-2 transition duration-300 ease-in-out hover:bg-[--text-accent-hover]"
use:icon={'refresh-cw'}
/>
{:else if $papaState === 'settings-change'}
<h3 class="text-center">{$t('quick_settings.settings_changed')}</h3>
<h3 class="text-center text-primary">{$t('quick_settings.settings_changed')}</h3>
<button
aria-label={$t('quick_settings.reinitialize')}
on:click={() => $plugin.s2b.init()}
class="h-8 rounded-l-md px-4 py-2 transition duration-300 ease-in-out hover:bg-[--text-accent-hover]"
use:icon={'refresh-cw'}
/>
{:else}
<h2 class="mb-0">{$data.isIncognitoMode ? 'Ollama' : 'OpenAI'}</h2>
<h2 class="mb-0 text-primary">{$data.isIncognitoMode ? 'Ollama' : 'OpenAI'}</h2>
<p class="mt-1">
{$t('quick_settings.chat_via', { values: { model: $data.isIncognitoMode ? $data.ollamaGenModel.model : $data.openAIGenModel.model } })}
</p>
Expand Down
2 changes: 1 addition & 1 deletion src/lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
"excludeff_delete": "Delete from exclude list",
"advanced": "Advanced Settings",
"clear": "Clear Plugin Data",
"clear_desc": "Clear all plugin data and reinitialize the plugin. This will delete all plugin data and the vector store data. All chat files inside your vault will not be affected.",
"clear_desc": "This will delete all plugin data and the vector store data. All chat files inside your vault will not be affected.",
"clear_modal": {
"title": "Clear Plugin Data",
"description": "Are you sure you want to delete the plugin data? Note that only the plugin data and the vector store data will be removed. All chat files inside your vault will not be affected."
Expand Down

0 comments on commit 6b5abb6

Please sign in to comment.