Skip to content

调整前台动态皮肤预览逻辑 #116

Closed
@88250

Description

@88250
Owner

前台动态切换皮肤特性 skin=xxx 主要是为了预览皮肤,之前的实现逻辑会在 cookie 中保存当前皮肤,目的是为了让前台动态切换以后可以不带 skin 参而继续用 cookie 值进行皮肤预览。比如 skin=nijigen 预览后,cookie 中的 skin 值会被设置为 nijigen,然后后续访问都用该值进行模板渲染。

当博主在后台切换皮肤后,访客的 cookie 并未清空,会导致皮肤切换没有效果,另外这个 cookie 逻辑偶尔上页面静态化 #107 以后就更复杂了,所以需要进行简化。

现改为不写 cookie,仅在带有 skin=xxx 时切换皮肤,将 skin 写入 session storage。

Activity

added this to the 4.1.0 milestone on Apr 30, 2020
self-assigned this
on Apr 30, 2020
added a commit that references this issue on Apr 30, 2020
reopened this on May 12, 2020
added a commit that references this issue on May 15, 2020
11b4572
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Projects

No projects

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @88250@Vanessa219

      Issue actions

        调整前台动态皮肤预览逻辑 · Issue #116 · 88250/solo