mirror of
https://github.com/geekgeekrun/geekgeekrun.git
synced 2026-07-06 06:41:22 +08:00
add more gtag for stop button
This commit is contained in:
@@ -18,21 +18,25 @@ import { ref, onUnmounted, onMounted } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import FlyingCompanyLogoList from '../../features/FlyingCompanyLogoList/index.vue'
|
||||
import { ElMessage } from 'element-plus';
|
||||
import { gtagRenderer } from '@renderer/utils/gtag'
|
||||
|
||||
const { ipcRenderer } = electron
|
||||
const router = useRouter()
|
||||
|
||||
const handleStopButtonClick = async () => {
|
||||
gtagRenderer('geek_auto_start_chat_with_boss_stop_button_clicked')
|
||||
ipcRenderer.invoke('stop-geek-auto-start-chat-with-boss')
|
||||
}
|
||||
|
||||
const isStopping = ref(false)
|
||||
const handleStopping = () => {
|
||||
gtagRenderer('geek_auto_start_chat_with_boss_become_stopping')
|
||||
isStopping.value = true
|
||||
}
|
||||
ipcRenderer.once('geek-auto-start-chat-with-boss-stopping', handleStopping)
|
||||
|
||||
const handleStopped = () => {
|
||||
gtagRenderer('geek_auto_start_chat_with_boss_become_stopped')
|
||||
router.replace('/main-layout/GeekAutoStartChatWithBoss')
|
||||
}
|
||||
ipcRenderer.once('geek-auto-start-chat-with-boss-stopped', handleStopped)
|
||||
@@ -47,12 +51,14 @@ onMounted(async () => {
|
||||
await electron.ipcRenderer.invoke('run-geek-auto-start-chat-with-boss')
|
||||
} catch (err) {
|
||||
if (err instanceof Error && err.message.includes('NEED_TO_CHECK_RUNTIME_DEPENDENCIES')) {
|
||||
gtagRenderer('geek_auto_start_chat_with_boss_cannot_run_due_to_corrupt')
|
||||
ElMessage.error({
|
||||
message: `核心组件损坏,正在尝试修复`
|
||||
})
|
||||
router.replace('/')
|
||||
}
|
||||
console.error(err)
|
||||
gtagRenderer('geek_auto_start_chat_with_boss_cannot_run_due_to_unknown_error', { err })
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -16,21 +16,25 @@ import { ref, onUnmounted, onMounted } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import FlyingCompanyLogoList from '../../features/FlyingCompanyLogoList/index.vue'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { gtagRenderer } from '@renderer/utils/gtag'
|
||||
|
||||
const { ipcRenderer } = electron
|
||||
const router = useRouter()
|
||||
|
||||
const handleStopButtonClick = async () => {
|
||||
gtagRenderer('read_no_reply_reminder_stop_button_clicked')
|
||||
ipcRenderer.invoke('stop-geek-auto-start-chat-with-boss')
|
||||
}
|
||||
|
||||
const isStopping = ref(false)
|
||||
const handleStopping = () => {
|
||||
gtagRenderer('read_no_reply_reminder_become_stopping')
|
||||
isStopping.value = true
|
||||
}
|
||||
ipcRenderer.once('geek-auto-start-chat-with-boss-stopping', handleStopping)
|
||||
|
||||
const handleStopped = () => {
|
||||
gtagRenderer('read_no_reply_reminder_become_stopped')
|
||||
router.replace('/main-layout/ReadNoReplyReminder')
|
||||
}
|
||||
ipcRenderer.once('geek-auto-start-chat-with-boss-stopped', handleStopped)
|
||||
@@ -45,12 +49,14 @@ onMounted(async () => {
|
||||
await electron.ipcRenderer.invoke('run-read-no-reply-auto-reminder')
|
||||
} catch (err) {
|
||||
if (err instanceof Error && err.message.includes('NEED_TO_CHECK_RUNTIME_DEPENDENCIES')) {
|
||||
gtagRenderer('read_no_reply_reminder_cannot_run_due_to_corrupt')
|
||||
ElMessage.error({
|
||||
message: `核心组件损坏,正在尝试修复`
|
||||
})
|
||||
router.replace('/')
|
||||
}
|
||||
console.error(err)
|
||||
gtagRenderer('read_no_reply_reminder_cannot_run_due_to_unknown_error', { err })
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -351,7 +351,7 @@ const handleSubmit = async () => {
|
||||
}
|
||||
}
|
||||
}
|
||||
gtagRenderer('reminder_launched')
|
||||
gtagRenderer('run_read_no_reply_reminder_launched')
|
||||
router.replace({
|
||||
path: '/geekAutoStartChatWithBoss/prepareRun',
|
||||
query: { flow: 'read-no-reply-reminder' }
|
||||
|
||||
Reference in New Issue
Block a user