Browse Source

Merge pull request #2720 from nocodb/feat/color-transition

pull/2728/head
Braks 2 years ago committed by GitHub
parent
commit
bbab4a7f2b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 11
      packages/nc-gui-v2/app.vue
  2. 4
      packages/nc-gui-v2/assets/style-v2.css
  3. 2
      packages/nc-gui-v2/components/general/Share.vue
  4. 2
      packages/nc-gui-v2/components/general/Social.vue
  5. 21
      packages/nc-gui-v2/pages/projects/index.vue
  6. 2
      packages/nc-gui-v2/pages/projects/index/index.vue
  7. 4
      packages/nc-gui-v2/pages/projects/index/list.vue
  8. 8
      packages/nc-gui-v2/pages/signin.vue
  9. 6
      packages/nc-gui-v2/pages/signup.vue
  10. 1
      packages/nc-gui-v2/windi.config.ts

11
packages/nc-gui-v2/app.vue

@ -59,13 +59,14 @@ const signOut = () => {
<template #activator="{ props }">
<MdiDotsVertical class="md:text-xl cursor-pointer" @click="props.onClick" />
</template>
<v-list class="!py-0 nc-user-menu min-w-32">
<v-list class="!py-0 nc-user-menu min-w-32 dark:(!bg-gray-800)">
<nuxt-link
v-t="['c:navbar:user:email']"
class="group hover:bg-gray-200 flex items-center p-2"
class="group hover:(bg-gray-200) dark:(hover:bg-gray-600) flex items-center p-2 no-underline"
to="/user/settings"
>
<MdiAt class="mt-1 transition-colors duration-150 ease-in group-hover:text-success" />&nbsp;
<MdiAt class="mt-1 color-transition group-hover:text-success" />&nbsp;
<span class="prose">{{ email }}</span>
</nuxt-link>
@ -73,10 +74,10 @@ const signOut = () => {
<div
v-t="['a:navbar:user:sign-out']"
class="group flex flex-row cursor-pointer hover:bg-gray-200 flex items-center p-2"
class="group flex flex-row cursor-pointer hover:bg-gray-200 dark:(hover:bg-gray-600) flex items-center p-2"
@click="signOut"
>
<MdiLogout class="transition-colors duration-150 ease-in group-hover:text-red-500" />&nbsp;
<MdiLogout class="color-transition dark:text-white group-hover:(!text-red-500)" />&nbsp;
<span class="prose font-semibold text-gray-500">{{ $t('general.signOut') }}</span>
</div>
</v-list>

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

@ -38,3 +38,7 @@ nav .v-list {
.layout-leave-active {
@apply opacity-0;
}
a {
@apply prose text-primary underline hover:opacity-75 dark:(text-secondary) hover:(opacity-75);
}

2
packages/nc-gui-v2/components/general/Share.vue

@ -292,6 +292,6 @@ const openUrl = (url: string) => {
}
a {
@apply cursor-pointer text-3xl rounded-full p-2 bg-gray-100 shadow-md hover:(shadow-lg bg-gray-200) transition-color ease-in duration-100;
@apply cursor-pointer text-3xl rounded-full p-2 bg-gray-100 shadow-md hover:(shadow-lg bg-gray-200) color-transition;
}
</style>

2
packages/nc-gui-v2/components/general/Social.vue

@ -46,7 +46,7 @@ const isZhLang = $computed(() => locale.value.startsWith('zh'))
<style scoped>
.icon {
@apply cursor-pointer text-3xl rounded-full p-2 bg-gray-100 shadow-md hover:(shadow-lg bg-gray-200) transition-color ease-in duration-100;
@apply cursor-pointer text-3xl rounded-full p-2 bg-gray-100 shadow-md hover:(shadow-lg bg-gray-200) color-transition;
}
.discourse {

21
packages/nc-gui-v2/pages/projects/index.vue

@ -46,13 +46,14 @@ const activePage = $ref(navDrawerOptions[0].title)
<v-menu class="select-none">
<template #activator="{ props }">
<div
class="bg-white mr-auto select-none flex items-center gap-2 leading-8 cursor-pointer rounded-full border-1 border-gray-300 px-5 py-2 shadow prose-lg font-semibold hover:(!bg-gray-100)"
class="color-transition hover:(bg-gray-100 dark:bg-secondary/25) dark:(bg-secondary/50 !text-white shadow-gray-600) mr-auto select-none flex items-center gap-2 leading-8 cursor-pointer rounded-full border-1 border-gray-300 px-5 py-2 shadow prose-lg font-semibold"
@click="props.onClick"
>
<MdiPlus class="text-primary text-2xl" />
<MdiPlus class="text-primary dark:(!text-white) text-2xl" />
{{ $t('title.newProj') }}
</div>
</template>
<v-list class="!py-0 flex flex-col bg-white rounded-lg shadow-md border-1 border-gray-300 mt-2 ml-2">
<div
class="grid grid-cols-12 cursor-pointer hover:bg-gray-200 flex items-center p-2"
@ -73,7 +74,7 @@ const activePage = $ref(navDrawerOptions[0].title)
</div>
<div class="advance-menu flex-1">
<v-list class="flex flex-col gap-1" :color="$state.darkMode.value ? 'default' : 'primary'">
<v-list class="flex flex-col gap-1" :color="$state.darkMode.value ? 'secondary' : 'primary'">
<!-- todo: v-list-item-group doesn't seem to work with vuetify 3 yet ... -->
<v-list-item
v-for="item in navDrawerOptions"
@ -111,16 +112,16 @@ const activePage = $ref(navDrawerOptions[0].title)
</div>
<div class="self-end flex text-4xl mb-1">
<MaterialSymbolsFormatListBulletedRounded
:class="route.name === 'projects-index-list' ? 'text-primary' : ''"
class="transition-color ease-in duration-100 cursor-pointer p-2 hover:bg-gray-300/50 rounded-full"
@click="navigateTo('/projects/list')"
/>
<MaterialSymbolsGridView
:class="route.name === 'projects-index' ? 'text-primary' : ''"
class="transition-color ease-in duration-100 cursor-pointer p-2 hover:bg-gray-300/50 rounded-full"
:class="route.name === 'projects-index' ? 'text-primary dark:(!text-secondary/75)' : ''"
class="color-transition cursor-pointer p-2 hover:bg-gray-300/50 rounded-full"
@click="navigateTo('/projects')"
/>
<MaterialSymbolsFormatListBulletedRounded
:class="route.name === 'projects-index-list' ? 'text-primary dark:(!text-secondary/75)' : ''"
class="color-transition cursor-pointer p-2 hover:bg-gray-300/50 rounded-full"
@click="navigateTo('/projects/list')"
/>
</div>
</div>

2
packages/nc-gui-v2/pages/projects/index/index.vue

@ -95,7 +95,7 @@ const formatTitle = (title: string) =>
<style scoped>
.thumbnail {
@apply relative rounded-md opacity-75 font-bold text-white text-[75px] h-[150px] w-full max-w-[150px] shadow-md cursor-pointer uppercase flex items-center justify-center transition-color ease-in duration-100 hover:(after:opacity-100 shadow-none);
@apply relative rounded-md opacity-75 font-bold text-white text-[75px] h-[150px] w-full max-w-[150px] shadow-md cursor-pointer uppercase flex items-center justify-center color-transition hover:(after:opacity-100 shadow-none);
}
.thumbnail::after {

4
packages/nc-gui-v2/pages/projects/index/list.vue

@ -17,7 +17,7 @@ const openProject = async (project: ProjectType) => {
</script>
<template>
<div>
<div class="mx-8">
<div class="grid grid-cols-3 gap-2 prose-md p-2 font-semibold">
<div>{{ $t('general.title') }}</div>
<div>Status</div>
@ -28,7 +28,7 @@ const openProject = async (project: ProjectType) => {
<template v-for="project of projects" :key="project.id">
<div
class="cursor-pointer grid grid-cols-3 gap-2 prose-md hover:(bg-gray-100 shadow-sm dark:text-black) p-2 transition-color ease-in duration-100"
class="cursor-pointer grid grid-cols-3 gap-2 prose-md hover:(bg-gray-100 shadow-sm dark:text-black) p-2 color-transition"
@click="openProject(project)"
>
<div class="font-semibold">{{ project.title || 'Untitled' }}</div>

8
packages/nc-gui-v2/pages/signin.vue

@ -74,7 +74,7 @@ const resetError = () => {
<v-form
ref="formValidator"
v-model="valid"
class="h-full min-h-[600px] flex justify-center items-center"
class="h-[calc(100%_+_90px)] min-h-[600px] flex justify-center items-center"
@submit.prevent="signIn"
>
<div class="h-full w-full flex flex-col flex-wrap justify-center items-center">
@ -121,7 +121,7 @@ const resetError = () => {
/>
<div class="hidden md:block self-end mx-8">
<nuxt-link class="prose-sm text-primary underline hover:opacity-75" to="/forgot-password">
<nuxt-link class="prose-sm" to="/forgot-password">
{{ $t('msg.info.signUp.forgotPassword') }}
</nuxt-link>
</div>
@ -134,14 +134,14 @@ const resetError = () => {
? '!opacity-50 !cursor-default'
: 'shadow-md hover:(text-primary bg-primary/10 dark:text-white dark:!bg-primary/50)',
]"
class="ml-1 border-1 border-solid border-gray-300 transition-color duration-100 ease-in rounded-lg p-4 bg-gray-100/50"
class="ml-1 border-1 border-solid border-gray-300 color-transition rounded-lg p-4 bg-gray-100/50"
type="submit"
>
<span class="flex items-center gap-2"><MdiLogin /> {{ $t('general.signIn') }}</span>
</button>
<div class="text-end prose-sm">
{{ $t('msg.info.signUp.dontHaveAccount') }}
<nuxt-link class="text-primary underline hover:opacity-75" to="/signup">{{ $t('general.signUp') }}</nuxt-link>
<nuxt-link to="/signup">{{ $t('general.signUp') }}</nuxt-link>
</div>
<div class="prose-sm md:hidden">

6
packages/nc-gui-v2/pages/signup.vue

@ -122,7 +122,7 @@ const resetError = () => {
@focus="resetError"
/>
<div class="self-center flex items-center justify-between w-full">
<div class="self-center flex flex-wrap gap-4 items-center mt-4 md:mx-8 md:justify-between justify-center w-full">
<button
:disabled="!valid"
:class="[
@ -130,14 +130,14 @@ const resetError = () => {
? '!opacity-50 !cursor-default'
: 'shadow-md hover:(text-primary bg-primary/10 dark:text-white dark:!bg-primary/50)',
]"
class="ml-1 border-1 border-solid border-gray-300 transition-color duration-100 ease-in rounded-lg p-4 bg-gray-100/50"
class="ml-1 border-1 border-solid border-gray-300 color-transition rounded-lg p-4 bg-gray-100/50"
type="submit"
>
<span class="flex items-center gap-2"><MaterialSymbolsRocketLaunchOutline /> {{ $t('general.signUp') }}</span>
</button>
<div class="text-end prose-sm">
{{ $t('msg.info.signUp.alreadyHaveAccount') }}
<nuxt-link class="text-primary underline hover:opacity-75" to="/signin">{{ $t('general.signIn') }}</nuxt-link>
<nuxt-link to="/signin">{{ $t('general.signIn') }}</nuxt-link>
</div>
</div>
</div>

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

@ -43,6 +43,7 @@ export default defineConfig({
},
shortcuts: {
'color-transition': 'transition-color duration-100 ease-in',
'scrollbar-thin-primary': 'scrollbar scrollbar-thin scrollbar-thumb-rounded scrollbar-thumb-primary scrollbar-track-white',
},

Loading…
Cancel
Save