Fix location card contrast and mobile history controls
This commit is contained in:
@@ -45,3 +45,7 @@ onBeforeUnmount(()=>{epoch++;clearTimeout(timer)})
|
||||
<p v-if="error" class="text-danger mt-2" role="alert">{{error}}</p>
|
||||
</section></template>
|
||||
<style scoped>.family-locations h2{font-size:1.3rem}.location-empty{display:grid;align-content:center;min-height:270px;text-align:center;color:var(--ui-muted,#64776f);padding:1rem}.location-empty>span{font-size:3rem;color:#6c9685}.location-person{display:flex;flex-direction:column;gap:.35rem;background:var(--panel,#fff);border:1px solid var(--ui-line,#d9e3dd);border-radius:12px;padding:14px;margin-bottom:10px;color:var(--ink,#243c32)}.location-person>span,.location-person small{font-size:.85rem}.location-selected{border-color:#257a68;box-shadow:inset 3px 0 #257a68}.family-locations summary{cursor:pointer}.family-locations input[type=checkbox]{min-width:18px;width:18px;min-height:18px}</style>
|
||||
<style scoped>
|
||||
button.location-person{color:var(--ink,#243c32)!important;background:var(--panel,#fff)!important;align-items:stretch;text-align:left!important}
|
||||
.location-person strong,.location-person small{color:var(--ink,#243c32)}
|
||||
</style>
|
||||
|
||||
@@ -10,3 +10,7 @@ async function load(more=false){const cursor=more?next.value:0;if(!more)clear();
|
||||
function hidden(){if(document.hidden)clear()}document.addEventListener('visibilitychange',hidden);onBeforeUnmount(()=>{clear();document.removeEventListener('visibilitychange',hidden)})
|
||||
</script>
|
||||
<template><details class="border-top mt-3 pt-3"><summary>历史轨迹 · 每天到一生</summary><p class="small text-secondary mt-2">仅记录本人同意保存的轨迹,长期保留至本人删除。关闭共享后他人不能读取;新查看人不自动获得过去记录。长时段分批从网盘读取,概览抽样展示,原始定位点仍保留。连线不是实际道路路线。画面 1 分钟后清除,需要时重新读取。</p><form class="row g-2 my-2" @submit.prevent="load(false)"><label class="col-sm-3">家人<select v-model="selected" required class="form-select"><option value="">请选择</option><option v-for="m in members" :key="m.id" :value="m.id">{{m.name}}</option></select></label><label class="col-sm-2">时段<select v-model="period" class="form-select"><option value="day">每天</option><option value="week">每周</option><option value="month">每月</option><option value="year">每年</option><option value="life">一生 · 全部已存记录</option><option value="custom">自定义</option></select></label><label v-if="period!=='life'" class="col-sm-3">{{period==='custom'?'开始日期':'选择该时段内的日期'}}<input type="date" v-model="date" required class="form-control"></label><label v-if="period==='custom'" class="col-sm-3">结束日期<input type="date" v-model="until" required class="form-control"></label><div class="col-sm-3 align-self-end"><button class="btn btn-primary" :disabled="busy">{{busy?'读取中':'查看轨迹'}}</button></div></form><FamilyMap v-if="points.length" :track="points" :height="420"/><p role="status">{{status}}</p><button v-if="next!==null" class="btn btn-outline-primary" :disabled="busy" @click="load(true)">继续加载</button></details></template>
|
||||
<style scoped>
|
||||
form>label{display:flex;flex-direction:column;align-items:stretch;gap:.35rem;min-width:0}
|
||||
form>label select,form>label input{width:100%;min-width:0}
|
||||
</style>
|
||||
|
||||
@@ -1 +1,3 @@
|
||||
.family-map-canvas{height:100%;width:100%;min-height:240px;background:#e5efea;border-radius:16px;overflow:hidden;position:relative}.family-map-pin{display:flex;align-items:center;gap:6px;border:0;background:transparent;color:#193d34;cursor:pointer;padding:4px;font-family:inherit}.family-map-pin>span{display:grid;place-items:center;width:40px;height:40px;background:#207e6e;border:3px solid white;border-radius:50%;color:white;font-size:17px;box-shadow:0 3px 14px #12392e40}.family-map-pin>b{background:#fffffff2;border-radius:8px;padding:5px 9px;box-shadow:0 2px 8px #12392e20;max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px}.family-map-pin.selected>span{background:#d37f3a;outline:3px solid #e8bc72}.maplibregl-ctrl button{min-width:36px;min-height:36px}.maplibregl-ctrl-attrib a{color:#375e51}.maplibregl-canvas:focus-visible{outline:3px solid #207e6e;outline-offset:-3px}[data-theme=night] .family-map-canvas{background:#1d2d27}[data-theme=night] .family-map-pin>b{background:#243c34;color:#cad9d2}.family-map-status{font-size:.8rem;color:#627c70;margin:.4rem 0}.maplibregl-control-container{font:12px sans-serif}
|
||||
.family-map-pin>b{color:#193d34}
|
||||
[data-theme=night] .family-map-pin>b{color:#cad9d2}
|
||||
|
||||
Reference in New Issue
Block a user