Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion desktop/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@itemmanager/desktop",
"version": "26.9.0",
"version": "26.9.1",
"private": true,
"description": "物品管理桌面客户端",
"author": "MCJ",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "itemmanager-workspace",
"version": "26.9.0",
"version": "26.9.1",
"private": true,
"license": "MIT",
"packageManager": "pnpm@11.7.0",
Expand Down
21 changes: 11 additions & 10 deletions web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,18 @@
<title>物品管理</title>
<style>
body:has(.entry-page) { margin: 0; }
.entry-page { min-height: 100dvh; display: grid; place-items: center; padding: 24px; box-sizing: border-box; color: #172026; background: #eef2f5; font: 400 16px/1.5 "Noto Sans SC", "Source Han Sans SC", "Microsoft YaHei UI", sans-serif; }
.entry-page { min-height: 100dvh; display: grid; place-items: center; padding: 24px; box-sizing: border-box; color: #172026; background: #f5f6f6; font: 400 16px/1.5 "Noto Sans SC", "Source Han Sans SC", "Microsoft YaHei UI", sans-serif; }
.entry-page * { box-sizing: border-box; }
.entry-card { display: grid; gap: 18px; width: min(100%, 400px); padding: 34px; background: rgba(255,255,255,.88); border: 1px solid rgba(33,47,57,.12); border-radius: 8px; box-shadow: 0 24px 54px rgba(23,32,38,.14); }
.entry-card h1 { margin: 0; font-size: 28px; }
.entry-field { display: grid; gap: 6px; }
.entry-field span { color: #64717d; font-size: .76rem; font-weight: 800; }
.entry-field input { width: 100%; padding: 10px 11px; color: #172026; background: #fff; border: 1px solid rgba(33,47,57,.12); border-radius: 8px; outline: none; font: inherit; }
.entry-field input:focus { border-color: rgba(15,118,110,.46); box-shadow: 0 0 0 4px rgba(15,118,110,.08); }
.entry-card button { min-height: 34px; padding: 7px 13px; color: #fff; background: #0f766e; border: 0; border-radius: 8px; font: inherit; font-size: .82rem; font-weight: 700; cursor: pointer; box-shadow: 0 10px 18px rgba(15,118,110,.22); }
.entry-card button:disabled { opacity: .52; cursor: not-allowed; box-shadow: none; }
.entry-card [data-entry-retry] { color: #64717d; background: transparent; box-shadow: none; }
.entry-card { display: grid; gap: 16px; width: min(100%, 400px); padding: 32px; background: #fff; border: 1px solid rgba(23,32,38,.11); border-radius: 12px; }
.entry-card h1 { margin: 0; font-size: 24px; font-weight: 600; }
.entry-field { display: grid; gap: 4px; }
.entry-field span { color: #59656b; font-size: .875rem; font-weight: 500; }
.entry-field input { width: 100%; min-height: 44px; padding: 8px 12px; color: #172026; background: #fff; border: 1px solid rgba(23,32,38,.22); border-radius: 8px; font: inherit; }
.entry-card :focus-visible { outline: 2px solid #0f766e; outline-offset: 2px; }
.entry-card button { min-height: 44px; padding: 8px 12px; color: #fff; background: #0f766e; border: 0; border-radius: 8px; font: inherit; font-size: .875rem; font-weight: 600; cursor: pointer; }
.entry-card button:disabled { opacity: .52; cursor: not-allowed; }
.entry-card [data-entry-retry] { color: #59656b; background: transparent; }
.entry-card [data-entry-feedback] { margin: 0; color: #59656b; font-size: .875rem; }
.entry-card [role=alert] { color: #b42318; }
.entry-card [hidden] { display: none; }
</style>
Expand Down
2 changes: 1 addition & 1 deletion web/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@itemmanager/web",
"version": "26.9.0",
"version": "26.9.1",
"private": true,
"license": "MIT",
"packageManager": "pnpm@11.7.0",
Expand Down
2 changes: 1 addition & 1 deletion web/src/renderer/features/catalog/CatalogWorkspace.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ export default function CatalogWorkspace({
</button>
</div>
{sorting ? <div className="catalog-sort-controls" aria-label={`${treeTitle}排序`}>
<p>拖动手柄调整同级顺序,排好后保存。</p>
<p>拖动手柄调整同级顺序,完成后保存</p>
<div className="catalog-sort-controls__actions">
<button className="secondary-button" type="button" disabled={selectedIndex <= 0} onClick={() => moveSelected(-1)}>上移</button>
<button className="secondary-button" type="button" disabled={selectedIndex < 0 || selectedIndex >= siblings.length - 1} onClick={() => moveSelected(1)}>下移</button>
Expand Down
4 changes: 2 additions & 2 deletions web/src/renderer/features/items/ItemEditorModal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ export default function ItemEditorModal({

function requestClose() {
if (saving) return;
if (dirtyDraft && !window.confirm('当前物品还有未保存修改,确定关闭吗?')) {
if (dirtyDraft && !window.confirm('还有修改没保存。确定关闭?')) {
return;
}

Expand All @@ -389,7 +389,7 @@ export default function ItemEditorModal({

function requestCopy() {
if (saving || !imageAccess || !onCopy) return;
if (dirtyDraft && !window.confirm('复制将使用已保存的物品内容,当前修改不会带入。继续复制?')) return;
if (dirtyDraft && !window.confirm('只复制已保存的内容。继续复制?')) return;
onCopy();
}

Expand Down
6 changes: 3 additions & 3 deletions web/src/renderer/features/items/ItemGalleryGrid.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ import ItemGalleryCard from './ItemGalleryCard';
import { observeScrollReveal } from './scroll-reveal';
import './scroll-reveal.css';

export default function ItemGalleryGrid({ items, bulkMode = false, bulkSelectedIds = new Set(), onSelect }) {
export default function ItemGalleryGrid({ items, hasItems = false, bulkMode = false, bulkSelectedIds = new Set(), onSelect }) {
const gridRef = useRef(null);
const seenRef = useRef(new WeakSet());
useEffect(() => observeScrollReveal(gridRef.current, seenRef.current), [items]);

if (!items.length) {
return (
<div className="item-gallery-empty">
<p>没有匹配物品</p>
<span>换个筛选,或者直接新增。</span>
<p>{hasItems ? '没有找到物品' : '还没有物品'}</p>
<span>{hasItems ? '试试换个关键词或筛选条件' : '点击「新增物品」开始记录'}</span>
</div>
);
}
Expand Down
1 change: 1 addition & 0 deletions web/src/renderer/features/items/ItemsGalleryPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ export default function ItemsGalleryPage({

<ItemGalleryGrid
items={galleryItems}
hasItems={allItems.length > 0}
selectedItemId={selectedItemId}
bulkMode={bulkMode}
bulkSelectedIds={bulkSelectedIds}
Expand Down
6 changes: 3 additions & 3 deletions web/src/renderer/features/items/scroll-reveal.css
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
@media (prefers-reduced-motion: no-preference) {
.item-gallery-card.scroll-reveal-enter {
animation: storage-card-reveal 360ms cubic-bezier(0.2, 0.65, 0.3, 1);
animation: storage-card-reveal 300ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes storage-card-reveal {
from { opacity: 0.35; translate: 0 var(--reveal-distance, 20px); }
from { opacity: 0.7; translate: 0 var(--reveal-distance, 8px); }
to { opacity: 1; translate: 0 0; }
}
}

@media (max-width: 1024px), (pointer: coarse) {
.item-gallery-card { --reveal-distance: 12px; }
.item-gallery-card { --reveal-distance: 4px; }
}

@media (prefers-reduced-motion: reduce) {
Expand Down
5 changes: 1 addition & 4 deletions web/src/renderer/features/layout/page-motion.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@
z-index: -1;
inset: -64px;
pointer-events: none;
background:
radial-gradient(ellipse at 8% 18%, rgb(15 118 110 / 11%), transparent 52%),
radial-gradient(ellipse at 88% 62%, rgb(47 111 159 / 10%), transparent 54%),
radial-gradient(ellipse at 42% 100%, rgb(217 119 6 / 4%), transparent 42%);
background: linear-gradient(160deg, #ebeeed, var(--bg) 64%);
transform: translate3d(0, var(--page-parallax-y, 0px), 0);
will-change: transform;
}
Expand Down
10 changes: 5 additions & 5 deletions web/src/renderer/features/web/WebApp.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ export default function WebApp({ fetchImpl, bootstrap }) {
async function persistCatalog(action, mode, ...args) {
return run(async (epoch) => {
const original = useProjectStore.getState();
if (!original.currentProject) throw new Error('项目暂时无法读取,请刷新页面重试');
if (!original.currentProject) throw new Error('物品读取失败,请刷新后重试');
const staged = createProjectStore();
staged.getState().setProject(original.currentProject);
staged.setState({ selectedCatalogNodeIds: { ...original.selectedCatalogNodeIds } });
Expand All @@ -160,7 +160,7 @@ export default function WebApp({ fetchImpl, bootstrap }) {
async function persistItem(draft, itemId) {
return run(async (epoch) => {
const original = useProjectStore.getState().currentProject;
if (!original) throw new Error('项目暂时无法读取,请刷新页面重试');
if (!original) throw new Error('物品读取失败,请刷新后重试');
// Stage edits independently so a rejected save cannot reset the editor's draft.
const staged = createProjectStore();
staged.getState().setProject(original);
Expand Down Expand Up @@ -246,8 +246,8 @@ export default function WebApp({ fetchImpl, bootstrap }) {
return <div className="web-app" aria-busy={busy}>
{feedback.message || project?.storageWarning?.code === 'CLEANUP_PENDING' || conflict ? <div className="web-feedback">
{feedback.message ? <span role={feedback.error ? 'alert' : 'status'}>{feedback.message}</span> : null}
{project?.storageWarning?.code === 'CLEANUP_PENDING' ? <span role="status">图片清理尚未完成,将自动重试。物品数据已保存。</span> : null}
{conflict ? <span>修改仍保留,请核对其他设备的更新后重试。</span> : null}
{project?.storageWarning?.code === 'CLEANUP_PENDING' ? <span role="status">物品已保存,图片清理会自动重试</span> : null}
{conflict ? <span>你的修改仍在。核对其他设备的更新后再试。</span> : null}
</div> : null}
{passwordPromptOpen ? <div className="dialog-backdrop" role="presentation">
<form className="dialog-card web-password-dialog" role="dialog" aria-modal="true" aria-labelledby="web-password-title" onSubmit={submitPassword} onKeyDown={(event) => {
Expand Down Expand Up @@ -276,6 +276,6 @@ export default function WebApp({ fetchImpl, bootstrap }) {
onBulkUpdateItems={state.bulkUpdateItems} onSaveProject={save}
onDeleteTag={state.deleteTag} onDeleteTags={state.deleteTags} onRenameTag={state.renameTag} onUpdateTagPrefix={state.updateTagPrefix}
/>
</ImageAccessProvider> : <p className="web-loading" role="status">{busy ? '正在读取物品…' : '项目暂时无法读取,请刷新页面重试。'}</p>}
</ImageAccessProvider> : <p className="web-loading" role="status">{busy ? '正在读取物品…' : '物品读取失败,请刷新后重试'}</p>}
</div>;
}
6 changes: 3 additions & 3 deletions web/src/renderer/features/web/entry.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export function startWebEntry({ root, fetchImpl, loadApp, timeoutMs = 15000, mod
function bounded(promise, controller, stage) {
const messages = {
session: '连接网站超时,请重试',
login: '登录请求超时,请重试',
login: '登录超时,请重试',
project: '读取物品超时,请重试',
module: '界面文件下载超时,请重试或切换网络'
};
Expand Down Expand Up @@ -78,7 +78,7 @@ export function startWebEntry({ root, fetchImpl, loadApp, timeoutMs = 15000, mod
ready = { project, attempt };
busy = true;
updateButton();
status('正在打开物品…');
status('正在打开物品列表…');
let app;
try { app = await bounded(preload(), null, 'module'); }
catch (error) {
Expand Down Expand Up @@ -123,7 +123,7 @@ export function startWebEntry({ root, fetchImpl, loadApp, timeoutMs = 15000, mod
submittedPassword = '';
await bounded(request, controller, 'login');
if (stopped || attempt !== epoch) return;
status('密码已验证,正在读取物品…');
status('正在读取物品…');
const project = await bounded(api.getProject({ signal: controller.signal }), controller, 'project');
await open(project, attempt);
} catch (error) { failed(error, attempt); }
Expand Down
12 changes: 9 additions & 3 deletions web/src/renderer/features/web/web.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading