mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-11 20:08:37 +00:00
@@ -33,8 +33,6 @@ async function handleHttpRequest(request: Request) {
|
||||
const pathname = url.pathname;
|
||||
const sameSite = url.host === new URL(CLOUD_BASE_URL).host;
|
||||
|
||||
console.log('request', request.url);
|
||||
|
||||
const isStaticResource = sameSite && !isNetworkResource(pathname);
|
||||
if (isStaticResource) {
|
||||
return fetchLocalResource(request);
|
||||
|
||||
@@ -19,6 +19,7 @@ import {
|
||||
useService,
|
||||
useServiceOptional,
|
||||
} from '@toeverything/infra';
|
||||
import { assignInlineVars } from '@vanilla-extract/dynamic';
|
||||
import clsx from 'clsx';
|
||||
import { partition } from 'lodash-es';
|
||||
import {
|
||||
@@ -207,6 +208,12 @@ const WorkbenchTab = ({
|
||||
data-active={tabActive}
|
||||
data-pinned={workbench.pinned}
|
||||
className={styles.tab}
|
||||
style={assignInlineVars({
|
||||
[styles.tabMaxWidth]: `${Math.max(
|
||||
workbench.views.length * 52,
|
||||
workbench.pinned ? 64 : 200
|
||||
)}px`,
|
||||
})}
|
||||
>
|
||||
{workbench.views.map((view, viewIdx) => {
|
||||
return (
|
||||
|
||||
@@ -4,6 +4,7 @@ import { createVar, style } from '@vanilla-extract/css';
|
||||
|
||||
export const tabOverlayWidth = createVar('0px');
|
||||
export const tabButtonWidth = createVar('16px');
|
||||
export const tabMaxWidth = createVar('200px');
|
||||
|
||||
export const root = style({
|
||||
width: '100%',
|
||||
@@ -79,7 +80,7 @@ export const tabWrapper = style({
|
||||
export const tab = style({
|
||||
height: 32,
|
||||
minWidth: 32,
|
||||
maxWidth: 200,
|
||||
maxWidth: tabMaxWidth,
|
||||
overflow: 'clip',
|
||||
background: cssVarV2('tab/tabBackground/default'),
|
||||
display: 'flex',
|
||||
@@ -97,9 +98,6 @@ export const tab = style({
|
||||
'&[data-active="true"]': {
|
||||
boxShadow: `0 0 0 1px ${cssVarV2('button/innerBlackBorder')}`,
|
||||
},
|
||||
'&[data-pinned="true"]': {
|
||||
maxWidth: 64,
|
||||
},
|
||||
[`${tabWrapper}[data-dragging="true"] &`]: {
|
||||
boxShadow: `0 0 0 1px ${cssVar('primaryColor')}`,
|
||||
},
|
||||
@@ -107,7 +105,7 @@ export const tab = style({
|
||||
});
|
||||
|
||||
export const splitViewLabel = style({
|
||||
minWidth: 32,
|
||||
minWidth: 48,
|
||||
padding: '0 8px',
|
||||
height: '100%',
|
||||
display: 'flex',
|
||||
|
||||
Reference in New Issue
Block a user