Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Close Workspace Action #814

Merged
merged 1 commit into from
Apr 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 CodeApp/Localization/de.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@
"OUTPUT" = "OUTPUT";
"Options" = "Optionen";
"Close All" = "Alles schliessen";
"Close Workspace" = "Arbeitsbereich schliessen";
"Preview in Safari" = "Vorschau in Safari";
"Mini Map" = "Minikarte";
"Line Numbers" = "Zeilennummern";
Expand Down Expand Up @@ -292,7 +293,7 @@

"Share" = "Teilen";
"Rename" = "Umbenennen";
"Assign as workplace folder" = "Als Arbeitsplatzordner zuweisen";
"Assign as workspace folder" = "Als Arbeitsbereichsordner zuweisen";
"Select for compare" = "Zum Vergleich auswählen";
"Compare with selected" = "Vergleiche mit ausgewählten";
"Version Control" = "Versionskontrolle";
Expand Down
3 changes: 2 additions & 1 deletion CodeApp/Localization/ja.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@
"OUTPUT" = "アウトプット";
"Options" = "オプション";
"Close All" = "すべて閉じる";
"Close Workspace" = "ワークスペースを閉じる";
"Preview in Safari" = "Safariで開く";
"Mini Map" = "ミニマップ";
"Line Numbers" = "行番号";
Expand Down Expand Up @@ -293,7 +294,7 @@

"Share" = "共有";
"Rename" = "名前の変更";
"Assign as workplace folder" = "ワークスペースのフォルダに割り当てる";
"Assign as workspace folder" = "ワークスペースのフォルダに割り当てる";
"Select for compare" = "比較対象を選択";
"Compare with selected" = "選択項目の比較";
"Version Control" = "バージョン管理";
Expand Down
3 changes: 2 additions & 1 deletion CodeApp/Localization/ko.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@
"OUTPUT" = "출력";
"Options" = "옵션";
"Close All" = "모두 닫기";
"Close Workspace" = "작업 공간(Workspace) 닫기";
"Preview in Safari" = "Safari에서 미리보기";
"Mini Map" = "미니맵";
"Line Numbers" = "행 번호";
Expand Down Expand Up @@ -292,7 +293,7 @@

"Share" = "공유";
"Rename" = "이름 바꾸기";
"Assign as workplace folder" = "작업 공간(Workplace) 폴더로 지정하기";
"Assign as workspace folder" = "작업 공간(Workspace) 폴더로 지정하기";
"Select for compare" = "비교를 위해 선택하기";
"Compare with selected" = "선택 항목과 비교하기";
"Version Control" = "형상 관리";
Expand Down
3 changes: 2 additions & 1 deletion CodeApp/Localization/zh-Hans.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@
"OUTPUT" = "输出";
"Options" = "选项";
"Close All" = "全部关闭";
"Close Workspace" = "关闭工作区";
"Preview in Safari" = "在 Safari 中预览";
"Mini Map" = "小地图";
"Line Numbers" = "行号";
Expand Down Expand Up @@ -286,7 +287,7 @@

"Share" = "分享";
"Rename" = "重命名";
"Assign as workplace folder" = "设置为工作文件夹";
"Assign as workspace folder" = "设置为工作文件夹";
"Select for compare" = "选择进行比较";
"Compare with selected" = "与选定内容做比较";
"Version Control" = "版本控制";
Expand Down
2 changes: 1 addition & 1 deletion CodeApp/Views/ExplorerCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ private struct ContextMenu: View {
Button(action: {
App.loadFolder(url: URL(string: item.url)!)
}) {
Text("Assign as workplace folder")
Text("Assign as workspace folder")
Image(systemName: "folder.badge.gear")
}
}
Expand Down
8 changes: 8 additions & 0 deletions CodeApp/Views/TopBar.swift
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,14 @@ struct TopBar: View {
} label: {
Label("Close All", systemImage: "xmark")
}
Button(role: .destructive) {
App.loadFolder(url: getRootDirectory())
DispatchQueue.main.async {
App.showWelcomeMessage()
}
} label: {
Label("Close Workspace", systemImage: "xmark")
}
}
Divider()
Section {
Expand Down