-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 🙈 Update .gitignore For Nodejs version controlling * ✨ Add new notify method: pushplus While email notification ruins my inbox, serverChan provides only 5 messages per day. In this case, pushplus is a great alternative with 200 free message push caps every day. * ✨ Add new notify method: pushplus This commit adds error handling, fixed the wrong url written by Copilot. * 🎨 Improve Pushplus configuration * 🚨 Makes ruff happy
- Loading branch information
Showing
9 changed files
with
197 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,6 +30,9 @@ __pycache__/ | |
*.py[cod] | ||
*$py.class | ||
|
||
# Nodejs Version Manager | ||
.nvmrc | ||
|
||
# C extensions | ||
*.so | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
<script setup> | ||
import { useConfigStore } from '@/stores/config' | ||
import { storeToRefs } from 'pinia' | ||
import { inject, ref } from 'vue' | ||
const store = useConfigStore() | ||
const axios = inject('axios') | ||
const mobile = inject('mobile') | ||
const testPushResult = ref('') | ||
const { pushplus } = storeToRefs(store) | ||
async function test_push() { | ||
testPushResult.value = '正在发送……' | ||
const response = await axios.get(`${import.meta.env.VITE_HTTP_URL}/test-pushplus-push`) | ||
testPushResult.value = response.data | ||
} | ||
</script> | ||
<template> | ||
<n-card> | ||
<template #header> | ||
<n-checkbox v-model:checked="pushplus.enable" class="serverpush-title"> | ||
<div class="card-title-wrapper"> | ||
<span class="card-title">PushPlus推送通知</span> | ||
<help-text class="card-title-tip"> | ||
什么是PushPlus?参考: | ||
<n-button text tag="a" href="https://www.pushplus.plus" target="_blank" type="primary"> | ||
https://www.pushplus.plus | ||
</n-button> | ||
</help-text> | ||
</div> | ||
</n-checkbox> | ||
</template> | ||
<template #default> | ||
<n-form | ||
:label-placement="mobile ? 'top' : 'left'" | ||
:show-feedback="false" | ||
label-width="96" | ||
label-align="left" | ||
> | ||
<n-form-item label="Push Plus Token"> | ||
<n-input v-model:value="pushplus.token" show-password-on="click" type="password" /> | ||
</n-form-item> | ||
</n-form> | ||
<n-divider v-if="pushplus.enable" /> | ||
<div v-if="pushplus.enable" class="push-test mt-16"> | ||
<n-button @click="test_push">发送测试通知</n-button> | ||
<div>{{ testPushResult }}</div> | ||
</div> | ||
</template> | ||
</n-card> | ||
</template> | ||
<style scoped> | ||
.card-title-wrapper { | ||
display: flex; | ||
align-items: center; | ||
gap: 8px; | ||
} | ||
.card-title { | ||
font-weight: 500; | ||
font-size: 18px; | ||
} | ||
.serverpush-title { | ||
width: 100%; | ||
} | ||
.push-test { | ||
display: flex; | ||
align-items: center; | ||
gap: 16px; | ||
} | ||
.mt-16 { | ||
margin-top: 16px; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters