-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconstants.go
More file actions
73 lines (62 loc) · 3.16 KB
/
constants.go
File metadata and controls
73 lines (62 loc) · 3.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
/*
MIT License
Copyright (c) 2026 Jan Van Herck (https://github.com/jvherck)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
/*
This file defines the core constants used throughout the Git Janitor application, including UI colors, layout
dimensions, interactive symbols, and default branch names.
*/
package main
// SortMode defines the available sorting orders for the branch list.
type SortMode int
const (
SortAlphabetical SortMode = iota
SortLatestCommits
SortOldestCommits
)
// UI color definitions for the application's interface.
// These accept standard ANSI color codes (e.g., "62") or Hex codes (e.g., "#8839ef").
const (
ColorPrimary = "#38BDF8" // Used for primary borders, selected item titles, and the confirm dialog
ColorSecondary = "#7DD3FC" // Used for selected item descriptions and the summary box border
ColorTextMuted = "#64748B" // Used for footer help text and version details
ColorSuccess = "#4ADE80" // Used for success message headers and help key columns
ColorWarning = "#FB923C" // Used for error and warning message headers
ColorTitle = "#FBBF24" // Used for the summary and help menu title text
)
// Layout and sizing constraints to maintain consistent spacing across different views.
const (
DocMarginVertical = 1 // Vertical margin around the main list
DocMarginHorizontal = 2 // Horizontal margin around the main list
DialogPaddingVertical = 1 // Vertical padding inside dialog boxes
ConfirmPaddingHorizontal = 4 // Horizontal padding inside the confirmation dialog
SummaryPaddingHorizontal = 3 // Horizontal padding inside the final summary box
SummaryBoxWidth = 50 // Fixed width for the final summary box
)
// UI text symbols for the interactive branch list.
const (
SymbolProtected = "🔒 " // Prefix for branches that cannot be deleted
SymbolSelected = "[x] " // Prefix for branches marked for deletion
SymbolUnselected = "[ ] " // Prefix for branches not currently selected
)
// Standard branch names used for fallback checks and default protections.
const (
BranchMain = "main" // Standard primary branch name
BranchMaster = "master" // Legacy/Standard primary branch name
BranchDev = "dev" // Standard development branch name
)