Skip to content

Commit a68b748

Browse files
committed
release 1.0.0-beta.1
1 parent 9a58b4e commit a68b748

File tree

10 files changed

+77
-7
lines changed

10 files changed

+77
-7
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "rocox-codex",
33
"private": false,
4-
"version": "1.0.0-alpha.4",
4+
"version": "1.0.0-beta.1",
55
"type": "module",
66
"scripts": {
77
"dev": "vite",

src-tauri/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src-tauri/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "rocox-codex"
3-
version = "1.0.0-alpha.4"
3+
version = "1.0.0-beta.1"
44
description = "Rocox Codex"
55
authors = ["NeserCode"]
66
license = "MIT"

src-tauri/tauri.conf.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
},
99
"package": {
1010
"productName": "RoCoX Codex",
11-
"version": "1.0.0-alpha.4"
11+
"version": "1.0.0-beta.1"
1212
},
1313
"tauri": {
1414
"allowlist": {

src/components/FeatureFilter.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ watch(checkedOption, (value) => {
124124
@apply inline-flex justify-center items-center pl-2 pr-0.5 py-1
125125
border-2 rounded border-zinc-400
126126
bg-neutral-200 dark:bg-neutral-500
127-
select-none cursor-pointer;
127+
select-none cursor-pointer transition-all;
128128
}
129129
.btn-context .icon {
130130
@apply w-4 h-4 mr-1

src/components/SkillList.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ function goSkillView(hash: string) {
173173
@apply w-6 h-6 inline-block my-1 ml-1 p-1
174174
border rounded
175175
bg-slate-200 dark:bg-slate-600 border-slate-400 dark:border-slate-500
176-
overflow-hidden;
176+
overflow-hidden transition-all;
177177
}
178178
.icon.damage {
179179
@apply p-0;

src/components/native/TitleBar.vue

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import { appWindow } from "@tauri-apps/api/window"
1414
1515
import { useDarkMode } from "../../composables/useDarkMode"
1616
import { register, unregisterAll } from "@tauri-apps/api/globalShortcut"
17+
import { Collections } from "../../share"
1718
1819
const $props = withDefaults(
1920
defineProps<{
@@ -107,24 +108,43 @@ function removeMoveClass(event: MouseEvent) {
107108
const { isDarkMode, toggleDarkMode } = useDarkMode()
108109
const isRoundedAvatar = useStorage("rocox-avatar-rounded", false)
109110
const alwaysUseFocusShortcut = useStorage("rocox-shortcut-use-focus", true)
111+
const $UserCollections = useStorage<Collections>(
112+
"rocox-user-collections",
113+
new Map()
114+
)
110115
111116
onMounted(async () => {
112117
await unregisterAll()
113118
await register("CommandOrControl+D", async () => {
114119
if (alwaysUseFocusShortcut.value) {
115120
if (await appWindow.isFocused()) toggleDarkMode()
116121
} else toggleDarkMode()
122+
123+
$UserCollections.value.set(
124+
"KeyShortCut",
125+
($UserCollections.value.get("KeyShortCut") ?? 0) + 1
126+
)
117127
})
118128
await register("CommandOrControl+P", async () => {
119129
if (alwaysUseFocusShortcut.value) {
120130
if (await appWindow.isFocused()) throttleToggleIspinned()
121131
} else throttleToggleIspinned()
132+
133+
$UserCollections.value.set(
134+
"KeyShortCut",
135+
($UserCollections.value.get("KeyShortCut") ?? 0) + 1
136+
)
122137
})
123138
await register("CommandOrControl+Q", async () => {
124139
if (isRoundedAvatar.value) {
125140
if (alwaysUseFocusShortcut.value) {
126141
if (await appWindow.isFocused()) $router.go(0)
127142
} else $router.go(0)
143+
144+
$UserCollections.value.set(
145+
"KeyShortCut",
146+
($UserCollections.value.get("KeyShortCut") ?? 0) + 1
147+
)
128148
}
129149
})
130150
})

src/composables/useApi.ts

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { RocoRequest } from "./useHttp"
22
import NProgress from "nprogress"
3+
import { useStorage } from "@vueuse/core"
34

45
import {
56
AngelDetailObject,
@@ -11,8 +12,14 @@ import {
1112
SkillDetailObject,
1213
SkillListData,
1314
SkillListParma,
15+
Collections,
1416
} from "../share"
1517

18+
const $UserCollections = useStorage<Collections>(
19+
"rocox-user-collections",
20+
new Map()
21+
)
22+
1623
const baseURL = "https://api.rocotime.com/api"
1724
const timeout = 5000
1825
const headers = {
@@ -79,6 +86,11 @@ export const useApi = () => {
7986
map.set(pair.id!, pair.name!)
8087
})
8188

89+
$UserCollections.value.set(
90+
"GetFeatures",
91+
($UserCollections.value.get("GetFeatures") ?? 0) + 1
92+
)
93+
8294
return map
8395
}
8496

@@ -93,6 +105,11 @@ export const useApi = () => {
93105
) {
94106
const response = await rocoApi.post<AngelListData>("/spiritList/", params)
95107

108+
$UserCollections.value.set(
109+
"GetAngelList",
110+
($UserCollections.value.get("GetAngelList") ?? 0) + 1
111+
)
112+
96113
return response.data.data
97114
}
98115

@@ -103,6 +120,11 @@ export const useApi = () => {
103120
params
104121
)
105122

123+
$UserCollections.value.set(
124+
"GetAngel",
125+
($UserCollections.value.get("GetAngel") ?? 0) + 1
126+
)
127+
106128
return response.data.data
107129
}
108130

@@ -115,6 +137,12 @@ export const useApi = () => {
115137
}
116138
) {
117139
const response = await rocoApi.post<ItemListData>("/Itemlist/", params)
140+
141+
$UserCollections.value.set(
142+
"GetItemList",
143+
($UserCollections.value.get("GetItemList") ?? 0) + 1
144+
)
145+
118146
return response.data.data
119147
}
120148

@@ -128,6 +156,12 @@ export const useApi = () => {
128156
}
129157
) {
130158
const response = await rocoApi.post<SkillListData>("/Skilllist/", params)
159+
160+
$UserCollections.value.set(
161+
"GetSkillList",
162+
($UserCollections.value.get("GetSkillList") ?? 0) + 1
163+
)
164+
131165
return response.data.data
132166
}
133167

@@ -137,6 +171,12 @@ export const useApi = () => {
137171
"/detail/skill/",
138172
params
139173
)
174+
175+
$UserCollections.value.set(
176+
"GetSkill",
177+
($UserCollections.value.get("GetSkill") ?? 0) + 1
178+
)
179+
140180
return response.data
141181
}
142182

src/share.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,3 +173,14 @@ export interface ItemListParma {
173173
id: string
174174
page: number
175175
}
176+
177+
export type Collections = Map<
178+
| "GetFeatures"
179+
| "GetAngelList"
180+
| "GetAngel"
181+
| "GetSkillList"
182+
| "GetSkill"
183+
| "GetItemList"
184+
| "KeyShortCut",
185+
number
186+
>

src/views/Angel.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ const { getAngel, iconStaticURL, featureStaticURL, talentStaticURL } = useApi()
1515
1616
const routeHash = $route.params.hash as string
1717
const angelData = computedAsync(async () => {
18-
console.log(routeHash)
1918
return await getAngel({ hash: routeHash })
2019
})
2120

0 commit comments

Comments
 (0)