Improved confirm
This commit is contained in:
parent
172d977dcd
commit
e63fb55461
@ -1047,7 +1047,7 @@ angular.module('myApp.controllers', ['myApp.i18n'])
|
|||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
.controller('AppImHistoryController', function ($scope, $location, $timeout, $modal, $rootScope, MtpApiManager, AppUsersManager, AppChatsManager, AppMessagesManager, AppPeersManager, ApiUpdatesManager, PeersSelectService, IdleManager, StatusManager, NotificationsManager, ErrorService) {
|
.controller('AppImHistoryController', function ($scope, $location, $timeout, $modal, $rootScope, MtpApiManager, AppUsersManager, AppChatsManager, AppMessagesManager, AppPeersManager, ApiUpdatesManager, PeersSelectService, IdleManager, StatusManager, NotificationsManager, ErrorService, GeoLocationManager) {
|
||||||
|
|
||||||
$scope.$watchCollection('curDialog', applyDialogSelect);
|
$scope.$watchCollection('curDialog', applyDialogSelect);
|
||||||
|
|
||||||
|
@ -235,6 +235,9 @@
|
|||||||
"confirm_modal_delete_group_md": "Are you sure you want to delete this group?\n\nAll members will be removed and all messages will be lost.",
|
"confirm_modal_delete_group_md": "Are you sure you want to delete this group?\n\nAll members will be removed and all messages will be lost.",
|
||||||
"confirm_modal_jump_ext_url_md": "Open this link?\n\n{url}",
|
"confirm_modal_jump_ext_url_md": "Open this link?\n\n{url}",
|
||||||
"confirm_modal_migrate_supergroup_md": "Please note that group members will need to update their Telegram apps to the latest version to see your supergroup.\n\nAre you sure you want to upgrade this group?",
|
"confirm_modal_migrate_supergroup_md": "Please note that group members will need to update their Telegram apps to the latest version to see your supergroup.\n\nAre you sure you want to upgrade this group?",
|
||||||
|
"confirm_modal_bot_access_phone": "Do you want?",
|
||||||
|
"confirm_modal_bot_access_geo": "Do you want?",
|
||||||
|
"confirm_modal_bot_access_geo_inline": "Do you want?",
|
||||||
|
|
||||||
"confirm_modal_are_u_sure": "Are you sure?",
|
"confirm_modal_are_u_sure": "Are you sure?",
|
||||||
|
|
||||||
|
@ -2462,14 +2462,11 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils'])
|
|||||||
};
|
};
|
||||||
if (bot.pFlags.bot_inline_geo) {
|
if (bot.pFlags.bot_inline_geo) {
|
||||||
return checkGeoLocationAccess(peerID).then(function () {
|
return checkGeoLocationAccess(peerID).then(function () {
|
||||||
// console.log('bot has access');
|
|
||||||
return GeoLocationManager.getPosition().then(function (coords) {
|
return GeoLocationManager.getPosition().then(function (coords) {
|
||||||
resolvedBot.geo = coords;
|
resolvedBot.geo = coords;
|
||||||
console.log('got position', resolvedBot);
|
|
||||||
return qSync.when(resolvedBot);
|
return qSync.when(resolvedBot);
|
||||||
});
|
});
|
||||||
})['catch'](function () {
|
})['catch'](function () {
|
||||||
console.log('resolve', resolvedBot);
|
|
||||||
return qSync.when(resolvedBot);
|
return qSync.when(resolvedBot);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -2764,7 +2761,7 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils'])
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return ErrorService.confirm({
|
return ErrorService.confirm({
|
||||||
type: 'BOT_ACCESS_GEO'
|
type: 'BOT_ACCESS_GEO_INLINE'
|
||||||
}).then(function () {
|
}).then(function () {
|
||||||
var setHash = {};
|
var setHash = {};
|
||||||
setHash[key] = {granted: true, time: tsNow()};
|
setHash[key] = {granted: true, time: tsNow()};
|
||||||
|
@ -63,6 +63,9 @@
|
|||||||
<my-i18n-param name="url"><strong ng-bind="url"></strong></my-i18n-param>
|
<my-i18n-param name="url"><strong ng-bind="url"></strong></my-i18n-param>
|
||||||
</div>
|
</div>
|
||||||
<div ng-switch-when="SUPERGROUP_MIGRATE" my-i18n="confirm_modal_migrate_supergroup_md"></div>
|
<div ng-switch-when="SUPERGROUP_MIGRATE" my-i18n="confirm_modal_migrate_supergroup_md"></div>
|
||||||
|
<div ng-switch-when="BOT_ACCESS_PHONE" my-i18n="confirm_modal_bot_access_phone"></div>
|
||||||
|
<div ng-switch-when="BOT_ACCESS_GEO" my-i18n="confirm_modal_bot_access_geo"></div>
|
||||||
|
<div ng-switch-when="BOT_ACCESS_GEO_INLINE" my-i18n="confirm_modal_bot_access_geo_inline"></div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user