-
Notifications
You must be signed in to change notification settings - Fork 610
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
1 parent
f4be95d
commit 762c5eb
Showing
12 changed files
with
348 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<template> | ||
<div ref="target" class="flex flex-col transition-opacity duration-500" :class="targetIsVisible ? 'opacity-100' : 'opacity-25'"> | ||
<time :datetime="date.day.toISOString()" class="flex-shrink-0 text-sm/6 font-semibold text-gray-500 dark:text-gray-400">{{ date.day.toLocaleString('en-us', { year: 'numeric', month: 'short', day: 'numeric' }) | ||
}}</time> | ||
|
||
<NuxtLink v-if="date.release" :to="`https://github.com/nuxt/ui/releases/tag/${date.release.name}`" target="_blank" class="text-gray-900 dark:text-white font-bold text-3xl mt-2 group hover:text-primary-500 dark:hover:text-primary-400 transition-[color]"> | ||
{{ date.release.name }} | ||
</NuxtLink> | ||
<div v-else-if="date.pull" class="text-sm/6 break-all mt-2"> | ||
<NuxtLink :to="`https://github.com/${date.pull.user.login}`" target="_blank" class="text-gray-900 dark:text-white transition-colors inline-flex items-center gap-1 rounded-full bg-gray-100/50 dark:bg-gray-800/50 dark:hover:bg-gray-800 p-0.5 pr-1 ring-1 ring-gray-300 dark:ring-gray-700 text-xs font-medium flex-shrink-0 align-middle mr-1"> | ||
<UAvatar :src="`https://github.com/${date.pull.user.login}.png`" size="3xs" /> | ||
|
||
{{ date.pull.user.login }} | ||
</NuxtLink> | ||
|
||
pushed <NuxtLink :to="date.pull.html_url" target="_blank" class="font-medium text-gray-900 dark:text-white hover:text-primary-500 dark:hover:text-primary-400 transition-[color]"> | ||
#{{ date.pull.number }} {{ date.pull.title }} | ||
</NuxtLink> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { useIntersectionObserver } from '@vueuse/core' | ||
defineProps<{ | ||
date: { | ||
day: Date | ||
release?: { | ||
name: string | ||
} | ||
pull?: { | ||
number: number | ||
title: string | ||
html_url: string | ||
user: { | ||
login: string | ||
} | ||
} | ||
} | ||
}>() | ||
const target = ref(null) | ||
const targetIsVisible = ref(false) | ||
useIntersectionObserver(target, ([{ isIntersecting }]) => { | ||
targetIsVisible.value = isIntersecting | ||
}, { | ||
threshold: 1, | ||
rootMargin: '0px 0px -68px 0px' | ||
}) | ||
</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,10 @@ | ||
navigation: false | ||
title: Releases | ||
description: Follow the latest releases and updates of Nuxt UI. | ||
links: | ||
- label: View on GitHub | ||
icon: i-simple-icons-github | ||
to: https://github.com/nuxt/ui/releases | ||
target: _blank | ||
size: md | ||
color: white |
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
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { Octokit } from '@octokit/rest' | ||
|
||
function isUserABot (user) { | ||
return user?.login?.endsWith('-bot') || user?.login?.endsWith('[bot]') | ||
} | ||
|
||
export default cachedEventHandler(async () => { | ||
if (!process.env.NUXT_GITHUB_TOKEN) { | ||
return [] | ||
} | ||
|
||
const octokit = new Octokit({ auth: process.env.NUXT_GITHUB_TOKEN }) | ||
|
||
const pulls = await octokit.paginate(octokit.rest.pulls.list, { | ||
owner: 'nuxt', | ||
repo: 'ui', | ||
state: 'closed' | ||
}) | ||
|
||
return pulls.filter(pull => !!pull.merged_at).filter(pull => !isUserABot(pull.user)) | ||
}, { | ||
maxAge: 60 * 60 | ||
}) |
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,18 @@ | ||
import { Octokit } from '@octokit/rest' | ||
|
||
export default cachedEventHandler(async () => { | ||
if (!process.env.NUXT_GITHUB_TOKEN) { | ||
return [] | ||
} | ||
|
||
const octokit = new Octokit({ auth: process.env.NUXT_GITHUB_TOKEN }) | ||
|
||
const { data: releases } = await octokit.rest.repos.listReleases({ | ||
owner: 'nuxt', | ||
repo: 'ui' | ||
}) | ||
|
||
return releases | ||
}, { | ||
maxAge: 60 * 60 | ||
}) |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
762c5eb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
ui – ./
ui-nuxt-js.vercel.app
ui-git-dev-nuxt-js.vercel.app
ui.nuxt.com