diff --git a/web/src/components/MemoEditor.tsx b/web/src/components/MemoEditor.tsx index 59fedecf..8ad6028f 100644 --- a/web/src/components/MemoEditor.tsx +++ b/web/src/components/MemoEditor.tsx @@ -474,7 +474,6 @@ const MemoEditor = () => { disabled={!(allowSave || editorState.resourceList.length > 0) || state.isUploadingResource || state.isRequesting} onClick={handleSaveBtnClick} > - {t("editor.save")} diff --git a/web/src/components/PreviewImageDialog.tsx b/web/src/components/PreviewImageDialog.tsx index 0dd83686..ae39676f 100644 --- a/web/src/components/PreviewImageDialog.tsx +++ b/web/src/components/PreviewImageDialog.tsx @@ -14,14 +14,12 @@ interface Props extends DialogProps { } interface State { - angle: number; scale: number; originX: number; originY: number; } const defaultState: State = { - angle: 0, scale: 1, originX: -1, originY: -1, @@ -104,36 +102,22 @@ const PreviewImageDialog: React.FC = ({ destroy, imgUrls, initialIndex }: } }; - const handleImgRotate = (event: React.MouseEvent, angle: number) => { - const curImgAngle = (state.angle + angle + 360) % 360; - setState({ - ...state, - originX: -1, - originY: -1, - angle: curImgAngle, - }); - }; - const handleImgContainerScroll = (event: React.WheelEvent) => { const offsetX = event.nativeEvent.offsetX; const offsetY = event.nativeEvent.offsetY; const sign = event.deltaY < 0 ? 1 : -1; - const curAngle = Math.max(MIN_SCALE, Math.min(MAX_SCALE, state.scale + sign * SCALE_UNIT)); + const scale = Math.max(MIN_SCALE, Math.min(MAX_SCALE, state.scale + sign * SCALE_UNIT)); setState({ ...state, originX: offsetX, originY: offsetY, - scale: curAngle, + scale: scale, }); }; - const getImageComputedStyle = () => { - return { - transform: `scale(${state.scale}) rotate(${state.angle}deg)`, - transformOrigin: `${state.originX === -1 ? "center" : `${state.originX}px`} ${ - state.originY === -1 ? "center" : `${state.originY}px` - }`, - }; + const imageComputedStyle = { + transform: `scale(${state.scale})`, + transformOrigin: `${state.originX === -1 ? "center" : `${state.originX}px`} ${state.originY === -1 ? "center" : `${state.originY}px`}`, }; return ( @@ -145,22 +129,16 @@ const PreviewImageDialog: React.FC = ({ destroy, imgUrls, initialIndex }: - -
e.stopPropagation()} onTouchStart={handleTouchStart} onTouchMove={handleTouchMove} onTouchEnd={handleTouchEnd} - src={imgUrls[currentIndex]} onWheel={handleImgContainerScroll} - style={getImageComputedStyle()} />
diff --git a/web/src/components/ShareMemoDialog.tsx b/web/src/components/ShareMemoDialog.tsx index 9a25ed81..54b40064 100644 --- a/web/src/components/ShareMemoDialog.tsx +++ b/web/src/components/ShareMemoDialog.tsx @@ -131,7 +131,7 @@ const ShareMemoDialog: React.FC = (props: Props) => {
- +
{user.nickname || user.username} @@ -141,10 +141,9 @@ const ShareMemoDialog: React.FC = (props: Props) => {
@@ -166,17 +165,17 @@ const ShareMemoDialog: React.FC = (props: Props) => { ))}
- -
diff --git a/web/src/components/ShortcutList.tsx b/web/src/components/ShortcutList.tsx index 6b4e0384..512c8357 100644 --- a/web/src/components/ShortcutList.tsx +++ b/web/src/components/ShortcutList.tsx @@ -36,7 +36,7 @@ const ShortcutList = () => { }, []); return ( -
+
{t("common.shortcuts")}