Skip to content

Commit af0d154

Browse files
committed
🔧 change route
1 parent 5305396 commit af0d154

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

app/initialize.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,10 @@ async function initialize () {
1616

1717
await step('[0] Get spaceKey from window.location', () => {
1818
let spaceKey = null
19-
if (config.isPlatform) {
20-
const wsPathPattern = /^\/ws\/([^\/]+)$/
21-
const match = wsPathPattern.exec(urlPath)
22-
if (match) spaceKey = match[1]
23-
}
19+
const wsPathPattern = /^\/ws\/([^\/]+)\/?$/
20+
const match = wsPathPattern.exec(urlPath)
21+
if (match) spaceKey = match[1]
22+
2423
if (!spaceKey) spaceKey = qs.parse(window.location.hash.slice(1)).spaceKey
2524
if (spaceKey) config.spaceKey = spaceKey
2625
return true

app/workspaces_standalone/WorkspaceList.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ class WorkspaceList extends Component {
8686
<div className='workspace-name'>{ws.projectName}</div>
8787
<div className='workspace-action'>
8888
<a className='btn btn-default'
89-
href={'/workspace.html#spaceKey=' + ws.spaceKey}
89+
href={`/ws/${ws.spaceKey}`}
9090
onClick={e => openWorkspace(ws)}>Open</a>
9191
<button className='btn btn-danger'
9292
style={{marginLeft: '4px'}}

0 commit comments

Comments
 (0)