-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
26 changed files
with
205 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1 @@ | ||
{ | ||
"game-of-life": "Game of Life" | ||
} | ||
{} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1 @@ | ||
{ | ||
"game-of-life": "康威生命游戏" | ||
} | ||
{} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1 @@ | ||
{ | ||
"game-of-life": "康威生命遊戲" | ||
} | ||
{} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
{ | ||
"goback": "Click to go back" | ||
"goback": "Click to go back", | ||
"mdPreview": "Markdown Preivew", | ||
"save": "Save" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
{ | ||
"goback": "点击返回" | ||
"goback": "点击返回", | ||
"mdPreview": "Markdown 预览", | ||
"save": "保存" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
{ | ||
"goback": "點擊返回" | ||
"goback": "點擊返回", | ||
"mdPreview": "Markdown 預覽", | ||
"save": "保存" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1 @@ | ||
{ | ||
"canvas": "Canvas" | ||
} | ||
{} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1 @@ | ||
{ | ||
"canvas": "画板" | ||
} | ||
{} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1 @@ | ||
{ | ||
"canvas": "畫板" | ||
} | ||
{} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { useNavigate } from 'react-router-dom'; | ||
import { Icon } from '@iconify/react'; | ||
|
||
import useI18n from '@/hooks/useI18n'; | ||
|
||
interface OmbIcon { | ||
title: string; | ||
icon: string; | ||
to: string; | ||
onClick?: () => void; | ||
} | ||
|
||
const OmbIcon: React.FC<OmbIcon> = ({ title, icon, to, onClick }) => { | ||
const t = useI18n(['dashboard']); | ||
const navigate = useNavigate(); | ||
|
||
const handleClick = () => { | ||
if (to) { | ||
navigate(to); | ||
return; | ||
} | ||
onClick && onClick(); | ||
}; | ||
|
||
return ( | ||
<span className="omb-card-icon" onClick={handleClick}> | ||
<Icon icon={icon} fontSize={40} color="#444" /> | ||
<b>{t(title)}</b> | ||
</span> | ||
); | ||
}; | ||
|
||
export default OmbIcon; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,7 +38,6 @@ export class Brush { | |
} | ||
|
||
save = () => { | ||
// this.canvas?.toBlob(); | ||
return this.canvas?.toDataURL(); | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
export default function SaveIcon() { | ||
return ( | ||
<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"> | ||
<path | ||
fill="#666" | ||
d="M597.333333 398.933333h170.666667v215.466667h-102.4v-113.066667h-194.133333v113.066667H256v-428.8c0-4.266667 2.133333-6.4 4.266667-10.666667s6.4-4.266667 10.666666-4.266666h326.4v228.266666z m170.666667-57.6h-113.066667v-113.066666l113.066667 113.066666z m-170.666667 341.333334h91.733334l-121.6 121.6-121.6-121.6h91.733333v-113.066667h57.6l2.133333 113.066667z m-102.4 170.666666h-224c-4.266667 0-6.4-2.133333-10.666666-4.266666s-4.266667-6.4-4.266667-10.666667v-224l238.933333 238.933333z m273.066667-125.866666v110.933333c0 4.266667-2.133333 6.4-4.266667 10.666667s-6.4 4.266667-10.666666 4.266666h-110.933334l125.866667-125.866666z" | ||
p-id="6663" | ||
></path> | ||
</svg> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.