diff --git a/apps/web/src/oj/submission/list.vue b/apps/web/src/oj/submission/list.vue index 4275075..6339352 100644 --- a/apps/web/src/oj/submission/list.vue +++ b/apps/web/src/oj/submission/list.vue @@ -61,10 +61,15 @@ const tone = useTone() const { isMobile, isDesktop } = useBreakpoints() /** - * 左栏收窄(底栏最左那个按钮):屏窄、或者浏览器放大了一档时右边的代码看不全, - * 收窄后每条排成手机上那样的两行,什么都不丢。记在本机,下次打开还是收着的 + * 左栏自动收窄:屏窄、或者浏览器放大了一档时,按 46 : 54 分右边的代码看不全 + * (九成五的提交最长一行 52 个字符,代码区要 ~650),就把列表收到 320、每条排成手机上 + * 那样的两行,什么都不丢。1280 的屏不放大正好不收;收不收只看分栏的宽,和列表自己无关,不会来回跳 */ -const narrowList = useStorage("oj2:submission-list-narrow", false) +const split = useTemplateRef("split") +const { width: splitWidth } = useElementSize(split) +const narrowList = computed( + () => isDesktop.value && splitWidth.value > 0 && splitWidth.value < 1200, +) const twoLine = computed(() => isMobile.value || narrowList.value) const inContest = computed(() => route.name === "contest submissions") @@ -588,7 +593,7 @@ function dayBreak(index: number) {
@@ -842,7 +847,7 @@ function dayBreak(index: number) {
-
+
@@ -974,24 +979,12 @@ function dayBreak(index: number) {
- - - - 共 {{ total }} 条 + 共 {{ total }} 条