From 36f356340cd53488d98c911b0be4c26656f952e4 Mon Sep 17 00:00:00 2001 From: undefined Date: Thu, 6 May 2021 13:54:56 +0800 Subject: [PATCH] ui: change default values --- packages/ui-default/components/socket/index.js | 5 ++++- packages/ui-default/package.json | 2 +- packages/ui-default/templates/components/form.html | 1 + .../templates/partials/discussion_edit_form.html | 2 +- .../ui-default/templates/partials/problem_default.md | 10 +++------- .../templates/partials/training_default.json | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/packages/ui-default/components/socket/index.js b/packages/ui-default/components/socket/index.js index 2a352ef06..9d24176fd 100644 --- a/packages/ui-default/components/socket/index.js +++ b/packages/ui-default/components/socket/index.js @@ -8,7 +8,10 @@ export default class Sock { this.isreconnect = false; this.init(); this.notification = null; - this.showNotification = showNotification; + this.showNotification = false; + setTimeout(() => { + this.showNotification = showNotification; + }, 10000); } onauth() { diff --git a/packages/ui-default/package.json b/packages/ui-default/package.json index b43228a53..dc3874614 100644 --- a/packages/ui-default/package.json +++ b/packages/ui-default/package.json @@ -1,6 +1,6 @@ { "name": "@hydrooj/ui-default", - "version": "4.7.1", + "version": "4.7.3", "author": "undefined ", "license": "AGPL-3.0", "main": "hydro.js", diff --git a/packages/ui-default/templates/components/form.html b/packages/ui-default/templates/components/form.html index 226e5a185..dccad2f4c 100644 --- a/packages/ui-default/templates/components/form.html +++ b/packages/ui-default/templates/components/form.html @@ -49,6 +49,7 @@ {% set autofocus = args.autofocus or false %} {% set noAutocomplete = args.noAutocomplete or false %} {% set extra_style = args.extra_style or false %} +{% set extra_class = args.extra_class %} {% set date = args.date or false %} {% set time = args.time or false %} class="{{ form_class }}{% if extra_class %} {{ extra_class }}{% endif %}" diff --git a/packages/ui-default/templates/partials/discussion_edit_form.html b/packages/ui-default/templates/partials/discussion_edit_form.html index 66be2623a..c3c81732c 100644 --- a/packages/ui-default/templates/partials/discussion_edit_form.html +++ b/packages/ui-default/templates/partials/discussion_edit_form.html @@ -43,5 +43,5 @@ markdown:true, required:true, extra_style:'height: 500px', - extra_class:'auto-resize' + extra_textarea_class:'auto-resize' }) }} diff --git a/packages/ui-default/templates/partials/problem_default.md b/packages/ui-default/templates/partials/problem_default.md index a47706a29..7796b066e 100644 --- a/packages/ui-default/templates/partials/problem_default.md +++ b/packages/ui-default/templates/partials/problem_default.md @@ -12,17 +12,13 @@ Two integers x and y, satisfying $0\leq x,y\leq 32767$ . ## Output One integer, the sum of x and y. -# Sample 1 +# Samples -## Input - -``` +```input1 123 500 ``` -## Output - -``` +```outpu1 623 ``` diff --git a/packages/ui-default/templates/partials/training_default.json b/packages/ui-default/templates/partials/training_default.json index f39debcae..fe14351c4 100644 --- a/packages/ui-default/templates/partials/training_default.json +++ b/packages/ui-default/templates/partials/training_default.json @@ -3,12 +3,12 @@ "_id": 1, "title": "最初的最初 - A+B Problem", "requireNids": [], - "pids": [1000, "56c52ade2fefd90539000005"] + "pids": [1, "P1001"] }, { "_id": 2, "title": "最初的进阶", "requireNids": [1], - "pids": [1001, 1002] + "pids": [2, 3] } ]