Skip to content

Commit

Permalink
add shadowrocket onekey subscription
Browse files Browse the repository at this point in the history
  • Loading branch information
ByteInternetHK committed May 16, 2021
1 parent 5c41deb commit f6a7cb7
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion src/views/dashboard/Dashboard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@
</a-button>
<a-button
class="button-color-volcano"
style="color: white;font-weight: bold;margin-bottom: 10px"
style="color: white;font-weight: bold;margin-bottom: 10px;margin-right: 2%; width: 49%"
block
v-clipboard:copy="user.subsLink + 'shadowrocket'"
v-clipboard:success="onCopy"
Expand All @@ -170,6 +170,15 @@
<my-icon type="icon-shadowrocket" />
Shadowrocket
</a-button>
<a-button
class="button-color-volcano"
style="color: white;font-weight: bold;margin-bottom: 10px; width: 49%"
block
@click="shadowrocketOneKey"
>
<my-icon type="icon-shadowrocket" />
Shadowrocket(Safari)
</a-button>
<a-button
class="button-color-dust"
style="color: white;font-weight: bold;margin-bottom: 10px"
Expand Down Expand Up @@ -245,6 +254,7 @@ import { mapState } from 'vuex'
import { PageHeaderWrapper } from '@ant-design-vue/pro-layout'
import { ChartCard } from '@/components'
import { getAnnouncement, resetInviteCode } from '@/api/dashboard'
const Base64 = require('js-base64').Base64
export default {
name: 'Dashboard',
Expand Down Expand Up @@ -305,6 +315,11 @@ export default {
}
})
},
// shadowrocket一键订阅
shadowrocketOneKey () {
const oneKey = 'sub://' + Base64.encode(this.user.subsLink + 'shadowrocket')
window.location.href = oneKey
},
refreshInfo () {
this.$http.delete('/user/info')
.then(res => {
Expand Down

0 comments on commit f6a7cb7

Please sign in to comment.