您是什么意思?这是一个 desktop 组件。
为了澄清一下——我知道 Discourse 中仍然支持内联 PDF 预览。
我的问题是专门针对主题组件本身——它在最近的 Discourse 版本中目前会在控制台中抛出弃用警告。
这是否需要一个 PR 来更新已弃用的 API 用法(例如插件 API / Ember 钩子),或者是否已经有正在进行的工作来使其现代化?
1 个赞
由于它被标记为 official,可以合理地假设它会在为时已晚之前得到更新。
4 个赞
一个帖子被拆分到新主题:类似于 Scribd 的门禁系统
是的,我上面的功能 PR 修复了已弃用的 API。但是,它还需要更多工作,而且我一直太忙了,没时间再看它了。
1 个赞
我对在移动设备上不允许查看 PDF 感到失望。我希望将我的 phpBB 站点迁移到 Discourse,因为 phpBB 很笨重——但我使用 pdf.js 破解了一个功能到我的论坛中,它允许我嵌入 PDF。pdf.js 允许您缩放和平移——虽然它不如桌面上的功能强大,但在车库里扫描手册而无需跑回屋子里很有用。这个例子不是手册,但它演示了这个原理:Bulletin #361 - A Diesel in America
Facebook 正在抢占我的市场,主要是在移动设备上——我希望通过 Discourse 集成赢回用户。但对于我来说,在手持设备上丢失 PDF 功能不是一个胜利。
-Dan
3 个赞
控制台弹discourse.static-viewport-initialization 弃用警告。
log_manager.js:98 [Gemini Nexus] Background Service Worker Started
index.js:4 Gemini Nexus v4.2.3 Ready
runtime.ts:81 DEPRECATION: Importing `inject` from `@ember/service` is deprecated. Please import `service` instead. [deprecation id: importing-inject-from-ember-service] This will be removed in ember-source 7.0.0. See https://deprecations.emberjs.com/id/importing-inject-from-ember-service for more details.
(匿名) @ deprecate.js:72
s.<computed> @ handlers.js:10
(匿名) @ deprecate.js:108
s.<computed> @ handlers.js:10
(匿名) @ deprecate.js:116
s.<computed> @ handlers.js:10
(匿名) @ index.js:75
(匿名) @ index.js:110
s.<computed> @ handlers.js:10
(匿名) @ index.js:115
s.<computed> @ handlers.js:10
r @ handlers.js:19
l @ deprecate.js:189
k @ index.js:31
p @ index.js:126
o @ index.js:31
n @ runtime.ts:81
<static_initializer> @ external-link-confirm.gjs:18
(匿名) @ external-link-confirm.gjs:18
app.js:297 ℹ️ Discourse v2026.1.0-latest — https://github.com/discourse/discourse/commits/1c90b0dd85 — Ember v6.6.0
deprecated.js:52 DEPRECATION NOTICE: Accessing `site.mobileView` or `site.desktopView` during the site initialization can lead to errors and inconsistencies when the browser window is resized. Please move these checks to a component, transformer, or API callback that executes during page rendering. [deprecated since Discourse 3.5.0.beta9-dev] [deprecation id: discourse.static-viewport-initialization] [info: https://meta.discourse.org/t/367810]
d @ deprecated.js:52
get mobileView @ site.js:123
(匿名) @ compat.js:22
X @ index.js:416
i.get @ compat.js:21
(匿名) @ initialize-for-pdf-preview.js:10
eH @ plugin-api.gjs:3363
initialize @ initialize-for-pdf-preview.js:9
i.initialize @ app.js:265
(匿名) @ index.js:379
e.each @ index.js:183
e.walk @ index.js:112
e.each @ index.js:59
e.topsort @ index.js:65
_runInitializer @ index.js:392
runInstanceInitializers @ index.js:377
_bootSync @ instance.js:116
didBecomeReady @ index.js:784
invoke @ index.js:262
flush @ index.js:180
flush @ index.js:334
_end @ index.js:762
_boundAutorunEnd @ index.js:499
Promise.then
(匿名) @ index.js:18
flush @ index.js:29
_scheduleAutorun @ index.js:928
_ensureInstance @ index.js:919
schedule @ index.js:618
f @ index.js:343
waitForDOMReady @ index.js:512
init @ index.js:412
_ @ core.js:97
create @ core.js:599
(匿名) @ start-app.js:18
await in (匿名)
(匿名) @ discourse-boot.js:13
(匿名) @ discourse-boot.js:1
loader.js:46 Lazy dependencies loading...
