tritask-scrapbox-betaのmobile用UIを作る
2020-12-31 09:04:33 うまく動いた!
Page Menuも一度展開したら出たままなので、連続操作をやりやすい
しばらくこれで運用してみよう。
script.jsimport {
addTask, startTask, endTask, posterioriEndTask,
selectPlanningTime, selectEstimatedTime, walkDay, transport
} from '/api/code/takker/tritask-scrapbox-beta/script.js';
import {isMobile} from '/api/code/takker/mobile版scrapboxの判定/script.js';
if (isMobile()) {
const id = 'Tritask';
scrapbox.PageMenu.addMenu({
title: id,
image: 'https://img.icons8.com/ios/180/FFFFFF/todo-list--v2.png',
});
scrapbox.PageMenu(id).addItem({
title: 'Add task',
image: 'https://img.icons8.com/ios/180/FFFFFF/plus-math.png',
onClick: addTask,
});
scrapbox.PageMenu(id).addItem({
title: 'Start task',
image: 'https://img.icons8.com/ios/180/FFFFFF/start--v1.png',
onClick: startTask,
});
scrapbox.PageMenu(id).addItem({
title: 'End task',
image: 'https://img.icons8.com/ios/180/FFFFFF/stop-squared.png',
onClick: endTask,
});
scrapbox.PageMenu(id).addItem({
title: 'Posteriori end task',
image: 'https://img.icons8.com/ios/180/FFFFFF/end--v1.png',
onClick: posterioriEndTask,
});
scrapbox.PageMenu(id).addItem({
title: 'Walk a day',
image: 'https://img.icons8.com/ios/180/FFFFFF/plus-1day.png',
onClick: () => walkDay(),
});
scrapbox.PageMenu(id).addItem({
title: 'Transport tasks',
onClick: () => transport({targetProject: 'takker-memex'}),
});
}