Make missing markdown path selectable (#1042)

Co-authored-by: cmux <cmux@cmuxs-Mac-mini.local>
This commit is contained in:
Lawrence Chen 2026-03-07 02:15:55 -08:00 committed by GitHub
parent e7c3961489
commit 3432a4a941
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 39 additions and 3 deletions

View file

@ -72685,6 +72685,40 @@
}
}
}
},
"markdown.fileUnavailable.message": {
"extractionState": "manual",
"localizations": {
"en": {
"stringUnit": {
"state": "translated",
"value": "The file may have been moved or deleted."
}
},
"ja": {
"stringUnit": {
"state": "translated",
"value": "ファイルが移動または削除された可能性があります。"
}
}
}
},
"markdown.fileUnavailable.title": {
"extractionState": "manual",
"localizations": {
"en": {
"stringUnit": {
"state": "translated",
"value": "File unavailable"
}
},
"ja": {
"stringUnit": {
"state": "translated",
"value": "ファイルを利用できません"
}
}
}
}
}
}

View file

@ -86,15 +86,17 @@ struct MarkdownPanelView: View {
Image(systemName: "doc.questionmark")
.font(.system(size: 40))
.foregroundColor(.secondary)
Text("File unavailable")
Text(String(localized: "markdown.fileUnavailable.title", defaultValue: "File unavailable"))
.font(.headline)
.foregroundColor(.primary)
Text(panel.filePath)
.font(.system(size: 12, design: .monospaced))
.foregroundColor(.secondary)
.lineLimit(2)
.multilineTextAlignment(.center)
Text("The file may have been moved or deleted.")
.textSelection(.enabled)
.fixedSize(horizontal: false, vertical: true)
.padding(.horizontal, 24)
Text(String(localized: "markdown.fileUnavailable.message", defaultValue: "The file may have been moved or deleted."))
.font(.caption)
.foregroundColor(.secondary)
}