diff --git a/pc-client/src/layout/MainContentLayout.tsx b/pc-client/src/layout/MainContentLayout.tsx index d1e26a6..dc4b722 100644 --- a/pc-client/src/layout/MainContentLayout.tsx +++ b/pc-client/src/layout/MainContentLayout.tsx @@ -36,7 +36,7 @@ export const MainContentLayout = () => { return ( - {portalMode &&
金讯达金牛集团 · 内部通讯 diff --git a/pc-client/src/main.tsx b/pc-client/src/main.tsx index 8e9df9b..ca34a51 100644 --- a/pc-client/src/main.tsx +++ b/pc-client/src/main.tsx @@ -9,6 +9,7 @@ import App from "./App"; import { isSaveLog } from "./config"; import { initializePortal, portalHome, portalMode } from './portal'; import './portal.scss'; +import './portal-return.css'; if (window.electronAPI && isSaveLog) { const sdkLogger = log.scope("openim-sdk-core"); diff --git a/pc-client/src/portal-return.css b/pc-client/src/portal-return.css new file mode 100644 index 0000000..3afc3e1 --- /dev/null +++ b/pc-client/src/portal-return.css @@ -0,0 +1,22 @@ +/* Shared portal navigation: same geometry in all four applications. */ +.jn-portal-bar { position: relative; min-height: 56px; box-sizing: border-box; padding-right: 160px !important; } +a.jn-portal-return, a.jn-portal-return:link, a.jn-portal-return:visited { + position: absolute; top: 10px; right: 16px; z-index: 2; + display: inline-flex; align-items: center; justify-content: center; gap: 8px; + box-sizing: border-box; height: 36px; min-width: 124px; padding: 0 12px; + border: 1px solid #e7c7c3; border-radius: 10px; margin: 0; + background: #fff7f5; color: #a92e24; box-shadow: 0 1px 2px rgba(64,25,20,.04); + font: 600 13px/1.2 -apple-system,BlinkMacSystemFont,"Segoe UI","Microsoft YaHei",sans-serif; + text-decoration: none; white-space: nowrap; cursor: pointer; +} +a.jn-portal-return svg { width: 18px; height: 18px; flex: none; } +a.jn-portal-return span { color: inherit !important; font: inherit; } +a.jn-portal-return:hover { background: #faeae6; color: #92251d; border-color: #d99c94; text-decoration: none; } +a.jn-portal-return:focus-visible { outline: 3px solid #b83a2d; outline-offset: 3px; } +[data-theme="night"] a.jn-portal-return { background: #382927; border-color: #70504b; color: #ffb4a8; } +[data-theme="night"] a.jn-portal-return:hover { background: #4a312c; color: #ffd0c7; } +@media (max-width: 600px) { + .jn-portal-bar { padding-right: 124px !important; } + a.jn-portal-return, a.jn-portal-return:link, a.jn-portal-return:visited { right: 12px; min-width: 102px; gap: 6px; padding: 0 9px; } +} +@media print { a.jn-portal-return { display: none !important; } } diff --git a/pc-client/src/portal.scss b/pc-client/src/portal.scss index 89405e7..3cce16b 100644 --- a/pc-client/src/portal.scss +++ b/pc-client/src/portal.scss @@ -6,7 +6,7 @@ html[data-portal='true'] { .portal-header { height: 56px; display: flex; align-items: center; gap: 20px; padding: 0 24px; border-bottom: 1px solid var(--gap-text); background: #fff; } .portal-header strong { color: var(--primary); font-size: 20px; } .portal-header span { color: var(--sub-text); } - .portal-header a { margin-left: auto; color: var(--primary); } + @media (max-width: 600px) { .portal-header > span { display: none; } } .ant-spin-nested-loading, .ant-spin-container { height: 100%; } &[data-theme='night'] { color-scheme: dark;