refactor: remove status mirror interaction and obsolete dialogs
This commit is contained in:
+17
-32
@@ -2,8 +2,8 @@
|
|||||||
import { computed, nextTick, onBeforeUnmount, onMounted, ref, watch } from 'vue'
|
import { computed, nextTick, onBeforeUnmount, onMounted, ref, watch } from 'vue'
|
||||||
import { useI18n } from 'vue-i18n'
|
import { useI18n } from 'vue-i18n'
|
||||||
import {
|
import {
|
||||||
ArrowRight, ArrowUpRight, CircleHelp, Check,
|
ArrowRight, CircleHelp, Check,
|
||||||
ExternalLink, Menu, Monitor, Moon,
|
Menu, Monitor, Moon,
|
||||||
Search, Sun, X,
|
Search, Sun, X,
|
||||||
} from 'lucide-vue-next'
|
} from 'lucide-vue-next'
|
||||||
import RollingText from './components/RollingText.vue'
|
import RollingText from './components/RollingText.vue'
|
||||||
@@ -92,37 +92,24 @@ function announcementDate(date: string) {
|
|||||||
const parts = Object.fromEntries(formatter.formatToParts(new Date(date)).map(part => [part.type, part.value]))
|
const parts = Object.fromEntries(formatter.formatToParts(new Date(date)).map(part => [part.type, part.value]))
|
||||||
return t('mirrors.datePatterns.announcement', { year: parts.year, month: parts.month, day: parts.day })
|
return t('mirrors.datePatterns.announcement', { year: parts.year, month: parts.month, day: parts.day })
|
||||||
}
|
}
|
||||||
function nextLabel(mirror: Mirror) {
|
|
||||||
return ['syncing', 'failed', 'paused', 'unknown'].includes(mirror.status)
|
|
||||||
? t(`mirrors.status.${mirror.status}`) : relativeTime(mirror.nextSync, true)
|
|
||||||
}
|
|
||||||
function resetSearch() { search.value = ''; searchInput.value?.focus() }
|
function resetSearch() { search.value = ''; searchInput.value?.focus() }
|
||||||
|
|
||||||
type Modal = 'about' | 'downloads' | 'mirror'
|
const downloadDialog = ref<HTMLDialogElement>()
|
||||||
const dialog = ref<HTMLDialogElement>()
|
const downloadsOpen = ref(false)
|
||||||
const modal = ref<Modal | null>(null)
|
async function openDownloads() {
|
||||||
const selectedMirror = ref<Mirror | null>(null)
|
downloadsOpen.value = true
|
||||||
const modalTitle = computed(() => {
|
|
||||||
if (modal.value === 'mirror') return selectedMirror.value?.name || ''
|
|
||||||
const keys = { about: 'common.aboutTitle', downloads: 'announcements.downloadsTitle' }
|
|
||||||
return modal.value && modal.value in keys ? t(keys[modal.value as keyof typeof keys]) : ''
|
|
||||||
})
|
|
||||||
async function openModal(value: Modal, mirror?: Mirror) {
|
|
||||||
modal.value = value
|
|
||||||
selectedMirror.value = mirror || null
|
|
||||||
mobileOpen.value = false
|
mobileOpen.value = false
|
||||||
themeOpen.value = false
|
themeOpen.value = false
|
||||||
await nextTick()
|
await nextTick()
|
||||||
if (!dialog.value?.open) dialog.value?.showModal()
|
if (!downloadDialog.value?.open) downloadDialog.value?.showModal()
|
||||||
}
|
}
|
||||||
function closeModal() { dialog.value?.close() }
|
function closeDownloads() { downloadDialog.value?.close() }
|
||||||
function onDialogClose() { modal.value = null; selectedMirror.value = null }
|
watch(downloadsOpen, value => { document.body.classList.toggle('dialog-open', value) })
|
||||||
watch(modal, value => { document.body.classList.toggle('dialog-open', value !== null) })
|
|
||||||
|
|
||||||
function onKeydown(event: KeyboardEvent) {
|
function onKeydown(event: KeyboardEvent) {
|
||||||
if (event.key === 'Escape') { themeOpen.value = false; mobileOpen.value = false }
|
if (event.key === 'Escape') { themeOpen.value = false; mobileOpen.value = false }
|
||||||
const target = event.target as HTMLElement
|
const target = event.target as HTMLElement
|
||||||
if (!isAdminPage && !isAnnouncementsPage && !isHelpPage && !dialog.value?.open && ((event.key === 'k' && (event.ctrlKey || event.metaKey))
|
if (!isAdminPage && !isAnnouncementsPage && !isHelpPage && !downloadDialog.value?.open && ((event.key === 'k' && (event.ctrlKey || event.metaKey))
|
||||||
|| (event.key === '/' && !['INPUT', 'TEXTAREA', 'SELECT'].includes(target.tagName) && !target.isContentEditable))) {
|
|| (event.key === '/' && !['INPUT', 'TEXTAREA', 'SELECT'].includes(target.tagName) && !target.isContentEditable))) {
|
||||||
event.preventDefault()
|
event.preventDefault()
|
||||||
if (isStatusPage) statusPage.value?.focusSearch()
|
if (isStatusPage) statusPage.value?.focusSearch()
|
||||||
@@ -189,7 +176,7 @@ onBeforeUnmount(() => {
|
|||||||
<AdminPage v-if="isAdminPage" />
|
<AdminPage v-if="isAdminPage" />
|
||||||
<AnnouncementsPage v-else-if="isAnnouncementsPage" />
|
<AnnouncementsPage v-else-if="isAnnouncementsPage" />
|
||||||
<HelpPage v-else-if="isHelpPage" :name="help.name" :invalid="help.invalid" />
|
<HelpPage v-else-if="isHelpPage" :name="help.name" :invalid="help.invalid" />
|
||||||
<StatusPage v-else-if="isStatusPage" ref="statusPage" :mirrors="mirrors" :now="now" :cycle="boardCycle" :show-next-sync="showNextSync" @mirror="openModal('mirror', $event)" />
|
<StatusPage v-else-if="isStatusPage" ref="statusPage" :mirrors="mirrors" :now="now" :cycle="boardCycle" :show-next-sync="showNextSync" />
|
||||||
<div v-else class="main-grid">
|
<div v-else class="main-grid">
|
||||||
<section id="mirrors" class="mirror-section" tabindex="-1">
|
<section id="mirrors" class="mirror-section" tabindex="-1">
|
||||||
<div class="mirror-controls">
|
<div class="mirror-controls">
|
||||||
@@ -228,11 +215,11 @@ onBeforeUnmount(() => {
|
|||||||
<time :datetime="item.date">{{ announcementDate(item.date) }}</time>
|
<time :datetime="item.date">{{ announcementDate(item.date) }}</time>
|
||||||
<span class="news-title" lang="zh-CN">{{ item.title }}</span>
|
<span class="news-title" lang="zh-CN">{{ item.title }}</span>
|
||||||
</a>
|
</a>
|
||||||
<p v-if="!announcements.length" class="dialog-hint">{{ t('common.noAnnouncements') }}</p>
|
<p v-if="!announcements.length" class="sidebar-empty">{{ t('common.noAnnouncements') }}</p>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section class="side-section downloads">
|
<section class="side-section downloads">
|
||||||
<div class="side-heading"><h2>{{ t('announcements.downloads') }}</h2><button class="download-menu-button" aria-haspopup="dialog" aria-controls="content-dialog" @click="openModal('downloads')">{{ t('announcements.downloadMenu') }}</button></div>
|
<div class="side-heading"><h2>{{ t('announcements.downloads') }}</h2><button class="download-menu-button" aria-haspopup="dialog" aria-controls="download-dialog" @click="openDownloads">{{ t('announcements.downloadMenu') }}</button></div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section v-if="site?.relatedLinks?.length" class="side-section useful-links">
|
<section v-if="site?.relatedLinks?.length" class="side-section useful-links">
|
||||||
@@ -284,12 +271,10 @@ onBeforeUnmount(() => {
|
|||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
<dialog id="content-dialog" ref="dialog" class="content-dialog" :class="{ 'download-dialog': modal === 'downloads' }" aria-labelledby="dialog-title" @close="onDialogClose" @click="($event.target === $event.currentTarget) && closeModal()">
|
<dialog id="download-dialog" ref="downloadDialog" class="download-dialog" aria-labelledby="download-dialog-title" @close="downloadsOpen = false" @click="($event.target === $event.currentTarget) && closeDownloads()">
|
||||||
<div class="dialog-inner"><div class="dialog-heading"><h2 id="dialog-title">{{ modalTitle }}</h2><button class="icon-button" :aria-label="t('common.close')" autofocus @click="closeModal"><X :size="21" /></button></div>
|
<div class="download-dialog-inner"><div class="download-dialog-heading"><h2 id="download-dialog-title">{{ t('announcements.downloadsTitle') }}</h2><button class="icon-button" :aria-label="t('common.close')" autofocus @click="closeDownloads"><X :size="21" /></button></div>
|
||||||
<div class="dialog-content">
|
<div class="download-dialog-content">
|
||||||
<template v-if="modal === 'mirror' && selectedMirror"><p class="dialog-lead">{{ description(selectedMirror) }}</p><div class="mirror-facts"><span>{{ t('mirrors.columns.status') }}</span><span>{{ t(`mirrors.status.${selectedMirror.status}`) }}</span><span>{{ t('mirrors.columns.updated') }}</span><span>{{ relativeTime(selectedMirror.lastSuccess) }}</span><span>{{ t('mirrors.columns.next') }}</span><span>{{ nextLabel(selectedMirror) }}</span></div><div class="dialog-actions"><a v-if="selectedMirror.help?.trim()" class="text-button" :href="helpUrl(selectedMirror.name)">{{ t('mirrors.helpTitle') }}<CircleHelp :size="18" /></a><a class="text-button" :href="selectedMirror.browseUrl">{{ t('common.openDirectory') }}<ArrowRight :size="15" /></a><a v-if="selectedMirror.website" :href="selectedMirror.website" target="_blank" rel="noopener noreferrer" class="text-button">{{ t('mirrors.official') }}<ExternalLink :size="14" /></a></div></template>
|
<DownloadList v-if="downloadsOpen" :items="distributions" />
|
||||||
<DownloadList v-else-if="modal === 'downloads'" :items="distributions" />
|
|
||||||
<template v-else-if="modal === 'about'"><img class="about-seal" :src="site?.avatar || '/assets/ouc-seal.png'" alt="" width="80" height="80" /><p class="article-body">{{ t('common.aboutBody') }}</p><div class="about-links"><a href="https://www.itouc.cn/" target="_blank" rel="noopener noreferrer">{{ t('common.studio') }}<ArrowUpRight :size="15" /></a><a href="https://github.com/tuna/tunasync" target="_blank" rel="noopener noreferrer">{{ t('common.source') }} · tunasync<ArrowUpRight :size="15" /></a></div></template>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</dialog>
|
</dialog>
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ import MonitoringChart from './MonitoringChart.vue'
|
|||||||
import RollingText from './RollingText.vue'
|
import RollingText from './RollingText.vue'
|
||||||
|
|
||||||
const props = defineProps<{ mirrors: Mirror[]; now: number; cycle: number; showNextSync: boolean }>()
|
const props = defineProps<{ mirrors: Mirror[]; now: number; cycle: number; showNextSync: boolean }>()
|
||||||
const emit = defineEmits<{ mirror: [mirror: Mirror] }>()
|
|
||||||
const { t, n } = useI18n({ useScope: 'global' })
|
const { t, n } = useI18n({ useScope: 'global' })
|
||||||
const { mirrorSize, relativeTime, fullTime } = useMirrorFormats(toRef(props, 'now'))
|
const { mirrorSize, relativeTime, fullTime } = useMirrorFormats(toRef(props, 'now'))
|
||||||
const range = ref<MonitoringRange>(24)
|
const range = ref<MonitoringRange>(24)
|
||||||
@@ -127,7 +126,7 @@ onBeforeUnmount(() => { sequence++; controller?.abort(); speedController?.abort(
|
|||||||
<table class="sync-table" role="table" aria-labelledby="monitor-sync">
|
<table class="sync-table" role="table" aria-labelledby="monitor-sync">
|
||||||
<thead role="rowgroup"><tr role="row"><th v-for="column in ['name', 'update', 'upstream', 'status', 'size', 'speed']" :key="column" role="columnheader" scope="col" :data-column="column" :title="column === 'speed' ? t('monitor.speedDescription') : undefined">{{ t(`monitor.columns.${column}`) }}</th></tr></thead>
|
<thead role="rowgroup"><tr role="row"><th v-for="column in ['name', 'update', 'upstream', 'status', 'size', 'speed']" :key="column" role="columnheader" scope="col" :data-column="column" :title="column === 'speed' ? t('monitor.speedDescription') : undefined">{{ t(`monitor.columns.${column}`) }}</th></tr></thead>
|
||||||
<tbody role="rowgroup"><tr v-for="mirror in filteredMirrors" :key="mirror.name" role="row" :data-status="mirror.status">
|
<tbody role="rowgroup"><tr v-for="mirror in filteredMirrors" :key="mirror.name" role="row" :data-status="mirror.status">
|
||||||
<td role="cell" data-column="name"><button class="sync-name" :aria-label="t('mirrors.browse', { name: mirror.name })" @click="emit('mirror', mirror)">{{ mirror.name }}</button></td>
|
<td role="cell" data-column="name"><span class="sync-name">{{ mirror.name }}</span></td>
|
||||||
<td role="cell" data-column="update" :title="fullTime(syncInfo(mirror, showNextSync).timestamp)"><div class="sync-update"><RollingText :value="syncLabel(mirror, showNextSync)" :cycle="cycle" :reserve="[syncLabel(mirror, false), syncLabel(mirror, true)]" :shuffle="false" /><RollingText :value="syncTime(mirror, showNextSync)" :cycle="cycle" :reserve="[syncTime(mirror, false), syncTime(mirror, true)]" :shuffle="false" /></div></td>
|
<td role="cell" data-column="update" :title="fullTime(syncInfo(mirror, showNextSync).timestamp)"><div class="sync-update"><RollingText :value="syncLabel(mirror, showNextSync)" :cycle="cycle" :reserve="[syncLabel(mirror, false), syncLabel(mirror, true)]" :shuffle="false" /><RollingText :value="syncTime(mirror, showNextSync)" :cycle="cycle" :reserve="[syncTime(mirror, false), syncTime(mirror, true)]" :shuffle="false" /></div></td>
|
||||||
<td role="cell" data-column="upstream"><span class="sync-mobile-label" aria-hidden="true">{{ t('monitor.columns.upstream') }}</span><a :href="mirror.upstream" target="_blank" rel="noopener noreferrer">{{ mirror.upstream }}</a></td>
|
<td role="cell" data-column="upstream"><span class="sync-mobile-label" aria-hidden="true">{{ t('monitor.columns.upstream') }}</span><a :href="mirror.upstream" target="_blank" rel="noopener noreferrer">{{ mirror.upstream }}</a></td>
|
||||||
<td role="cell" data-column="status">{{ t(`mirrors.status.${mirror.status}`) }}</td>
|
<td role="cell" data-column="status">{{ t(`mirrors.status.${mirror.status}`) }}</td>
|
||||||
@@ -175,8 +174,8 @@ onBeforeUnmount(() => { sequence++; controller?.abort(); speedController?.abort(
|
|||||||
.sync-table :is(th, td):last-child { padding-right: 0; }
|
.sync-table :is(th, td):last-child { padding-right: 0; }
|
||||||
.sync-table tr[data-status='syncing'] { background: var(--blue-soft); }
|
.sync-table tr[data-status='syncing'] { background: var(--blue-soft); }
|
||||||
.sync-table tr[data-status='failed'] { background: var(--red-soft); }
|
.sync-table tr[data-status='failed'] { background: var(--red-soft); }
|
||||||
.sync-name { padding: 0; min-height: 30px; color: var(--blue); font: 600 13px ui-monospace, Consolas, monospace; text-align: left; overflow-wrap: anywhere; }
|
.sync-name { display: inline-flex; align-items: center; min-height: 30px; color: var(--ink); font: 600 13px ui-monospace, Consolas, monospace; overflow-wrap: anywhere; }
|
||||||
.sync-name:hover, .sync-table a:hover { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
|
.sync-table a:hover { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
|
||||||
.sync-update { display: grid; grid-template-columns: max-content minmax(0, 1fr); align-items: center; gap: 12px; font-size: 12px; font-variant-numeric: tabular-nums; }
|
.sync-update { display: grid; grid-template-columns: max-content minmax(0, 1fr); align-items: center; gap: 12px; font-size: 12px; font-variant-numeric: tabular-nums; }
|
||||||
.sync-table td[data-column='upstream'] { font-size: 12px; }
|
.sync-table td[data-column='upstream'] { font-size: 12px; }
|
||||||
.sync-table td[data-column='size'] { font-variant-numeric: tabular-nums; white-space: nowrap; }
|
.sync-table td[data-column='size'] { font-variant-numeric: tabular-nums; white-space: nowrap; }
|
||||||
|
|||||||
@@ -40,9 +40,6 @@ export default {
|
|||||||
"preview": "Interface preview · Demo data",
|
"preview": "Interface preview · Demo data",
|
||||||
"footer": "MirrorITS is developed and hosted by ITStudio at Ocean University of China.",
|
"footer": "MirrorITS is developed and hosted by ITStudio at Ocean University of China.",
|
||||||
"studio": "IT Studio",
|
"studio": "IT Studio",
|
||||||
"source": "Sync engine",
|
|
||||||
"aboutTitle": "About MirrorITS",
|
|
||||||
"aboutBody": "MirrorITS provides open-source software downloads and is developed and hosted by ITStudio at Ocean University of China.",
|
|
||||||
"previewBody": "This is an interface prototype. Mirrors and sync jobs use demo data and are not connected to the mirror server. Mirror directories, configuration addresses and downloads will be available after integration.",
|
"previewBody": "This is an interface prototype. Mirrors and sync jobs use demo data and are not connected to the mirror server. Mirror directories, configuration addresses and downloads will be available after integration.",
|
||||||
"emptyValue": "—",
|
"emptyValue": "—",
|
||||||
"footerLinks": "Related sites",
|
"footerLinks": "Related sites",
|
||||||
|
|||||||
@@ -40,9 +40,6 @@ export default {
|
|||||||
"preview": "界面预览 · 演示数据",
|
"preview": "界面预览 · 演示数据",
|
||||||
"footer": "爱特开源软件镜像站(MirrorITS)由中国海洋大学爱特工作室开发部署。",
|
"footer": "爱特开源软件镜像站(MirrorITS)由中国海洋大学爱特工作室开发部署。",
|
||||||
"studio": "爱特工作室",
|
"studio": "爱特工作室",
|
||||||
"source": "同步引擎",
|
|
||||||
"aboutTitle": "关于 MirrorITS",
|
|
||||||
"aboutBody": "爱特开源软件镜像站(MirrorITS)由中国海洋大学爱特工作室开发部署,为校内外用户提供开源软件下载服务。",
|
|
||||||
"previewBody": "当前为界面原型,镜像与同步任务均为演示数据,尚未连接镜像服务器。正式镜像目录、配置地址与下载服务将在接入后开放。",
|
"previewBody": "当前为界面原型,镜像与同步任务均为演示数据,尚未连接镜像服务器。正式镜像目录、配置地址与下载服务将在接入后开放。",
|
||||||
"emptyValue": "—",
|
"emptyValue": "—",
|
||||||
"footerLinks": "友情链接",
|
"footerLinks": "友情链接",
|
||||||
|
|||||||
+18
-37
@@ -3,9 +3,9 @@
|
|||||||
/* Palette from itouc.cn. */
|
/* Palette from itouc.cn. */
|
||||||
--blue: #0969da; --blue-bright: #58a6ff; --blue-soft: rgba(9, 105, 218, .08);
|
--blue: #0969da; --blue-bright: #58a6ff; --blue-soft: rgba(9, 105, 218, .08);
|
||||||
--ink: #24292f; --ink-2: #343a40; --ink-3: var(--ink-2); --line: #d0d7de; --line-soft: #d8dee4;
|
--ink: #24292f; --ink-2: #343a40; --ink-3: var(--ink-2); --line: #d0d7de; --line-soft: #d8dee4;
|
||||||
--paper: #fff; --surface: #f6f8fa; --panel: #fff; --panel-blue: var(--surface);
|
--paper: #fff; --surface: #f6f8fa; --panel: #fff;
|
||||||
--on-accent: #fff; --accent-hover: color-mix(in srgb, var(--blue) 88%, #000);
|
--on-accent: #fff; --accent-hover: color-mix(in srgb, var(--blue) 88%, #000);
|
||||||
--shadow: 0 4px 12px rgba(140, 149, 159, .15); --dialog-shadow: 0 8px 24px rgba(140, 149, 159, .2);
|
--shadow: 0 4px 12px rgba(140, 149, 159, .15);
|
||||||
--green: #2dba4e; --amber: #b98325; --red: #cf222e; --red-soft: rgba(207, 34, 46, .08); --violet: #8957e5;
|
--green: #2dba4e; --amber: #b98325; --red: #cf222e; --red-soft: rgba(207, 34, 46, .08); --violet: #8957e5;
|
||||||
color-scheme: light;
|
color-scheme: light;
|
||||||
}
|
}
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
--paper: #0d1117; --surface: #161b22; --panel: #161b22;
|
--paper: #0d1117; --surface: #161b22; --panel: #161b22;
|
||||||
--on-accent: #0d1117; --accent-hover: color-mix(in srgb, var(--blue) 88%, #fff);
|
--on-accent: #0d1117; --accent-hover: color-mix(in srgb, var(--blue) 88%, #fff);
|
||||||
--green: #6fda83; --amber: #f5b04d; --red: #ff8a80; --red-soft: rgba(255, 138, 128, .12); --violet: #b9a0ff;
|
--green: #6fda83; --amber: #f5b04d; --red: #ff8a80; --red-soft: rgba(255, 138, 128, .12); --violet: #b9a0ff;
|
||||||
--shadow: 0 4px 12px rgba(0, 0, 0, .5); --dialog-shadow: 0 8px 24px rgba(0, 0, 0, .8);
|
--shadow: 0 4px 12px rgba(0, 0, 0, .5);
|
||||||
color-scheme: dark;
|
color-scheme: dark;
|
||||||
}
|
}
|
||||||
* { box-sizing: border-box; scrollbar-width: thin; scrollbar-color: var(--blue) transparent; }
|
* { box-sizing: border-box; scrollbar-width: thin; scrollbar-color: var(--blue) transparent; }
|
||||||
@@ -43,7 +43,6 @@ a { color: inherit; text-decoration: none; }
|
|||||||
.brand { display: inline-flex; align-items: center; min-width: 0; }
|
.brand { display: inline-flex; align-items: center; min-width: 0; }
|
||||||
.brand-logo { display: block; flex-shrink: 0; width: 320px; max-width: 100%; aspect-ratio: 2000 / 433; }
|
.brand-logo { display: block; flex-shrink: 0; width: 320px; max-width: 100%; aspect-ratio: 2000 / 433; }
|
||||||
.brand-logo img { display: block; width: 100%; height: auto; }
|
.brand-logo img { display: block; width: 100%; height: auto; }
|
||||||
:root[data-theme='dark'] .about-seal { filter: brightness(0) invert(1); opacity: .85; }
|
|
||||||
.desktop-nav { display: flex; flex-shrink: 0; align-items: center; gap: 20px; margin-left: auto; }
|
.desktop-nav { display: flex; flex-shrink: 0; align-items: center; gap: 20px; margin-left: auto; }
|
||||||
.nav-link { padding: 14px 0; border-bottom: 2px solid transparent; color: var(--ink-2); font-size: 14px; transition: color .18s, border-color .18s; white-space: nowrap; }
|
.nav-link { padding: 14px 0; border-bottom: 2px solid transparent; color: var(--ink-2); font-size: 14px; transition: color .18s, border-color .18s; white-space: nowrap; }
|
||||||
.nav-link:hover, .nav-link.active { color: var(--blue); }
|
.nav-link:hover, .nav-link.active { color: var(--blue); }
|
||||||
@@ -97,13 +96,6 @@ h2 { margin: 0; font-size: 19px; font-weight: 600; letter-spacing: -.04em; }
|
|||||||
.mirror-name-group { display: flex; align-items: center; gap: 8px; min-width: 0; }
|
.mirror-name-group { display: flex; align-items: center; gap: 8px; min-width: 0; }
|
||||||
.mirror-name-button { display: inline-flex; align-items: center; min-width: 0; min-height: 36px; padding: 0; color: var(--blue); font: 600 16px/1.5 ui-monospace, 'Cascadia Code', Consolas, monospace; text-align: left; overflow-wrap: anywhere; }
|
.mirror-name-button { display: inline-flex; align-items: center; min-width: 0; min-height: 36px; padding: 0; color: var(--blue); font: 600 16px/1.5 ui-monospace, 'Cascadia Code', Consolas, monospace; text-align: left; overflow-wrap: anywhere; }
|
||||||
.mirror-name-button:hover { text-decoration: underline; text-underline-offset: 3px; }
|
.mirror-name-button:hover { text-decoration: underline; text-underline-offset: 3px; }
|
||||||
.distro-mark { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 31px; height: 31px; border: 1px solid color-mix(in srgb, var(--distro-color) 31%, var(--line)); border-radius: 7px; background: color-mix(in srgb, var(--distro-color) 10%, var(--panel)); color: var(--distro-color); font-family: ui-monospace, 'Cascadia Code', Consolas, monospace; font-size: 14px; font-weight: 500; }
|
|
||||||
.status-chip { display: inline-flex; align-items: center; gap: 6px; min-width: 72px; color: var(--ink-2); font-size: 11px; white-space: nowrap; }
|
|
||||||
.status-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--ink-3); }
|
|
||||||
.status-chip.success .status-dot { background: var(--green); }.status-chip.syncing .status-dot { background: var(--blue-bright); box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue-bright) 14%, transparent); }.status-chip.waiting .status-dot { background: var(--amber); }.status-chip.failed .status-dot { background: var(--red); }.status-chip.paused .status-dot { background: var(--violet); }
|
|
||||||
.status-chip.paused { color: var(--violet); }
|
|
||||||
.status-list > div[data-status='syncing'] { background: var(--blue-soft); }
|
|
||||||
.status-list > div[data-status='failed'] { background: var(--red-soft); }
|
|
||||||
.mirror-table :is(.time-cell, .metric-cell) { font-variant-numeric: tabular-nums; }
|
.mirror-table :is(.time-cell, .metric-cell) { font-variant-numeric: tabular-nums; }
|
||||||
.mirror-table .roll-frame { display: grid; width: 100%; max-width: 100%; }
|
.mirror-table .roll-frame { display: grid; width: 100%; max-width: 100%; }
|
||||||
.help-button { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; width: 28px; height: 28px; border: 0; border-radius: 50%; background: transparent; color: var(--blue); transition: color 120ms, background-color 120ms; }
|
.help-button { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; width: 28px; height: 28px; border: 0; border-radius: 50%; background: transparent; color: var(--blue); transition: color 120ms, background-color 120ms; }
|
||||||
@@ -133,6 +125,7 @@ h2 { margin: 0; font-size: 19px; font-weight: 600; letter-spacing: -.04em; }
|
|||||||
:root[data-theme='dark'] :is(.section-heading, .mirror-table th, .sync-table thead th, .side-heading) { color: #fff; }
|
:root[data-theme='dark'] :is(.section-heading, .mirror-table th, .sync-table thead th, .side-heading) { color: #fff; }
|
||||||
.sidebar-more { display: inline-flex; align-items: center; flex-shrink: 0; min-height: 32px; padding: 4px 0 4px 8px; color: var(--blue); font-size: 13px; }
|
.sidebar-more { display: inline-flex; align-items: center; flex-shrink: 0; min-height: 32px; padding: 4px 0 4px 8px; color: var(--blue); font-size: 13px; }
|
||||||
.sidebar-more:hover { text-decoration: underline; text-underline-offset: 3px; }
|
.sidebar-more:hover { text-decoration: underline; text-underline-offset: 3px; }
|
||||||
|
.sidebar-empty { color: var(--ink-3); font-size: 11px; line-height: 1.65; }
|
||||||
.news-item { display: flex; align-items: baseline; gap: 8px; width: 100%; min-height: 30px; padding: 4px 0; color: var(--blue); font-size: 14px; font-weight: 500; text-align: left; }
|
.news-item { display: flex; align-items: baseline; gap: 8px; width: 100%; min-height: 30px; padding: 4px 0; color: var(--blue); font-size: 14px; font-weight: 500; text-align: left; }
|
||||||
.news-item time { flex-shrink: 0; font-size: 12px; font-weight: 400; font-variant-numeric: tabular-nums; }
|
.news-item time { flex-shrink: 0; font-size: 12px; font-weight: 400; font-variant-numeric: tabular-nums; }
|
||||||
.news-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
.news-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||||
@@ -165,22 +158,20 @@ h2 { margin: 0; font-size: 19px; font-weight: 600; letter-spacing: -.04em; }
|
|||||||
.footer-affiliation::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to right, transparent var(--wordmark-start), #004098 var(--wordmark-start)); mask: var(--affiliation-image) center / contain no-repeat; pointer-events: none; }
|
.footer-affiliation::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to right, transparent var(--wordmark-start), #004098 var(--wordmark-start)); mask: var(--affiliation-image) center / contain no-repeat; pointer-events: none; }
|
||||||
:root[data-theme='dark'] .footer-affiliation::after { display: none; }
|
:root[data-theme='dark'] .footer-affiliation::after { display: none; }
|
||||||
|
|
||||||
.content-dialog { width: min(680px, calc(100% - 32px)); max-height: min(710px, calc(100dvh - 44px)); padding: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--ink); box-shadow: var(--dialog-shadow); }.content-dialog::backdrop { background: rgba(0, 0, 0, .57); backdrop-filter: blur(4px); }.dialog-inner { max-height: min(710px, calc(100dvh - 44px)); overflow: auto; }.dialog-heading { position: sticky; z-index: 1; top: 0; display: flex; justify-content: space-between; align-items: center; padding: 22px 25px; border-bottom: 1px solid var(--line); background: var(--panel); }.dialog-heading h2 { font-size: 18px; }.dialog-heading .icon-button { margin: -8px -8px 0 0; }.dialog-content { padding: 25px; }.dialog-lead { margin: 0 0 23px; color: var(--ink-2); font-size: 13px; line-height: 1.75; }.mirror-facts { display: grid; grid-template-columns: 1fr 1.5fr; gap: 10px 16px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--ink-3); font-size: 11px; }.mirror-facts > span:nth-child(even) { color: var(--ink); }.directory-preview { display: flex; gap: 13px; align-items: flex-start; margin: 23px 0; padding: 18px; border-radius: 8px; background: var(--panel-blue); color: var(--blue); }.directory-preview h3 { margin: -2px 0 4px; color: var(--ink); font-size: 13px; }.directory-preview p { margin: 0; color: var(--ink-2); font-size: 11px; }.dialog-content h3 { margin: 21px 0 7px; font-size: 13px; }.dialog-hint { color: var(--ink-3); font-size: 11px; line-height: 1.65; }.dialog-content pre { overflow: auto; margin: 12px 0; padding: 14px; border: 1px solid var(--line); border-radius: 6px; background: color-mix(in srgb, var(--paper) 80%, var(--panel)); color: var(--blue); font: 11px ui-monospace, 'Cascadia Code', Consolas, monospace; white-space: pre-wrap; }.dialog-actions { display: flex; align-items: center; gap: 18px; }.secondary-button { display: inline-flex; align-items: center; gap: 7px; padding: 8px 11px; border-radius: 6px; background: var(--blue); color: var(--on-accent); font-size: 11px; }.secondary-button:hover { background: var(--accent-hover); }.help-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }.help-grid button, .article-link, .modal-downloads a { display: flex; align-items: center; gap: 11px; width: 100%; padding: 11px 10px; border: 1px solid var(--line); border-radius: 7px; color: var(--ink); font-size: 12px; text-align: left; }.help-grid button:hover, .article-link:hover, .modal-downloads a:hover { border-color: var(--blue); background: var(--blue-soft); color: var(--blue); }.help-grid button span:nth-child(2), .modal-downloads a span:nth-child(2) { flex: 1; }.help-grid button svg, .modal-downloads a svg { margin-left: auto; }.article-date { display: block; margin-bottom: 18px; color: var(--ink-3); font: 10px ui-monospace, 'Cascadia Code', Consolas, monospace; }.article-body { margin: 0; color: var(--ink); font-size: 13px; line-height: 1.9; }.article-link { justify-content: space-between; margin-bottom: 8px; }.article-link span { flex: 1; }.status-list { display: grid; gap: 1px; border-top: 1px solid var(--line); }.status-list > div { display: flex; justify-content: space-between; align-items: center; min-height: 45px; border-bottom: 1px solid var(--line); }.mono { font: 12px ui-monospace, 'Cascadia Code', Consolas, monospace; }.modal-downloads { display: grid; gap: 9px; }.about-seal { display: block; margin: 0 auto 21px; }.about-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }.about-links a { display: inline-flex; align-items: center; gap: 5px; color: var(--blue); font-size: 12px; }
|
.download-dialog { --download-dialog-max-height: min(720px, calc(100dvh - 48px)); width: min(960px, calc(100% - 40px)); max-width: none; height: var(--download-dialog-max-height); max-height: var(--download-dialog-max-height); overflow: hidden; padding: 0; border: 1px solid var(--line); border-top: 3px solid var(--blue); border-radius: 2px; background: var(--paper); color: var(--ink); box-shadow: 0 16px 48px rgba(0, 0, 0, .28); }
|
||||||
|
.download-dialog::backdrop { background: rgba(0, 0, 0, .6); }
|
||||||
.content-dialog.download-dialog { --download-dialog-max-height: min(720px, calc(100dvh - 48px)); width: min(960px, calc(100% - 40px)); max-width: none; height: var(--download-dialog-max-height); max-height: var(--download-dialog-max-height); overflow: hidden; border-radius: 2px; border-top: 3px solid var(--blue); background: var(--paper); box-shadow: 0 16px 48px rgba(0, 0, 0, .28); }
|
.download-dialog-inner { display: grid; grid-template-rows: auto minmax(0, 1fr); height: 100%; max-height: calc(var(--download-dialog-max-height) - 4px); overflow: hidden; }
|
||||||
.content-dialog.download-dialog::backdrop { background: rgba(0, 0, 0, .6); backdrop-filter: none; }
|
.download-dialog-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 22px 24px; }
|
||||||
.download-dialog .dialog-inner { display: grid; grid-template-rows: auto minmax(0, 1fr); height: 100%; max-height: calc(var(--download-dialog-max-height) - 4px); overflow: hidden; }
|
.download-dialog-heading h2 { min-width: 0; color: var(--ink); font-size: 24px; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
|
||||||
.download-dialog .dialog-heading { position: static; gap: 20px; padding: 22px 24px; border-bottom: 0; background: var(--paper); }
|
.download-dialog-heading .icon-button { flex-shrink: 0; width: 36px; height: 36px; margin: 0 -6px 0 0; border-radius: 2px; color: var(--ink); }
|
||||||
.download-dialog .dialog-heading h2 { color: var(--ink); font-size: 24px; font-weight: 600; line-height: 1.4; }
|
.download-dialog-content { display: flex; min-width: 0; min-height: 0; overflow: hidden; padding: 0 24px 24px; }
|
||||||
.download-dialog .dialog-heading .icon-button { flex-shrink: 0; width: 36px; height: 36px; margin: 0 -6px 0 0; border-radius: 2px; color: var(--ink); }
|
:root[data-theme='dark'] .download-dialog-heading h2 { color: #fff; }
|
||||||
.download-dialog .dialog-content { display: flex; min-width: 0; min-height: 0; overflow: hidden; padding: 0 24px 24px; }
|
|
||||||
:root[data-theme='dark'] .download-dialog .dialog-heading h2 { color: #fff; }
|
|
||||||
@media (max-width: 640px) {
|
@media (max-width: 640px) {
|
||||||
.content-dialog.download-dialog { --download-dialog-max-height: calc(100dvh - 32px); width: calc(100% - 24px); }
|
.download-dialog { --download-dialog-max-height: calc(100dvh - 32px); width: calc(100% - 24px); }
|
||||||
.download-dialog .dialog-heading { gap: 12px; padding: 16px 18px; }
|
.download-dialog-heading { gap: 12px; padding: 16px 18px; }
|
||||||
.download-dialog .dialog-heading h2 { font-size: 22px; }
|
.download-dialog-heading h2 { font-size: 22px; }
|
||||||
.download-dialog .dialog-heading .icon-button { width: 44px; height: 44px; margin-right: -8px; }
|
.download-dialog-heading .icon-button { width: 44px; height: 44px; margin-right: -8px; }
|
||||||
.download-dialog .dialog-content { padding: 4px 18px 22px; }
|
.download-dialog-content { padding: 4px 18px 22px; }
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 1100px) {
|
@media (max-width: 1100px) {
|
||||||
@@ -236,22 +227,12 @@ h2 { margin: 0; font-size: 19px; font-weight: 600; letter-spacing: -.04em; }
|
|||||||
.side-heading h2 { font-size: 20px; }
|
.side-heading h2 { font-size: 20px; }
|
||||||
.news-item, .sidebar-more, .download-menu-button, .useful-links a, .useful-links button { min-height: 44px; }
|
.news-item, .sidebar-more, .download-menu-button, .useful-links a, .useful-links button { min-height: 44px; }
|
||||||
.text-button { min-height: 44px; font-size: 13px; }
|
.text-button { min-height: 44px; font-size: 13px; }
|
||||||
.dialog-content, .dialog-heading { padding: 18px; }
|
.sidebar-empty { font-size: 12px; overflow-wrap: anywhere; }
|
||||||
.dialog-heading { gap: 12px; }
|
|
||||||
.dialog-heading h2 { min-width: 0; overflow-wrap: anywhere; }
|
|
||||||
.dialog-heading .icon-button { flex-shrink: 0; width: 44px; height: 44px; margin: -8px; }
|
|
||||||
.help-grid { grid-template-columns: 1fr; }
|
|
||||||
.mirror-facts { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); font-size: 12px; }
|
|
||||||
.dialog-hint, .directory-preview p { font-size: 12px; overflow-wrap: anywhere; }
|
|
||||||
.dialog-content pre { overflow-wrap: anywhere; font-size: 12px; }
|
|
||||||
.dialog-actions { flex-wrap: wrap; gap: 6px 13px; }
|
|
||||||
.secondary-button { min-height: 44px; font-size: 13px; }
|
|
||||||
}
|
}
|
||||||
@media (max-width: 360px) {
|
@media (max-width: 360px) {
|
||||||
.site-header { padding-inline: 12px; }
|
.site-header { padding-inline: 12px; }
|
||||||
.page-width { width: calc(100% - 24px); }
|
.page-width { width: calc(100% - 24px); }
|
||||||
.brand-logo { width: 148px; }
|
.brand-logo { width: 148px; }
|
||||||
.distro-mark { display: none; }
|
|
||||||
}
|
}
|
||||||
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; } }
|
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; } }
|
||||||
:focus-visible { outline: 2px solid var(--blue-bright); outline-offset: 3px; }
|
:focus-visible { outline: 2px solid var(--blue-bright); outline-offset: 3px; }
|
||||||
|
|||||||
Reference in New Issue
Block a user