also looking at this
feat: native trail maps and complete native mobile screens
#1017
60 files
+2505
-823
Review threads live on the whole diff, not on one commit, so none are shown here - a thread's line means something in the branch's final form, and painting it into an intermediate step would put it on code it is not about.
| @@ -88,8 +88,8 @@ onMount(() => onNativeAccountChange(craft, () => { rows.set([]); kudosed.set({}) | ||
| 88 | 88 | </Pressable> |
| 89 | 89 | <Button :show="activity.trailId" :class="ui.secondary" @click="craft.navigation.open('/trail/' + activity.trailId)" :text="activity.trailName || 'View trail'" /> |
| 90 | 90 | <View class="mt-3 flex-row gap-3"> |
| 91 | <Button testID="feed-kudos" :disabled="pending()[activity.id]" @click="kudos(activity)" :text="(kudosed()[activity.id] ? 'Kudos given' : 'Give kudos') + ' · ' + activity.kudosCount" /> | |
| 92 | <Button @click="craft.navigation.open('/activity/' + activity.id)">Comments</Button> | |
| 91 | <Button testID="feed-kudos" :class="ui.secondary" :disabled="pending()[activity.id]" @click="kudos(activity)" :text="(kudosed()[activity.id] ? 'Kudos given' : 'Give kudos') + ' · ' + activity.kudosCount" /> | |
| 92 | <Button :class="ui.secondary" @click="craft.navigation.open('/activity/' + activity.id)">Comments</Button> | |
| 93 | 93 | </View> |
| 94 | 94 | </View> |
| 95 | 95 | <Button :show="hasMore" :disabled="loading" class="m-4" :class="ui.secondary" @click="load(true)" testID="feed-load-more">Load more</Button> |
| @@ -175,13 +175,13 @@ onMount(() => onNativeAccountChange(craft, () => { rows.set([]); mine.set([]); v | ||
| 175 | 175 | @input="query.set(eventText($event))" |
| 176 | 176 | /> |
| 177 | 177 | <View class="flex-row gap-2"> |
| 178 | <Button testID="trails-submit" @click="search()">Search</Button> | |
| 179 | <Button :show="query() !== ''" testID="trails-clear" @click="clear()">Clear</Button> | |
| 178 | <Button testID="trails-submit" :class="ui.action + ' flex-1'" @click="search()">Search</Button> | |
| 179 | <Button :show="query() !== ''" testID="trails-clear" :class="ui.secondary" @click="clear()">Clear</Button> | |
| 180 | 180 | </View> |
| 181 | 181 | </View> |
| 182 | 182 | |
| 183 | 183 | <View :show="listMode() === 'all'" class="mt-3 gap-3"> |
| 184 | <View class="flex-row gap-3"><Button testID="trails-near-me" @click="locate()">Near me</Button><Button @click="showFilters.set(!showFilters())">Filters</Button><Button :show="nearby()" @click="nearby.set(null);load()">Anywhere</Button></View> | |
| 184 | <View class="flex-row gap-3"><Button testID="trails-near-me" :class="ui.secondary" @click="locate()">Near me</Button><Button :class="ui.secondary" @click="showFilters.set(!showFilters())">Filters</Button><Button :show="nearby()" :class="ui.secondary" @click="nearby.set(null);load()">Anywhere</Button></View> | |
| 185 | 185 | <View :show="showFilters" class="gap-3 rounded-xl bg-white dark:bg-[#1b2c22] p-4"> |
| 186 | 186 | <Text class="text-[#51604e] dark:text-[#b0bfac]">Difficulty</Text><Button testID="trails-difficulty" :class="ui.secondary" :title="'Difficulty' + ': ' + nativeChoiceLabel([{label:'Any difficulty',value:'all'},{label:'Easy',value:'easy'},{label:'Moderate',value:'moderate'},{label:'Hard',value:'hard'}],difficulty())" accessibilityLabel="Difficulty" :accessibilityValue="nativeChoiceLabel([{label:'Any difficulty',value:'all'},{label:'Easy',value:'easy'},{label:'Moderate',value:'moderate'},{label:'Hard',value:'hard'}],difficulty())" @click="chooseNativeChoice(craft,'Difficulty',[{label:'Any difficulty',value:'all'},{label:'Easy',value:'easy'},{label:'Moderate',value:'moderate'},{label:'Hard',value:'hard'}],choice=>{difficulty.set(choice);load()},message=>error.set(message))" /> |
| 187 | 187 | <Text class="text-[#51604e] dark:text-[#b0bfac]">Route type</Text><Button :class="ui.secondary" :title="'Route type' + ': ' + nativeChoiceLabel([{label:'Any route',value:'all'},{label:'Loop',value:'loop'},{label:'Out and back',value:'out-and-back'},{label:'Point to point',value:'point-to-point'}],routeType())" accessibilityLabel="Route type" :accessibilityValue="nativeChoiceLabel([{label:'Any route',value:'all'},{label:'Loop',value:'loop'},{label:'Out and back',value:'out-and-back'},{label:'Point to point',value:'point-to-point'}],routeType())" @click="chooseNativeChoice(craft,'Route type',[{label:'Any route',value:'all'},{label:'Loop',value:'loop'},{label:'Out and back',value:'out-and-back'},{label:'Point to point',value:'point-to-point'}],choice=>{routeType.set(choice);load()},message=>error.set(message))" /> |