mirror of
https://github.com/System-End/hackatime.git
synced 2026-04-20 00:35:22 +00:00
Replace slack app_redirect links to be workspace specific instead (#561)
This commit is contained in:
parent
5ae07f5643
commit
cb353b4414
3 changed files with 4 additions and 4 deletions
|
|
@ -169,7 +169,7 @@ export default class extends Controller {
|
|||
const url = u.avatar_url || ''
|
||||
|
||||
const name = u.slack_uid ?
|
||||
`<a href="https://slack.com/app_redirect?channel=${u.slack_uid}" target="_blank" class="text-blue-500 hover:underline">@${dis}</a>` :
|
||||
`<a href="https://hackclub.slack.com/team/${u.slack_uid}" target="_blank" class="text-blue-500 hover:underline">@${dis}</a>` :
|
||||
`<span class="text-white">${dis}</span>`
|
||||
|
||||
return `
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
<%= link_to SlackChannel.find_by_id(channel_id), "https://slack.com/app_redirect?channel=#{channel_id}", target: "_blank" %>
|
||||
<%= link_to SlackChannel.find_by_id(channel_id), "https://hackclub.slack.com/archives/#{channel_id}", target: "_blank" %>
|
||||
|
|
@ -5,7 +5,7 @@
|
|||
alt: "#{h(user.username)}'s avatar" if user.avatar_url %>
|
||||
<span class="inline-flex items-center gap-1">
|
||||
<% if local_assigns.fetch(:show, []).include?(:slack) && user.slack_uid.present? %>
|
||||
<%= link_to "@#{h(user.display_name)}", "https://slack.com/app_redirect?channel=#{user.slack_uid}", target: "_blank", class: "text-blue-500 hover:underline" %>
|
||||
<%= link_to "@#{h(user.display_name)}", "https://hackclub.slack.com/team/#{user.slack_uid}", target: "_blank", class: "text-blue-500 hover:underline" %>
|
||||
<% else %>
|
||||
<%= h(user.display_name) %>
|
||||
<% end %>
|
||||
|
|
@ -24,7 +24,7 @@
|
|||
</span>
|
||||
<% end %>
|
||||
<% if local_assigns.fetch(:show, []).include?(:neighborhood) && user.slack_neighborhood_channel.present? %>
|
||||
<%= link_to "🏘️", "https://slack.com/app_redirect?channel={user.slack_neighborhood_channel}", target: "_blank" %>
|
||||
<%= link_to "🏘️", "https://hackclub.slack.com/archives/#{user.slack_neighborhood_channel}", target: "_blank" %>
|
||||
<% end %>
|
||||
<% unless current_user == user %>
|
||||
<% admin_tool('', 'span') do %>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue