(client *api.Client)
| 50 | } |
| 51 | |
| 52 | func NewSnapshotCreateModel(client *api.Client) snapshotCreateModel { |
| 53 | styles := NewPanelStyles() |
| 54 | |
| 55 | ti := textinput.New() |
| 56 | ti.Placeholder = "" |
| 57 | ti.CharLimit = 50 |
| 58 | ti.Width = 40 |
| 59 | ti.Prompt = "▶ " |
| 60 | ti.PromptStyle = styles.Cursor |
| 61 | ti.TextStyle = styles.Cursor |
| 62 | ti.PlaceholderStyle = styles.Cursor |
| 63 | ti.Cursor.Style = styles.Cursor |
| 64 | |
| 65 | s := NewPrimarySpinner() |
| 66 | |
| 67 | return snapshotCreateModel{ |
| 68 | step: snapshotCreateStepSelectInstance, |
| 69 | client: client, |
| 70 | nameInput: ti, |
| 71 | spinner: s, |
| 72 | styles: styles, |
| 73 | warningBox: WarningBoxStyle().MarginTop(1).MarginBottom(1), |
| 74 | } |
| 75 | } |
| 76 | |
| 77 | type snapshotCreateInstancesMsg struct { |
| 78 | instances []api.Instance |
no test coverage detected