Skip to content

Commit bdc7764

Browse files
committed
Remove Apply action button from prompt view footer
- from prompt view's footer, remove 'apply' button └── apps └── editor └── src └── views └── prompt └── frontend ├── Prompt.tsx ├── components │ └── Layout │ ├── Footer │ │ ├── Footer.tsx │ │ └── index.ts │ └── Layout.tsx ├── contexts │ └── LayoutContext.tsx └── i18n └── translations └── footer.ts
1 parent 4027c6e commit bdc7764

4 files changed

Lines changed: 2 additions & 40 deletions

File tree

‎apps/editor/src/views/prompt/frontend/Prompt.tsx‎

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -207,12 +207,6 @@ export const Prompt = () => {
207207
return undefined
208208
}
209209

210-
const handle_apply_click = () => {
211-
post_message(vscode, {
212-
command: 'APPLY'
213-
})
214-
}
215-
216210
const handle_history_click = () => {
217211
post_message(vscode, {
218212
command: 'EXECUTE_COMMAND',
@@ -271,7 +265,6 @@ export const Prompt = () => {
271265
can_undo,
272266
has_changes_to_commit,
273267
target,
274-
on_apply_click: handle_apply_click,
275268
on_undo_click: handle_undo_click,
276269
on_commit_click: handle_commit_action_click
277270
}

‎apps/editor/src/views/prompt/frontend/components/Layout/Footer/Footer.tsx‎

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,8 @@ type Props = {
1515
}
1616

1717
export const Footer: React.FC<Props> = (props) => {
18-
const {
19-
can_undo,
20-
has_changes_to_commit,
21-
on_apply_click,
22-
on_undo_click,
23-
on_commit_click
24-
} = useContext(LayoutContext)
18+
const { can_undo, has_changes_to_commit, on_undo_click, on_commit_click } =
19+
useContext(LayoutContext)
2520
const { t } = use_translation()
2621
const { container_ref, compact_step } = use_compacting()
2722

@@ -96,12 +91,6 @@ export const Footer: React.FC<Props> = (props) => {
9691
codicon="git-pull-request-comment"
9792
label={t('footer.action.commit')}
9893
/>
99-
<CompactableActionButton
100-
is_compact={compact_step >= 4}
101-
on_click={on_apply_click}
102-
codicon="sparkle"
103-
label={t('footer.action.apply')}
104-
/>
10594
</div>
10695
{props.is_home_active && (
10796
<span className={styles['footer__happy-coding']}>

‎apps/editor/src/views/prompt/frontend/contexts/LayoutContext.tsx‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ type LayoutContextType = {
55
can_undo: boolean
66
has_changes_to_commit: boolean
77
target: Target
8-
on_apply_click: () => void
98
on_undo_click: () => void
109
on_commit_click: () => void
1110
}
@@ -14,7 +13,6 @@ export const LayoutContext = createContext<LayoutContextType>({
1413
can_undo: false,
1514
has_changes_to_commit: false,
1615
target: 'WEB',
17-
on_apply_click: () => {},
1816
on_undo_click: () => {},
1917
on_commit_click: () => {}
2018
})

‎apps/editor/src/views/prompt/frontend/i18n/translations/footer.ts‎

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -35,24 +35,6 @@ export const footer = {
3535
hu: 'Véglegesítés',
3636
bg: 'Комитни'
3737
},
38-
'footer.action.apply': {
39-
en: 'Apply',
40-
pl: 'Integruj',
41-
'zh-cn': '应用',
42-
ja: '適用',
43-
'zh-tw': '套用',
44-
de: 'Anwenden',
45-
es: 'Aplicar',
46-
fr: 'Appliquer',
47-
'pt-br': 'Aplicar',
48-
ru: 'Применить',
49-
ko: '적용',
50-
it: 'Applica',
51-
tr: 'Uygula',
52-
cs: 'Použít',
53-
hu: 'Alkalmazás',
54-
bg: 'Приложи'
55-
},
5638
'footer.action.undo': {
5739
en: 'Undo',
5840
pl: 'Cofnij',

0 commit comments

Comments
 (0)