feat(desktop): show skill issue when snapshotting is off (#16432)
This commit is contained in:
@@ -512,6 +512,7 @@ export const dict = {
|
|||||||
"session.review.loadingChanges": "Loading changes...",
|
"session.review.loadingChanges": "Loading changes...",
|
||||||
"session.review.empty": "No changes in this session yet",
|
"session.review.empty": "No changes in this session yet",
|
||||||
"session.review.noVcs": "No Git Version Control System detected, changes not displayed",
|
"session.review.noVcs": "No Git Version Control System detected, changes not displayed",
|
||||||
|
"session.review.noSnapshot": "Snapshot tracking is disabled in config, so session changes are unavailable",
|
||||||
"session.review.noChanges": "No changes",
|
"session.review.noChanges": "No changes",
|
||||||
|
|
||||||
"session.files.selectToOpen": "Select a file to open",
|
"session.files.selectToOpen": "Select a file to open",
|
||||||
|
|||||||
@@ -495,8 +495,9 @@ export default function Page() {
|
|||||||
})
|
})
|
||||||
const reviewEmptyKey = createMemo(() => {
|
const reviewEmptyKey = createMemo(() => {
|
||||||
const project = sync.project
|
const project = sync.project
|
||||||
if (!project || project.vcs) return "session.review.empty"
|
if (project && !project.vcs) return "session.review.noVcs"
|
||||||
return "session.review.noVcs"
|
if (sync.data.config.snapshot === false) return "session.review.noSnapshot"
|
||||||
|
return "session.review.empty"
|
||||||
})
|
})
|
||||||
|
|
||||||
function upsert(next: Project) {
|
function upsert(next: Project) {
|
||||||
|
|||||||
@@ -60,6 +60,12 @@ export function SessionSidePanel(props: {
|
|||||||
return sync.data.session_diff[id] !== undefined
|
return sync.data.session_diff[id] !== undefined
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const reviewEmptyKey = createMemo(() => {
|
||||||
|
if (sync.project && !sync.project.vcs) return "session.review.noVcs"
|
||||||
|
if (sync.data.config.snapshot === false) return "session.review.noSnapshot"
|
||||||
|
return "session.review.noChanges"
|
||||||
|
})
|
||||||
|
|
||||||
const diffFiles = createMemo(() => diffs().map((d) => d.file))
|
const diffFiles = createMemo(() => diffs().map((d) => d.file))
|
||||||
const kinds = createMemo(() => {
|
const kinds = createMemo(() => {
|
||||||
const merge = (a: "add" | "del" | "mix" | undefined, b: "add" | "del" | "mix") => {
|
const merge = (a: "add" | "del" | "mix" | undefined, b: "add" | "del" | "mix") => {
|
||||||
@@ -387,7 +393,7 @@ export function SessionSidePanel(props: {
|
|||||||
/>
|
/>
|
||||||
</Show>
|
</Show>
|
||||||
</Match>
|
</Match>
|
||||||
<Match when={true}>{empty(language.t("session.review.noChanges"))}</Match>
|
<Match when={true}>{empty(language.t(reviewEmptyKey()))}</Match>
|
||||||
</Switch>
|
</Switch>
|
||||||
</Tabs.Content>
|
</Tabs.Content>
|
||||||
<Tabs.Content value="all" class="bg-background-stronger px-3 py-0">
|
<Tabs.Content value="all" class="bg-background-stronger px-3 py-0">
|
||||||
|
|||||||
Reference in New Issue
Block a user