Skip to content

Commit

Permalink
release: v0.13.3 (#97)
Browse files Browse the repository at this point in the history
【更新】v0.13.3
  • Loading branch information
crrashh1542 authored Feb 1, 2024
2 parents 19a187a + fd36250 commit a8ade24
Show file tree
Hide file tree
Showing 15 changed files with 102 additions and 11 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "win-up-to-date",
"version": "0.13.2",
"version": "0.13.3",
"description": "A website project showing the latest status of Windows Insider versions.",
"main": "index.js",
"repository": "https://github.com/crrashh1542/win-up-to-date",
Expand All @@ -16,6 +16,7 @@
"@fluentui/web-components": "^2.5.16",
"axios": "^1.6.7",
"core-js": "^3.35.1",
"js-cookie": "^3.0.5",
"moment": "^2.30.1",
"normalize.css": "^8.0.1",
"vue": "^3.4.15",
Expand Down
8 changes: 8 additions & 0 deletions src/assets/fonts/iconfont/iconfont.less
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,14 @@
content: "\e64b";
}

// 小提示
.icon-info:before {
content: "\e771";
}
.icon-close:before {
content: "\e600";
}

// 关于&列表页
.icon-tag::before {
content: "\e63d";
Expand Down
Binary file modified src/assets/fonts/iconfont/iconfont.ttf
Binary file not shown.
Binary file modified src/assets/fonts/iconfont/iconfont.woff2
Binary file not shown.
Binary file added src/assets/images/warning.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions src/assets/styles/color.less
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
@wu-color-theme-bg: rgba(247, 249, 255, .8);

// 其它颜色,部分借鉴自 Material Design 设计指南
@wu-color-yellow-light: #fffde7;
@wu-color-yellow: #ffeb3b;
@wu-color-amber: #ffc107;
@wu-color-orange: #ff5722;
@wu-color-green: #8bc94a;
Expand Down
47 changes: 44 additions & 3 deletions src/components/Banner.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,29 @@
<script>
import { reactive, toRefs } from 'vue'
import Cookie from 'js-cookie'
export default {
name: 'MainBanner',
setup() {
// 初始是否显示提示框:true
let isShowWarning = true
// 如果 cookie 中存储了,则替换掉初始值
if (Cookie.get('isShowWarning') !== undefined) {
isShowWarning = Cookie.get('isShowWarning')
}
console.log(Cookie.get('isShowWarning'))
console.log(isShowWarning)
let data = reactive({
isShowWarning
})
return { ...toRefs(data) }
},
methods: {
stopShowingWarning() {
Cookie.set('isShowWarning', 'false')
this.isShowWarning = false
}
},
props: {
description: String
}
Expand All @@ -9,11 +32,18 @@ export default {

<template>
<div class="banner">
<div class="title font-medium">
<slot></slot>
</div>
<div class="title font-medium"><slot></slot></div>
<div class="subtitle">{{ description }}</div>
</div>

<fluent-card class="warning" v-if="isShowWarning == true">
<div class="content text-base"><img src="../assets/images/warning.png" class="h-6 w-6 inline align-middle mr-2">
<span class="leading-6">项目处于较早期开发阶段,数据正在补全,bug 也会慢慢修复!感谢支持!</span></div>
<div class="grow"></div>
<div class="button" @click="stopShowingWarning">&#xe600;</div>
</fluent-card>

<div class="h-6"></div>
</template>

<style lang="less" scoped>
Expand All @@ -34,6 +64,17 @@ export default {
}
}
.warning {
display: flex;
padding: .66em 1.25em .66em 1em;
background-color: @wu-color-yellow-light;
border: 1px solid @wu-color-yellow;
.button {
cursor: pointer;
}
}
@media screen and (max-width: 800px) {
.banner {
--banner-title: 32px;
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/parseRepoInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* 此脚本用于在处理本项目相关信息
* @author crrashh1542
* @version 1.4
* @version 1.5
*/

import packageInfo from '/package.json'
Expand Down
10 changes: 7 additions & 3 deletions src/views/DataCategoryList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export default {
// 获取到数据后,关闭加载动画
data.category = resp
data.isLoading = false
document.title = resp.name + ' / Windows Up-to-Date'
// 处理版本范围
if (resp.range[1] == null) {
data.customVersionRange = resp.range[0] + ' ~ ?'
Expand All @@ -57,11 +58,14 @@ export default {
// 刷新数据
refreshData(platform) {
document.title = platform.name + ' / Windows Up-to-Date'
let category = platform.path
let vueObj = this
axios.get('https://wutd.crrashh.com/api/category?platform=' + platform)
axios.get('https://wutd.crrashh.com/api/category?platform=' + category)
.then(function (response) {
let resp = response.data.content
vueObj.category = resp
if (resp.range[1] == null) {
vueObj.customVersionRange = resp.range[0] + ' ~ ?'
} else {
Expand Down Expand Up @@ -90,12 +94,12 @@ export default {
<!-- 快速导航 -->
<TopNav>
<span class="icon-left" v-if="category.previous != null">
<router-link :to="category.previous.path" @click="refreshData(category.previous.path)">
<router-link :to="category.previous.path" @click="refreshData(category.previous)">
{{ category.previous.name }}</router-link>
</span>
<span class="grow"></span>
<span class="icon-right" v-if="category.next != null">
<router-link :to="category.next.path" @click="refreshData(category.next.path)">
<router-link :to="category.next.path" @click="refreshData(category.next)">
{{ category.next.name }}</router-link>
</span>
</TopNav>
Expand Down
8 changes: 6 additions & 2 deletions src/views/DataDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ export default {
// STEP3 ------ 处理并修改数据
.then(function (response) {
let resp = response.data.content
// 获取到数据后,关闭加载动画
data.detail = resp
document.title = resp.build.number + ' / Windows Up-to-Date'
// 获取到数据后,关闭加载动画
data.isLoading = false
})
.catch(() => {
Expand All @@ -58,6 +59,7 @@ export default {
// 刷新数据
refreshData(platform, build) {
document.title = build + ' / Windows Up-to-Date'
let vueObj = this
axios.get('https://wutd.crrashh.com/api/detail?platform=' + platform + '&build=' + build)
.then(function (response) {
Expand Down Expand Up @@ -158,7 +160,9 @@ export default {
<div v-if="detail.download !== undefined">
<p>文件名称:{{ detail.download.name }}</p>
<p>系统架构:{{ detail.download.arch }}</p>
<p>下载地址:<a target="_blank" :href="detail.download.url">{{ detail.download.source }}</a></p>
<p>下载地址:<span v-for="(l, index) in detail.download.link" :key="index">
<a target="_blank" :href="l.url">{{ l.source }}</a>&nbsp;&nbsp;&nbsp;
</span></p>
<p>MD5:<CopiableCode :value="detail.download.md5" /></p>
<p>SHA-256:<CopiableCode :value="detail.download.sha256" /></p>
</div>
Expand Down
3 changes: 3 additions & 0 deletions src/views/MainAbout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ export default {
return {
buildInfo, sources
}
},
setup() {
document.title = '关于项目 / Windows Up-to-Date'
}
}
</script>
Expand Down
18 changes: 17 additions & 1 deletion src/views/MainCategory.vue
Original file line number Diff line number Diff line change
@@ -1 +1,17 @@
<!-- PlaceHolder 2024-01-07 by crrashh1542 -->
<script>
// 引入组件
import Card from '../components/Card.vue'
export default {
name: 'MainCategory',
components: { Card }
}
</script>

<template>
<!-- PlaceHolder 2024-02-01 by crrashh1542 -->
</template>

<style lang="less" scoped>
</style>
1 change: 1 addition & 0 deletions src/views/MainHome.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export default {
components: { Banner, Catalog, Card, LoadAnim },
setup() {
// STEP1 ------ 设定初始值
document.title = 'Windows Up-to-Date'
let data = reactive({
list: [],
isLoading: true
Expand Down
3 changes: 3 additions & 0 deletions src/views/NotFound.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ provideFluentDesignSystem().register(fluentButton())
export default {
name: 'OtherNotFound',
setup() {
document.title = '内容不见啦! / Windows Up-to-Date'
},
methods: {
routerToHome() {
this.$router.push('/')
Expand Down
8 changes: 8 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6298,6 +6298,13 @@ __metadata:
languageName: node
linkType: hard

"js-cookie@npm:^3.0.5":
version: 3.0.5
resolution: "js-cookie@npm:3.0.5"
checksum: 366494b1630b9fb8abaef3659748db5dfd52c58c6fc3459b9f0a03b492593bc1b01c6dfcc066b46f6413c28edb3a00cc68fb61ea8cdf6991bedf1f100f8a389d
languageName: node
linkType: hard

"js-message@npm:1.0.7":
version: 1.0.7
resolution: "js-message@npm:1.0.7"
Expand Down Expand Up @@ -10014,6 +10021,7 @@ __metadata:
core-js: "npm:^3.35.1"
eslint: "npm:^8.56.0"
eslint-plugin-vue: "npm:^9.21.0"
js-cookie: "npm:^3.0.5"
less: "npm:^4.2.0"
less-loader: "npm:^12.2.0"
moment: "npm:^2.30.1"
Expand Down

0 comments on commit a8ade24

Please sign in to comment.