mirror of
https://github.com/unraid/api.git
synced 2026-05-04 06:02:47 -05:00
345e83bfb0
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added new modal dialogs and UI components, including activation steps, OS update feedback, and expanded notification management. * Introduced a plugin to configure internationalization, state management, and Apollo client support in web components. * Added a new Log Viewer page with a streamlined interface for viewing logs. * **Improvements** * Centralized Pinia state management by consolidating all stores to use a shared global Pinia instance. * Simplified component templates by removing redundant internationalization host wrappers. * Enhanced ESLint configuration with stricter rules and global variable declarations. * Refined custom element build process to prevent jQuery conflicts and optimize minification. * Updated component imports and templates for consistent structure and maintainability. * Streamlined log viewer dropdowns using simplified select components with improved formatting. * Improved notification sidebar with filtering by importance and modular components. * Replaced legacy notification popups with new UI components and added automatic root session creation for localhost requests. * Updated OS version display and user profile UI with refined styling and component usage. * **Bug Fixes** * Fixed component tag capitalization and improved type annotations across components. * **Chores** * Updated development dependencies including ESLint plugins and build tools. * Removed deprecated log viewer patch class and cleaned up related test fixtures. * Removed unused imports and simplified Apollo client setup. * Cleaned up test mocks and removed obsolete i18n host component tests. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- - To see the specific tasks where the Asana app for GitHub is being used, see below: - https://app.asana.com/0/0/1210730229632804 --------- Co-authored-by: Pujit Mehrotra <pujit@lime-technology.com> Co-authored-by: Zack Spear <zackspear@users.noreply.github.com>
131 lines
3.3 KiB
Vue
131 lines
3.3 KiB
Vue
<script lang="ts" setup>
|
|
import { computed, h } from 'vue';
|
|
import { storeToRefs } from 'pinia';
|
|
|
|
import { BrandButton, BrandLoading } from '@unraid/ui';
|
|
|
|
import type { ComposerTranslation } from 'vue-i18n';
|
|
|
|
import { useServerStore } from '~/store/server';
|
|
import { useUnraidApiStore } from '~/store/unraidApi';
|
|
import UpcUptimeExpire from './UptimeExpire.vue';
|
|
import KeyActions from '~/components/KeyActions.vue';
|
|
|
|
defineProps<{ t: ComposerTranslation }>();
|
|
|
|
const BrandLoadingIcon = () => h(BrandLoading, { variant: 'white' });
|
|
|
|
const { expireTime, connectPluginInstalled, state, stateData } = storeToRefs(useServerStore());
|
|
const { unraidApiStatus, unraidApiRestartAction } = storeToRefs(useUnraidApiStore());
|
|
|
|
const showExpireTime = computed(
|
|
() => (state.value === 'TRIAL' || state.value === 'EEXPIRED') && expireTime.value > 0
|
|
);
|
|
</script>
|
|
|
|
<template>
|
|
<div class="flex flex-col grow gap-y-24px p-16px">
|
|
<header>
|
|
<h2 class="text-24px text-center font-semibold" v-html="t(stateData.heading)" />
|
|
<div
|
|
class="text-center prose text-16px leading-relaxed whitespace-normal opacity-75 gap-y-8px"
|
|
v-html="t(stateData.message)"
|
|
/>
|
|
<UpcUptimeExpire v-if="showExpireTime" class="text-center opacity-75 mt-12px" :t="t" />
|
|
</header>
|
|
<template v-if="stateData.actions">
|
|
<ul
|
|
v-if="connectPluginInstalled && unraidApiStatus !== 'online'"
|
|
class="list-reset flex flex-col gap-y-8px px-16px"
|
|
>
|
|
<li>
|
|
<BrandButton
|
|
class="w-full"
|
|
:disabled="unraidApiStatus === 'connecting' || unraidApiStatus === 'restarting'"
|
|
:icon="unraidApiStatus === 'restarting' ? BrandLoadingIcon : unraidApiRestartAction?.icon"
|
|
:text="
|
|
unraidApiStatus === 'restarting' ? t('Restarting unraid-api…') : t('Restart unraid-api')
|
|
"
|
|
:title="
|
|
unraidApiStatus === 'restarting' ? t('Restarting unraid-api…') : t('Restart unraid-api')
|
|
"
|
|
@click="unraidApiRestartAction?.click?.()"
|
|
/>
|
|
</li>
|
|
</ul>
|
|
<KeyActions :actions="stateData.actions" :t="t" />
|
|
</template>
|
|
</div>
|
|
</template>
|
|
|
|
<style lang="postcss">
|
|
/* Import unraid-ui globals first */
|
|
@import '@unraid/ui/styles';
|
|
@import '~/assets/main.css';
|
|
|
|
.DropdownWrapper_blip {
|
|
box-shadow: var(--ring-offset-shadow), var(--ring-shadow), var(--shadow-foreground);
|
|
|
|
&::before {
|
|
@apply absolute z-20 block;
|
|
|
|
content: '';
|
|
width: 0;
|
|
height: 0;
|
|
top: -10px;
|
|
right: 42px;
|
|
border-right: 11px solid transparent;
|
|
border-bottom: 11px solid var(--color-popover);
|
|
border-left: 11px solid transparent;
|
|
}
|
|
}
|
|
|
|
.unraid_mark_2,
|
|
.unraid_mark_4 {
|
|
animation: mark_2 1.5s ease infinite;
|
|
}
|
|
.unraid_mark_3 {
|
|
animation: mark_3 1.5s ease infinite;
|
|
}
|
|
.unraid_mark_6,
|
|
.unraid_mark_8 {
|
|
animation: mark_6 1.5s ease infinite;
|
|
}
|
|
.unraid_mark_7 {
|
|
animation: mark_7 1.5s ease infinite;
|
|
}
|
|
|
|
@keyframes mark_2 {
|
|
50% {
|
|
transform: translateY(-40px);
|
|
}
|
|
100% {
|
|
transform: translateY(0);
|
|
}
|
|
}
|
|
@keyframes mark_3 {
|
|
50% {
|
|
transform: translateY(-62px);
|
|
}
|
|
100% {
|
|
transform: translateY(0);
|
|
}
|
|
}
|
|
@keyframes mark_6 {
|
|
50% {
|
|
transform: translateY(40px);
|
|
}
|
|
100% {
|
|
transform: translateY(0);
|
|
}
|
|
}
|
|
@keyframes mark_7 {
|
|
50% {
|
|
transform: translateY(62px);
|
|
}
|
|
100% {
|
|
transform: translateY(0);
|
|
}
|
|
}
|
|
</style>
|