Add a settings page for profit display and default stack
- Per-device toggle to hide your own net and the net ranking at tables - Default starting stack set in settings; creating a table saves the stack, SB and BB used as the next defaults - Number fields on create and settings select all on focus Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
ed3d1e437e
commit
22ee28ba03
9 files changed
+160
-8
No files matched your search
+13
-1
@@ -1,7 +1,7 @@
|
||||
(function () {
|
||||
'use strict';
|
||||
|
||||
const { Store, api, chips } = App;
|
||||
const { Store, api, chips, selectOnFocus } = App;
|
||||
if (!Store.name) {
|
||||
location.replace('/');
|
||||
return;
|
||||
@@ -109,6 +109,7 @@
|
||||
timerInput.addEventListener('change', refresh);
|
||||
intervalInput.addEventListener('input', refresh);
|
||||
form.querySelectorAll('input[type="radio"]').forEach((el) => el.addEventListener('change', refresh));
|
||||
[stackInput, sbInput, bbInput, intervalInput].forEach(selectOnFocus);
|
||||
$('reroll').addEventListener('click', suggestName);
|
||||
Fluid.Segmented(form.querySelector('.segmented.numbers'));
|
||||
Fluid.navBar($('nav'), $('large-title'));
|
||||
@@ -152,6 +153,9 @@
|
||||
cpuCount: Number(radioValue('cpu-count')),
|
||||
token: Store.token,
|
||||
});
|
||||
// 次にテーブルを作るときの初期値にする
|
||||
Store.defaultStack = int(stackInput);
|
||||
Store.lastBlinds = { stack: int(stackInput), sb: int(sbInput), bb: int(bbInput) };
|
||||
location.href = '/table/' + encodeURIComponent(id);
|
||||
} catch (err) {
|
||||
errorEl.textContent = err.message;
|
||||
@@ -164,7 +168,15 @@
|
||||
.then((me) => { $('review-mode').hidden = !me.admin; })
|
||||
.catch(() => {});
|
||||
|
||||
// 開始スタックは設定(=前回値)。SB/BB は前回と同じ開始スタックなら前回値を引き継ぐ
|
||||
stackInput.value = Store.defaultStack;
|
||||
applyDefaultBlinds();
|
||||
const last = Store.lastBlinds;
|
||||
if (last && last.stack === Store.defaultStack && (last.sb !== int(sbInput) || last.bb !== int(bbInput))) {
|
||||
sbInput.value = last.sb;
|
||||
bbInput.value = last.bb;
|
||||
blindsTouched = true;
|
||||
}
|
||||
refresh();
|
||||
suggestName();
|
||||
})();
|
||||
Reference in new issue
Block a user