-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
46 changed files
with
9,138 additions
and
671 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
nuxt: PORT=3000 node .output/server/index.mjs | ||
api: PORT=7171 node --enable-source-maps index.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,5 +17,11 @@ | |
"engines": { | ||
"node": ">=16", | ||
"pnpm": "8" | ||
}, | ||
"pnpm": { | ||
"overrides": { | ||
"ufo": "^1.3.1", | ||
"nuxt": "3.7.4" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Nuxt dev/build outputs | ||
.output | ||
.nuxt | ||
.nitro | ||
.cache | ||
dist | ||
|
||
# Node dependencies | ||
node_modules | ||
|
||
# Logs | ||
logs | ||
*.log | ||
|
||
# Misc | ||
.DS_Store | ||
.fleet | ||
.idea | ||
|
||
# Local env files | ||
.env | ||
.env.* | ||
!.env.example |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
shamefully-hoist=true | ||
strict-peer-dependencies=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
export default defineAppConfig({ | ||
ui: { | ||
primary: 'zinc', | ||
input: { | ||
default: { | ||
size: 'lg', | ||
}, | ||
}, | ||
select: { | ||
default: { | ||
size: 'lg', | ||
}, | ||
}, | ||
selectMenu: { | ||
default: { | ||
size: 'lg', | ||
}, | ||
}, | ||
button: { | ||
default: { | ||
size: 'lg', | ||
}, | ||
}, | ||
card: { | ||
background: 'bg-white dark:bg-zinc-900', | ||
ring: 'ring-1 ring-zinc-200 dark:ring-zinc-800', | ||
divide: 'divide-y divide-zinc-200 dark:divide-zinc-800', | ||
}, | ||
popover: { | ||
background: 'bg-white dark:bg-zinc-900', | ||
ring: 'ring-1 ring-zinc-200 dark:ring-zinc-800', | ||
}, | ||
table: { | ||
divide: 'divide-y divide-zinc-300 dark:divide-zinc-700', | ||
tbody: 'divide-y divide-zinc-200 dark:divide-zinc-800', | ||
tr: { | ||
selected: 'bg-zinc-50 dark:bg-zinc-800/50', | ||
active: 'hover:bg-zinc-50 dark:hover:bg-zinc-800/50 cursor-pointer', | ||
}, | ||
th: { | ||
color: 'text-zinc-900 dark:text-white', | ||
}, | ||
td: { | ||
color: 'text-zinc-500 dark:text-zinc-400', | ||
}, | ||
loadingState: { | ||
label: 'text-sm text-center text-zinc-900 dark:text-white', | ||
icon: 'w-6 h-6 mx-auto text-zinc-400 dark:text-zinc-500 mb-4 animate-spin', | ||
}, | ||
emptyState: { | ||
label: 'text-sm text-center text-zinc-900 dark:text-white', | ||
icon: 'w-6 h-6 mx-auto text-zinc-400 dark:text-zinc-500 mb-4', | ||
}, | ||
}, | ||
dropdown: { | ||
background: 'bg-white dark:bg-zinc-800', | ||
ring: 'ring-1 ring-zinc-200 dark:ring-zinc-700', | ||
divide: 'divide-y divide-zinc-200 dark:divide-zinc-700', | ||
item: { | ||
active: 'bg-zinc-100 dark:bg-zinc-900 text-zinc-900 dark:text-white', | ||
inactive: 'text-zinc-700 dark:text-zinc-200', | ||
icon: { | ||
active: 'text-zinc-500 dark:text-zinc-400', | ||
inactive: 'text-zinc-400 dark:text-zinc-500', | ||
}, | ||
}, | ||
}, | ||
notification: { | ||
background: 'bg-white dark:bg-zinc-900', | ||
ring: 'ring-1 ring-zinc-200 dark:ring-zinc-800', | ||
}, | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
<template> | ||
<UPopover :popper="{ placement: 'bottom-start' }" class="w-full"> | ||
<UButton | ||
icon="i-heroicons-calendar-days-20-solid" | ||
:label="label" | ||
variant="outline" | ||
class="w-full" | ||
:disabled="disabled" | ||
/> | ||
<template #panel="{ close }"> | ||
<VCalendarDatePicker | ||
v-model="innerModel" | ||
transparent | ||
:mode="mode" | ||
borderless | ||
:attributes="{ | ||
key: 'today', | ||
highlight: { | ||
color: 'blue', | ||
fillMode: 'outline', | ||
class: '!bg-zinc-100 dark:!bg-zinc-800', | ||
}, | ||
dates: new Date(), | ||
}" | ||
hide-time-header | ||
is24hr | ||
:is-dark="isDark" | ||
trim-weeks | ||
:first-day-of-week="2" | ||
:disabled="disabled" | ||
@close="close" | ||
/> | ||
</template> | ||
</UPopover> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { DatePicker as VCalendarDatePicker } from 'v-calendar'; | ||
import 'v-calendar/dist/style.css'; | ||
const colorMode = useColorMode(); | ||
const isDark = computed(() => colorMode.value === 'dark'); | ||
const props = withDefaults( | ||
defineProps<{ | ||
modelValue: string | Date | undefined; | ||
mode?: 'date' | 'dateTime'; | ||
disabled: boolean; | ||
}>(), | ||
{ | ||
mode: 'dateTime', | ||
}, | ||
); | ||
const emit = defineEmits<{ | ||
(event: 'update:modelValue', value: Date | undefined): void; | ||
}>(); | ||
const innerModel = computed<Date | undefined>({ | ||
get() { | ||
if (!props.modelValue) { | ||
return undefined; | ||
} | ||
return new Date(props.modelValue); | ||
}, | ||
set(date) { | ||
emit('update:modelValue', date); | ||
}, | ||
}); | ||
const label = computed(() => { | ||
if (!innerModel.value) { | ||
return ''; | ||
} | ||
if (props.mode === 'date') { | ||
return formatDate(innerModel.value); | ||
} | ||
return formatDateTime(innerModel.value); | ||
}); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
<template> | ||
<aside class="fixed h-screen pb-12 lg:inset-y-0 lg:w-72 lg:flex-col hidden lg:block"> | ||
<NuxtLink | ||
class="flex items-center px-8 py-6 text-2xl font-semibold tracking-tight duration-200 cursor-pointer stroke-stone-800 dark:text-stone-200 dark:stroke-stone-500 dark:hover:stroke-white hover:stroke-stone-700 hover:text-stone-700 dark:hover:text-white" | ||
to="/" | ||
> | ||
<img src="/logo_light.svg" alt="CodeCaptain logo" class="w-8 dark:hidden" /> | ||
<img src="/logo_dark.svg" alt="CodeCaptain dark logo" class="w-8 hidden dark:block" /> | ||
<span | ||
class="ml-2 text-transparent bg-gradient-to-tr from-gray-800 to-gray-400 dark:from-gray-100 dark:to-gray-400 bg-clip-text" | ||
>Grin</span | ||
> | ||
<span>gotts</span> | ||
</NuxtLink> | ||
<div class="space-y-4"> | ||
<div class="px-6 py-2"> | ||
<h2 class="px-2 mb-2 text-lg font-semibold tracking-tight">Workspace</h2> | ||
<div class="space-y-1"> | ||
<MenuItem to="/customers" title="Customers" icon="i-ion-people" /> | ||
<MenuItem to="/subscriptions" title="Subscriptions" icon="i-ion-md-refresh" /> | ||
<MenuItem to="/invoices" title="Invoices" icon="i-ion-document-text" /> | ||
<MenuItem to="/project/settings" title="Settings" icon="i-ion-settings-sharp" /> | ||
<!-- <MenuItem to="/docs" title="Api docs" icon="i-ion-document-text-sharp" /> --> | ||
<MenuItem to="https://geprog.com" title="Geprog" icon="i-ion-android-favorite-outline" /> | ||
</div> | ||
</div> | ||
|
||
<!-- <div class="py-2"> | ||
<h2 class="relative px-8 text-lg font-semibold tracking-tight">Projects</h2> | ||
<div dir="ltr" class="relative overflow-hidden px-4"> | ||
<div data-radix-scroll-area-viewport="" class="h-full w-full rounded-[inherit]"> | ||
<div class="p-2 space-y-1"> | ||
<div v-for="project in projects || []" :key="project._id"> | ||
<MenuItem to="/" :title="project.name" icon="i-ion-ios-repeat" /> | ||
</div> | ||
<MenuItem to="/project/add" title="Add repo" icon="i-heroicons-plus" /> | ||
</div> | ||
</div> | ||
</div> | ||
</div> --> | ||
</div> | ||
|
||
<div v-if="user" class="absolute inset-x-0 mx-6 bottom-8"> | ||
<UPopover> | ||
<button | ||
type="button" | ||
class="flex items-center justify-between gap-4 px-2 py-1 rounded lg:w-full hover:bg-stone-100 dark:hover:bg-stone-800" | ||
> | ||
<div class="flex flex-row-reverse items-center justify-start w-full gap-4 lg:flex-row"> | ||
<UAvatar v-if="user.avatarUrl" :src="user.avatarUrl" size="md" alt="Avatar" /> | ||
|
||
<div class="flex flex-row-reverse items-center gap-4 lg:gap-1 lg:items-start lg:flex-col"> | ||
<span class="text-ellipsis overflow-hidden whitespace-nowrap max-w-[8rem]">{{ user.name }}</span> | ||
<span | ||
class="inline-flex items-center font-medium py-0.5 text-xs uppercase rounded-md text-stone-800 dark:text-stone-300" | ||
>FREE</span | ||
> | ||
</div> | ||
</div> | ||
|
||
<UIcon name="i-ion-chevron-expand-outline" /> | ||
</button> | ||
|
||
<template #panel> | ||
<UVerticalNavigation :links="links" class="w-48" /> | ||
</template> | ||
</UPopover> | ||
</div> | ||
</aside> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
const { user, logout } = await useAuth(); | ||
const colorMode = useColorMode(); | ||
const isDark = computed({ | ||
get() { | ||
return colorMode.value === 'dark'; | ||
}, | ||
set() { | ||
colorMode.preference = colorMode.value === 'dark' ? 'light' : 'dark'; | ||
}, | ||
}); | ||
const links = computed(() => [ | ||
{ | ||
label: 'Theme', | ||
icon: isDark.value ? 'i-heroicons-moon-20-solid' : 'i-heroicons-sun-20-solid', | ||
click: () => { | ||
isDark.value = !isDark.value; | ||
}, | ||
}, | ||
{ | ||
label: 'Logout', | ||
icon: 'i-ion-log-out-outline', | ||
click: logout, | ||
}, | ||
]); | ||
// const { data: projects } = await useAsyncData(async () => { | ||
// const { data } = await client.project.projectList(); | ||
// return data; | ||
// }); | ||
</script> |
Oops, something went wrong.