mirror of https://github.com/veypi/OneAuth.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
929 B
TypeScript
44 lines
929 B
TypeScript
/*
|
|
* fs.ts
|
|
* Copyright (C) 2024 veypi <i@veypi.com>
|
|
* 2024-11-04 17:11
|
|
* Distributed under terms of the GPL license.
|
|
*/
|
|
|
|
|
|
import { v } from "../v2dom";
|
|
import logic from '../logic'
|
|
import api from "../api";
|
|
import fstree from "./fstree";
|
|
|
|
|
|
export default () => {
|
|
return v({
|
|
class: 'voa-fs',
|
|
children: [
|
|
v('voa-fs-header',
|
|
[
|
|
v({
|
|
class: 'voa-item-title',
|
|
children: ['我的文件'],
|
|
onclick: () => {
|
|
logic.goto('/')
|
|
}
|
|
}),
|
|
v({
|
|
class: 'voa-fs-subtxt', children: '获取密钥', onclick: () => {
|
|
api.token.Post({
|
|
refresh: logic.token.refresh.raw(),
|
|
user_id: logic.token.refresh.uid!
|
|
}).then(e => {
|
|
console.log(e)
|
|
})
|
|
}
|
|
})
|
|
]
|
|
),
|
|
v('voa-fs-body', fstree('/'))
|
|
]
|
|
})
|
|
}
|