mirror of
https://github.com/geekgeekrun/geekgeekrun.git
synced 2026-09-08 00:47:15 +08:00
enhance the event delivery of RunningStatus
This commit is contained in:
@@ -6,27 +6,36 @@
|
|||||||
<p>📱 你可以在<b>手机</b> / <b>平板电脑</b>上,使用BOSS直聘App与为你开聊的BOSS聊天</p>
|
<p>📱 你可以在<b>手机</b> / <b>平板电脑</b>上,使用BOSS直聘App与为你开聊的BOSS聊天</p>
|
||||||
<p>🍀 祝你求职顺利!</p>
|
<p>🍀 祝你求职顺利!</p>
|
||||||
</article>
|
</article>
|
||||||
<el-button :disabled="isStopping" @click="handleStop">停止开聊</el-button>
|
<el-button :disabled="isStopping" @click="handleStopButtonClick">停止开聊</el-button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref } from 'vue'
|
import { ref, onUnmounted } from 'vue';
|
||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
|
|
||||||
const { ipcRenderer } = electron
|
const { ipcRenderer } = electron
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
|
|
||||||
const isStopping = ref(false)
|
const handleStopButtonClick = async () => {
|
||||||
const handleStop = async () => {
|
|
||||||
ipcRenderer.once('geek-auto-start-chat-with-boss-stopping', () => {
|
|
||||||
isStopping.value = true
|
|
||||||
ipcRenderer.once('geek-auto-start-chat-with-boss-stopped', () => {
|
|
||||||
router.replace('/configuration/GeekAutoStartChatWithBoss')
|
|
||||||
})
|
|
||||||
})
|
|
||||||
ipcRenderer.invoke('stop-geek-auto-start-chat-with-boss')
|
ipcRenderer.invoke('stop-geek-auto-start-chat-with-boss')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const isStopping = ref(false)
|
||||||
|
const handleStopping = () => {
|
||||||
|
isStopping.value = true
|
||||||
|
}
|
||||||
|
ipcRenderer.once('geek-auto-start-chat-with-boss-stopping', handleStopping)
|
||||||
|
|
||||||
|
const handleStopped = () => {
|
||||||
|
router.replace('/configuration/GeekAutoStartChatWithBoss')
|
||||||
|
}
|
||||||
|
ipcRenderer.once('geek-auto-start-chat-with-boss-stopped', handleStopped)
|
||||||
|
|
||||||
|
onUnmounted(() => {
|
||||||
|
ipcRenderer.removeListener('geek-auto-start-chat-with-boss-stopped', handleStopped)
|
||||||
|
ipcRenderer.removeListener('geek-auto-start-chat-with-boss-stopping', handleStopping)
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss"></style>
|
<style scoped lang="scss"></style>
|
||||||
|
|||||||
Reference in New Issue
Block a user