enzostvs HF staff commited on
Commit
c8cdf26
·
1 Parent(s): e6de30f
src/lib/components/Button.svelte CHANGED
@@ -11,16 +11,16 @@
11
  export let iconPosition: "left" | "right" = "left";
12
  export let disabled: boolean = false;
13
  export let loading: boolean = false;
14
- export let onClick: () => void = () => {};
15
 
16
- const handleClick = async () => {
17
  if (href) {
18
  if (target) window.open(href, target);
19
  else goto(href);
20
  return
21
  }
22
  if (disabled || loading) return;
23
- onClick();
24
  };
25
 
26
  </script>
 
11
  export let iconPosition: "left" | "right" = "left";
12
  export let disabled: boolean = false;
13
  export let loading: boolean = false;
14
+ export let onClick: (e?: any) => void = (e) => {};
15
 
16
+ const handleClick = async (e: any) => {
17
  if (href) {
18
  if (target) window.open(href, target);
19
  else goto(href);
20
  return
21
  }
22
  if (disabled || loading) return;
23
+ onClick(e);
24
  };
25
 
26
  </script>
src/lib/components/community/drawer/Comments.svelte CHANGED
@@ -45,10 +45,14 @@
45
  <Comment comment={comment} />
46
  {/each}
47
  {#if comments?.length > 1}
48
- <div class="flex items-center justify-start max-w-max absolute right-8 top-8">
49
  <Button
50
  theme="dark"
51
- onClick={() => collapse_comments = !collapse_comments}
 
 
 
 
52
  >
53
  {collapse_comments ? "Show less" : `Show more (${comments?.length - 1})`}
54
  </Button>
 
45
  <Comment comment={comment} />
46
  {/each}
47
  {#if comments?.length > 1}
48
+ <div class="flex items-center justify-start max-w-max absolute right-8 top-8 pointer-events-auto z-[10]">
49
  <Button
50
  theme="dark"
51
+ onClick={(e) => {
52
+ e.preventDefault();
53
+ e.stopPropagation();
54
+ collapse_comments = !collapse_comments;
55
+ }}
56
  >
57
  {collapse_comments ? "Show less" : `Show more (${comments?.length - 1})`}
58
  </Button>
src/lib/components/community/drawer/Drawer.svelte CHANGED
@@ -116,7 +116,7 @@
116
  </div>
117
  </main>
118
  </div>
119
- <footer class="p-8 border-t border-neutral-900 bg-neutral-900/30 flex flex-col justify-between relative">
120
  <p class="font-semibold text-neutral-100 text-base lg:text-lg mb-6">
121
  Comment{(gallery?.comments?.length ?? 0) > 1 ? 's' : ''} ({gallery?.comments?.length ?? 0})
122
  </p>
 
116
  </div>
117
  </main>
118
  </div>
119
+ <footer class="p-8 border-t border-neutral-900 bg-neutral-900/30 flex flex-col justify-between relative max-h-[80%] overflow-auto">
120
  <p class="font-semibold text-neutral-100 text-base lg:text-lg mb-6">
121
  Comment{(gallery?.comments?.length ?? 0) > 1 ? 's' : ''} ({gallery?.comments?.length ?? 0})
122
  </p>
src/lib/components/models/drawer/Drawer.svelte CHANGED
@@ -150,7 +150,7 @@
150
  {/if}
151
  </main>
152
  </div>
153
- <footer class="p-8 border-t border-neutral-900 bg-neutral-900/30 flex flex-col justify-between relative">
154
  <p class="font-semibold text-neutral-100 text-base lg:text-lg mb-6">
155
  Comment{(model?.comments?.length ?? 0) > 1 ? 's' : ''} ({model?.comments?.length ?? 0})
156
  </p>
 
150
  {/if}
151
  </main>
152
  </div>
153
+ <footer class="p-8 border-t border-neutral-900 bg-neutral-900/30 flex flex-col justify-between relative max-h-[80%] overflow-auto">
154
  <p class="font-semibold text-neutral-100 text-base lg:text-lg mb-6">
155
  Comment{(model?.comments?.length ?? 0) > 1 ? 's' : ''} ({model?.comments?.length ?? 0})
156
  </p>
src/lib/components/models/drawer/comments/Comments.svelte CHANGED
@@ -45,10 +45,14 @@
45
  <Comment comment={comment} />
46
  {/each}
47
  {#if comments?.length > 1}
48
- <div class="flex items-center justify-start max-w-max absolute right-8 top-8">
49
  <Button
50
  theme="dark"
51
- onClick={() => collapse_comments = !collapse_comments}
 
 
 
 
52
  >
53
  {collapse_comments ? "Show less" : `Show more (${comments?.length - 1})`}
54
  </Button>
 
45
  <Comment comment={comment} />
46
  {/each}
47
  {#if comments?.length > 1}
48
+ <div class="flex items-center justify-start max-w-max absolute right-8 top-8 pointer-events-auto z-10">
49
  <Button
50
  theme="dark"
51
+ onClick={(e) => {
52
+ e.preventDefault();
53
+ e.stopPropagation();
54
+ collapse_comments = !collapse_comments;
55
+ }}
56
  >
57
  {collapse_comments ? "Show less" : `Show more (${comments?.length - 1})`}
58
  </Button>