Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Nov 8, 2022. It is now read-only.

refactor(post): publish/update workflow redesign#1168

Merged
mydearxym merged 30 commits intodevfrompublish-workflow
Oct 18, 2021
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
Show all changes
30 commits
Select commitHold shift + click to select a range
a180b89
refactor(workflow): query target community & fix mobx-react issue
mydearxymOct 11, 2021
5a01b9d
refactor(workflow): create route adjust
mydearxymOct 11, 2021
b7800f2
refactor(publish-post): wip
mydearxymOct 11, 2021
259d1e8
refactor(workflow): naming & new favicon
mydearxymOct 11, 2021
baf6ba0
refactor(workflow): wip
mydearxymOct 12, 2021
7c628a8
chore(workflow): ts spec
mydearxymOct 12, 2021
95685c1
chore(workflow): basic publish done
mydearxymOct 12, 2021
3b301dd
refactor(publish-post): re-org route system
mydearxymOct 12, 2021
be5aef9
refactor(workflow): update post wip
mydearxymOct 13, 2021
9b07edd
refactor(workflow): update post with real data
mydearxymOct 13, 2021
207f76f
refactor(workflow): general TagsList wip
mydearxymOct 13, 2021
cdbce8b
refactor(workflow): use common viewingArticle as update article
mydearxymOct 13, 2021
385b389
refactor(article-editor): publish after behaviors
mydearxymOct 13, 2021
9b220fb
refactor(article-editor): add counter & improve editor inline style
mydearxymOct 14, 2021
f63bd5c
refactor(article-editor): extract submit button & re-org tagsetter wip
mydearxymOct 15, 2021
37977f7
refactor(TagSetter): add canActOnSeleted opt
mydearxymOct 15, 2021
726790e
refactor(TagSetter): wip
mydearxymOct 16, 2021
8e224e7
fix(Modal): close logic, esc hint style
mydearxymOct 16, 2021
684cdc7
refactor(CommunityTagSetter): re-org
mydearxymOct 16, 2021
48cdeca
refactor(CommunityTagSetter): type issue
mydearxymOct 16, 2021
b28bb72
chore(type): add TInput type
mydearxymOct 16, 2021
c61a8d1
refactor(publish): communityBadege change community logic
mydearxymOct 16, 2021
46b4af4
refactor: community setter logo
mydearxymOct 16, 2021
0ef886e
refactor(community-card): add slash for raw
mydearxymOct 16, 2021
8d7d069
chore: account-solid svg back-in
mydearxymOct 16, 2021
55f49b5
refactor(taglist): setter style adjust & re-org
mydearxymOct 16, 2021
0fc05e8
refactor(word-counter): add TSpace to WordCounter
mydearxymOct 16, 2021
7f8950d
refactor(community-tag-setter): debug with real data & re-org
mydearxymOct 17, 2021
a079589
refactor(tag-setter): basic workflow
mydearxymOct 17, 2021
940eeac
refactor: enhance publish after & tag, and style
mydearxymOct 18, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion.eslintignore
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -8,4 +8,5 @@ next-env.d.ts
*.png
*.jpeg
*.txt
*.md
*.md
*.ico
170 changes: 129 additions & 41 deletionspackage-lock.json
View file
Open in desktop

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletionpackage.json
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -41,7 +41,7 @@
},
"dependencies": {
"@babel/core": "^7.13.14",
"@groupher/react-editor": "^1.1.26",
"@groupher/react-editor": "^1.1.28",
"@next/bundle-analyzer": "^9.4.4",
"@sentry/browser": "5.17.0",
"@sentry/node": "5.17.0",
Expand DownExpand Up@@ -112,6 +112,7 @@
"resize-observer-polyfill": "^1.5.1",
"response-time": "^2.3.2",
"rxjs": "6.2.2",
"sanitize-html": "^2.5.2",
"scroll-into-view-if-needed": "1.5.0",
"sentry-testkit": "^2.1.0",
"store": "^2.0.12",
Expand Down
Binary file modifiedpublic/favicon.ico
View file
Open in desktop
Binary file not shown.
1 change: 1 addition & 0 deletionsserver/helper.js
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -9,6 +9,7 @@ const renderAndCache = ({ req, res, path }) => {
// do not cache in dev mode
if (dev) {
const pagePath = path || req.path
console.log('# pagePath: ', pagePath)
return app.render(req, res, pagePath, {
...req.query,
...req.params,
Expand Down
47 changes: 22 additions & 25 deletionsserver/routes.js
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
/* eslint-disable @typescript-eslint/no-var-requires */

const router = require('express').Router()
const R = require('ramda')

const app = require('./app')
const { renderAndCache } = require('./helper')
Expand All@@ -22,7 +21,7 @@ router.route('/oauth/').get((req, res) => renderAndCache({ req, res }))
// 将首页重定向到 HOME_PAGE
router
.route('/')
.get((req, res) => renderAndCache({ req, res, path: '/community' }))
.get((req, res) => renderAndCache({ req, res, path: '/index' }))

// 来一杯
router.route('/have-a-drink/:slug?').get((req, res) => {
Expand DownExpand Up@@ -85,7 +84,8 @@ router.route('/user/:userId').get((req, res) => {

// 帖子页
router.route('/post/:id').get((req, res) => {
return renderAndCache({ req, res, path: '/post' })
const { id } = req.params
return renderAndCache({ req, res, path: `/post/${id}` })
})

// job 帖子页
Expand All@@ -99,28 +99,34 @@ router.route('/:community/video/:id').get((req, res) => {
})

// repo 帖子页
router.route('/:community/repo/:id').get((req, res) => {
return renderAndCache({ req, res, path: '/repo' })
})
//router.route('/:community/repo/:id').get((req, res) => {
// return renderAndCache({ req, res, path: '/repo' })
//})

// 创建新社区
router.route('/create/community').get((req, res) => {
return renderAndCache({ req, res, page: '/create/community' })
router.route('/publish/community').get((req, res) => {
return renderAndCache({ req, res, page: '/publish/community' })
})

// 创建新帖子
router.route('/publish/post').get((req, res) => {
return renderAndCache({ req, res, page: '/publish/post' })
})

// 创建新内容
router.route('/create/article').get((req, res) => {
return renderAndCache({ req, res, page: '/create/article' })
// 编辑新帖子
router.route('/update/post/:id').get((req, res) => {
const { id } = req.params
return renderAndCache({ req, res, path: `/update/post/${id}` })
})

// 创建新博客
router.route('/create/blog').get((req, res) => {
return renderAndCache({ req, res, page: '/create/blog' })
router.route('/publish/blog').get((req, res) => {
return renderAndCache({ req, res, page: '/publish/blog' })
})

// 创建新作品
router.route('/create/works').get((req, res) => {
return renderAndCache({ req, res, page: '/create/works' })
router.route('/publish/works').get((req, res) => {
return renderAndCache({ req, res, page: '/publish/works' })
})

// 所有社区
Expand All@@ -137,16 +143,7 @@ router.route('/:community/help-center').get((req, res) => {

// 社区主页
router.route('/:community/:thread').get((req, res) => {
if (
R.has('preview', req.query) &&
R.has('id', req.query) &&
R.has('community', req.query)
) {
const { community, preview, id } = req.query
return res.redirect(`/${community}/${preview}/${id}`)
}

return renderAndCache({ req, res, path: '/community' })
return renderAndCache({ req, res, path: '/index' })
})

router.route('*').get((req, res) => handle(req, res))
Expand Down
6 changes: 3 additions & 3 deletionssrc/components/ArticleCard/Header.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,7 +4,7 @@ import type { TJob, TRadar } from '@/spec'
import { ICON } from '@/config'
import { THREAD } from '@/constant'
import { cutRest } from '@/utils/helper'
importInlineTags from '@/components/InlineTags'
importTagsList from '@/components/TagsList'
import { Br } from '@/components/Common'

import type { TProps as TIndex } from './index'
Expand DownExpand Up@@ -33,7 +33,7 @@ const Header: FC<TIndex> = ({ data, thread }) => {
<Br top={4} />
<Title>{cutRest(title, 100)}</Title>
<Br top={6} />
<InlineTags items={articleTags} mLeft={0} size="medium" />
<TagsList items={articleTags} mLeft={0} size="medium" />
</Wrapper>
)
}
Expand All@@ -43,7 +43,7 @@ const Header: FC<TIndex> = ({ data, thread }) => {

return (
<Wrapper>
<InlineTags items={articleTags} mLeft={0} size="medium" />
<TagsList items={articleTags} mLeft={0} size="medium" />
<Br top={10} />
<Title>
<ExtraInfo>
Expand Down
87 changes: 0 additions & 87 deletionssrc/components/ArticleEditToolbar/CopyrightSelector.js
View file
Open in desktop

This file was deleted.

71 changes: 0 additions & 71 deletionssrc/components/ArticleEditToolbar/index.js
View file
Open in desktop

This file was deleted.

View file
Open in desktop

This file was deleted.

Loading

[8]ページ先頭

©2009-2025 Movatter.jp