Skip to content

Commit dc89046

Browse files
committed
google photos 기능 제거
1 parent b90f800 commit dc89046

File tree

13 files changed

+4
-608
lines changed

13 files changed

+4
-608
lines changed

oauthInfo.json

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,5 @@
1313
"authorizationUrl": "https://www.tistory.com/oauth/authorize",
1414
"tokenUrl": "https://www.tistory.com/oauth/access_token",
1515
"redirectUri": "http://localhost"
16-
},
17-
"google": {
18-
"clientId": "CLIENT_ID",
19-
"clientSecret": "CLIENT_SECRET",
20-
"authorizationUrl": "https://accounts.google.com/o/oauth2/auth",
21-
"tokenUrl": "https://accounts.google.com/o/oauth2/token",
22-
"redirectUri": "http://localhost"
23-
}
16+
}
2417
}

src/main/apis/photos-api.js

Lines changed: 0 additions & 120 deletions
This file was deleted.

src/main/events/google-photos.js

Lines changed: 0 additions & 61 deletions
This file was deleted.

src/main/ipc-event.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
const authEvents = require('./events/auth')
22
const contentEvents = require('./events/content')
33
const preferenceEvents = require('./events/preference')
4-
const googlePhotosEvents = require('./events/google-photos')
54
const googleAnalyticsEvents = require('./events/google-analytics')
65

76
module.exports.init = () => {
87
authEvents()
98
contentEvents()
109
preferenceEvents()
11-
googlePhotosEvents()
1210
googleAnalyticsEvents()
1311
}

src/renderer/components/editor/codemirror/MarkdownEditor.js

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ import { Button, Box } from '@mui/material'
88
import { FormatBold, FormatItalic, FormatUnderlined, Attachment } from '@mui/icons-material'
99

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

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

127-
function handleGooglePhotos(e) {
128-
setOpenGooglePhotos(true)
129-
}
130-
131-
function handleCloseGooglePhotos() {
132-
setOpenGooglePhotos(false)
133-
}
134-
135-
function handleInsertImage(url, fileName) {
136-
ipcRenderer.send("add-image-url", currentAuth.uuid, currentBlog.name, url, fileName)
137-
}
138-
139124
function handleFinishUploadFile(e, fileUrl) {
140125
CodeMirrorHelper.insertImage(editorRef.current.getCodeMirror(), fileUrl)
141126
}
@@ -163,7 +148,6 @@ export default function MarkdownEditor({ value, onOpenFile, onChange }) {
163148
<ToolbarButton onClick={handleItalic}><FormatItalic /></ToolbarButton>
164149
<ToolbarButton onClick={handleUnderline}><FormatUnderlined /></ToolbarButton>
165150
<ToolbarButton onClick={handleLink}>Link</ToolbarButton>
166-
{imageUploadEnabled && <ToolbarButton onClick={handleGooglePhotos}><img src={googlePhotosLogo} /></ToolbarButton>}
167151
{imageUploadEnabled && <ToolbarButton onClick={onOpenFile}><Attachment /></ToolbarButton>}
168152
</Box>
169153

@@ -178,12 +162,6 @@ export default function MarkdownEditor({ value, onOpenFile, onChange }) {
178162
value={markdownValue}
179163
onChange={handleChangeContent}
180164
/>
181-
182-
<GooglePhotosDialog
183-
open={openGooglePhotos}
184-
onClose={handleCloseGooglePhotos}
185-
onSelectImage={handleInsertImage}
186-
/>
187165
</Box>
188166
)
189167
}

src/renderer/components/editor/plugins/google-photos/GooglePhotos.js

Lines changed: 0 additions & 103 deletions
This file was deleted.

0 commit comments

Comments
 (0)