|
1 | 1 | <template> |
2 | | - <div v-if="!isCreate" class="mt-6 border-t border-gray-200 pt-6 dark:border-gray-700"> |
3 | | - <h3 class="mb-4 text-lg font-bold text-gray-800 dark:text-gray-200"> |
| 2 | + <div v-if="!isCreate" class="mt-6 border-t border-line pt-6"> |
| 3 | + <h3 class="mb-4 text-base font-semibold text-ink"> |
4 | 4 | GitHub Integration |
5 | 5 | </h3> |
6 | 6 |
|
7 | 7 | <div v-if="loading" class="flex items-center justify-center py-8"> |
8 | | - <div class="h-8 w-8 animate-spin rounded-full border-4 border-blue-500 border-t-transparent"></div> |
| 8 | + <div class="h-8 w-8 animate-spin rounded-full border-4 border-brand border-t-transparent"></div> |
9 | 9 | </div> |
10 | 10 |
|
11 | | - <div v-else-if="!status.has_installation" class="rounded-lg border border-gray-300 bg-gray-50 p-6 dark:border-gray-600 dark:bg-gray-800"> |
12 | | - <div class="mb-4"> |
13 | | - <svg class="mx-auto h-12 w-12 text-gray-400" fill="none" stroke="currentColor" viewBox="0 0 24 24"> |
14 | | - <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path> |
15 | | - </svg> |
| 11 | + <div v-else-if="!status.has_installation" class="rounded-card border border-line bg-surface-sunken p-6 shadow-tmgr-xs"> |
| 12 | + <div class="mb-4 flex justify-center"> |
| 13 | + <div class="flex h-12 w-12 items-center justify-center rounded-pill bg-surface text-ink-subtle"> |
| 14 | + <svg class="h-6 w-6" fill="none" stroke="currentColor" viewBox="0 0 24 24"> |
| 15 | + <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path> |
| 16 | + </svg> |
| 17 | + </div> |
16 | 18 | </div> |
17 | | - <h4 class="mb-2 text-center text-lg font-semibold text-gray-700 dark:text-gray-300"> |
| 19 | + <h4 class="mb-2 text-center text-base font-semibold text-ink"> |
18 | 20 | Connect GitHub Repository |
19 | 21 | </h4> |
20 | | - <p class="mb-4 text-center text-sm text-gray-600 dark:text-gray-400"> |
| 22 | + <p class="mx-auto mb-5 max-w-md text-center text-sm text-ink-muted"> |
21 | 23 | Link your GitHub repository to automatically track commits, branches, and pull requests |
22 | 24 | </p> |
23 | 25 | <button |
24 | 26 | @click="installGitHubApp" |
25 | 27 | :disabled="installing" |
26 | | - class="mx-auto block rounded bg-gray-800 px-6 py-2 font-semibold text-white transition hover:bg-gray-700 disabled:opacity-50 dark:bg-gray-700 dark:hover:bg-gray-600" |
| 28 | + class="mx-auto flex h-10 items-center justify-center rounded-pill bg-brand px-6 text-sm font-semibold text-white shadow-tmgr-xs transition-colors hover:bg-brand-hover disabled:opacity-50" |
27 | 29 | > |
28 | | - <span v-if="installing">Installing...</span> |
| 30 | + <span v-if="installing">Installing…</span> |
29 | 31 | <span v-else>Install GitHub App</span> |
30 | 32 | </button> |
31 | 33 | </div> |
32 | 34 |
|
33 | 35 | <div v-else-if="!status.repository" class="space-y-4"> |
34 | | - <div class="rounded-lg border border-green-200 bg-green-50 p-4 dark:border-green-800 dark:bg-green-900/20"> |
35 | | - <p class="text-sm text-green-700 dark:text-green-400"> |
| 36 | + <div class="rounded-card border border-status-done/40 bg-status-done-bg p-4"> |
| 37 | + <p class="text-sm text-status-done-fg"> |
36 | 38 | ✓ GitHub App is installed. Select a repository to connect: |
37 | 39 | </p> |
38 | 40 | </div> |
39 | 41 |
|
40 | | - <div v-if="status.available_repositories.length === 0" class="rounded-lg border border-yellow-200 bg-yellow-50 p-4 dark:border-yellow-800 dark:bg-yellow-900/20"> |
41 | | - <p class="text-sm text-yellow-700 dark:text-yellow-400"> |
| 42 | + <div v-if="status.available_repositories.length === 0" class="rounded-card border border-status-fix/40 bg-status-fix-bg p-4"> |
| 43 | + <p class="text-sm text-status-fix-fg"> |
42 | 44 | No repositories available. Make sure the GitHub App has access to your repositories. |
43 | 45 | </p> |
44 | 46 | </div> |
45 | 47 |
|
46 | 48 | <div v-else> |
47 | | - <label class="mb-2 block text-sm font-bold text-gray-700 dark:text-gray-300"> |
| 49 | + <label class="mb-2 block text-sm font-semibold text-ink"> |
48 | 50 | Select Repository |
49 | 51 | </label> |
50 | 52 | <select |
51 | 53 | v-model="selectedRepo" |
52 | | - class="w-full rounded border border-gray-300 bg-white px-3 py-2 text-gray-700 focus:border-blue-500 focus:outline-none dark:border-gray-600 dark:bg-gray-800 dark:text-gray-300" |
| 54 | + class="h-10 w-full rounded-card border border-line bg-surface px-3 text-sm text-ink outline-none focus:border-line-strong" |
53 | 55 | > |
54 | | - <option :value="null">-- Select repository --</option> |
| 56 | + <option :value="null">— Select repository —</option> |
55 | 57 | <option |
56 | 58 | v-for="repo in status.available_repositories" |
57 | 59 | :key="repo.id" |
|
64 | 66 | <button |
65 | 67 | @click="connectRepository" |
66 | 68 | :disabled="!selectedRepo || connecting" |
67 | | - class="mt-4 rounded bg-blue-500 px-6 py-2 font-semibold text-white transition hover:bg-blue-600 disabled:cursor-not-allowed disabled:opacity-50" |
| 69 | + class="mt-4 inline-flex h-10 items-center justify-center rounded-pill bg-brand px-6 text-sm font-semibold text-white shadow-tmgr-xs transition-colors hover:bg-brand-hover disabled:cursor-not-allowed disabled:opacity-50" |
68 | 70 | > |
69 | | - <span v-if="connecting">Connecting...</span> |
| 71 | + <span v-if="connecting">Connecting…</span> |
70 | 72 | <span v-else>Connect Repository</span> |
71 | 73 | </button> |
72 | 74 | </div> |
73 | 75 | </div> |
74 | 76 |
|
75 | 77 | <div v-else class="space-y-4"> |
76 | | - <div class="rounded-lg border border-green-200 bg-green-50 p-4 dark:border-green-800 dark:bg-green-900/20"> |
77 | | - <div class="flex items-center justify-between"> |
| 78 | + <div class="rounded-card border border-status-done/40 bg-status-done-bg p-4"> |
| 79 | + <div class="flex items-center justify-between gap-3"> |
78 | 80 | <div> |
79 | | - <p class="font-semibold text-green-800 dark:text-green-300"> |
| 81 | + <p class="text-sm font-semibold text-status-done-fg"> |
80 | 82 | Connected to |
81 | 83 | <a |
82 | 84 | :href="`https://github.com/${status.repository.full_name}`" |
83 | 85 | target="_blank" |
84 | | - class="underline hover:text-green-900 dark:hover:text-green-200" |
| 86 | + class="underline hover:opacity-80" |
85 | 87 | > |
86 | 88 | {{ status.repository.full_name }} |
87 | 89 | </a> |
88 | 90 | </p> |
89 | | - <p v-if="status.repository.last_synced_at" class="mt-1 text-xs text-green-700 dark:text-green-400"> |
| 91 | + <p v-if="status.repository.last_synced_at" class="mt-1 text-xs text-status-done-fg/80"> |
90 | 92 | Last synced: {{ formatDate(status.repository.last_synced_at) }} |
91 | 93 | </p> |
92 | 94 | </div> |
93 | | - <svg class="h-6 w-6 text-green-600 dark:text-green-400" fill="none" stroke="currentColor" viewBox="0 0 24 24"> |
| 95 | + <svg class="h-5 w-5 shrink-0 text-status-done-fg" fill="none" stroke="currentColor" viewBox="0 0 24 24"> |
94 | 96 | <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7"></path> |
95 | 97 | </svg> |
96 | 98 | </div> |
97 | 99 | </div> |
98 | 100 |
|
99 | | - <div class="flex gap-2"> |
| 101 | + <div class="flex flex-wrap gap-2"> |
100 | 102 | <button |
101 | 103 | @click="syncRepository" |
102 | 104 | :disabled="syncing" |
103 | | - class="rounded bg-blue-500 px-4 py-2 text-sm font-semibold text-white transition hover:bg-blue-600 disabled:opacity-50" |
| 105 | + class="inline-flex h-9 items-center justify-center rounded-pill bg-brand px-4 text-sm font-semibold text-white shadow-tmgr-xs transition-colors hover:bg-brand-hover disabled:opacity-50" |
104 | 106 | > |
105 | | - <span v-if="syncing">Syncing...</span> |
| 107 | + <span v-if="syncing">Syncing…</span> |
106 | 108 | <span v-else>Sync Now</span> |
107 | 109 | </button> |
108 | 110 |
|
109 | 111 | <button |
110 | 112 | @click="relinkRepository" |
111 | 113 | :disabled="relinking" |
112 | | - class="rounded bg-violet-500 px-4 py-2 text-sm font-semibold text-white transition hover:bg-violet-600 disabled:opacity-50" |
| 114 | + class="inline-flex h-9 items-center justify-center rounded-pill border border-line bg-surface px-4 text-sm font-semibold text-ink transition-colors hover:bg-surface-hover disabled:opacity-50" |
113 | 115 | title="Relink existing commits/branches to tasks" |
114 | 116 | > |
115 | | - <span v-if="relinking">Relinking...</span> |
| 117 | + <span v-if="relinking">Relinking…</span> |
116 | 118 | <span v-else>Relink Tasks</span> |
117 | 119 | </button> |
118 | 120 |
|
119 | 121 | <button |
120 | 122 | @click="disconnectRepository" |
121 | 123 | :disabled="disconnecting" |
122 | | - class="rounded bg-red-500 px-4 py-2 text-sm font-semibold text-white transition hover:bg-red-600 disabled:opacity-50" |
| 124 | + class="inline-flex h-9 items-center justify-center rounded-pill border border-status-fix/40 bg-status-fix-bg px-4 text-sm font-semibold text-status-fix-fg transition-colors hover:opacity-90 disabled:opacity-50" |
123 | 125 | > |
124 | | - <span v-if="disconnecting">Disconnecting...</span> |
| 126 | + <span v-if="disconnecting">Disconnecting…</span> |
125 | 127 | <span v-else>Disconnect</span> |
126 | 128 | </button> |
127 | 129 | </div> |
128 | 130 | </div> |
129 | 131 |
|
130 | | - <div v-if="error" class="mt-4 rounded-lg border border-red-200 bg-red-50 p-4 dark:border-red-800 dark:bg-red-900/20"> |
131 | | - <p class="text-sm text-red-700 dark:text-red-400">{{ error }}</p> |
| 132 | + <div v-if="error" class="mt-4 rounded-card border border-status-fix/40 bg-status-fix-bg p-4"> |
| 133 | + <p class="text-sm text-status-fix-fg">{{ error }}</p> |
132 | 134 | </div> |
133 | 135 | </div> |
134 | 136 | </template> |
|
0 commit comments