Skip to content

Commit

Permalink
feat: Navie now supports user themes
Browse files Browse the repository at this point in the history
  • Loading branch information
dustinbyrne committed Dec 17, 2024
1 parent dd4a939 commit 7a80e63
Show file tree
Hide file tree
Showing 21 changed files with 230 additions and 166 deletions.
14 changes: 6 additions & 8 deletions packages/components/src/components/AddFileButton.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<v-button class="add-file__button" size="small" kind="ghost">
<v-button class="add-file__button" size="small" kind="native-ghost">
<PlusIcon />Add content...
</v-button>
</template>
Expand All @@ -21,21 +21,19 @@ export default {
<style lang="scss" scoped>
.add-file__button {
padding: 0.5rem 1rem;
transition-duration: 0.25s;
&:hover {
background-color: rgba(white, 0.05);
}
&:active {
background-color: rgba(white, 0.2);
svg {
fill: $color-highlight;
}
}
svg {
width: 1rem;
height: 1rem;
margin-right: 0.63em;
fill: $white;
fill: $color-input-fg;
transition: $transition;
}
}
</style>
29 changes: 28 additions & 1 deletion packages/components/src/components/Button.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default {
type: String,
default: 'primary',
validator(value) {
return ['primary', 'secondary', 'ghost'].indexOf(value) !== -1;
return ['primary', 'secondary', 'ghost', 'native', 'native-ghost'].indexOf(value) !== -1;
},
},
size: {
Expand Down Expand Up @@ -133,6 +133,33 @@ export default {
}
}
&--native {
background-color: $color-button-bg;
color: $color-button-fg;
&:hover {
background-color: $color-button-bg-hover;
}
&:active {
background-color: $color-highlight-dark;
}
}
&--native-ghost {
background-color: transparent;
border: 1px solid $color-input-fg;
color: $color-input-fg;
&:hover {
border-color: $color-highlight;
color: $color-highlight;
}
&:active {
border-color: $color-highlight-dark;
color: $color-highlight-dark;
}
}
&--primary {
border: 2px solid $brightblue;
color: white;
Expand Down
1 change: 0 additions & 1 deletion packages/components/src/components/CodeSnippet.vue
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ export default {
</script>

<style lang="scss" scoped>
@import '~highlight.js/styles/base16/snazzy.css';
.code-snippet {
margin: 1rem 0;
border-radius: $border-radius;
Expand Down
8 changes: 4 additions & 4 deletions packages/components/src/components/chat-search/Context.vue
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export default {

<style lang="scss" scoped>
.context {
color: $gray4;
color: $color-foreground;
width: 100%;
min-height: 100%;
Expand All @@ -108,7 +108,7 @@ export default {
&__count {
font-size: 0.8rem;
font-weight: 400;
color: lighten($gray4, 20%);
color: $color-foreground;
margin-left: 0.5rem;
background-color: rgb(168, 168, 255, 0.15);
border-radius: 4rem;
Expand All @@ -121,7 +121,7 @@ export default {
h3 {
margin: 0.65rem;
color: $gray5;
color: $color-foreground;
}
&__body {
Expand All @@ -147,7 +147,7 @@ export default {
margin: 0 2rem;
min-width: 180px;
border-radius: 0.5rem;
color: rgba(white, 0.66);
color: $color-foreground;
line-height: 1.5;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ export default Vue.extend({
gap: 0.5em;
padding: 0.65rem;
cursor: pointer;
color: lighten($gray4, 20%);
height: 100%;
.row-icon {
Expand Down
10 changes: 5 additions & 5 deletions packages/components/src/components/chat-search/CopilotNotice.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export default Vue.extend({
display: flex;
flex-direction: column;
align-items: flex-start;
color: $white;
color: $color-foreground;
gap: 0.5rem;
&__notification {
Expand All @@ -47,8 +47,8 @@ export default Vue.extend({
max-width: 20rem;
gap: 1rem;
border-radius: $border-radius;
background-color: #32354d;
border: 1px solid rgba(255, 255, 255, 0.1);
background-color: $color-background-dark;
border: 1px solid $color-border;
&-icon {
svg {
Expand All @@ -60,11 +60,11 @@ export default Vue.extend({
&__sub-notification {
a {
text-decoration: none;
color: desaturate($brightblue, 30%);
color: $color-link;
&:hover,
&:active {
color: $brightblue;
color: $color-link-hover;
text-decoration: underline;
}
}
Expand Down
30 changes: 19 additions & 11 deletions packages/components/src/components/chat-search/LlmConfiguration.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
<div class="action">
<v-button
size="medium"
kind="native"
@click.native="selectOption('copilot')"
:disabled="selectedOption === 'copilot'"
data-cy="llm-select"
Expand All @@ -40,6 +41,7 @@
<div class="action">
<v-button
size="medium"
kind="native"
@click.native="selectOption('default')"
:disabled="selectedOption === 'default'"
data-cy="llm-select"
Expand All @@ -54,7 +56,12 @@
<p>Input your own OpenAI API key to use it with Navie.</p>
</div>
<div class="action">
<v-button size="medium" @click.native="selectOption('own-key')" data-cy="llm-select">
<v-button
size="medium"
kind="native"
@click.native="selectOption('own-key')"
data-cy="llm-select"
>
Select
</v-button>
</div>
Expand All @@ -77,6 +84,7 @@
>
<v-button
size="medium"
kind="native"
@click.native="selectOption('own-model')"
data-cy="llm-select"
>
Expand All @@ -98,7 +106,7 @@
<div class="llm-configuration__indicator">
<v-button
v-if="!vsCodeLMVendor"
kind="ghost"
kind="native-ghost"
class="button"
@click.native="showModal"
data-cy="llm-config-button"
Expand Down Expand Up @@ -220,6 +228,7 @@ export default Vue.extend({
display: flex;
padding: 1rem;
width: fit-content;
color: $color-foreground;
.skeleton-loader {
@keyframes skeleton {
Expand Down Expand Up @@ -251,8 +260,8 @@ export default Vue.extend({
padding: 1rem;
align-items: center;
border-radius: $border-radius;
background-color: #32354d;
border: 1px solid rgba(255, 255, 255, 0.1);
background-color: $color-background-dark;
border: 1px solid $color-border;
}
&__content {
Expand All @@ -266,7 +275,7 @@ export default Vue.extend({
padding: 0.5rem;
&:hover {
background-color: #32354d;
background-color: $color-background-light;
}
}
.config-header {
Expand Down Expand Up @@ -305,11 +314,10 @@ export default Vue.extend({
}
.config-options {
$bg: #32354d;
background-color: $bg;
background-color: $color-background;
padding: 1em;
border-radius: $border-radius;
border: 1px solid desaturate(lighten($bg, 15%), 10%);
border: 1px solid $color-background-light;
display: flex;
flex-direction: column;
gap: 1rem;
Expand All @@ -322,7 +330,7 @@ export default Vue.extend({
display: flex;
flex-direction: row;
padding: 1em;
border-bottom: 1px solid desaturate(lighten($bg, 15%), 10%);
border-bottom: 1px solid $color-background-light;
gap: 1em;
&:last-child {
Expand Down Expand Up @@ -350,11 +358,11 @@ export default Vue.extend({
a {
text-decoration: none;
color: desaturate($brightblue, 30%);
color: $color-link;
&:hover,
&:active {
color: $brightblue;
color: $color-link-hover;
text-decoration: underline;
}
}
Expand Down
12 changes: 0 additions & 12 deletions packages/components/src/components/chat-search/PinnedItems.vue
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ export default {

<style lang="scss" scoped>
.pinned-items {
color: $gray4;
width: 100%;
min-height: 100%;
Expand All @@ -106,7 +105,6 @@ export default {
&__count {
font-size: 0.8rem;
font-weight: 400;
color: lighten($gray4, 20%);
margin-left: 0.5rem;
background-color: rgb(168, 168, 255, 0.15);
border-radius: 4rem;
Expand All @@ -123,13 +121,8 @@ export default {
color: $white;
}
h3 {
color: $gray5;
}
&__header {
flex: none;
background-color: $gray3;
padding: 1rem;
position: sticky;
top: 0;
Expand Down Expand Up @@ -157,22 +150,17 @@ export default {
}
&__notice {
$fg: rgb(255, 255, 255, 0.75);
margin: 0 auto;
width: 80%;
min-width: 180px;
background-color: rgb(0, 0, 0, 0.25);
border: 1px solid rgb(255, 255, 255, 0.1);
border-radius: 0.5rem;
padding: 1rem;
color: $fg;
line-height: 1.5;
h2 {
margin-top: 0;
margin-bottom: 0.5rem;
color: $fg;
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,13 @@ export default {
user-select: none;
line-height: 1.5;
font-size: 1em;
color: rgba(white, 0.66);
svg {
height: 16px;
width: 16px;
path {
fill: $gray4;
fill: $color-foreground;
}
}
Expand Down
Loading

0 comments on commit 7a80e63

Please sign in to comment.