collavre 0.2.4 → 0.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 35c8808cc85f9a6a43fc6800c660850f2725137c805765436f7439dd6b75e07c
4
- data.tar.gz: f6783666bfa9dc57128f4e5497d1e5267dfbf0de47cc9f0a8d95b021f1e35843
3
+ metadata.gz: 3ad04ae23058f911aed4ecb6d53a0b650b3e90de1296258cc3a481b5d2984e60
4
+ data.tar.gz: a7a19242045151694e551ee8f998ca6bc15213804f4b28a0da1e3d8f3b110946
5
5
  SHA512:
6
- metadata.gz: ed9266ed122d64cedc2fbda308d3400d837776bb60a71b39a21c3a717bf5dad6ecfb2fda336928fa1ac112bb59c5fda5171f627583648a353d53fe5dbc2508c4
7
- data.tar.gz: f46c41dde92548ff415f9eaa5b233f8d35af31f69ad7859c122a4e7cca52d992b6459f147af270652193e5db815fcd7669a632eee5928480d3a1babd9960e028
6
+ metadata.gz: 000ca6cfec2bef14c9199f0a8204ce40c498da48a437b765d9f08c8623a86ec4434a2094d29fa9717488cd5cedf9a44e3016699c0e0a37f8e5eee55890fbfa33
7
+ data.tar.gz: 7f2235ffb0bbc1c37943f3be68dd17bdc4f0c1185b85019e7b748485e5915b22d24ff41ba62eae5625233820cdb902733ac186f36b9a0082f8a2c1140292759a
@@ -12,6 +12,12 @@ module Collavre
12
12
  flash[:notice] = t("collavre.invites.invite_sent")
13
13
  redirect_back(fallback_location: creatives_path) and return
14
14
  end
15
+
16
+ # Restrict sharing non-searchable AI agents to their owners only
17
+ if user.ai_user? && !user.searchable? && user.created_by_id != Current.user.id
18
+ flash[:alert] = t("collavre.creatives.share.cannot_share_private_ai_agent")
19
+ redirect_back(fallback_location: creatives_path) and return
20
+ end
15
21
  end
16
22
 
17
23
  permission = params[:permission]
@@ -495,10 +495,48 @@ export default class extends Controller {
495
495
  } else {
496
496
  const savedStyles = this._savedStyles
497
497
  this._savedStyles = null
498
+ const creativeId = el.dataset.creativeId
499
+
500
+ // Mobile: skip animation, just clear inline styles and let CSS handle positioning
501
+ if (this.isMobile()) {
502
+ el.style.transition = 'none'
503
+ el.dataset.fullscreen = 'false'
504
+ document.body.classList.remove('chat-fullscreen')
505
+ this._syncFullscreenUI(false)
506
+
507
+ // Clear all inline styles so CSS media query rules apply
508
+ el.style.position = ''
509
+ el.style.top = ''
510
+ el.style.left = ''
511
+ el.style.right = ''
512
+ el.style.bottom = ''
513
+ el.style.width = ''
514
+ el.style.height = ''
515
+ el.style.transform = ''
498
516
 
517
+ // Force layout then restore transitions
518
+ el.offsetHeight // eslint-disable-line no-unused-expressions
519
+ el.style.transition = ''
520
+
521
+ // Update URL
522
+ let backUrl = this._previousUrl || (creativeId ? `/creatives/${creativeId}` : null)
523
+ if (backUrl) {
524
+ const url = new URL(backUrl, window.location.origin)
525
+ url.searchParams.set('open_comments', 'true')
526
+ window.history.pushState({ fullscreen: false }, '', url.pathname + url.search)
527
+ }
528
+ this._previousUrl = null
529
+
530
+ // Scroll to bottom after layout change
531
+ requestAnimationFrame(() => {
532
+ this.listController?.scrollToBottom()
533
+ })
534
+ return
535
+ }
536
+
537
+ // Desktop: animated exit to target position
499
538
  // Calculate target position using the same logic as updatePosition()
500
539
  // so cleanup can apply it directly without calling updatePosition() (which would cause a snap)
501
- const creativeId = el.dataset.creativeId
502
540
  const scrollY = window.scrollY || window.pageYOffset
503
541
 
504
542
  // Final absolute-position values (what updatePosition would set)
@@ -124,6 +124,7 @@ en:
124
124
  already_shared_in_parent: Creative already shared in parent creative.
125
125
  can_not_share_by_no_access_in_parent: You can not share by no access in parent
126
126
  creative.
127
+ cannot_share_private_ai_agent: Only the owner can share this AI Agent.
127
128
  notices:
128
129
  progress_recalculated: All parent progress recalculated.
129
130
  errors:
@@ -111,6 +111,7 @@ ko:
111
111
  shared: 크리에이티브가 성공적으로 공유되었습니다.
112
112
  already_shared_in_parent: 크리에이티브가 상위 크리에이티브에 이미 공유되었습니다.
113
113
  can_not_share_by_no_access_in_parent: 상위 크리에이티브에 접근 금지가 있어서 공유할 수 없습니다.
114
+ cannot_share_private_ai_agent: AI Agent 소유자만 공유할 수 있습니다.
114
115
  notices:
115
116
  progress_recalculated: 진행률을 다시 계산 했습니다.
116
117
  errors:
@@ -1,3 +1,3 @@
1
1
  module Collavre
2
- VERSION = "0.2.4"
2
+ VERSION = "0.2.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: collavre
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Collavre