Commit fa208e72 authored by ransome1's avatar ransome1
Browse files

Added more fallback fonts for SC, optimized input length for SC

parent d1676362
name: Code scan, build & release
on: push
on:
push:
tags:
- '*'
jobs:
macos:
name: MacOS (Build & Release)
......
......@@ -112,6 +112,7 @@ A prioritized backlog of new features and known issues can be found <a href="htt
- Italian
- Spanish
- French
- Simplified Chinese
* sleek can be minimized to tray
* Tabindex available
* Existing todos can be used as templates for new ones
......
......@@ -15,7 +15,7 @@ html {
}
body {
font: 16px "FreeSans", sans-serif;
font-size: 16px;
height: 100%;
margin: auto;
-webkit-user-select: none;
......@@ -1574,7 +1574,7 @@ input,
optgroup,
select,
textarea {
font-family: "FreeSans", Helvetica, Arial, "Noto Sans", "DejaVu Sans", sans-serif;
font-family: "FreeSans", Helvetica, "Arial Unicode MS", Arial, "Noto Sans", "DejaVu Sans", "Microsoft JhengHei", "微軟正黑體", "Microsoft YaHei", sans-serif;
}
code,
......@@ -10357,15 +10357,15 @@ a.has-text-danger-dark:hover, a.has-text-danger-dark:focus {
}
.is-family-primary {
font-family: "FreeSans", Helvetica, Arial, "Noto Sans", "DejaVu Sans", sans-serif !important;
font-family: "FreeSans", Helvetica, "Arial Unicode MS", Arial, "Noto Sans", "DejaVu Sans", "Microsoft JhengHei", "微軟正黑體", "Microsoft YaHei", sans-serif !important;
}
.is-family-secondary {
font-family: "FreeSans", Helvetica, Arial, "Noto Sans", "DejaVu Sans", sans-serif !important;
font-family: "FreeSans", Helvetica, "Arial Unicode MS", Arial, "Noto Sans", "DejaVu Sans", "Microsoft JhengHei", "微軟正黑體", "Microsoft YaHei", sans-serif !important;
}
.is-family-sans-serif {
font-family: "FreeSans", Helvetica, Arial, "Noto Sans", "DejaVu Sans", sans-serif !important;
font-family: "FreeSans", Helvetica, "Arial Unicode MS", Arial, "Noto Sans", "DejaVu Sans", "Microsoft JhengHei", "微軟正黑體", "Microsoft YaHei", sans-serif !important;
}
.is-family-monospace {
......
......@@ -111,9 +111,9 @@ function getCaretPosition(inputId) {
}
function resizeInput(input) {
if(input.value) {
input.style.width = input.value.length + 6 + "ch";
input.style.width = input.value.length + 8 + "ch";
} else if(!input.value && input.placeholder) {
input.style.width = input.placeholder.length + 6 + "ch";
input.style.width = input.placeholder.length + 8 + "ch";
}
}
function positionAutoCompleteContainer() {
......
......@@ -5,6 +5,7 @@ import { categories } from "./filters.mjs";
import { generateRecurrence } from "./recurrences.mjs";
import { convertDate, isToday, isTomorrow, isPast } from "./date.mjs";
import { show } from "./form.mjs";
const body = document.getElementById("body");
const modalForm = document.getElementById("modalForm");
const todoTableWrapper = document.getElementById("todoTableWrapper");
const todoTableContainer = document.getElementById("todoTableContainer");
......@@ -48,13 +49,13 @@ const item = { previous: "" }
let
items,
clusterCounter,
clusterSize = Math.ceil(window.innerHeight/35), // 35 being the pixel height of one todo in compact mode
clusterSize = Math.ceil(window.innerHeight/30), // 35 being the pixel height of one todo in compact mode
clusterThreshold = 0,
stopBuilding = false,
visibleRows = 0;
console.log(clusterSize);
todoTableWrapper.addEventListener("scroll", function(event) {
if((event.target.scrollHeight - event.target.scrollTop === event.target.clientHeight) && visibleRows<items.filtered.length) {
if((event.target.scrollHeight - event.target.scrollTop <= event.target.clientHeight) && visibleRows<items.filtered.length) {
stopBuilding = false;
startBuilding(null, true);
}
......
......@@ -17,7 +17,7 @@
"contexts": "情境",
"projects": "项目",
"visibleTodos": "可见任务",
"of": "",
"of": "of",
"selectedFilters": "选中的过滤器",
"inProgress": "进行中",
"done": "标记为完成",
......@@ -53,7 +53,7 @@
"windowButtonCreateFile": "在此处创建todo.txt",
"selectFile": "选择todo.txt文件",
"select": "选择",
"selected": "选中的",
"selected": "当前文件",
"windowButtonOpenFile": "打开",
"windowFileformat": "文本文件",
"sleekOnGithub": "sleek on Github",
......@@ -85,7 +85,7 @@
"year_plural": "年",
"yearly": "每年",
"noRecurrence": "不重复",
"errorEventLogging": "错误及事件记录(Log)",
"errorEventLogging": "错误及事件记录",
"messageLoggingBody": "如果打开匿名的错误/事件报告会有助于未来的开发. 报告里将包括发生的错误和使用的功能. 你可以在设定里打开. ",
"messageShareTitle": "sleek <i class=\"fas fa-heart\"></i> 你",
"messageShareBody": "这个项目欢迎各位的意见<br><i class=\"fas fa-star\"></i>&nbsp;<a href=\"https://sourceforge.net/projects/sleek/reviews\" target=\"_blank\">SourceForge</a>, <i class=\"fab fa-github\"></i>&nbsp;<a href=\"https://github.com/ransome1/sleek/issues\" target=\"_blank\">Github 报告错误</a> 以及推荐",
......@@ -115,7 +115,7 @@
"helpTabPrioritiesTitle": "添加优先度",
"helpTabPrioritiesBody": "重要任务要加重显示在列表上. 你可以在任务前加 \"(A)\". 你可以选择 (A) 到 (Z), 但是只有A到C有对应颜色. 其他优先度显示为灰色. 可以在新建/编辑窗口里使用Ctrl+Alt+A〜Z设置优先度",
"helpTabContextsProjectsTitle": "添加情境和项目",
"helpTabContextsProjectsBody": "如果你的项目里有多个任务, 你可以在任务里添加 \"+\" 加上项目名. 情境表示该任务和你相关的情形. 根据David Allen著作<a href=\"https://en.wikipedia.org/wiki/Getting_Things_Done\" target=\"_blank\">Getting Things Done</a>, \"context\" 情境可以是家庭, 职场, 外出购物, 打电话, 电脑, 或者某个特定的人. 如果要添加情境, 请输入 \"@\" 和情境名. 更多关于todo.txt的清晰请参见<a href=\"https://github.com/todotxt/todo.txt\" target=\"_blank\">click here</a>.<br><br>项目名和情境都不允许使用空格, 所以请使用一个单词. 你可以指定多个项目和情境. ",
"helpTabContextsProjectsBody": "如果你的项目里有多个任务, 你可以在任务里添加 \"+\" 加上项目名. 情境表示该任务和你相关的情形. 根据David Allen著作<a href=\"https://en.wikipedia.org/wiki/Getting_Things_Done\" target=\"_blank\">Getting Things Done</a>, \"Context\" (情境) 可以是家庭, 职场, 外出购物, 打电话, 电脑, 或者某个特定的人. 如果要添加情境, 请输入 \"@\" 和情境名. 更多关于todo.txt的清晰请参见<a href=\"https://github.com/todotxt/todo.txt\" target=\"_blank\">click here</a>.<br><br>项目名和情境都不允许使用空格, 所以请使用一个单词. 你可以指定多个项目和情境. ",
"helpTabDatesRecurrencesTitle1": "添加日期",
"helpTabDatesRecurrencesBody1": "sleek会给任务自动添加创建日期. 如果你想要修改可以优先度旁边找到日期选择. 有到期的任务将显示在列表上部, 到期越接近当前日期位置越高. 如果到期设置为今天或者过去的日期, 则会被标记为红色, 且显示在列表最上面. 如果要添加到期可以使用 \"due:\" 日期格式为 <strong>YYYY-MM-DD (e.g. due:2021-03-07)</strong>. 你也可以使用到期选择器, 会自动帮你调整日期格式. ",
"helpTabDatesRecurrencesTitle2": "添加重复",
......@@ -128,5 +128,5 @@
"reviewWindowsStore": "在Windows Store上给我们建议",
"shareTwitter": "通过Twitter分享sleek",
"shareFacebook": "通过Facebook分享sleek",
"shareLinkedin": "通过LinkedI分享sleek"
"shareLinkedin": "通过LinkedIn分享sleek"
}
......@@ -14,7 +14,7 @@ html {
height: 100%;
}
body {
font: 16px "FreeSans", sans-serif;
font-size: 16px;
height: 100%;
margin: auto;
-webkit-user-select: none;
......
......@@ -21,6 +21,6 @@ $sleek-projects-button: #f1d6f1;
$modal-background-background-color: rgba(0, 0, 0, 0.25);
$modal-z: 50;
$family-sans-serif: "FreeSans", Helvetica, Arial, "Noto Sans", "DejaVu Sans", sans-serif;
$family-sans-serif: "FreeSans", Helvetica, "Arial Unicode MS", Arial, "Noto Sans", "DejaVu Sans", "Microsoft JhengHei", "微軟正黑體", "Microsoft YaHei", sans-serif;
$modal-content-width: 80%;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment