Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7b65b7cd authored by Akhil's avatar Akhil 🙂
Browse files

Add eslint rc

parent 12395078
Loading
Loading
Loading
Loading
Loading

.eslintrc.js

0 → 100644
+5 −0
Original line number Diff line number Diff line
module.exports = {
        extends: [
                '@nextcloud'
        ]
};
+71 −75
Original line number Diff line number Diff line
<template>
  <SettingsSection
    :title="t('ecloud-accounts', 'Delete Shop Account')"
	<SettingsSection :title="t('ecloud-accounts', 'Delete Shop Account')"
		:description="
			t(
				'ecloud-accounts',
				'Set your shop account preferences when your Murena ID is deleted'
			)
    "
  >
  
  </SettingsSection>
		" />
</template>
<script>
import { loadState } from "@nextcloud/initial-state";
import SettingsSection from "@nextcloud/vue/dist/Components/SettingsSection.js";
import Axios from "@nextcloud/axios";
import { generateUrl } from "@nextcloud/router";
import { showError } from "@nextcloud/dialogs";
import { loadState } from '@nextcloud/initial-state'
import SettingsSection from '@nextcloud/vue/dist/Components/SettingsSection.js'
import Axios from '@nextcloud/axios'
import { generateUrl } from '@nextcloud/router'
import { showError } from '@nextcloud/dialogs'

export default {
  name: "PersonalSettings",
	name: 'PersonalSettings',
	components: {
		SettingsSection,
	},
	data() {
		return {
			deleteShopAccount: false,
      shopEmailPostDelete: "",
      appName: "ecloud-accounts",
    };
			shopEmailPostDelete: '',
			appName: 'ecloud-accounts',
		}
	},
	created() {
		try {
			this.deleteShopAccount = loadState(
				this.appName,
        "shop_email_post_delete"
      );
      this.shopEmailPostDelete = loadState(this.appName, "delete_shop_account");
				'shop_email_post_delete'
			)
			this.shopEmailPostDelete = loadState(this.appName, 'delete_shop_account')
		} catch (e) {
      console.error("Error fetching initial state", e);
			console.error('Error fetching initial state', e)
		}
	},
	methods: {
@@ -46,36 +42,36 @@ export default {
			try {
				const url = generateUrl(
					`/apps/${this.appName}/set_shop_delete_preference`
        );
        const { status } = await Axios.post(url, {});
				)
				const { status } = await Axios.post(url, {})
				if (status !== 200) {
					showError(
            t("drop_account", "Error while setting shop delete preference")
          );
						t('drop_account', 'Error while setting shop delete preference')
					)
				}
			} catch (e) {
				showError(
          t("drop_account", "Error while setting shop delete preference")
        );
					t('drop_account', 'Error while setting shop delete preference')
				)
			}
		},
		async updateEmailPostDelete() {
			try {
				const url = generateUrl(
					`/apps/${this.appName}/set_shop_email_post_delete`
        );
        const { status } = await Axios.post(url, {});
				)
				const { status } = await Axios.post(url, {})
				if (status !== 200) {
					showError(
            t("drop_account", "Error while setting shop email preference")
          );
						t('drop_account', 'Error while setting shop email preference')
					)
				}
			} catch (e) {
				showError(
          t("drop_account", "Error while setting shop email preference")
        );
					t('drop_account', 'Error while setting shop email preference')
				)
			}
		},
	},
};
}
</script>