chore: rebrand public site as MirrorITS
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
# MirrorOUC
|
# MirrorITS
|
||||||
|
|
||||||
爱特软件镜像源的前端与管理服务,由[中国海洋大学爱特工作室](https://www.itouc.cn/)制作。使用 Vue 3、TypeScript 和 Go,支持镜像展示、公告、使用帮助与管理后台,同步任务由 [tunasync](https://github.com/tuna/tunasync) 执行。
|
爱特开源软件镜像站(MirrorITS)的前端与管理服务,由[中国海洋大学爱特工作室](https://www.itouc.cn/)开发部署。使用 Vue 3、TypeScript 和 Go,支持镜像展示、公告、使用帮助与管理后台,同步任务由 [tunasync](https://github.com/tuna/tunasync) 执行。
|
||||||
|
|
||||||
## 部署
|
## 部署
|
||||||
|
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ func TestAnnouncementPublishingLifecycle(t *testing.T) {
|
|||||||
|
|
||||||
func TestAnnouncementsDirectNavigation(t *testing.T) {
|
func TestAnnouncementsDirectNavigation(t *testing.T) {
|
||||||
c := fixture(t)
|
c := fixture(t)
|
||||||
if err := os.WriteFile(filepath.Join(c.app.cfg.Static, "index.html"), []byte("<!doctype html><title>MirrorOUC</title>"), 0600); err != nil {
|
if err := os.WriteFile(filepath.Join(c.app.cfg.Static, "index.html"), []byte("<!doctype html><title>MirrorITS</title>"), 0600); err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
for _, path := range []string{"/announcements", "/announcements/"} {
|
for _, path := range []string{"/announcements", "/announcements/"} {
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ func TestPublishedHelpAndDeepLinks(t *testing.T) {
|
|||||||
for _, name := range []string{"hidden", "empty", "missing", "bad%2Fname"} {
|
for _, name := range []string{"hidden", "empty", "missing", "bad%2Fname"} {
|
||||||
status(t, c.call("GET", "/api/v1/help/"+name, nil, false), 404)
|
status(t, c.call("GET", "/api/v1/help/"+name, nil, false), 404)
|
||||||
}
|
}
|
||||||
const html = "<!doctype html><title>MirrorOUC help</title>"
|
const html = "<!doctype html><title>MirrorITS help</title>"
|
||||||
if err := os.WriteFile(filepath.Join(c.app.cfg.Static, "index.html"), []byte(html), 0600); err != nil {
|
if err := os.WriteFile(filepath.Join(c.app.cfg.Static, "index.html"), []byte(html), 0600); err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -223,7 +223,7 @@ func main() {
|
|||||||
defer cancel()
|
defer cancel()
|
||||||
srv.Shutdown(stop)
|
srv.Shutdown(stop)
|
||||||
}()
|
}()
|
||||||
log.Printf("MirrorOUC API listening on %s", cfg.Listen)
|
log.Printf("MirrorITS API listening on %s", cfg.Listen)
|
||||||
if err = srv.ListenAndServe(); err != nil && err != http.ErrServerClosed {
|
if err = srv.ListenAndServe(); err != nil && err != http.ErrServerClosed {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -100,8 +100,8 @@ type Session struct {
|
|||||||
|
|
||||||
func initialSettings() Settings {
|
func initialSettings() Settings {
|
||||||
return Settings{
|
return Settings{
|
||||||
Name: Localized{"zh-CN": "中国海洋大学软件镜像源", "en-US": "Ocean University of China Software Mirrors"},
|
Name: Localized{"zh-CN": "爱特开源软件镜像站", "en-US": "ITStudio Open Source Software Mirrors"},
|
||||||
Description: Localized{"zh-CN": "中国海洋大学软件镜像源(MirrorOUC)由中国海洋大学爱特工作室承建。", "en-US": "MirrorOUC is built by IT Studio, Ocean University of China."},
|
Description: Localized{"zh-CN": "爱特开源软件镜像站(MirrorITS)由中国海洋大学爱特工作室开发部署。", "en-US": "MirrorITS is developed and hosted by ITStudio at Ocean University of China."},
|
||||||
LogoLight: "/assets/mirrorOUC_dark.png", LogoDark: "/assets/mirrorOUC.png", Favicon: "/assets/ouc-seal.png", Avatar: "/assets/ouc-seal.png", Email: "contact@itstudio.club",
|
LogoLight: "/assets/mirrorOUC_dark.png", LogoDark: "/assets/mirrorOUC.png", Favicon: "/assets/ouc-seal.png", Avatar: "/assets/ouc-seal.png", Email: "contact@itstudio.club",
|
||||||
Address: Localized{"zh-CN": "山东省青岛市中国海洋大学西海岸校区 · 信息南楼五八创新创业工坊", "en-US": "58 Innovation Workshop, Information South Building, West Coast Campus, Ocean University of China, Qingdao, Shandong"},
|
Address: Localized{"zh-CN": "山东省青岛市中国海洋大学西海岸校区 · 信息南楼五八创新创业工坊", "en-US": "58 Innovation Workshop, Information South Building, West Coast Campus, Ocean University of China, Qingdao, Shandong"},
|
||||||
RelatedLinks: initialRelatedLinks(),
|
RelatedLinks: initialRelatedLinks(),
|
||||||
|
|||||||
+1
-1
@@ -5,7 +5,7 @@
|
|||||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
<meta name="theme-color" content="#ffffff" />
|
<meta name="theme-color" content="#ffffff" />
|
||||||
<link rel="icon" type="image/png" href="/assets/ouc-seal.png" />
|
<link rel="icon" type="image/png" href="/assets/ouc-seal.png" />
|
||||||
<title>{{directory.title}} · MirrorOUC</title>
|
<title>{{directory.title}} · {{common.brand}}</title>
|
||||||
<script src="/assets/directory-theme.js"></script>
|
<script src="/assets/directory-theme.js"></script>
|
||||||
<script type="module" src="/src/directory/main.ts"></script>
|
<script type="module" src="/src/directory/main.ts"></script>
|
||||||
</head>
|
</head>
|
||||||
|
|||||||
+1
-1
@@ -5,7 +5,7 @@
|
|||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<meta name="theme-color" content="#ffffff" />
|
<meta name="theme-color" content="#ffffff" />
|
||||||
<link rel="icon" type="image/png" href="/assets/ouc-seal.png" />
|
<link rel="icon" type="image/png" href="/assets/ouc-seal.png" />
|
||||||
<title>MirrorOUC</title>
|
<title>MirrorITS</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="app"></div>
|
<div id="app"></div>
|
||||||
|
|||||||
+1
-1
@@ -64,7 +64,7 @@ watch(locale, (value) => {
|
|||||||
savePreference('mirrorouc.locale', value)
|
savePreference('mirrorouc.locale', value)
|
||||||
}, { immediate: true })
|
}, { immediate: true })
|
||||||
watch([locale, site], () => {
|
watch([locale, site], () => {
|
||||||
const siteTitle = site.value ? `MirrorOUC · ${content(site.value.name, locale.value)}` : t('common.pageTitle')
|
const siteTitle = site.value ? `${t('common.brand')} · ${content(site.value.name, locale.value)}` : t('common.pageTitle')
|
||||||
const pageTitle = isHelpPage ? (help.name && !help.invalid ? t('mirrors.helpFor', { name: help.name }) : t('mirrors.helpTitle')) : isAnnouncementsPage ? t('announcements.title') : ''
|
const pageTitle = isHelpPage ? (help.name && !help.invalid ? t('mirrors.helpFor', { name: help.name }) : t('mirrors.helpTitle')) : isAnnouncementsPage ? t('announcements.title') : ''
|
||||||
document.title = pageTitle ? `${pageTitle} · ${siteTitle}` : siteTitle
|
document.title = pageTitle ? `${pageTitle} · ${siteTitle}` : siteTitle
|
||||||
}, { immediate: true })
|
}, { immediate: true })
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ function applyTheme() {
|
|||||||
function applyLocale() {
|
function applyLocale() {
|
||||||
i18n.global.locale.value = locale
|
i18n.global.locale.value = locale
|
||||||
document.documentElement.lang = locale
|
document.documentElement.lang = locale
|
||||||
document.title = `${path} · ${t('directory.title')} · MirrorOUC`
|
document.title = `${path} · ${t('directory.title')} · ${t('common.brand')}`
|
||||||
for (const element of document.querySelectorAll<HTMLElement>('[data-i18n]')) element.textContent = t(element.dataset.i18n!)
|
for (const element of document.querySelectorAll<HTMLElement>('[data-i18n]')) element.textContent = t(element.dataset.i18n!)
|
||||||
for (const [attribute, data] of [['aria-label', 'i18nAria'], ['placeholder', 'i18nPlaceholder']] as const) {
|
for (const [attribute, data] of [['aria-label', 'i18nAria'], ['placeholder', 'i18nPlaceholder']] as const) {
|
||||||
for (const element of document.querySelectorAll<HTMLElement>(`[data-${data === 'i18nAria' ? 'i18n-aria' : 'i18n-placeholder'}]`)) element.setAttribute(attribute, t(element.dataset[data]!))
|
for (const element of document.querySelectorAll<HTMLElement>(`[data-${data === 'i18nAria' ? 'i18n-aria' : 'i18n-placeholder'}]`)) element.setAttribute(attribute, t(element.dataset[data]!))
|
||||||
|
|||||||
@@ -22,8 +22,8 @@ export default {
|
|||||||
"downloadItem": "Download {name} {version}",
|
"downloadItem": "Download {name} {version}",
|
||||||
"entries": {
|
"entries": {
|
||||||
"preview": {
|
"preview": {
|
||||||
"title": "A first look at the MirrorOUC interface",
|
"title": "A first look at the MirrorITS interface",
|
||||||
"body": "Welcome to the MirrorOUC homepage prototype. The mirror list and sync jobs use demo data. Try search, themes and language switching. The mirror server is not connected yet."
|
"body": "Welcome to the MirrorITS homepage prototype. The mirror list and sync jobs use demo data. Try search, themes and language switching. The mirror server is not connected yet."
|
||||||
},
|
},
|
||||||
"help": {
|
"help": {
|
||||||
"title": "Finding mirror configuration help",
|
"title": "Finding mirror configuration help",
|
||||||
|
|||||||
@@ -10,10 +10,10 @@ export default {
|
|||||||
noHelp: 'No usage guide has been added for this mirror.',
|
noHelp: 'No usage guide has been added for this mirror.',
|
||||||
openDirectory: 'Browse mirror directory',
|
openDirectory: 'Browse mirror directory',
|
||||||
|
|
||||||
"brand": "MirrorOUC",
|
"brand": "MirrorITS",
|
||||||
"university": "Ocean University of China",
|
"university": "Ocean University of China",
|
||||||
"siteName": "Ocean University of China Software Mirrors",
|
"siteName": "ITStudio Open Source Software Mirrors",
|
||||||
"pageTitle": "MirrorOUC · Ocean University of China Software Mirrors",
|
"pageTitle": "MirrorITS · ITStudio Open Source Software Mirrors",
|
||||||
"skip": "Skip to mirror list",
|
"skip": "Skip to mirror list",
|
||||||
"skipStatus": "Skip to site status",
|
"skipStatus": "Skip to site status",
|
||||||
"nav": {
|
"nav": {
|
||||||
@@ -38,11 +38,11 @@ export default {
|
|||||||
"copyFailed": "Unable to copy. Please select and copy the configuration.",
|
"copyFailed": "Unable to copy. Please select and copy the configuration.",
|
||||||
"external": "Open in a new window",
|
"external": "Open in a new window",
|
||||||
"preview": "Interface preview · Demo data",
|
"preview": "Interface preview · Demo data",
|
||||||
"footer": "MirrorOUC is built by IT Studio, 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",
|
"source": "Sync engine",
|
||||||
"aboutTitle": "About MirrorOUC",
|
"aboutTitle": "About MirrorITS",
|
||||||
"aboutBody": "Open-source software mirror of ITStudio, developed by ITStudio at Ocean University of China.",
|
"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",
|
||||||
|
|||||||
@@ -22,8 +22,8 @@ export default {
|
|||||||
"downloadItem": "下载 {name} {version}",
|
"downloadItem": "下载 {name} {version}",
|
||||||
"entries": {
|
"entries": {
|
||||||
"preview": {
|
"preview": {
|
||||||
"title": "MirrorOUC 首页界面预览",
|
"title": "MirrorITS 首页界面预览",
|
||||||
"body": "欢迎体验 MirrorOUC 首页原型。当前展示的镜像列表与同步任务为演示数据,可体验镜像搜索、主题切换和中英文界面。镜像服务器尚未接入。"
|
"body": "欢迎体验 MirrorITS 首页原型。当前展示的镜像列表与同步任务为演示数据,可体验镜像搜索、主题切换和中英文界面。镜像服务器尚未接入。"
|
||||||
},
|
},
|
||||||
"help": {
|
"help": {
|
||||||
"title": "软件源配置帮助入口说明",
|
"title": "软件源配置帮助入口说明",
|
||||||
|
|||||||
@@ -10,10 +10,10 @@ export default {
|
|||||||
noHelp: '此镜像暂未添加使用说明。',
|
noHelp: '此镜像暂未添加使用说明。',
|
||||||
openDirectory: '浏览镜像目录',
|
openDirectory: '浏览镜像目录',
|
||||||
|
|
||||||
"brand": "MirrorOUC",
|
"brand": "MirrorITS",
|
||||||
"university": "中国海洋大学",
|
"university": "中国海洋大学",
|
||||||
"siteName": "中国海洋大学软件镜像源",
|
"siteName": "爱特开源软件镜像站",
|
||||||
"pageTitle": "MirrorOUC · 中国海洋大学软件镜像源",
|
"pageTitle": "MirrorITS · 爱特开源软件镜像站",
|
||||||
"skip": "跳转到镜像列表",
|
"skip": "跳转到镜像列表",
|
||||||
"skipStatus": "跳转到站点状态",
|
"skipStatus": "跳转到站点状态",
|
||||||
"nav": {
|
"nav": {
|
||||||
@@ -38,11 +38,11 @@ export default {
|
|||||||
"copyFailed": "复制失败,请手动选择并复制",
|
"copyFailed": "复制失败,请手动选择并复制",
|
||||||
"external": "在新窗口中打开",
|
"external": "在新窗口中打开",
|
||||||
"preview": "界面预览 · 演示数据",
|
"preview": "界面预览 · 演示数据",
|
||||||
"footer": "爱特开源软件镜像源(MirrorITS)由中国海洋大学爱特工作室开发部署",
|
"footer": "爱特开源软件镜像站(MirrorITS)由中国海洋大学爱特工作室开发部署。",
|
||||||
"studio": "爱特工作室",
|
"studio": "爱特工作室",
|
||||||
"source": "同步引擎",
|
"source": "同步引擎",
|
||||||
"aboutTitle": "关于 MirrorOUC",
|
"aboutTitle": "关于 MirrorITS",
|
||||||
"aboutBody": "中国海洋大学软件镜像源(MirrorOUC)由中国海洋大学爱特工作室承建,旨在为校内外用户提供便捷的开源软件下载服务。",
|
"aboutBody": "爱特开源软件镜像站(MirrorITS)由中国海洋大学爱特工作室开发部署,为校内外用户提供开源软件下载服务。",
|
||||||
"previewBody": "当前为界面原型,镜像与同步任务均为演示数据,尚未连接镜像服务器。正式镜像目录、配置地址与下载服务将在接入后开放。",
|
"previewBody": "当前为界面原型,镜像与同步任务均为演示数据,尚未连接镜像服务器。正式镜像目录、配置地址与下载服务将在接入后开放。",
|
||||||
"emptyValue": "—",
|
"emptyValue": "—",
|
||||||
"footerLinks": "友情链接",
|
"footerLinks": "友情链接",
|
||||||
|
|||||||
Reference in New Issue
Block a user