feat: add target deletion functionality with cascaded removal of associated jobs and tasks
This commit is contained in:
@@ -22,7 +22,8 @@ const targetsTabHTML = `{{ define "targetsTab" }}
|
||||
<select name="platform"
|
||||
class="px-3 py-2 text-xs rounded-lg bg-slate-800 border border-slate-700 text-white focus:outline-none focus:border-indigo-500">
|
||||
<option value="google_jobs">🔍 Google Jobs</option>
|
||||
<!-- More platforms will be added as crawlers are implemented -->
|
||||
<option value="apple">🍏 Apple</option>
|
||||
<option value="meta">♾️ Meta</option>
|
||||
</select>
|
||||
<button type="submit"
|
||||
class="px-4 py-2 bg-indigo-600 hover:bg-indigo-500 text-xs font-semibold text-white rounded-lg shadow-md transition-all">
|
||||
@@ -68,12 +69,21 @@ const targetListHTML = `{{ define "targets" }}
|
||||
{{ end }}
|
||||
</td>
|
||||
<td class="px-4 py-3 text-right">
|
||||
<button hx-post="/targets/{{ .ID }}/toggle"
|
||||
hx-target="#targets-container"
|
||||
hx-swap="innerHTML"
|
||||
class="px-2.5 py-1 text-[11px] rounded bg-slate-800 hover:bg-slate-700 text-slate-200 border border-slate-700 transition-colors">
|
||||
{{ if .IsActive }}Pause{{ else }}Activate{{ end }}
|
||||
</button>
|
||||
<div class="flex items-center justify-end gap-1.5">
|
||||
<button hx-post="/targets/{{ .ID }}/toggle"
|
||||
hx-target="#targets-container"
|
||||
hx-swap="innerHTML"
|
||||
class="px-2.5 py-1 text-[11px] rounded bg-slate-800 hover:bg-slate-700 text-slate-200 border border-slate-700 transition-colors">
|
||||
{{ if .IsActive }}Pause{{ else }}Activate{{ end }}
|
||||
</button>
|
||||
<button type="button"
|
||||
data-target-id="{{ .ID }}"
|
||||
data-target-name="{{ .Name }}"
|
||||
onclick="openDeleteTargetModal(this)"
|
||||
class="px-2.5 py-1 text-[11px] rounded bg-rose-500/10 hover:bg-rose-500/20 text-rose-400 border border-rose-500/30 hover:border-rose-500/50 transition-colors flex items-center gap-1">
|
||||
<span>🗑️</span> Delete
|
||||
</button>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{{ else }}
|
||||
|
||||
Reference in New Issue
Block a user