Skip to content

Commit

Permalink
update tran boxes borders, add preview files of tran in README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
abdfnx committed Feb 8, 2022
1 parent 5676756 commit 90125bb
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 17 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
<img src="https://raw.githubusercontent.com/abdfnx/tran/main/.github/assets/logo.svg" height="120px" />
</p>

<!-- Here's the demo file -->
![computer 1](https://user-images.githubusercontent.com/64256993/152999023-fbbe04aa-a4b5-449c-b589-27e1169cf851.gif)
![computer 2](https://user-images.githubusercontent.com/64256993/153002664-9c3db89e-5c71-4555-afa0-3866e37f5339.gif)

> 🖥️ Securely transfer and send anything between computers with TUI.
Expand All @@ -16,7 +17,7 @@
* Shell

```
curl -fsSL https://cutt.ly/tran | bash
curl -fsSL https://cutt.ly/tran-cli | bash
```

* PowerShell
Expand Down
6 changes: 3 additions & 3 deletions internal/tui/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ func New() Bubble {
cfg := config.GetConfig()
theme := theme.GetTheme("default")

primaryBoxBorder := lipgloss.NormalBorder()
secondaryBoxBorder := lipgloss.NormalBorder()
thirdBoxBorder := lipgloss.NormalBorder()
primaryBoxBorder := lipgloss.RoundedBorder()
secondaryBoxBorder := lipgloss.RoundedBorder()
thirdBoxBorder := lipgloss.RoundedBorder()
primaryBoxBorderColor := theme.ActiveBoxBorderColor
secondaryBoxBorderColor := theme.InactiveBoxBorderColor
thirdBoxBorderColor := theme.InactiveBoxBorderColor
Expand Down
11 changes: 2 additions & 9 deletions internal/tui/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -518,18 +518,11 @@ func (b Bubble) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
hc, _ := glamour.Render(constants.HelpContent, "dark")
ic, _ := glamour.Render(constants.InfoContent, "dark")

boxStyle := lipgloss.NewStyle().
BorderStyle(lipgloss.RoundedBorder()).
BorderTop(true).
BorderBottom(true).
BorderLeft(true).
BorderRight(true)

hs := lipgloss.NewStyle().
BorderStyle(lipgloss.DoubleBorder()).
BorderStyle(lipgloss.NormalBorder()).
BorderBottom(true)

b.thirdViewport.SetContent(hs.Render(hc) + "\n\n" + boxStyle.Render(ic))
b.thirdViewport.SetContent(hs.Render(hc) + "\n\n" + ic)

switch {
case b.showFileTreePreview:
Expand Down
6 changes: 3 additions & 3 deletions internal/tui/view.go
Original file line number Diff line number Diff line change
Expand Up @@ -271,9 +271,9 @@ func (b Bubble) View() string {
var secondaryBox string
var thirdBox string

primaryBoxBorder := lipgloss.NormalBorder()
secondaryBoxBorder := lipgloss.NormalBorder()
thirdBoxBorder := lipgloss.NormalBorder()
primaryBoxBorder := lipgloss.RoundedBorder()
secondaryBoxBorder := lipgloss.RoundedBorder()
thirdBoxBorder := lipgloss.RoundedBorder()
primaryBoxBorderColor := b.theme.InactiveBoxBorderColor
secondaryBoxBorderColor := b.theme.InactiveBoxBorderColor
thirdBoxBorderColor := b.theme.InactiveBoxBorderColor
Expand Down

0 comments on commit 90125bb

Please sign in to comment.