Skip to content

Commit 9fae9e1

Browse files
committed
feat: 修复权限警告
1 parent e660b7c commit 9fae9e1

File tree

4 files changed

+8385
-4067
lines changed

4 files changed

+8385
-4067
lines changed

.github/workflows/deploy.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
name: Build Check
22

3+
permissions:
4+
contents: read
5+
actions: write
6+
37
on:
48
push:
59
branches: [main]

app/components/ActivityTicker.tsx

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import Image from "next/image";
44
import Link from "next/link";
5-
import { useCallback, useEffect, useMemo, useState } from "react";
5+
import React, { useCallback, useEffect, useMemo, useState } from "react";
66
import { ChevronLeft, ChevronRight } from "lucide-react";
77
import {
88
activityEventsConfig,
@@ -44,6 +44,17 @@ export function ActivityTicker({ className }: ActivityTickerProps) {
4444
const [activeIndex, setActiveIndex] = useState(0);
4545
const totalEvents = events.length;
4646

47+
// 拖拽坐标
48+
const [offset, setOffset] = useState({ x: 0, y: 0 });
49+
const [dragStart, setDragStart] = useState<{ x: number; y: number } | null>(
50+
null,
51+
);
52+
53+
const handlePointerDown = (event: React.PointerEvent<HTMLDivElement>) => {
54+
event.currentTarget.setPointerCapture(event.pointerId);
55+
setDragStart({ x: event.clientX - offset.x, y: event.clientY - offset.y });
56+
};
57+
4758
useEffect(() => {
4859
if (totalEvents <= 1) {
4960
return;

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292
"tw-animate-css": "^1.3.8",
9393
"typescript": "^5.9.2",
9494
"typescript-eslint": "^8.46.2",
95-
"vercel": "^48.1.0",
95+
"vercel": "^48.8.0",
9696
"vitest": "^4.0.6"
9797
},
9898
"lint-staged": {

0 commit comments

Comments
 (0)