feat: add GitHub link button to ExtensionCard for extensions with a repository
This commit is contained in:
@@ -93,8 +93,7 @@ const viewReadme = () => {
|
||||
|
||||
<div v-if="extension?.icon">
|
||||
<v-avatar size="65">
|
||||
<v-img :src="extension.icon"
|
||||
:alt="extension.name" cover></v-img>
|
||||
<v-img :src="extension.icon" :alt="extension.name" cover></v-img>
|
||||
</v-avatar>
|
||||
</div>
|
||||
|
||||
@@ -103,6 +102,10 @@ const viewReadme = () => {
|
||||
<div style="position: absolute; right: 8px; top: 8px; z-index: 5;">
|
||||
<v-menu offset-y>
|
||||
<template v-slot:activator="{ props: menuProps }">
|
||||
<v-btn icon variant="text" aria-label="more" v-if="extension?.repo" :href="extension?.repo"
|
||||
target="_blank">
|
||||
<v-icon icon="mdi-github"></v-icon>
|
||||
</v-btn>
|
||||
<v-btn v-bind="menuProps" icon variant="text" aria-label="more">
|
||||
<v-icon icon="mdi-dots-vertical"></v-icon>
|
||||
</v-btn>
|
||||
@@ -148,7 +151,7 @@ const viewReadme = () => {
|
||||
|
||||
<v-list-item @click="viewHandlers">
|
||||
<v-list-item-title>{{ tm('card.actions.viewHandlers') }} ({{ extension.handlers.length
|
||||
}})</v-list-item-title>
|
||||
}})</v-list-item-title>
|
||||
</v-list-item>
|
||||
|
||||
<v-list-item @click="updateExtension" :disabled="!extension?.has_update">
|
||||
@@ -163,7 +166,8 @@ const viewReadme = () => {
|
||||
|
||||
<div style="width: 100%; margin-bottom: 24px;">
|
||||
<!-- 最多一行 -->
|
||||
<div class="text-caption" style="color: gray; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-right: 36px;">
|
||||
<div class="text-caption"
|
||||
style="color: gray; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-right: 84px;">
|
||||
{{ extension.author }} / {{ extension.name }}
|
||||
</div>
|
||||
<p class="text-h3 font-weight-black" :class="{ 'text-h4': $vuetify.display.xs }">
|
||||
|
||||
@@ -647,7 +647,7 @@ onMounted(async () => {
|
||||
<div class="text-subtitle-1 font-weight-medium">{{ item.name }}</div>
|
||||
<div v-if="item.reserved" class="d-flex align-center mt-1">
|
||||
<v-chip color="primary" size="x-small" class="font-weight-medium">{{ tm('status.system')
|
||||
}}</v-chip>
|
||||
}}</v-chip>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -799,7 +799,8 @@ onMounted(async () => {
|
||||
|
||||
<v-col cols="12" md="12" style="padding: 0px;">
|
||||
<v-data-table :headers="pluginMarketHeaders" :items="pluginMarketData" item-key="name"
|
||||
:loading="loading_" v-model:search="marketSearch" :filter-keys="filterKeys" :custom-filter="marketCustomFilter">
|
||||
:loading="loading_" v-model:search="marketSearch" :filter-keys="filterKeys"
|
||||
:custom-filter="marketCustomFilter">
|
||||
<template v-slot:item.name="{ item }">
|
||||
<div class="d-flex align-center"
|
||||
style="overflow-x: auto; scrollbar-width: thin; scrollbar-track-color: transparent;">
|
||||
@@ -814,9 +815,9 @@ onMounted(async () => {
|
||||
</template>
|
||||
|
||||
<template v-slot:item.desc="{ item }">
|
||||
<div style="font-size: 13px;">
|
||||
<small>
|
||||
{{ item.desc }}
|
||||
</div>
|
||||
</small>
|
||||
</template>
|
||||
<template v-slot:item.author="{ item }">
|
||||
<div style="font-size: 12px;">
|
||||
@@ -828,7 +829,7 @@ onMounted(async () => {
|
||||
<span>{{ item.stars }}</span>
|
||||
</template>
|
||||
<template v-slot:item.updated_at="{ item }">
|
||||
<span>{{ new Date(item.updated_at).toLocaleString() }}</span>
|
||||
<small>{{ new Date(item.updated_at).toLocaleString() }}</small>
|
||||
</template>
|
||||
<template v-slot:item.tags="{ item }">
|
||||
<span v-if="item.tags.length === 0">-</span>
|
||||
@@ -837,13 +838,13 @@ onMounted(async () => {
|
||||
{{ tag }}</v-chip>
|
||||
</template>
|
||||
<template v-slot:item.actions="{ item }">
|
||||
<v-btn v-if="!item.installed" class="text-none mr-2" size="x-small" variant="flat"
|
||||
<v-btn class="text-none mr-2" size="x-small" icon variant="text"
|
||||
@click="open(item.repo)"><v-icon>mdi-github</v-icon></v-btn>
|
||||
<v-btn v-if="!item.installed" class="text-none mr-2" size="x-small" icon variant="text"
|
||||
@click="handleInstallPlugin(item)">
|
||||
<v-icon>mdi-download</v-icon></v-btn>
|
||||
<v-btn v-else class="text-none mr-2" size="x-small" variant="flat" border
|
||||
<v-btn v-else class="text-none mr-2" size="x-small" icon variant="text"
|
||||
disabled><v-icon>mdi-check</v-icon></v-btn>
|
||||
<v-btn class="text-none mr-2" size="x-small" variant="flat" border
|
||||
@click="open(item.repo)"><v-icon>mdi-help</v-icon></v-btn>
|
||||
</template>
|
||||
</v-data-table>
|
||||
</v-col>
|
||||
@@ -861,7 +862,8 @@ onMounted(async () => {
|
||||
|
||||
<v-col v-if="activeTab === 'market'" style="margin-bottom: 16px;" cols="12" md="12">
|
||||
<small><a href="https://astrbot.app/dev/plugin.html">{{ tm('market.devDocs') }}</a></small> |
|
||||
<small> <a href="https://github.com/AstrBotDevs/AstrBot_Plugins_Collection">{{ tm('market.submitRepo') }}</a></small>
|
||||
<small> <a href="https://github.com/AstrBotDevs/AstrBot_Plugins_Collection">{{ tm('market.submitRepo')
|
||||
}}</a></small>
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
@@ -942,7 +944,7 @@ onMounted(async () => {
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn color="blue-darken-1" variant="text" @click="showPluginInfoDialog = false">{{ tm('buttons.close')
|
||||
}}</v-btn>
|
||||
}}</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
|
||||
Reference in New Issue
Block a user