feat(settings): add update check and MCP uninstall
This commit is contained in:
12 files changed
+189
-9
No files matched your search
@@ -1,7 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import { computed, onMounted, ref, watch } from "vue";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { ChevronDown, ExternalLink, Loader2, RefreshCw, Tag } from "@lucide/vue";
|
||||
import { ChevronDown, CloudDownload, ExternalLink, Loader2, RefreshCw, Tag } from "@lucide/vue";
|
||||
import { Badge } from "@/components/ui/badge";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { Label } from "@/components/ui/label";
|
||||
@@ -13,6 +13,19 @@ const PAGE_SIZE = 5;
|
||||
|
||||
const { t, locale } = useI18n();
|
||||
|
||||
withDefaults(
|
||||
defineProps<{
|
||||
checkingUpdates?: boolean;
|
||||
}>(),
|
||||
{
|
||||
checkingUpdates: false,
|
||||
},
|
||||
);
|
||||
|
||||
const emit = defineEmits<{
|
||||
"check-updates": [];
|
||||
}>();
|
||||
|
||||
const loading = ref(false);
|
||||
const error = ref("");
|
||||
const releases = ref<ChangelogRelease[]>([]);
|
||||
@@ -123,6 +136,11 @@ watch(changelogLang, (lang) => {
|
||||
<p class="text-sm text-muted-foreground">{{ t("settings.changelogDescription") }}</p>
|
||||
</div>
|
||||
<div class="settings-about-section-actions flex shrink-0 flex-wrap items-center gap-2">
|
||||
<Button type="button" variant="outline" size="sm" :disabled="checkingUpdates" @click="emit('check-updates')">
|
||||
<Loader2 v-if="checkingUpdates" class="mr-1 h-3.5 w-3.5 animate-spin" />
|
||||
<CloudDownload v-else class="mr-1 h-3.5 w-3.5" />
|
||||
{{ t("updates.check") }}
|
||||
</Button>
|
||||
<Button type="button" variant="outline" size="sm" :disabled="loading" @click="openExternalUrl(changelogWebsiteUrl(changelogLang))">
|
||||
<ExternalLink class="mr-1 h-3.5 w-3.5" />
|
||||
{{ t("settings.changelogOpenWebsite") }}
|
||||
|
||||
Reference in new issue
Block a user