🐛 Fixed error on Download feed

This commit is contained in:
Liyas Thomas
2020-01-22 12:47:09 +05:30
parent 6eb9ae8ad5
commit 6bcd532767
3 changed files with 11 additions and 11 deletions

View File

@@ -59,13 +59,12 @@ export default {
methods: {
deleteFeed(feed) {
fb.deleteFeed(feed.id);
this.$toast.error(this.$t("deleted"), {
icon: "delete"
});
},
saveFeed(feed) {
const dataToWrite = JSON.stringify(
eval("(" + feed.message + ")"),
null,
2
);
const dataToWrite = JSON.stringify(feed.message, null, 2);
const file = new Blob([dataToWrite], { type: "application/json" });
const a = document.createElement("a"),
url = URL.createObjectURL(file);

View File

@@ -40,11 +40,12 @@ export const fb = {
return console.error("error inserting", dt, e);
}
},
deleteFeed: id =>
deleteFeed: id => {
feedsCollection
.doc(id)
.delete()
.catch(e => console.error("error deleting", dt, e)),
.catch(e => console.error("error deleting", dt, e));
},
writeSettings: async (setting, value) => {
const st = {
updatedOn: new Date(),

View File

@@ -6,7 +6,7 @@
<div v-if="!fb.currentUser">
<label>{{ $t("login_with") }}</label>
<p>
<button class="icon" @click="signInWithGoogle" v-close-popover>
<button class="icon" @click="signInWithGoogle">
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
@@ -21,7 +21,7 @@
<span>Google</span>
</button>
<br />
<button class="icon" @click="signInWithGithub" v-close-popover>
<button class="icon" @click="signInWithGithub">
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
@@ -57,12 +57,12 @@
</span>
</button>
<br />
<button class="icon" @click="logout" v-close-popover>
<button class="icon" @click="logout">
<i class="material-icons">exit_to_app</i>
<span>{{ $t("logout") }}</span>
</button>
<br />
<p v-for="setting in fb.currentSettings">
<p v-for="setting in fb.currentSettings" :key="setting.id">
<pw-toggle
:key="setting.name"
:on="setting.value"