1
0
mirror of https://github.com/bitwarden/server.git synced 2025-04-05 13:08:17 -05:00

webfonts and styling

This commit is contained in:
Kyle Spearrin 2018-03-23 15:51:54 -04:00
parent 78363bcd5e
commit bbaafab04b
11 changed files with 241 additions and 75 deletions

View File

@ -1 +1,30 @@
@import "../node_modules/bootstrap/scss/bootstrap.scss";
$theme-colors: ( "primary": #3c8dbc, "primary-accent": #286090, "danger": #dd4b39, "success": #00a65a, "info": #555555, "warning": #bf7e16);
$font-family-sans-serif: 'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
$h1-font-size: 2rem;
$h2-font-size: 1.3rem;
$h3-font-size: 1rem;
$h4-font-size: 1rem;
$h5-font-size: 1rem;
$h6-font-size: 1rem;
@import "../node_modules/bootstrap/scss/bootstrap.scss";
h1 {
border-bottom: 1px solid $border-color;
margin-bottom: 20px;
small {
color: $text-muted;
font-size: $h1-font-size * .5;
}
}
h2 {
text-transform: uppercase;
font-weight: bold;
}
h3 {
text-transform: uppercase;
}

View File

@ -60,29 +60,29 @@
<div class="row">
<div class="col-md">
<dl class="row">
<dt class="col-sm-4">Core Installed</dt>
<dd class="col-sm-8">
<dt class="col-sm-5">Core Installed</dt>
<dd class="col-sm-7">
<span id="core-installed">@Model.CurrentVersion</span>
<i class="fa fa-check text-success d-none" id="core-success" title="You are up to date!"></i>
<i class="fa fa-warning text-warning d-none" id="core-warning"
title="This version is not the latest. You should update."></i>
</dd>
<dt class="col-sm-4">Core Latest</dt>
<dd class="col-sm-8">
<dt class="col-sm-5">Core Latest</dt>
<dd class="col-sm-7">
<span id="core-latest" title="Checking version..."><i class="fa fa-spinner fa-spin"></i></span>
</dd>
<dt class="col-sm-4">Web Installed</dt>
<dd class="col-sm-8">
<dt class="col-sm-5">Web Installed</dt>
<dd class="col-sm-7">
<span id="web-installed"><i class="fa fa-spinner fa-spin" title="Checking version..."></i></span>
<i class="fa fa-check text-success d-none" id="web-success" title="You are up to date!"></i>
<i class="fa fa-warning text-warning d-none" id="web-warning"
title="This version is not the latest. You should update."></i>
</dd>
<dt class="col-sm-4">Web Latest</dt>
<dd class="col-sm-8">
<dt class="col-sm-5">Web Latest</dt>
<dd class="col-sm-7">
<span id="web-latest"><i class="fa fa-spinner fa-spin" title="Checking version..."></i></span>
</dd>
</dl>
@ -101,83 +101,83 @@
<h3>SMTP</h3>
@if(Model.GlobalSettings.Mail.Smtp == null)
{
<p class="text-muted">Not configured</p>
<p class="text-muted">Not configured</p>
}
else
{
<dl class="row">
<dt class="col-sm-3">Host</dt>
<dd class="col-sm-9">
@(string.IsNullOrWhiteSpace(Model.GlobalSettings.Mail.Smtp.Host) ? "-" : Model.GlobalSettings.Mail.Smtp.Host)
</dd>
<dl class="row">
<dt class="col-sm-4 col-lg-3">Host</dt>
<dd class="col-sm-8 col-lg-9">
@(string.IsNullOrWhiteSpace(Model.GlobalSettings.Mail.Smtp.Host) ? "-" : Model.GlobalSettings.Mail.Smtp.Host)
</dd>
<dt class="col-sm-3">Port</dt>
<dd class="col-sm-9">@Model.GlobalSettings.Mail.Smtp.Port</dd>
<dt class="col-sm-4 col-lg-3">Port</dt>
<dd class="col-sm-8 col-lg-9">@Model.GlobalSettings.Mail.Smtp.Port</dd>
<dt class="col-sm-3">SSL</dt>
<dd class="col-sm-9">@(Model.GlobalSettings.Mail.Smtp.Ssl ? "Yes" : "No")</dd>
<dt class="col-sm-4 col-lg-3">SSL</dt>
<dd class="col-sm-8 col-lg-9">@(Model.GlobalSettings.Mail.Smtp.Ssl ? "Yes" : "No")</dd>
<dt class="col-sm-3">Credentials</dt>
<dd class="col-sm-9">@(Model.GlobalSettings.Mail.Smtp.UseDefaultCredentials ? "Default" : "Provided")</dd>
<dt class="col-sm-4 col-lg-3">Credentials</dt>
<dd class="col-sm-8 col-lg-9">@(Model.GlobalSettings.Mail.Smtp.UseDefaultCredentials ? "Default" : "Provided")</dd>
<dt class="col-sm-3">Username</dt>
<dd class="col-sm-9">
@(string.IsNullOrWhiteSpace(Model.GlobalSettings.Mail.Smtp.Username) ? "-" : Model.GlobalSettings.Mail.Smtp.Username)
</dd>
</dl>
<dt class="col-sm-4 col-lg-3">Username</dt>
<dd class="col-sm-8 col-lg-9">
@(string.IsNullOrWhiteSpace(Model.GlobalSettings.Mail.Smtp.Username) ? "-" : Model.GlobalSettings.Mail.Smtp.Username)
</dd>
</dl>
}
<h3>Other</h3>
<dl class="row">
<dt class="col-sm-3">Installation Id</dt>
<dd class="col-sm-9">
<dt class="col-sm-4 col-lg-3">Installation Id</dt>
<dd class="col-sm-8 col-lg-9">
@if(Model.GlobalSettings.Installation?.Id != null)
{
<code>@Model.GlobalSettings.Installation.Id</code>
<code>@Model.GlobalSettings.Installation.Id</code>
}
else
{
<text>-</text>
<text>-</text>
}
</dd>
<dt class="col-sm-3">User Registraion</dt>
<dd class="col-sm-9">@(Model.GlobalSettings.DisableUserRegistration ? "Disabled" : "Enabled")</dd>
<dt class="col-sm-4 col-lg-3">User Registraion</dt>
<dd class="col-sm-8 col-lg-9">@(Model.GlobalSettings.DisableUserRegistration ? "Disabled" : "Enabled")</dd>
<dt class="col-sm-3">Push Notifications Relay</dt>
<dd class="col-sm-9">
<dt class="col-sm-4 col-lg-3">Push Notifications</dt>
<dd class="col-sm-8 col-lg-9">
@if(Bit.Core.Utilities.CoreHelpers.SettingHasValue(Model.GlobalSettings.PushRelayBaseUri))
{
<span><i class="fa fa-check"></i> Configured</span>
<span><i class="fa fa-check"></i> Configured</span>
}
else
{
<span class="text-muted">Not configured</span>
<span class="text-muted">Not configured</span>
}
</dd>
<dt class="col-sm-3">Yubico 2FA</dt>
<dd class="col-sm-9">
<dt class="col-sm-4 col-lg-3">Yubico 2FA</dt>
<dd class="col-sm-8 col-lg-9">
@if(Bit.Core.Utilities.CoreHelpers.SettingHasValue(Model.GlobalSettings.Yubico?.Key) && Bit.Core.Utilities.CoreHelpers.SettingHasValue(Model.GlobalSettings.Yubico?.ClientId))
{
<span><i class="fa fa-check"></i> Configured</span>
<span><i class="fa fa-check"></i> Configured</span>
}
else
{
<span class="text-muted">Not configured</span>
<span class="text-muted">Not configured</span>
}
</dd>
<dt class="col-sm-3">Duo 2FA</dt>
<dd class="col-sm-9">
<dt class="col-sm-4 col-lg-3">Duo 2FA</dt>
<dd class="col-sm-8 col-lg-9">
@if(Bit.Core.Utilities.CoreHelpers.SettingHasValue(Model.GlobalSettings.Duo?.AKey))
{
<span><i class="fa fa-check"></i> Configured</span>
<span><i class="fa fa-check"></i> Configured</span>
}
else
{
<span class="text-muted">Not configured</span>
<span class="text-muted">Not configured</span>
}
</dd>
</dl>

View File

@ -85,7 +85,7 @@
</div>
</div>
</div>
<div class="form-check">
<div class="form-check mb-3">
<input type="checkbox" class="form-check-input" asp-for="Enabled">
<label class="form-check-label" asp-for="Enabled"></label>
</div>
@ -441,7 +441,7 @@
<input type="checkbox" class="form-check-input" asp-for="UseEvents">
<label class="form-check-label" asp-for="UseEvents"></label>
</div>
<div class="form-check">
<div class="form-check mb-3">
<input type="checkbox" class="form-check-input" asp-for="UsersGetPremium">
<label class="form-check-label" asp-for="UsersGetPremium"></label>
</div>

View File

@ -1,20 +1,20 @@
@model OrganizationViewModel
<dl class="row">
<dt class="col-sm-2">Id</dt>
<dd class="col-sm-10"><code>@Model.Organization.Id</code></dd>
<dt class="col-sm-4 col-lg-3">Id</dt>
<dd class="col-sm-8 col-lg-9"><code>@Model.Organization.Id</code></dd>
<dt class="col-sm-2">Users</dt>
<dd class="col-sm-10">@Model.UserCount</dd>
<dt class="col-sm-4 col-lg-3">Users</dt>
<dd class="col-sm-8 col-lg-9">@Model.UserCount</dd>
<dt class="col-sm-2">Owners</dt>
<dd class="col-sm-10">@(string.IsNullOrWhiteSpace(Model.Owners) ? "None" : Model.Owners)</dd>
<dt class="col-sm-4 col-lg-3">Owners</dt>
<dd class="col-sm-8 col-lg-9">@(string.IsNullOrWhiteSpace(Model.Owners) ? "None" : Model.Owners)</dd>
<dt class="col-sm-2">Admins</dt>
<dd class="col-sm-10">@(string.IsNullOrWhiteSpace(Model.Admins) ? "None" : Model.Admins)</dd>
<dt class="col-sm-4 col-lg-3">Admins</dt>
<dd class="col-sm-8 col-lg-9">@(string.IsNullOrWhiteSpace(Model.Admins) ? "None" : Model.Admins)</dd>
<dt class="col-sm-2">Created</dt>
<dd class="col-sm-10">@Model.Organization.CreationDate.ToString()</dd>
<dt class="col-sm-4 col-lg-3">Created</dt>
<dd class="col-sm-8 col-lg-9">@Model.Organization.CreationDate.ToString()</dd>
<dt class="col-sm-2">Modified</dt>
<dd class="col-sm-10">@Model.Organization.RevisionDate.ToString()</dd>
<dt class="col-sm-4 col-lg-3">Modified</dt>
<dd class="col-sm-8 col-lg-9">@Model.Organization.RevisionDate.ToString()</dd>
</dl>

View File

@ -6,6 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>@ViewData["Title"] - Bitwarden Admin Portal</title>
<link rel="stylesheet" href="~/css/webfonts.css" />
<environment include="Development">
<link rel="stylesheet" href="~/lib/font-awesome/css/font-awesome.css" />
<link rel="stylesheet" href="~/css/site.css" />

View File

@ -74,7 +74,7 @@
</div>
</div>
</div>
<div class="form-check">
<div class="form-check mb-3">
<input type="checkbox" class="form-check-input" asp-for="EmailVerified">
<label class="form-check-label" asp-for="EmailVerified"></label>
</div>
@ -87,7 +87,7 @@
</div>
</div>
</div>
<div class="form-check">
<div class="form-check mb-3">
<input type="checkbox" class="form-check-input" asp-for="Premium">
<label class="form-check-label" asp-for="Premium"></label>
</div>
@ -108,7 +108,7 @@
</div>
<h2>Billing</h2>
<div class="row">
<div class="col-sm">
<div class="col-md">
<div class="form-group">
<div class="form-group">
<label asp-for="Gateway"></label>
@ -119,7 +119,7 @@
</div>
</div>
</div>
<div class="col-sm">
<div class="col-md">
<div class="form-group">
<label asp-for="GatewayCustomerId"></label>
<div class="input-group">
@ -132,7 +132,7 @@
</div>
</div>
</div>
<div class="col-sm">
<div class="col-md">
<div class="form-group">
<label asp-for="GatewaySubscriptionId"></label>
<div class="input-group">

View File

@ -1,17 +1,17 @@
@model UserViewModel
<dl class="row">
<dt class="col-sm-2">Id</dt>
<dd class="col-sm-10"><code>@Model.User.Id</code></dd>
<dt class="col-sm-4 col-lg-3">Id</dt>
<dd class="col-sm-8 col-lg-9"><code>@Model.User.Id</code></dd>
<dt class="col-sm-2">Items</dt>
<dd class="col-sm-10">@Model.CipherCount</dd>
<dt class="col-sm-4 col-lg-3">Items</dt>
<dd class="col-sm-8 col-lg-9">@Model.CipherCount</dd>
<dt class="col-sm-2">Created</dt>
<dd class="col-sm-10">@Model.User.CreationDate.ToString()</dd>
<dt class="col-sm-4 col-lg-3">Created</dt>
<dd class="col-sm-8 col-lg-9">@Model.User.CreationDate.ToString()</dd>
<dt class="col-sm-2">Modified</dt>
<dd class="col-sm-10">@Model.User.RevisionDate.ToString()</dd>
<dt class="col-sm-4 col-lg-3">Modified</dt>
<dd class="col-sm-8 col-lg-9">@Model.User.RevisionDate.ToString()</dd>
<dt class="col-sm-2">Account Modified</dt>
<dd class="col-sm-10">@Model.User.AccountRevisionDate.ToString()</dd>
<dt class="col-sm-4 col-lg-3">Account Modified</dt>
<dd class="col-sm-8 col-lg-9">@Model.User.AccountRevisionDate.ToString()</dd>
</dl>

View File

@ -4,6 +4,7 @@ const gulp = require('gulp'),
rimraf = require('rimraf'),
merge = require('merge-stream'),
runSequence = require('run-sequence'),
googleWebFonts = require('gulp-google-webfonts'),
concat = require('gulp-concat'),
cssmin = require('gulp-cssmin'),
uglify = require('gulp-uglify'),
@ -78,6 +79,15 @@ gulp.task('sass:watch', () => {
gulp.watch(paths.sass, ['sass']);
});
gulp.task('build', function (cb) {
return runSequence('clean', ['lib', 'sass'], cb);
gulp.task('webfonts', () => {
return gulp.src('./webfonts.list')
.pipe(googleWebFonts({
fontsDir: 'webfonts',
cssFilename: 'webfonts.css'
}))
.pipe(gulp.dest(paths.cssDir));
});
gulp.task('build', function (cb) {
return runSequence('clean', ['lib', 'sass', 'webfonts'], cb);
});

View File

@ -187,6 +187,12 @@
"integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=",
"dev": true
},
"async": {
"version": "0.9.2",
"resolved": "https://registry.npmjs.org/async/-/async-0.9.2.tgz",
"integrity": "sha1-rqdNXmHB+JlhO/ZL2mbUx48v0X0=",
"dev": true
},
"async-foreach": {
"version": "0.1.3",
"resolved": "https://registry.npmjs.org/async-foreach/-/async-foreach-0.1.3.tgz",
@ -1670,6 +1676,97 @@
}
}
},
"gulp-google-webfonts": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/gulp-google-webfonts/-/gulp-google-webfonts-1.0.0.tgz",
"integrity": "sha512-iNiNuGYb9F4hWLWK+A2H7B4RFrtUTudDUzuqdYBMqQ+1l9T2XWnHBtPzuxnV6avZBnV9C6YH/VZMrOFzN6241A==",
"dev": true,
"requires": {
"async": "0.9.2",
"commander": "2.15.1",
"lodash.defaults": "3.1.2",
"mkdirp": "0.5.1",
"through2": "0.6.5",
"vinyl": "2.1.0"
},
"dependencies": {
"clone": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz",
"integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=",
"dev": true
},
"clone-stats": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-1.0.0.tgz",
"integrity": "sha1-s3gt/4u1R04Yuba/D9/ngvh3doA=",
"dev": true
},
"lodash.assign": {
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/lodash.assign/-/lodash.assign-3.2.0.tgz",
"integrity": "sha1-POnwI0tLIiPilrj6CsH+6OvKZPo=",
"dev": true,
"requires": {
"lodash._baseassign": "3.2.0",
"lodash._createassigner": "3.1.1",
"lodash.keys": "3.1.2"
}
},
"lodash.defaults": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-3.1.2.tgz",
"integrity": "sha1-xzCLGNv4vJNy1wGnNJPGEZK9Liw=",
"dev": true,
"requires": {
"lodash.assign": "3.2.0",
"lodash.restparam": "3.6.1"
}
},
"readable-stream": {
"version": "1.0.34",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz",
"integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=",
"dev": true,
"requires": {
"core-util-is": "1.0.2",
"inherits": "2.0.3",
"isarray": "0.0.1",
"string_decoder": "0.10.31"
}
},
"replace-ext": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.0.tgz",
"integrity": "sha1-3mMSg3P8v3w8z6TeWkgMRaZ5WOs=",
"dev": true
},
"through2": {
"version": "0.6.5",
"resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz",
"integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=",
"dev": true,
"requires": {
"readable-stream": "1.0.34",
"xtend": "4.0.1"
}
},
"vinyl": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/vinyl/-/vinyl-2.1.0.tgz",
"integrity": "sha1-Ah+cLPlR1rk5lDyJ617lrdT9kkw=",
"dev": true,
"requires": {
"clone": "2.1.2",
"clone-buffer": "1.0.0",
"clone-stats": "1.0.0",
"cloneable-readable": "1.1.2",
"remove-trailing-separator": "1.1.0",
"replace-ext": "1.0.0"
}
}
}
},
"gulp-rename": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/gulp-rename/-/gulp-rename-1.1.0.tgz",
@ -2265,6 +2362,16 @@
"integrity": "sha1-j1dWDIO1n8JwvT1WG2kAQ0MOJVE=",
"dev": true
},
"lodash._baseassign": {
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/lodash._baseassign/-/lodash._baseassign-3.2.0.tgz",
"integrity": "sha1-jDigmVAPIVrQnlnxci/QxSv+Ck4=",
"dev": true,
"requires": {
"lodash._basecopy": "3.0.1",
"lodash.keys": "3.1.2"
}
},
"lodash._basecopy": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz",
@ -2283,6 +2390,23 @@
"integrity": "sha1-W3dXYoAr3j0yl1A+JjAIIP32Ybc=",
"dev": true
},
"lodash._bindcallback": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/lodash._bindcallback/-/lodash._bindcallback-3.0.1.tgz",
"integrity": "sha1-5THCdkTPi1epnhftlbNcdIeJOS4=",
"dev": true
},
"lodash._createassigner": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/lodash._createassigner/-/lodash._createassigner-3.1.1.tgz",
"integrity": "sha1-g4pbri/aymOsIt7o4Z+k5taXCxE=",
"dev": true,
"requires": {
"lodash._bindcallback": "3.0.1",
"lodash._isiterateecall": "3.0.9",
"lodash.restparam": "3.6.1"
}
},
"lodash._escapehtmlchar": {
"version": "2.4.1",
"resolved": "https://registry.npmjs.org/lodash._escapehtmlchar/-/lodash._escapehtmlchar-2.4.1.tgz",

View File

@ -10,6 +10,7 @@
"gulp-cssmin": "0.2.0",
"gulp-uglify": "3.0.0",
"gulp-sass": "3.1.0",
"gulp-google-webfonts": "1.0.0",
"bootstrap": "4.0.0",
"font-awesome": "4.7.0",
"popper.js": "1.14.1",

1
src/Admin/webfonts.list Normal file
View File

@ -0,0 +1 @@
Open+Sans:300,300i,400,400i,600,600i,700,700i,800,800i&subset=cyrillic,cyrillic-ext,greek,greek-ext,latin-ext