Skip to content

Commit

Permalink
support disable map
Browse files Browse the repository at this point in the history
  • Loading branch information
mayswind committed Jun 10, 2023
1 parent 58104a9 commit e608e85
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion pkg/settings/setting.go
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,9 @@ func loadDataConfiguration(config *Config, configFile *ini.File, sectionName str
}

func loadMapConfiguration(config *Config, configFile *ini.File, sectionName string) error {
if getConfigItemStringValue(configFile, sectionName, "map_provider") == OpenStreetMapProvider {
if getConfigItemStringValue(configFile, sectionName, "map_provider") == "" {
config.MapProvider = ""
} else if getConfigItemStringValue(configFile, sectionName, "map_provider") == OpenStreetMapProvider {
config.MapProvider = OpenStreetMapProvider
} else {
return errs.ErrInvalidMapProvider
Expand Down
2 changes: 1 addition & 1 deletion src/views/mobile/transactions/EditPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@
<f7-actions-button v-if="mode !== 'view'" @click="updateGeoLocation(true)">{{ $t('Update Geographic Location') }}</f7-actions-button>
<f7-actions-button v-if="mode !== 'view'" @click="clearGeoLocation">{{ $t('Clear Geographic Location') }}</f7-actions-button>
</f7-actions-group>
<f7-actions-group>
<f7-actions-group v-if="$settings.getMapProvider()">
<f7-actions-button :class="{ 'disabled': !transaction.geoLocation }" @click="showGeoLocationMapSheet = true">{{ $t('Show on the map') }}</f7-actions-button>
</f7-actions-group>
<f7-actions-group>
Expand Down

0 comments on commit e608e85

Please sign in to comment.