0351d front end linting (#377)

* feat: disable custom script for  trial users

* after lint fix

* frontend linting

---------

Co-authored-by: Julien Nahum <julien@nahum.net>
This commit is contained in:
Favour Olayinka
2024-04-15 18:39:03 +01:00
committed by GitHub
parent 8d35fc8b1a
commit bcd45ce8a6
228 changed files with 17036 additions and 8744 deletions

View File

@@ -1,22 +1,30 @@
<template>
<transition name="fade">
<button v-if="isImpersonating"
class="cursor-pointer group hover:bg-blue-50 text-gray-600 py-2 px-5 fixed bottom-0 left-0 rounded-tr-md bg-white border-t border-r"
@click="reverseImpersonation"
<button
v-if="isImpersonating"
class="cursor-pointer group hover:bg-blue-50 text-gray-600 py-2 px-5 fixed bottom-0 left-0 rounded-tr-md bg-white border-t border-r"
@click="reverseImpersonation"
>
<template v-if="!loading">
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 -mt-1 group-hover:text-blue-500 inline text-gray-400"
fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"
<svg
xmlns="http://www.w3.org/2000/svg"
class="h-5 w-5 -mt-1 group-hover:text-blue-500 inline text-gray-400"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
stroke-width="2"
>
<path stroke-linecap="round" stroke-linejoin="round"
d="M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h4a3 3 0 013 3v1"
<path
stroke-linecap="round"
stroke-linejoin="round"
d="M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h4a3 3 0 013 3v1"
/>
</svg>
Stop Impersonation
</template>
<template v-else>
<div class="px-6">
<Loader class="h-4 w-4 inline"/>
<Loader class="h-4 w-4 inline" />
</div>
</template>
</button>
@@ -24,9 +32,9 @@
</template>
<script>
import {computed} from 'vue'
import {useAuthStore} from '../../stores/auth.js';
import {useWorkspacesStore} from '../../stores/workspaces.js';
import { computed } from "vue"
import { useAuthStore } from "../../stores/auth.js"
import { useWorkspacesStore } from "../../stores/workspaces.js"
export default {
setup() {
@@ -40,13 +48,12 @@ export default {
},
data: () => ({
loading: false
loading: false,
}),
computed: {},
mounted() {
},
mounted() {},
methods: {
async reverseImpersonation() {
@@ -54,13 +61,13 @@ export default {
this.authStore.stopImpersonating()
// Fetch the user.
const userData = await opnFetch('user')
const userData = await opnFetch("user")
this.authStore.setUser(userData)
const workspaces = await fetchAllWorkspaces()
this.workspacesStore.set(workspaces.data.value)
this.$router.push({name: 'settings-admin'})
this.$router.push({ name: "settings-admin" })
this.loading = false
}
}
},
},
}
</script>