Skip to content

Commit b2921c2

Browse files
committed
feat: traQ チャンネルの導線を通す
1 parent 782c3bf commit b2921c2

File tree

6 files changed

+28
-2
lines changed

6 files changed

+28
-2
lines changed

.env.example

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# 必要に応じてコピーして使用
2+
# https://q.trap.jp/channels/ の後ろに続くパスを指定してください
3+
VITE_CHANNEL_PATH=event/gasshuku/staff

.env.production

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# 本番環境の設定(vite build 時に読み込まれる)
2+
# https://q.trap.jp/channels/ の後ろに続くパスを指定してください
3+
VITE_CHANNEL_PATH=event/gasshuku/staff

.env.staging

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# ステージング環境の設定(`npm run dev:staging` で読み込まれる)
2+
# https://q.trap.jp/channels/ の後ろに続くパスを指定してください
3+
VITE_CHANNEL_PATH=event/gasshuku/staff

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,6 @@ coverage
3030

3131
*.tsbuildinfo
3232

33-
# .env
33+
.env
3434

3535
dev-dist/

env.d.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,9 @@
11
/// <reference types="vite/client" />
2+
3+
interface ImportMetaEnv {
4+
readonly VITE_CHANNEL_PATH: string
5+
}
6+
7+
interface ImportMeta {
8+
readonly env: ImportMetaEnv
9+
}

src/views/RollCallView.vue

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ onMounted(async () => {
4848
onBeforeUnmount(() => {
4949
stop()
5050
})
51+
52+
// traQ チャンネルの URL(環境変数からパスを参照)
53+
const channelUrl = computed(() => `https://q.trap.jp/channels/${import.meta.env.VITE_CHANNEL_PATH}`)
5154
</script>
5255

5356
<template>
@@ -68,7 +71,13 @@ onBeforeUnmount(() => {
6871
/>
6972
</div>
7073
<div class="d-flex justify-center mt-2">
71-
<v-btn variant="flat" :class="$style.shadow">
74+
<v-btn
75+
variant="flat"
76+
:class="$style.shadow"
77+
:href="channelUrl"
78+
target="_blank"
79+
rel="noopener noreferrer"
80+
>
7281
<div class="d-flex align-center">
7382
<img src="/src/assets/traq.svg" alt="traQ" height="20" class="mr-1" />
7483
<div :class="$style.buttonText">traQ で連絡する</div>

0 commit comments

Comments
 (0)