5 个已改动文件
src/navigation.ts
未暂存
12 export type View = 'changes' | 'history' | 'files';12 export type View = 'changes' | 'history' | 'files';13 1314 const views: View[] = ['changes', 'history', 'files'];14 const views: View[] = ['changes', 'history', 'files'];15 1516 export function nextView(current: View) {16 export function nextView(current: View) {17- return views[current + 1];17+ const index = views.indexOf(current);18+ return views[(index + 1) % views.length];18 }19 }19 2020 export function previousView(current: View) {21 export function previousView(current: View) {21 const index = views.indexOf(current);22 const index = views.indexOf(current);22 return views[(index - 1 + views.length) % views.length];23 return views[(index - 1 + views.length) % views.length];23 }24 }32 export const shortcuts = {33 export const shortcuts = {34+ nextView: 'Mod+Alt+ArrowRight',33 };35 };
变更文件 2
Refine workspace navigationa6f203d · Alice · 2 分钟前
src/navigation.ts
12 export type View = 'changes' | 'history' | 'files';12 export type View = 'changes' | 'history' | 'files';13 1314 const views: View[] = ['changes', 'history', 'files'];14 const views: View[] = ['changes', 'history', 'files'];15 1516 export function nextView(current: View) {16 export function nextView(current: View) {17- return views[current + 1];17+ const index = views.indexOf(current);18+ return views[(index + 1) % views.length];18 }19 }19 2020 export function previousView(current: View) {21 export function previousView(current: View) {21 const index = views.indexOf(current);22 const index = views.indexOf(current);22 return views[(index - 1 + views.length) % views.length];23 return views[(index - 1 + views.length) % views.length];23 }24 }32 export const shortcuts = {33 export const shortcuts = {34+ nextView: 'Mod+Alt+ArrowRight',33 };35 };
Stash
工作区导航基于 main · 1 小时前
docs/navigation.md
1 # Workspace navigation1 # Workspace navigation2 23 Select a view in the sidebar.3 Select a view in the sidebar.4+Use Mod+Alt+ArrowRight to cycle through views.
文件
src
src/navigation.tsTypeScript
12
export type View = 'changes' | 'history' | 'files';13
14
const views: View[] = ['changes', 'history', 'files'];15
16
export function nextView(current: View) {17
const index = views.indexOf(current);18
return views[(index + 1) % views.length];19
}20
21
export function previousView(current: View) {22
const index = views.indexOf(current);23
return views[(index - 1 + views.length) % views.length];24
}33
export const shortcuts = {34
nextView: 'Mod+Alt+ArrowRight',35
};高颜值, 也顺手。
明暗主题、清晰的代码高亮、可调节的面板。从文件列表到差异视图,细节保持一致。
atlasmain
Msrc/navigation.ts
12 export type View = 'changes' | 'history' | 'files';1314 const views: View[] = ['changes', 'history', 'files'];1516 export function nextView(current: View) {17- return views[current + 1];17+ const index = views.indexOf(current);18+ return views[(index + 1) % views.length];19 }2021 export function previousView(current: View) {22 const index = views.indexOf(current);23 return views[(index - 1 + views.length) % views.length];24 }33 export const shortcuts = {34+ nextView: 'Mod+Alt+ArrowRight',35 };
工作区外观
Rust 内核, 轻快运行。
用 Rust 与 Tauri 构建,直接调用本机 Git 和 p4。沿用已有配置,接着用熟悉的工作流。
Git 与 Perforce, 一个客户端就够。
在 Git 中按行暂存改动、变基分支。在 Perforce 中审阅待提交的 Changelist,跨 Stream 恢复 Shelf 中的文件,并在提交前解决冲突。
为游戏程序员 量身打造。
代码、关卡、美术资源,放在同一个客户端。Git LFS、Perforce 文件锁和图片差异,为游戏开发的日常流程准备。