Skip to content

Commit

Permalink
feat: 更新阅读模式工具栏图标样式和排列顺序
Browse files Browse the repository at this point in the history
  • Loading branch information
yaohaixiao committed Apr 17, 2024
1 parent f29d78b commit 172810f
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 31 deletions.
2 changes: 1 addition & 1 deletion docs/js/outline.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/js/outline.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/js/reader.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/js/reader.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion outline.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion outline.min.js.map

Large diffs are not rendered by default.

45 changes: 22 additions & 23 deletions reader.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,8 @@ class Reader extends Base {

_renderEdge() {
const $target = this.$target
const mobile = isMobile()
const size = mobile ? 24 : 20
let title = this.attr('title')
let $wrapper
let $paper
Expand Down Expand Up @@ -202,40 +204,37 @@ class Reader extends Base {

const buttons = []

buttons.push({
name: 'print',
icon: 'print',
size,
action: {
context: this,
handler: this.print
}
})

if (Speech.isSupport && this.attr('allowSpeak')) {
buttons.push({
name: 'speak',
icon: 'sound',
size: 20,
size,
action: {
context: this,
handler: this.speak
}
})
}

buttons.push(
...[
{
name: 'print',
icon: 'print',
size: 20,
action: {
context: this,
handler: this.print
}
},
{
name: 'exit',
icon: 'close',
size: 20,
action: {
context: this,
handler: this.exit
}
}
]
)
buttons.push({
name: 'exit',
icon: 'close',
size,
action: {
context: this,
handler: this.exit
}
})

this.toolbar = new Toolbar({
placement: 'rtl',
Expand Down
2 changes: 1 addition & 1 deletion reader.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion reader.min.js.map

Large diffs are not rendered by default.

0 comments on commit 172810f

Please sign in to comment.