Skip to content

Commit

Permalink
fix: popup is hided in small screen
Browse files Browse the repository at this point in the history
  • Loading branch information
betterRunner committed Oct 29, 2021
1 parent 3a8e54f commit 0950940
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
14 changes: 9 additions & 5 deletions src/content-scripts/renderer/popup/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,15 @@ export default defineComponent({
appExpanded.value = e as boolean;
appWidth.value = e ? AppWidth.expanded : AppWidth.normal;
});
const wrapperStyle = computed(() => ({
width: `${appWidth.value}px`,
"min-width": `${appWidth.value}px`,
transition: "1.0s",
}));
const wrapperStyle = computed(() => {
const maxWidth = window.innerWidth * 0.8;
const width = appWidth.value > maxWidth ? maxWidth : appWidth.value;
return {
width: `${width}px`,
"min-width": `${width}px`,
transition: "0.5s",
};
});
const visible = ref(false);
const handleClickOutside = () => {
Expand Down
6 changes: 4 additions & 2 deletions src/content-scripts/renderer/popup/note-book/note.vue
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ export default {
text-align: left;
text-overflow: ellipsis;
overflow: hidden;
width: 400px;
width: auto;
color: #409eff;
}
.note-link-content {
Expand All @@ -284,7 +284,7 @@ export default {
display: flex;
flex-direction: row;
flex-wrap: wrap;
width: 300px;
width: auto;
position: relative;
font-size: 14px;
Expand All @@ -298,6 +298,8 @@ export default {
}
}
.note-time {
width: 100px;
min-width: 100px;
text-align: right;
user-select: none;
}
Expand Down

0 comments on commit 0950940

Please sign in to comment.