release: v0.2.2 - cross-platform paths, health version, update-check hardening, clean packaging
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { Fragment, useCallback, useEffect, useRef, useState } from 'react'
|
||||
import { parentPathOf } from './pathutil'
|
||||
import { Terminal } from 'xterm'
|
||||
|
||||
import MarkdownIt from 'markdown-it'
|
||||
@@ -253,14 +254,6 @@ async function postJson(url: string, body: unknown): Promise<any> {
|
||||
return res.json()
|
||||
}
|
||||
|
||||
function parentPathOf(p: string): string {
|
||||
const idx = Math.max(p.lastIndexOf('/'), p.lastIndexOf('\\'))
|
||||
if (idx <= 0) return p
|
||||
let parent = p.slice(0, idx)
|
||||
if (/^[A-Za-z]:$/.test(parent)) parent += '\\'
|
||||
return parent
|
||||
}
|
||||
|
||||
/** 拖拽换位暂存 */
|
||||
let dragPane: { row: PaneRow; index: number } | null = null
|
||||
/** 标签拖拽暂存(跨窗移动) */
|
||||
|
||||
Reference in New Issue
Block a user