mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 09:36:08 +08:00
gitpod support
This commit is contained in:
1 parent
8b5107fefa
commit
539b47d55b
5 files changed
+20
-5
No files matched your search
+12
@@ -0,0 +1,12 @@
|
||||
image: gitpod/mongodb
|
||||
tasks:
|
||||
- init: yarn && yarn build
|
||||
vscode:
|
||||
extensions:
|
||||
- dbaeumer.vscode-eslint@2.1.3:1NRvj3UKNTNwmYjptmUmIw==
|
||||
- vscode-icons-team.vscode-icons@10.2.0:DrQUJPtFm0woSFiyitha8Q==
|
||||
ports:
|
||||
- port: 8888
|
||||
onOpen: open-preview
|
||||
- port: 27017
|
||||
onOpen: open-mongodb
|
||||
Vendored
+1
-3
@@ -1,8 +1,6 @@
|
||||
{
|
||||
"recommendations": [
|
||||
"dbaeumer.vscode-eslint",
|
||||
"gruntfuggly.todo-tree",
|
||||
"ronnidc.nunjucks",
|
||||
"sysoev.language-stylus"
|
||||
"gruntfuggly.todo-tree"
|
||||
]
|
||||
}
|
||||
+2
-1
@@ -9,7 +9,7 @@ const hydro = require('../dist/loader');
|
||||
fs.ensureDirSync(path.resolve(os.homedir(), '.hydro'));
|
||||
const addonPath = path.resolve(os.homedir(), '.hydro', 'addon.json');
|
||||
if (!fs.existsSync(addonPath)) fs.writeFileSync(addonPath, '[]');
|
||||
const addons = JSON.parse(fs.readFileSync(addonPath).toString());
|
||||
let addons = JSON.parse(fs.readFileSync(addonPath).toString());
|
||||
|
||||
try {
|
||||
const ui = argv.ui || '@hydrooj/ui-default';
|
||||
@@ -33,6 +33,7 @@ if (argv._[0]) {
|
||||
}
|
||||
}
|
||||
}
|
||||
addons = Array.from(new Set(addons));
|
||||
console.log('Current Addons: ', addons);
|
||||
fs.writeFileSync(addonPath, JSON.stringify(addons, null, 2));
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { isSafeInteger, flatten } from 'lodash';
|
||||
import yaml from 'js-yaml';
|
||||
import { ObjectID } from 'mongodb';
|
||||
import paginate from '../lib/paginate';
|
||||
import {
|
||||
@@ -175,9 +176,12 @@ class ProblemDetailHandler extends ProblemHandler {
|
||||
if (this.pdoc.hidden && this.pdoc.owner !== this.user._id) {
|
||||
this.checkPerm(PERM.PERM_VIEW_PROBLEM_HIDDEN);
|
||||
}
|
||||
const config: any = this.pdoc.config ? yaml.safeLoad(this.pdoc.config) : {};
|
||||
this.udoc = await user.getById(domainId, this.pdoc.owner);
|
||||
this.response.body = {
|
||||
pdoc: this.pdoc,
|
||||
time: config.time,
|
||||
memory: config.memory,
|
||||
udoc: this.udoc,
|
||||
title: this.pdoc.title,
|
||||
path: [
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "hydrooj",
|
||||
"version": "2.9.4",
|
||||
"version": "2.9.5",
|
||||
"main": "dist/loader.js",
|
||||
"bin": "bin/hydrooj.js",
|
||||
"repository": "https://github.com/hydro-dev/Hydro.git",
|
||||
|
||||
Reference in new issue
Block a user