Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion plugins/alipay/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ const getUserFinishOrder = async userId => {
orders = orders.map(order => {
return {
orderId: order.orderId,
type: '支付宝',
type: 'Alipay',
amount: order.amount,
createTime: order.createTime,
};
Expand Down
2 changes: 1 addition & 1 deletion plugins/flowSaver/flow.js
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ const getServerPortFlow = async (serverId, accountId, timeArray, isMultiServerFl
};

/**
* 为流量倍率而增加
* 为Скорость потока而增加
*/
const getServerPortFlowWithScale = async (serverId, accountId, timeArray, isMultiServerFlow) => {
const serverIdFilter = {};
Expand Down
6 changes: 3 additions & 3 deletions plugins/freeAccount/views/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@
<script src="/libs/bootstrap.min.js"></script>
<script src="/libs/qrcode.min.js"></script>
<div class="row">
<div class="title col-md-12 col-lg-12">扫码添加账号<br>定期更换密码</div>
<div class="title col-md-12 col-lg-12">Отсканируйте QR-код, чтобы добавить учетную запись<br>Регулярно меняйте свой пароль.</div>
</div>
<div class="row">
<div class="time col-md-12 col-lg-12"></div>
</div>
<% if (pay) { %>
<div class="row">
<div class="title col-md-12 col-lg-12"><a href="<%=pay%>">购买付费服务</a></div>
<div class="title col-md-12 col-lg-12"><a href="<%=pay%>">Покупка платных услуг</a></div>
</div>
<% } %>
<div class="row">
Expand Down Expand Up @@ -83,7 +83,7 @@
document.getElementById('qrcode').innerHTML = qr.createImgTag(6);
$('.address').text(window.ssqrcode);
$('#qrcode').attr('href', window.ssqrcode);
$('.time').text('更新时间: ' + (new Date(data.updateTime)).toLocaleString());
$('.time').text('Время обновления: ' + (new Date(data.updateTime)).toLocaleString());
});
});
};
Expand Down
2 changes: 1 addition & 1 deletion plugins/group/db/group.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const addDefaultGroup = async () => {
.then(s => s[0]);
if (!data) {
const id = await knex('group').insert(
{ id: 0, name: '默认组', comment: '系统默认分组' },
{ id: 0, name: 'Группа по умолчанию', comment: 'Системная группа по умолчанию' },
);
if (id[0] !== 0) {
await knex('group')
Expand Down
30 changes: 15 additions & 15 deletions plugins/webgui/public/controllers/admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,35 +26,35 @@ app.controller('AdminController', ['$scope', '$mdMedia', '$mdSidenav', '$state',
}
};
$scope.menus = [{
name: '首页',
name: 'Главная страница',
icon: 'home',
click: 'admin.index',
}, {
name: '服务器',
name: 'Сервер',
icon: 'cloud',
click: 'admin.server',
hide: !!($scope.id !== 1),
}, {
name: '用户',
name: 'Пользователи',
icon: 'people',
click: 'admin.user',
}, {
name: '账号',
name: 'Счета',
icon: 'account_circle',
click: 'admin.account',
}, {
name: '订单',
name: 'Заказы',
icon: 'attach_money',
click: 'admin.pay',
hide: !($scope.config.paypal || $scope.config.giftcard || $scope.config.refCode || $scope.config.alipay),
}, {
name: '设置',
name: 'Настройки',
icon: 'settings',
click: 'admin.settings',
}, {
name: 'divider',
}, {
name: '退出',
name: 'Выйти',
icon: 'exit_to_app',
click: function() {
$http.post('/api/home/logout').then(() => {
Expand Down Expand Up @@ -183,7 +183,7 @@ app.controller('AdminController', ['$scope', '$mdMedia', '$mdSidenav', '$state',
])
.controller('AdminIndexController', ['$scope', '$state', 'adminApi', '$localStorage', '$interval', 'orderDialog',
($scope, $state, adminApi, $localStorage, $interval, orderDialog) => {
$scope.setTitle('首页');
$scope.setTitle('Главная страница');
if($localStorage.admin.indexInfo) {
$scope.signupUsers = $localStorage.admin.indexInfo.data.signup;
$scope.loginUsers = $localStorage.admin.indexInfo.data.login;
Expand Down Expand Up @@ -245,7 +245,7 @@ app.controller('AdminController', ['$scope', '$mdMedia', '$mdSidenav', '$state',
}
])
.controller('AdminRecentSignupController', ['$scope', '$http', '$state', ($scope, $http, $state) => {
$scope.setTitle('最新注册用户');
$scope.setTitle('Новые зарегистрированные пользователи');
$scope.setMenuButton('arrow_back', 'admin.index');
$scope.recentUsers = null;
$http.get('/api/admin/user/recentSignup?number=100').then(success => {
Expand All @@ -256,7 +256,7 @@ app.controller('AdminController', ['$scope', '$mdMedia', '$mdSidenav', '$state',
};
}])
.controller('AdminRecentLoginController', ['$scope', '$http', '$state', ($scope, $http, $state) => {
$scope.setTitle('最近登录用户');
$scope.setTitle('Недавно вошедшие пользователи');
$scope.setMenuButton('arrow_back', 'admin.index');
$scope.recentUsers = null;
$http.get('/api/admin/user/recentLogin?number=-1').then(success => {
Expand All @@ -267,7 +267,7 @@ app.controller('AdminController', ['$scope', '$mdMedia', '$mdSidenav', '$state',
};
}])
.controller('AdminTopFlowController', ['$scope', '$http', '$state', ($scope, $http, $state) => {
$scope.setTitle('今日流量排行');
$scope.setTitle('Рейтинг трафика на сегодняшний день');
$scope.setMenuButton('arrow_back', 'admin.index');
$scope.topUsers = null;
$scope.allFlow = 0;
Expand All @@ -287,18 +287,18 @@ app.controller('AdminController', ['$scope', '$mdMedia', '$mdSidenav', '$state',
}])
.controller('AdminPayController', ['$scope', 'adminApi', 'orderDialog', '$mdMedia', '$localStorage', 'orderFilterDialog', '$timeout', '$state', '$stateParams',
($scope, adminApi, orderDialog, $mdMedia, $localStorage, orderFilterDialog, $timeout, $state, $stateParams) => {
$scope.setTitle('订单');
$scope.setTitle('Заказ');
$scope.setMenuSearchButton('search');
$scope.showOrderInfo = order => {
orderDialog.show(order);
};
$scope.myPayType = '';
let tabSwitchTime = 0;
$scope.payTypes = [];
if($scope.config.alipay) { $scope.payTypes.push({ name: '支付宝' }); }
if($scope.config.alipay) { $scope.payTypes.push({ name: 'Alipay' }); }
if($scope.config.paypal) { $scope.payTypes.push({ name: 'Paypal' }); }
if($scope.config.giftcard) { $scope.payTypes.push({ name: '充值码' }); }
if($scope.config.refCode) { $scope.payTypes.push({ name: '邀请码' }); }
if($scope.config.giftcard) { $scope.payTypes.push({ name: 'Код пополнения' }); }
if($scope.config.refCode) { $scope.payTypes.push({ name: 'Код приглашения' }); }
if($scope.payTypes.length) {
$scope.myPayType = $stateParams.myPayType || $scope.payTypes[0].name;
$scope.defaultTabIndex = 0;
Expand Down
46 changes: 23 additions & 23 deletions plugins/webgui/public/controllers/adminAccount.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const app = angular.module('app');

app.controller('AdminAccountController', ['$scope', '$state', '$mdMedia', '$http', 'accountSortDialog','$timeout', 'adminApi', '$localStorage',
($scope, $state, $mdMedia, $http, accountSortDialog, $timeout, adminApi, $localStorage) => {
$scope.setTitle('账号');
$scope.setTitle('счет');
$scope.setMenuRightButton('sort_by_alpha');
$scope.setMenuSearchButton('search');
if(!$localStorage.admin.accountFilterSettings) {
Expand Down Expand Up @@ -125,7 +125,7 @@ app.controller('AdminAccountController', ['$scope', '$state', '$mdMedia', '$http
])
.controller('AdminAccountPageController', ['$scope', '$state', '$stateParams', '$http', '$mdMedia', '$q', 'adminApi', '$timeout', '$interval', 'qrcodeDialog', 'ipDialog', '$mdBottomSheet', 'wireGuardConfigDialog', '$filter', 'subscribeDialog',
($scope, $state, $stateParams, $http, $mdMedia, $q, adminApi, $timeout, $interval, qrcodeDialog, ipDialog, $mdBottomSheet, wireGuardConfigDialog, $filter, subscribeDialog) => {
$scope.setTitle('账号');
$scope.setTitle('счет');
$scope.setMenuButton('arrow_back', 'admin.account');
$scope.accountId = +$stateParams.accountId;
$scope.account = { port: '...' };
Expand Down Expand Up @@ -428,7 +428,7 @@ app.controller('AdminAccountController', ['$scope', '$state', '$mdMedia', '$http
});
};
$scope.clipboardSuccess = event => {
$scope.toast($filter('translate')('二维码链接已复制到剪贴板'));
$scope.toast($filter('translate')('Ссылка на QR-код скопирована в буфер обмена.'));
};
$scope.isWG = server => server.type === 'WireGuard';
$scope.isSS = server => server.type === 'Shadowsocks';
Expand All @@ -443,7 +443,7 @@ app.controller('AdminAccountController', ['$scope', '$state', '$mdMedia', '$http
])
.controller('AdminAddAccountController', ['$scope', '$state', '$http', '$mdBottomSheet', 'alertDialog', '$filter', 'setAccountServerDialog',
($scope, $state, $http, $mdBottomSheet, alertDialog, $filter, setAccountServerDialog) => {
$scope.setTitle('添加账号');
$scope.setTitle('Добавить аккаунт');
$scope.setMenuButton('arrow_back', 'admin.account');
$http.get('/api/admin/order').then(success => {
$scope.orders = success.data.filter(f => !f.baseId);
Expand All @@ -459,11 +459,11 @@ app.controller('AdminAccountController', ['$scope', '$state', '$mdMedia', '$http
$scope.account.password = getRandomPassword(10);
});
$scope.typeList = [
{key: '不限量', value: 1},
{key: '', value: 3},
{key: '', value: 2},
{key: '', value: 4},
{key: '小时', value: 5},
{key: 'Неограниченный', value: 1},
{key: 'Месяц', value: 3},
{key: 'Неделя', value: 2},
{key: 'День', value: 4},
{key: 'Час', value: 5},
];
$scope.timeLimit = {
'2': 7 * 24 * 3600000,
Expand Down Expand Up @@ -540,10 +540,10 @@ app.controller('AdminAccountController', ['$scope', '$state', '$mdMedia', '$http
server: $scope.account.server,
user: $scope.account.user,
}).then(success => {
alertDialog.show('添加账号成功', '确定');
alertDialog.show('Учетная запись успешно добавлена', 'Конечно');
$state.go('admin.accountPage', { accountId: success.data.id });
}).catch(() => {
alertDialog.show('添加账号失败', '确定');
alertDialog.show('Не удалось добавить аккаунт', 'Конечно');
});
};
$scope.pickTime = () => {
Expand Down Expand Up @@ -593,16 +593,16 @@ app.controller('AdminAccountController', ['$scope', '$state', '$mdMedia', '$http
])
.controller('AdminEditAccountController', ['$scope', '$state', '$stateParams', '$http', '$mdBottomSheet', 'confirmDialog', 'alertDialog', '$filter', '$q', 'setAccountServerDialog',
($scope, $state, $stateParams, $http, $mdBottomSheet, confirmDialog, alertDialog, $filter, $q, setAccountServerDialog) => {
$scope.setTitle('编辑账号');
$scope.setTitle('Редактировать аккаунт');
$scope.setMenuButton('arrow_back', function() {
$state.go('admin.accountPage', { accountId: $stateParams.accountId });
});
$scope.typeList = [
{key: '不限量', value: 1},
{key: '', value: 3},
{key: '', value: 2},
{key: '', value: 4},
{key: '小时', value: 5},
{key: 'Неограниченный', value: 1},
{key: 'Месяц', value: 3},
{key: 'Неделя', value: 2},
{key: 'День', value: 4},
{key: 'Час', value: 5},
];
$scope.timeLimit = {
'2': 7 * 24 * 3600000,
Expand Down Expand Up @@ -721,10 +721,10 @@ app.controller('AdminAccountController', ['$scope', '$state', '$mdMedia', '$http
multiServerFlow: $scope.account.multiServerFlow ? 1 : 0,
server: $scope.account.server,
}).then(success => {
alertDialog.show('修改账号成功', '确定');
alertDialog.show('Успешное изменение учетной записи', 'Конечно');
$state.go('admin.accountPage', { accountId: $stateParams.accountId });
}).catch(() => {
alertDialog.show('修改账号失败', '确定');
alertDialog.show('Не удалось изменить учетную запись.', 'Конечно');
});
};
$scope.pickTime = () => {
Expand All @@ -748,10 +748,10 @@ app.controller('AdminAccountController', ['$scope', '$state', '$mdMedia', '$http
};
$scope.deleteAccount = () => {
confirmDialog.show({
text: '真的要删除账号吗?',
cancel: '取消',
confirm: '删除',
error: '删除账号失败',
text: 'Вы действительно хотите удалить свой аккаунт? ',
cancel: 'Отмена',
confirm: 'Удалить',
error: 'Не удалось удалить аккаунт.',
fn: function () { return $http.delete('/api/admin/account/' + accountId); },
}).then(() => {
$state.go('admin.account');
Expand Down
14 changes: 7 additions & 7 deletions plugins/webgui/public/controllers/adminGiftCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const app = angular.module('app');

app.controller('AdminGiftCardController', ['$scope', '$http', 'addGiftCardBatchDialog', '$state',
($scope, $http, addGiftCardBatchDialog, $state) => {
$scope.setTitle('充值码管理');
$scope.setTitle('Управление кодами пополнения');
$scope.setMenuButton('arrow_back', 'admin.settings');
const showBatch = () => {
$http.get('/api/admin/giftcard/list').then(result => {
Expand All @@ -28,7 +28,7 @@ app.controller('AdminGiftCardController', ['$scope', '$http', 'addGiftCardBatchD
]).controller('AdminGiftCardBatchDetailsController', ['$scope', '$http', '$stateParams', 'confirmDialog', 'alertDialog',
($scope, $http, $stateParams, confirmDialog, alertDialog) => {
const batchNumber = $stateParams.batchNumber;
$scope.setTitle(`充值码[ ${batchNumber} ]`);
$scope.setTitle(`Код пополнения[ ${batchNumber} ]`);
$scope.setMenuButton('arrow_back', 'admin.listGiftCardBatch');
const showDetails = () => {
$http.get(`/api/admin/giftcard/details/${batchNumber}`).then(result => {
Expand All @@ -42,16 +42,16 @@ app.controller('AdminGiftCardController', ['$scope', '$http', 'addGiftCardBatchD
});
};
$scope.showPassword = (id, password) => {
alertDialog.show(`卡号:${id},密码:${password}`, '确定');
alertDialog.show(`номер карты:${id},пароль:${password}`, 'Конечно');
};
showDetails();

$scope.revoke = () => {
confirmDialog.show({
text: '确实要召回这些卡片吗?该操作不可撤销。',
cancel: '取消',
confirm: '召回',
error: '召回失败',
text: 'Вы уверены, что хотите отозвать эти карты? Это действие не может быть отменено. ',
cancel: 'Отмена',
confirm: 'Отозвать',
error: 'Неудачный отзыв',
fn: () => {
return $http.post(`/api/admin/giftcard/revoke`, { batchNumber });
},
Expand Down
18 changes: 9 additions & 9 deletions plugins/webgui/public/controllers/adminGroup.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const app = angular.module('app');

app.controller('AdminGroupSettingController', ['$scope', '$http', '$state',
($scope, $http, $state) => {
$scope.setTitle('群组管理');
$scope.setTitle('Управление группой');
$scope.setMenuButton('arrow_back', function() {
$state.go('admin.settings');
});
Expand All @@ -16,7 +16,7 @@ app.controller('AdminGroupSettingController', ['$scope', '$http', '$state',
}
]).controller('AdminAddGroupController', ['$scope', '$q', '$http', '$state', 'alertDialog', 'setGroupNoticeDialog', 'setGroupOrderDialog',
($scope, $q, $http, $state, alertDialog, setGroupNoticeDialog, setGroupOrderDialog) => {
$scope.setTitle('新增群组');
$scope.setTitle('Добавить новую группу');
$scope.setMenuButton('arrow_back', 'admin.groupSetting');
$scope.group = {};
$q.all([
Expand Down Expand Up @@ -104,10 +104,10 @@ app.controller('AdminGroupSettingController', ['$scope', '$http', '$state',
}, {
timeout: 15000,
}).then(success => {
alertDialog.show('添加群组成功', '确定');
alertDialog.show('Группа успешно добавлена', 'Конечно');
$state.go('admin.groupSetting');
}).catch(() => {
alertDialog.show('添加群组失败', '确定');
alertDialog.show('Не удалось добавить группу', 'Конечно');
});
};
$scope.cancel = () => {
Expand All @@ -122,7 +122,7 @@ app.controller('AdminGroupSettingController', ['$scope', '$http', '$state',
}
]).controller('AdminEditGroupController', ['$scope', '$http', '$q', '$state', '$stateParams', 'alertDialog', 'setGroupNoticeDialog', 'setGroupOrderDialog',
($scope, $http, $q, $state, $stateParams, alertDialog, setGroupNoticeDialog, setGroupOrderDialog) => {
$scope.setTitle('修改群组');
$scope.setTitle('Изменить группу');
$scope.setMenuButton('arrow_back', 'admin.groupSetting');
$scope.groupId = +$stateParams.groupId;
$scope.group = {};
Expand Down Expand Up @@ -209,10 +209,10 @@ app.controller('AdminGroupSettingController', ['$scope', '$http', '$state',
}, {
timeout: 15000,
}).then(success => {
alertDialog.show('修改群组成功', '确定');
alertDialog.show('Группа успешно изменена', 'Конечно');
$state.go('admin.groupSetting');
}).catch(() => {
alertDialog.show('修改群组失败', '确定');
alertDialog.show('Не удалось изменить группу', 'Конечно');
});
};
$scope.cancel = () => {
Expand All @@ -223,10 +223,10 @@ app.controller('AdminGroupSettingController', ['$scope', '$http', '$state',
$http.delete(`/api/admin/group/${ $scope.groupId }`, {
timeout: 15000,
}).then(success => {
alertDialog.show('删除群组成功', '确定');
alertDialog.show('Группа успешно удалена', 'Конечно');
$state.go('admin.groupSetting');
}).catch(() => {
alertDialog.show('删除群组失败', '确定');
alertDialog.show('Не удалось удалить группу.', 'Конечно');
});
};
$scope.setGroupNotice = () => {
Expand Down
Loading