-
Notifications
You must be signed in to change notification settings - Fork 0
/
popup.html
163 lines (150 loc) · 8.36 KB
/
popup.html
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>GitLab URL Settings</title>
<style>
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
margin: 0;
padding: 20px;
width: 350px;
background-color: #f7f7f7;
color: #333;
}
h2 {
color: #4a4a4a;
margin-bottom: 20px;
text-align: center;
font-size: 24px;
}
form {
background-color: white;
padding: 20px;
border-radius: 8px;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
label {
display: block;
margin-bottom: 5px;
font-weight: bold;
color: #555;
}
input[type="text"], select, input[type="submit"] {
width: 100%;
padding: 10px;
margin-bottom: 15px;
border: 1px solid #ddd;
border-radius: 4px;
box-sizing: border-box;
font-size: 14px;
}
select {
appearance: none;
background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23007CB2%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E');
background-repeat: no-repeat;
background-position: right 10px top 50%;
background-size: 12px auto;
}
input[type="submit"] {
background-color: #fc6d26;
color: white;
border: none;
cursor: pointer;
transition: background-color 0.3s;
font-weight: bold;
}
input[type="submit"]:hover {
background-color: #e24329;
}
#status {
margin-top: 15px;
text-align: center;
font-weight: bold;
}
#gitService {
display: flex;
justify-content: space-between;
margin-bottom: 15px;
}
#gitService input[type="radio"] {
position: absolute;
opacity: 0;
width: 1px;
height: 1px;
overflow: hidden;
}
#gitService label {
display: flex;
align-items: center;
padding: 8px 12px;
background-color: #f1f1f1;
border-radius: 4px;
cursor: pointer;
border: 1px solid #ddd;
font-weight: bold;
transition: background-color 0.3s, border-color 0.3s;
}
#gitService input[type="radio"]:checked + label {
background-color: #fc6d26;
color: white;
border-color: #fc6d26;
}
#gitService label:hover {
background-color: #e1e1e1;
border-color: #ccc;
}
#gitService input[type="radio"]:checked + label:hover {
background-color: #e24329;
border-color: #e24329;
}
</style>
</head>
<body>
<h2>Github/GitLab URL Settings</h2>
<form id="urlForm">
<label for="gitService">Select Git Service:</label>
<div id="gitService">
<input type="radio" id="gitlab" name="gitService" value="gitlab" >
<label for="gitlab">
<svg style="margin-right: 10px;" fill="#000000" width="24px" height="24px" viewBox="0 0 256 256" xmlns="http://www.w3.org/2000/svg">
<path d="M227.37415,163.20266l-94.82044,65.645a8.00047,8.00047,0,0,1-9.10736,0l-94.82043-65.645a8.00029,8.00029,0,0,1-3.17621-8.63916L52.77905,52.07863a4,4,0,0,1,7.61023-.374L83,112h90l22.61072-60.29541a4.00007,4.00007,0,0,1,7.61029.374L230.55035,154.5635A8.0003,8.0003,0,0,1,227.37415,163.20266Z" opacity="0.2"></path>
<path d="M238.28027,152.50246,210.95068,50.01662a12.00021,12.00021,0,0,0-22.83056-1.12109L167.45605,104H88.544L67.87988,48.89651a12.00012,12.00012,0,0,0-22.831,1.12109L17.71973,152.50246a16.03981,16.03981,0,0,0,6.35254,17.27783l94.82031,65.64454a16.07612,16.07612,0,0,0,18.21484,0l94.82031-65.64454A16.03981,16.03981,0,0,0,238.28027,152.50246ZM128,222.26955,33.17969,156.625,57.2876,66.21877,75.50928,114.8091A7.99963,7.99963,0,0,0,83,120h90a7.99963,7.99963,0,0,0,7.49072-5.19092L198.7124,66.21877,222.82031,156.625Z"></path>
</svg>
GitLab</label>
<input type="radio" id="github" name="gitService" value="github" >
<label for="github">
<svg style="margin-right: 10px;" fill="#000000" width="24px" height="24px" viewBox="0 0 256 256" id="Flat" xmlns="http://www.w3.org/2000/svg">
<path d="M200,112v8a47.99987,47.99987,0,0,1-48,48H104a47.99987,47.99987,0,0,1-48-48v-8a49.25725,49.25725,0,0,1,8.51172-27.29639A51.90015,51.90015,0,0,1,68,40a51.96059,51.96059,0,0,1,43.8252,23.99927l32.3496.00049A51.95917,51.95917,0,0,1,188,40a51.90015,51.90015,0,0,1,3.48828,44.70361A49.25725,49.25725,0,0,1,200,112Z" opacity="0.2"/>
<path d="M216,216a16.01833,16.01833,0,0,1-16-16v-8a31.9949,31.9949,0,0,0-14.78076-26.95068A55.951,55.951,0,0,0,208,120v-8a58.04124,58.04124,0,0,0-7.69531-28.32031A59.73339,59.73339,0,0,0,194.92822,36,7.99908,7.99908,0,0,0,188,32a59.74792,59.74792,0,0,0-48.00781,24l-23.98487-.001A59.74952,59.74952,0,0,0,68,32a7.99908,7.99908,0,0,0-6.92822,4,59.73551,59.73551,0,0,0-5.377,47.67969A58.0419,58.0419,0,0,0,48,112v8a55.951,55.951,0,0,0,22.78076,45.04932A31.9949,31.9949,0,0,0,56,192v8a16.01833,16.01833,0,0,1-16,16,8,8,0,0,0,0,16,32.03667,32.03667,0,0,0,32-32v-8a16.01833,16.01833,0,0,1,16-16h12v40a16.01833,16.01833,0,0,1-16,16,8,8,0,0,0,0,16,32.03667,32.03667,0,0,0,32-32V176h24v40a32.03667,32.03667,0,0,0,32,32,8,8,0,0,0,0-16,16.01833,16.01833,0,0,1-16-16V176h12a16.01833,16.01833,0,0,1,16,16v8a32.03667,32.03667,0,0,0,32,32,8,8,0,0,0,0-16ZM64,120v-8A41.77977,41.77977,0,0,1,70.90088,89.5176a7.99937,7.99937,0,0,0,1.07666-7.6875,43.82564,43.82564,0,0,1,.78906-33.5752,43.84232,43.84232,0,0,1,32.32129,20.05762,7.99912,7.99912,0,0,0,6.73682,3.68652L144.17432,72h.00048a8.00058,8.00058,0,0,0,6.73731-3.68652A43.84259,43.84259,0,0,1,183.2334,48.2549a43.8234,43.8234,0,0,1,.78857,33.5752,8.08338,8.08338,0,0,0,1.04932,7.65039A41.7664,41.7664,0,0,1,192,112v8a40.04551,40.04551,0,0,1-40,40H104A40.04551,40.04551,0,0,1,64,120Z"/>
</svg>
GitHub</label>
</div>
<label for="gitUrl" id="gitUrlLabel">GitHub/GitLab Project URL:</label>
<input type="text" id="gitUrl" placeholder="Add Github / GitLab Branch Link e.g., https://gitlab.com/your-project" required>
<label for="username">Linear Username:</label>
<input type="text" id="username" placeholder="Your Linear username" required>
<label for="branchFormat">Branch Format:</label>
<select id="branchFormat" required>
<option value="" disabled selected>Select a GitLab Link format</option>
<option value="username/identifier-title">username/identifier-title</option>
<option value="username/identifier">username/identifier</option>
<option value="username-identifier-title">username-identifier-title</option>
<option value="username-identifier">username-identifier</option>
<option value="identifier-title">identifier-title</option>
<option value="title-identifier">title-identifier</option>
<option value="identifier">identifier</option>
<option value="feature/identifier-title">feature/identifier-title</option>
<option value="feature/identifier">feature/identifier</option>
</select>
<input type="submit" value="Save Settings">
<div id="hint" style="display: none; color: #a3a2a0; margin-top: 2px;">
Please reload the page to see the changes.
</div>
<div id="serviceError" style="color: red; display: none; margin-bottom: 10px;font-size: 14px;"></div>
</form>
<div id="status"></div>
<script src="popup.js"></script>
</body>
</html>