Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean default settings modal and theme #193

Merged
merged 6 commits into from
Apr 19, 2024
Merged
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
5 changes: 3 additions & 2 deletions wizard/Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -204,14 +204,15 @@ module.exports = function (grunt) {
'<%= yeoman.dist %>/styles/{,*/}*.css',
'<%= yeoman.dist %>/images/{,*/}*.{png,jpg,jpeg,gif,webp,svg}',
'<%= yeoman.dist %>/styles/fonts/*',
'!<%= yeoman.dist %>/images/brand.png',
'!<%= yeoman.dist %>/images/brand.svg',
'!<%= yeoman.dist %>/images/brandDark.svg',
'!<%= yeoman.dist %>/images/1.jpg',
'!<%= yeoman.dist %>/images/2.jpg',
'!<%= yeoman.dist %>/images/3.jpg',
'!<%= yeoman.dist %>/images/4.jpg',
'!<%= yeoman.dist %>/images/5.jpg',
'!<%= yeoman.dist %>/images/6.jpg',
'!<%= yeoman.dist %>/images/login.png',
'!<%= yeoman.dist %>/images/login.svg',
'!<%= yeoman.dist %>/scripts/custom.js',
'!<%= yeoman.dist %>/lib/clipboard-copy-element/dist/index.umd.js',
'!<%= yeoman.dist %>/styles/brand.css',
Expand Down
Binary file modified wizard/app/favicon.ico
Binary file not shown.
20 changes: 20 additions & 0 deletions wizard/app/images/brand.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions wizard/app/images/brandDark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed wizard/app/images/login.png
Binary file not shown.
9 changes: 9 additions & 0 deletions wizard/app/images/login.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion wizard/app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
<span class="icon-bar"></span>
</button>
<a ng-click="wizard.isMigration ? '' : goTo('/')" class="navbar-brand">
<img class="navbar-brand-icon" src="images/brand.png" alt="" />
<img class="navbar-brand-icon" src="images/brandDark.svg" alt="" />
</a>
</div>
<nav class="collapse navbar-collapse">
Expand Down
6 changes: 1 addition & 5 deletions wizard/app/scripts/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,15 +137,11 @@ var appConfig = {
next: 'routes/outbound'
},
outbound: {
prev: 'routes/inbound',
next: 'devices'
},
devices: {
prev: 'routes/inbound',
next: 'devices/inventory'
},
inventory: {
prev: 'devices',
prev: 'routes/outbound',
next: 'devices/models'
},
models: {
Expand Down
6 changes: 0 additions & 6 deletions wizard/app/scripts/controllers/extensions.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,6 @@ angular.module('nethvoiceWizardUiApp')
$scope.checkDefaultExtensions();
}
$scope.lockOnList = false;
// count users
UserService.count().then(function (res) {
$scope.menuCount.users = res.data;
}, function (err) {
console.log(err);
});
}, function (err) {
$scope.users = {}
$scope.view.changeRoute = false;
Expand Down
4 changes: 2 additions & 2 deletions wizard/app/scripts/controllers/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -348,8 +348,8 @@ angular.module('nethvoiceWizardUiApp')
// get count data
$scope.$on('loginCompleted', function (event, args) {
// users
UserService.count().then(function (res) {
$scope.menuCount.users = res.data;
UserService.list(true).then(function (res) {
$scope.menuCount.users = res.data.length;
}, function (err) {
console.log(err);
});
Expand Down
16 changes: 16 additions & 0 deletions wizard/app/scripts/controllers/login.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,20 @@ angular.module('nethvoiceWizardUiApp')
$location.path('/login');
$('body').show();
}

//detect dark mode
$scope.isDarkTheme = false;

if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
$scope.isDarkTheme = true;
} else {
$scope.isDarkTheme = false;
}

// handle password visibility toggle
$scope.showPassword = false;

$scope.togglePasswordVisibility = function() {
$scope.showPassword = !$scope.showPassword;
};
});
11 changes: 9 additions & 2 deletions wizard/app/scripts/i18n/locale-en.json
Original file line number Diff line number Diff line change
Expand Up @@ -151,11 +151,18 @@
"expkey_label": "Exp key",
"progkey_label": "Label",
"upload_invalid_filename": "The file name is not valid. It can only contain letters, numbers and the symbols _ - . ( ) ",
"Spy":"Listen",
"Spy": "Listen",
"Link to portal text": "For user management (creation, update and deletion), use the dedicated portal",
"Link to portal": "Link to the Portal",
"Off Hour": "Phones lines",
"Admin Off Hour": "Admin phone lines",
"Advanced Off Hour": "Advanced phone lines",
"NethLink": "Desktop Phone"
"NethLink": "Desktop Phone",
"Sign in": "Sign in",
"Password": "Password",
"User": "User",
"Welcome": "Welcome",
"Cannot login": "Cannot login",
"Incorrect username or password": "Incorrect username or password",
"Sign in to Nethvoice": "Sign in to Nethvoice"
}
Loading
Loading