aboutsummaryrefslogtreecommitdiff
path: root/src/site/components/home
diff options
context:
space:
mode:
authorZephyrrus <[email protected]>2021-01-07 21:39:47 +0200
committerZephyrrus <[email protected]>2021-01-07 21:39:47 +0200
commita838d024a7b74e69b7fb65b9c1db4a3a900d160e (patch)
tree87a7ea1801fea5c2003134f17076a105806f7a1f /src/site/components/home
parentfeat: change mutation timestamp on every database mutation (diff)
parentfix: indentation (diff)
downloadhost.fuwn.me-a838d024a7b74e69b7fb65b9c1db4a3a900d160e.tar.xz
host.fuwn.me-a838d024a7b74e69b7fb65b9c1db4a3a900d160e.zip
Merge branch 'feature/stats-dashboard' into feature/system_status_page
Diffstat (limited to 'src/site/components/home')
-rw-r--r--src/site/components/home/links/Links.vue12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/site/components/home/links/Links.vue b/src/site/components/home/links/Links.vue
index 05915b9..6777f44 100644
--- a/src/site/components/home/links/Links.vue
+++ b/src/site/components/home/links/Links.vue
@@ -46,13 +46,15 @@
</div>
</template>
<script>
+import { mapGetters } from 'vuex';
import { saveAs } from 'file-saver';
export default {
computed: {
- loggedIn() {
- return this.$store.state.auth.loggedIn;
- }
+ ...mapGetters({
+ loggedIn: 'auth/isLoggedIn',
+ apiKey: 'auth/getApiKey'
+ })
},
methods: {
createShareXThing() {
@@ -63,12 +65,12 @@ export default {
"RequestURL": "${location.origin}/api/upload",
"FileFormName": "files[]",
"Headers": {
- "authorization": "Bearer ${this.$store.state.token}",
+ "token": "${this.apiKey}",
"accept": "application/vnd.chibisafe.json"
},
"ResponseType": "Text",
"URL": "$json:url$",
- "ThumbnailURL": "$json:url$"
+ "ThumbnailURL": "$json:thumb$"
}`;
const sharexBlob = new Blob([sharexFile], { type: 'application/octet-binary' });
saveAs(sharexBlob, `${location.hostname}.sxcu`);