Skip to content

Commit

Permalink
google photos 기능 제거
Browse files Browse the repository at this point in the history
  • Loading branch information
joostory committed May 1, 2022
1 parent b90f800 commit dc89046
Show file tree
Hide file tree
Showing 13 changed files with 4 additions and 608 deletions.
9 changes: 1 addition & 8 deletions oauthInfo.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,5 @@
"authorizationUrl": "https://www.tistory.com/oauth/authorize",
"tokenUrl": "https://www.tistory.com/oauth/access_token",
"redirectUri": "http://localhost"
},
"google": {
"clientId": "CLIENT_ID",
"clientSecret": "CLIENT_SECRET",
"authorizationUrl": "https://accounts.google.com/o/oauth2/auth",
"tokenUrl": "https://accounts.google.com/o/oauth2/token",
"redirectUri": "http://localhost"
}
}
}
120 changes: 0 additions & 120 deletions src/main/apis/photos-api.js

This file was deleted.

61 changes: 0 additions & 61 deletions src/main/events/google-photos.js

This file was deleted.

2 changes: 0 additions & 2 deletions src/main/ipc-event.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
const authEvents = require('./events/auth')
const contentEvents = require('./events/content')
const preferenceEvents = require('./events/preference')
const googlePhotosEvents = require('./events/google-photos')
const googleAnalyticsEvents = require('./events/google-analytics')

module.exports.init = () => {
authEvents()
contentEvents()
preferenceEvents()
googlePhotosEvents()
googleAnalyticsEvents()
}
22 changes: 0 additions & 22 deletions src/renderer/components/editor/codemirror/MarkdownEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ import { Button, Box } from '@mui/material'
import { FormatBold, FormatItalic, FormatUnderlined, Attachment } from '@mui/icons-material'

import CodeMirrorHelper from './CodeMirrorHelper'
import GooglePhotosDialog from '../plugins/google-photos/GooglePhotosDialog'
import googlePhotosLogo from '../../../images/google-photos-logo.png'
import "../../../styles/lib/codemirror/tistory-markdown-theme.scss"
import "codemirror/lib/codemirror.css"
import "codemirror/addon/dialog/dialog.css"
Expand Down Expand Up @@ -75,7 +73,6 @@ export default function MarkdownEditor({ value, onOpenFile, onChange }) {
const currentAuth = useSelector(state => state.currentAuth)
const currentBlog = useSelector(state => state.currentBlog)
const [markdownValue, setMarkdownValue] = useState(MarkdownHelper.htmlToMarkdown(value))
const [openGooglePhotos, setOpenGooglePhotos] = useState(false)
const editorRef = useRef(null)

const imageUploadEnabled = useMemo(() => currentAuth.provider == 'tistory', [currentAuth])
Expand Down Expand Up @@ -124,18 +121,6 @@ export default function MarkdownEditor({ value, onOpenFile, onChange }) {
CodeMirrorHelper.link(editorRef.current.getCodeMirror())
}

function handleGooglePhotos(e) {
setOpenGooglePhotos(true)
}

function handleCloseGooglePhotos() {
setOpenGooglePhotos(false)
}

function handleInsertImage(url, fileName) {
ipcRenderer.send("add-image-url", currentAuth.uuid, currentBlog.name, url, fileName)
}

function handleFinishUploadFile(e, fileUrl) {
CodeMirrorHelper.insertImage(editorRef.current.getCodeMirror(), fileUrl)
}
Expand Down Expand Up @@ -163,7 +148,6 @@ export default function MarkdownEditor({ value, onOpenFile, onChange }) {
<ToolbarButton onClick={handleItalic}><FormatItalic /></ToolbarButton>
<ToolbarButton onClick={handleUnderline}><FormatUnderlined /></ToolbarButton>
<ToolbarButton onClick={handleLink}>Link</ToolbarButton>
{imageUploadEnabled && <ToolbarButton onClick={handleGooglePhotos}><img src={googlePhotosLogo} /></ToolbarButton>}
{imageUploadEnabled && <ToolbarButton onClick={onOpenFile}><Attachment /></ToolbarButton>}
</Box>

Expand All @@ -178,12 +162,6 @@ export default function MarkdownEditor({ value, onOpenFile, onChange }) {
value={markdownValue}
onChange={handleChangeContent}
/>

<GooglePhotosDialog
open={openGooglePhotos}
onClose={handleCloseGooglePhotos}
onSelectImage={handleInsertImage}
/>
</Box>
)
}
Expand Down
103 changes: 0 additions & 103 deletions src/renderer/components/editor/plugins/google-photos/GooglePhotos.js

This file was deleted.

Loading

0 comments on commit dc89046

Please sign in to comment.