Skip to content

Commit

Permalink
fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
vivganes committed Jan 15, 2025
1 parent 42be505 commit 5874d91
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 5 deletions.
25 changes: 24 additions & 1 deletion src/lib/components/Card.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@
<!-- show icon if there is card has trackingRef -->
{#if card.trackingRef}
<button on:click|preventDefault|stopPropagation={(e) => null}
class="more-options-btn">
class="track-icon">
<span class="material-icons" title="Tracked card from another board">track_changes</span>
</button>

Expand Down Expand Up @@ -593,4 +593,27 @@
background: rgba(0, 0, 0, 0.05);
}
.track-icon{
background: none;
background: linear-gradient(90deg, #cc00b1, #5638ff);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
color:black;
border: none;
padding: 0.2rem;
font-size: 1rem;
cursor: auto;
opacity: 0.9;
border-radius: 4px;
transition: opacity 0.2s, background-color 0.2s;
}
.track-icon:hover {
opacity: 1;
background: none;
background: linear-gradient(90deg, #cc00b1, #5638ff);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
</style>
4 changes: 0 additions & 4 deletions src/lib/stores/kanban.ts
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,6 @@ function createKanbanStore() {
let trackingRef, trackingKind;

if(kTag){
console.log("Found ktag in card event", event);
const trackedEventOutput = await loadTrackedEvent(kTag, trackingRef, event);
if(trackedEventOutput){
eventToLoad = trackedEventOutput.eventToLoad;
Expand Down Expand Up @@ -371,7 +370,6 @@ function createKanbanStore() {
update(state => {
const newCards = new Map(state.cards);
newCards.set(boardId, boardCards);
console.log("New cards", newCards);
return { ...state, cards: newCards };
});
} catch (error) {
Expand Down Expand Up @@ -858,13 +856,11 @@ function createKanbanStore() {
const maintainers = boardEvent.tags
.filter(t => t[0] === 'p')
.map(t => t[1]);
console.log("Maintainers", maintainers);
// Retain only those trackedCardEvents authored by maintainers
const maintainersSet = new Set(maintainers);
for(const event of trackedCardEvents){

if(!maintainersSet.has(event.pubkey) && event.pubkey !== boardEvent.pubkey){
console.log("Removing event", event);
trackedCardEvents.delete(event);
}
}
Expand Down

0 comments on commit 5874d91

Please sign in to comment.