-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Feat(iss#8106) 控制台样式切换按钮 #8128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
M1LKT
wants to merge
4
commits into
AstrBotDevs:master
Choose a base branch
from
M1LKT:feat/#8106
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Feat(iss#8106) 控制台样式切换按钮 #8128
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
1fe141e
fix(ui): always show actions btn instead of on hover in OutlinedActi…
M1LKT 4b9de1f
Merge remote-tracking branch 'upstream/master' into feat/#8106
M1LKT 299e848
feat(webui): add flush mode toggle for ConsoleDisplayer
M1LKT d3021ba
feat:为切换按钮增加持久性保存
M1LKT File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+60 Bytes
(100%)
dashboard/src/assets/mdi-subset/materialdesignicons-webfont-subset.woff
Binary file not shown.
Binary file modified
BIN
+92 Bytes
(100%)
dashboard/src/assets/mdi-subset/materialdesignicons-webfont-subset.woff2
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,6 +14,13 @@ import { EventSourcePolyfill } from 'event-source-polyfill'; | |
| </v-chip> | ||
| </v-chip-group> | ||
| <v-spacer></v-spacer> | ||
| <v-btn | ||
| :icon="flushMode ? 'mdi-format-columns' : 'mdi-format-align-left'" | ||
| variant="text" | ||
| density="compact" | ||
| class="fullscreen-btn" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| @click="toggleFlushMode" | ||
| ></v-btn> | ||
| <v-btn | ||
| :icon="isFullscreen ? 'mdi-fullscreen-exit' : 'mdi-fullscreen'" | ||
| variant="text" | ||
|
|
@@ -23,7 +30,7 @@ import { EventSourcePolyfill } from 'event-source-polyfill'; | |
| ></v-btn> | ||
| </div> | ||
|
|
||
| <div id="term" class="console-term"> | ||
| <div id="term" class="console-term" :class="{ 'console-term--flush': flushMode }"> | ||
| </div> | ||
| </div> | ||
| </template> | ||
|
|
@@ -35,6 +42,7 @@ export default { | |
| return { | ||
| autoScroll: true, | ||
| isFullscreen: false, | ||
| flushMode: localStorage.getItem('console_flush_mode') === 'true', | ||
| logColorAnsiMap: { | ||
| '\u001b[1;34m': 'color: #6cb6d9; font-weight: bold;', | ||
| '\u001b[1;36m': 'color: #72c4cc; font-weight: bold;', | ||
|
|
@@ -84,6 +92,9 @@ export default { | |
| this.refreshDisplay(); | ||
| }, | ||
| deep: true | ||
| }, | ||
| flushMode(val) { | ||
| localStorage.setItem('console_flush_mode', val); | ||
| } | ||
| }, | ||
| async mounted() { | ||
|
|
@@ -264,6 +275,10 @@ export default { | |
| this.autoScroll = !this.autoScroll; | ||
| }, | ||
|
|
||
| toggleFlushMode() { | ||
| this.flushMode = !this.flushMode; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| }, | ||
|
|
||
| toggleFullscreen() { | ||
| const container = document.getElementById('console-wrapper'); | ||
| if (!document.fullscreenElement) { | ||
|
|
@@ -386,6 +401,22 @@ export default { | |
| white-space: normal; | ||
| } | ||
|
|
||
| .console-term--flush :deep(.console-log-line--structured) { | ||
| display: block; | ||
| white-space: pre-wrap; | ||
| } | ||
|
|
||
| .console-term--flush :deep(.console-log-prefix), | ||
| .console-term--flush :deep(.console-log-level), | ||
| .console-term--flush :deep(.console-log-message) { | ||
| display: inline; | ||
| } | ||
|
|
||
| .console-term--flush :deep(.console-log-prefix), | ||
| .console-term--flush :deep(.console-log-level) { | ||
| margin-right: 4px; | ||
| } | ||
|
|
||
| :deep(.console-log-prefix), | ||
| :deep(.console-log-level), | ||
| :deep(.console-log-message) { | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
该文件是自动生成的(如注释所述),手动修改的内容在下次运行
pnpm run subset-icons时会被覆盖。请按照文件头部的说明,通过运行脚本来更新图标子集,而不是直接编辑 CSS 文件。