mirror of
https://github.com/coder/code-server.git
synced 2025-09-25 00:54:42 +08:00
Simplify frontend
Just a login form and a list of applications. No modals or anything like that.
This commit is contained in:
27
src/node/app/bin.ts
Normal file
27
src/node/app/bin.ts
Normal file
@ -0,0 +1,27 @@
|
||||
import * as path from "path"
|
||||
import { Application } from "../../common/api"
|
||||
|
||||
const getVscodeVersion = (): string => {
|
||||
try {
|
||||
return require(path.resolve(__dirname, "../../../lib/vscode/package.json")).version
|
||||
} catch (error) {
|
||||
return "unknown"
|
||||
}
|
||||
}
|
||||
|
||||
export const Vscode: Application = {
|
||||
categories: ["Editor"],
|
||||
name: "VS Code",
|
||||
path: "/vscode",
|
||||
version: getVscodeVersion(),
|
||||
}
|
||||
|
||||
export const findApplications = async (): Promise<ReadonlyArray<Application>> => {
|
||||
const apps: Application[] = [Vscode]
|
||||
|
||||
return apps.sort((a, b): number => a.name.localeCompare(b.name))
|
||||
}
|
||||
|
||||
export const findWhitelistedApplications = async (): Promise<ReadonlyArray<Application>> => {
|
||||
return []
|
||||
}
|
Reference in New Issue
Block a user