- 新增 SystemNotification 模型,实现系统通知的数据存储 - 管理后台新增通知相关接口,支持通知的增删改查 - 用户端新增接口,获取最新激活通知并支持标记已读 - 在前端首页添加全局通知弹窗,实现通知自动轮询及已读同步 - 生成历史记录中兼容支持图片缩略图及新旧图片格式 - 优化后台图片同步逻辑,新增缩略图生成与存储 - 支持上传参考图的拖拽、粘贴、多文件上传及排序功能 - 增加购买积分页面入口及菜单项,调整菜单结构 - 日志系统由 Redis 列表迁移为有序集合,保留 30 天日志 - 优化日志页面样式,提升可读性及滚动体验 - 调整部分模板布局为自定义滚动条容器,增强视觉一致性
46 lines
919 B
Python
46 lines
919 B
Python
from __future__ import annotations
|
|
|
|
import os
|
|
import sys
|
|
from collections.abc import Sequence
|
|
from typing import Any, Protocol, TypeVar
|
|
|
|
TYPE_CHECKING = False
|
|
if TYPE_CHECKING:
|
|
from numbers import _IntegralLike as IntegralLike
|
|
|
|
try:
|
|
import numpy.typing as npt
|
|
|
|
NumpyArray = npt.NDArray[Any]
|
|
except ImportError:
|
|
pass
|
|
|
|
if sys.version_info >= (3, 13):
|
|
from types import CapsuleType
|
|
else:
|
|
CapsuleType = object
|
|
|
|
if sys.version_info >= (3, 12):
|
|
from collections.abc import Buffer
|
|
else:
|
|
Buffer = Any
|
|
|
|
|
|
_Ink = float | tuple[int, ...] | str
|
|
|
|
Coords = Sequence[float] | Sequence[Sequence[float]]
|
|
|
|
|
|
_T_co = TypeVar("_T_co", covariant=True)
|
|
|
|
|
|
class SupportsRead(Protocol[_T_co]):
|
|
def read(self, length: int = ..., /) -> _T_co: ...
|
|
|
|
|
|
StrOrBytesPath = str | bytes | os.PathLike[str] | os.PathLike[bytes]
|
|
|
|
|
|
__all__ = ["Buffer", "IntegralLike", "StrOrBytesPath", "SupportsRead"]
|