mirror of
https://github.com/mxpv/podsync.git
synced 2024-05-11 05:55:04 +00:00
Detect feature level on page load
This commit is contained in:
@ -10,7 +10,6 @@
|
||||
showModal: false,
|
||||
feedLink: '',
|
||||
|
||||
// Server variables
|
||||
featureLevel: 0,
|
||||
userId: '',
|
||||
},
|
||||
@ -99,5 +98,13 @@
|
||||
vm.showModal = false;
|
||||
}
|
||||
});
|
||||
|
||||
axios.get('/api/user').then(function (response) {
|
||||
vm.userId = response.data.user_id;
|
||||
vm.featureLevel = response.data.feature_level;
|
||||
}).catch(function() {
|
||||
vm.userId = ''
|
||||
vm.featureLevel = 0;
|
||||
})
|
||||
}
|
||||
});
|
@ -163,11 +163,6 @@
|
||||
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
|
||||
<script src="assets/js/site.js"></script>
|
||||
|
||||
<script type="application/javascript">
|
||||
app.featureLevel = {{.FeatureLevel}};
|
||||
app.userId = {{.UserId}};
|
||||
</script>
|
||||
|
||||
<script>
|
||||
(function (i, s, o, g, r, a, m) {
|
||||
i['GoogleAnalyticsObject'] = r;
|
||||
|
Reference in New Issue
Block a user