Browse Source

feat(gui-v2): add shortcut for custom scrollbar style

Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
pull/2716/head
Braks 2 years ago committed by Pranav C
parent
commit
8f1688d597
  1. 2
      packages/nc-gui-v2/assets/style.css
  2. 21
      packages/nc-gui-v2/components/general/Language.vue
  3. 4
      packages/nc-gui-v2/windi.config.ts

2
packages/nc-gui-v2/assets/style.css

@ -6,7 +6,7 @@ body,
}
html, body {
@apply scrollbar scrollbar-thin scrollbar-thumb-rounded scrollbar-thumb-green-500 scrollbar-track-black;
@apply scrollbar-thin-primary;
}
.shake-btn {

21
packages/nc-gui-v2/components/general/Language.vue

@ -33,24 +33,19 @@ onMounted(() => {
</script>
<template>
<v-menu top offset-y>
<v-menu>
<template #activator="{ props }">
<MaterialSymbolsTranslate class="cursor-pointer" @click="props.onClick" />
</template>
<v-list dense class="min-w-50 max-h-90vh overflow-auto !py-0">
<v-list-item
v-for="lang of languages"
:key="lang.value"
class="!min-h-8 group"
dense
:value="lang"
@click="changeLanguage(lang)"
>
<v-list class="min-w-50 max-h-90vh overflow-auto !py-0 scrollbar-thin-primary">
<v-list-item v-for="lang of languages" :key="lang.value" class="!min-h-8 group" :value="lang" @click="changeLanguage(lang)">
<v-list-item-subtitle class="capitalize md:(!leading-8) group-hover:(text-primary font-semibold)">
{{ Languages[lang] || lang }}
</v-list-item-subtitle>
</v-list-item>
<v-divider />
<v-list-item>
<a
href="https://docs.nocodb.com/engineering/translation/#how-to-contribute--for-community-members"
@ -63,9 +58,3 @@ onMounted(() => {
</v-list>
</v-menu>
</template>
<style scoped lang="scss">
.v-list {
@apply scrollbar scrollbar-thin scrollbar-thumb-rounded scrollbar-thumb-primary scrollbar-track-white;
}
</style>

4
packages/nc-gui-v2/windi.config.ts

@ -19,6 +19,10 @@ export default defineConfig({
plugins: [scrollbar, formsPlugin, typographyPlugin, aspectRatioPlugin, lineClampPlugin],
shortcuts: {
'scrollbar-thin-primary': 'scrollbar scrollbar-thin scrollbar-thumb-rounded scrollbar-thumb-primary scrollbar-track-white',
},
theme: {
fontFamily: {
sans: ['Vazirmatn', 'sans-serif'],

Loading…
Cancel
Save