-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: remove plugin icon from header tabs
- Loading branch information
Showing
3 changed files
with
94 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
66 changes: 66 additions & 0 deletions
66
packages/app-frontend/src/features/plugin/PluginSourceDescription.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
<script lang="ts"> | ||
import { computed, defineComponent } from 'vue' | ||
import { useRouter } from '@front/util/router' | ||
import { usePlugins } from '.' | ||
export default defineComponent({ | ||
props: { | ||
pluginId: { | ||
type: String, | ||
required: true, | ||
}, | ||
}, | ||
setup (props) { | ||
const { | ||
plugins, | ||
} = usePlugins() | ||
const plugin = computed(() => plugins.value.find(p => p.id === props.pluginId)) | ||
const router = useRouter() | ||
function go () { | ||
router.push({ | ||
name: 'plugin-details', | ||
params: { | ||
pluginId: props.pluginId, | ||
}, | ||
}) | ||
} | ||
return { | ||
plugin, | ||
go, | ||
} | ||
}, | ||
}) | ||
</script> | ||
|
||
<template> | ||
<div | ||
v-if="plugin" | ||
class="flex space-x-3 items-center" | ||
> | ||
<div class="flex items-center justify-center w-8 h-8 bg-gray-700 dark:bg-gray-200 rounded"> | ||
<img | ||
v-if="plugin.logo" | ||
:src="plugin.logo" | ||
alt="Plugin logo" | ||
class="max-w-[24px] max-h-[24px]" | ||
> | ||
<VueIcon | ||
v-else | ||
icon="extension" | ||
/> | ||
</div> | ||
<div> | ||
<div>Provided by <b>{{ plugin ? plugin.label : pluginId }}</b></div> | ||
<div | ||
v-if="plugin" | ||
class="opacity-50" | ||
> | ||
<div>Plugin ID: {{ plugin.id }}</div> | ||
</div> | ||
</div> | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters