dsh-mini-remote 0.1.8 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/page.js CHANGED
@@ -19,7 +19,9 @@ let template = null
19
19
  export function renderPage({ defaultMode = 'minimal', needsToken = false, build = '', maxUpload = 0 } = {}) {
20
20
  if (template === null) template = readFileSync(PAGE_PATH, 'utf8')
21
21
  return template
22
- .replace('__DEFAULT_MODE__', defaultMode === 'chat' ? 'chat' : 'minimal')
22
+ // 三种显示模式都认(单帧/聊天/完整);不认识的值一律回落单帧——回落要卡在这一处,
23
+ // 各处自己挑认哪几个,迟早出现「存得进去、刷新就变回去」的对不上。
24
+ .replace('__DEFAULT_MODE__', ['chat', 'full'].includes(defaultMode) ? defaultMode : 'minimal')
23
25
  .replace('__NEEDS_TOKEN__', needsToken ? 'true' : 'false')
24
26
  // 立绘地址带上构建指纹(页面自己拼 ?v=__BUILD__),换了图浏览器就不会一直
25
27
  // 拿缓存里那张。只留字母数字,别让它有机会往 HTML 里塞东西。
@@ -57,6 +57,7 @@ export const PRESET_LABELS = {
57
57
  'read-only': '仅可查看',
58
58
  'workspace-write': '工作区内修改',
59
59
  'danger-full-access': '完全权限',
60
+ 'auto': '自动审查',
60
61
  }
61
62
 
62
63
  /**