1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-18 20:59:43 +02:00

[WIP] theme selector

This commit is contained in:
Harvey Kandola 2018-11-24 16:13:21 +00:00
parent a7e52809dc
commit 11e164496b
74 changed files with 363 additions and 38 deletions

View file

@ -63,6 +63,7 @@ func (h *Handler) Meta(w http.ResponseWriter, r *http.Request) {
data.ConversionEndpoint = org.ConversionEndpoint
data.Storage = h.Runtime.StoreProvider.Type()
data.Location = h.Runtime.Flags.Location // reserved
data.Theme = org.Theme
// Strip secrets
data.AuthConfig = auth.StripAuthSecrets(h.Runtime, org.AuthProvider, org.AuthConfig)
@ -277,3 +278,20 @@ type sitemapItem struct {
type searchStatus struct {
Entries int `json:"entries"`
}
// Themes returns list of installed UI themes.
func (h *Handler) Themes(w http.ResponseWriter, r *http.Request) {
type theme struct {
Name string `json:"names"`
Primary string `json:"primary"`
}
th := []theme{}
th = append(th, theme{Name: "Default", Primary: "#280A42"})
th = append(th, theme{Name: "Blue", Primary: "#176091"})
th = append(th, theme{Name: "Deep Orange", Primary: "#BF360C"})
th = append(th, theme{Name: "Teal", Primary: "#00695C"})
response.WriteJSON(w, th)
}

View file

@ -20,6 +20,8 @@ export default Service.extend({
ajax: service(),
localStorage: service(),
kcAuth: service(),
assetMap: service('asset-map'),
appHost: '',
apiHost: `${config.apiHost}`,
endpoint: `${config.apiHost}/${config.apiNamespace}`,
@ -41,6 +43,8 @@ export default Service.extend({
location: 'selfhost',
// for bugfix releases, only admin is made aware of new release and end users see no What's New messaging
updateAvailable: false,
// empty theme uses default theme
theme: '',
getBaseUrl(endpoint) {
return [this.get('endpoint'), endpoint].join('/');
@ -75,6 +79,9 @@ export default Service.extend({
this.set('version', 'v' + this.get('version'));
this.set('appHost', window.location.host);
// Handle theming
this.setTheme(this.get('theme'));
if (requestedRoute === 'secure') {
this.setProperties({
title: htmlSafe("Secure document viewing"),
@ -110,5 +117,13 @@ export default Service.extend({
return response;
});
},
setTheme(theme) {
theme = theme.trim();
if (theme.length === 0) return;
let file = this.get('assetMap').resolve(`assets/theme-${theme}.css`);
$('head').append(`<link rel="stylesheet" href="${file}">`);
}
});

View file

@ -39,8 +39,6 @@ export default Service.extend({
if (is.null(description) || is.undefined(description)) {
description = this.get('sessionService.appMeta.message');
}
$('head').append('<meta name="description" content="' + description + '">');
},
scrollTo(id) {

View file

@ -8,20 +8,21 @@
// by contacting <sales@documize.com>.
//
// https://documize.com
@import "color.scss";
@import "font.scss";
@import "mixins.scss";
@import "base.scss";
@import "bootstrap.scss";
@import "view/common.scss";
@import "widget/widget.scss";
@import "view/toolbar.scss";
@import "view/views.scss";
@import "layout/all.scss";
@import "core/color.scss";
@import "core/font.scss";
@import "core/mixins.scss";
@import "core/base.scss";
@import "core/bootstrap.scss";
@import "vendor.scss";
@import "print.scss";
@import "news.scss";
@import "section/all.scss";
@import "enterprise/all.scss";
@import "core/view/common.scss";
@import "core/widget/widget.scss";
@import "core/view/toolbar.scss";
@import "core/view/views.scss";
@import "core/layout/all.scss";
@import "core/vendor.scss";
@import "core/print.scss";
@import "core/news.scss";
@import "core/section/all.scss";
@import "core/enterprise/all.scss";

View file

@ -35,7 +35,7 @@ $tooltip-bg: $color-dark;
$tooltip-color: $color-white;
// modal
$modal-backdrop-opacity: 0.7;
$modal-backdrop-opacity: 0.5;
$modal-header-border-color: $color-white;
$modal-footer-border-color: $color-white;

View file

@ -9,13 +9,7 @@
//
// https://documize.com
// theme blue
$color-primary: #176091;
$color-primary-light: #E6F1F8;
$color-link: #348A37;
// theme purple
// default theme makes things tick
$color-primary: #280A42;
$color-primary-light: #F7F2FF;
$color-link: #348A37;

View file

@ -1,10 +1,10 @@
.font-fixed-width {
font-family: 'courier new', courier;
}
// .font-fixed-width {
// font-family: 'courier new', courier;
// }
$font-regular: Helvetica;
$font-semibold: Helvetica;
$font-light: Helvetica;
// $font-regular: Helvetica;
// $font-semibold: Helvetica;
// $font-light: Helvetica;
@font-face {
font-family: "Material Icons";

View file

@ -0,0 +1,45 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
//
// https://documize.com
@import "../core/color.scss";
$color-primary: #176091;
$color-primary-light: #E6F1F8;
$color-link: #348A37;
.color-primary {
color: $color-primary !important;
}
.color-link {
color: $color-link !important;
}
.background-color-theme {
background-color: $color-primary !important;
}
.background-color-theme-light {
background-color: $color-primary-light !important;
}
@import "../core/font.scss";
@import "../core/mixins.scss";
@import "../core/base.scss";
@import "../core/bootstrap.scss";
@import "../core/view/common.scss";
@import "../core/widget/widget.scss";
@import "../core/view/toolbar.scss";
@import "../core/view/views.scss";
@import "../core/layout/all.scss";
@import "../core/vendor.scss";
@import "../core/print.scss";
@import "../core/news.scss";
@import "../core/section/all.scss";
@import "../core/enterprise/all.scss";

View file

@ -0,0 +1,45 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
//
// https://documize.com
@import "../core/color.scss";
$color-primary: #BF360C;
$color-primary-light: #FBE9E7;
$color-link: #FF8A65;
.color-primary {
color: $color-primary !important;
}
.color-link {
color: $color-link !important;
}
.background-color-theme {
background-color: $color-primary !important;
}
.background-color-theme-light {
background-color: $color-primary-light !important;
}
@import "../core/font.scss";
@import "../core/mixins.scss";
@import "../core/base.scss";
@import "../core/bootstrap.scss";
@import "../core/view/common.scss";
@import "../core/widget/widget.scss";
@import "../core/view/toolbar.scss";
@import "../core/view/views.scss";
@import "../core/layout/all.scss";
@import "../core/vendor.scss";
@import "../core/print.scss";
@import "../core/news.scss";
@import "../core/section/all.scss";
@import "../core/enterprise/all.scss";

View file

@ -0,0 +1,45 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
//
// https://documize.com
@import "../core/color.scss";
$color-primary: #00695C;
$color-primary-light: #E0F2F1;
$color-link: #348A37;
.color-primary {
color: $color-primary !important;
}
.color-link {
color: $color-link !important;
}
.background-color-theme {
background-color: $color-primary !important;
}
.background-color-theme-light {
background-color: $color-primary-light !important;
}
@import "../core/font.scss";
@import "../core/mixins.scss";
@import "../core/base.scss";
@import "../core/bootstrap.scss";
@import "../core/view/common.scss";
@import "../core/widget/widget.scss";
@import "../core/view/toolbar.scss";
@import "../core/view/views.scss";
@import "../core/layout/all.scss";
@import "../core/vendor.scss";
@import "../core/print.scss";
@import "../core/news.scss";
@import "../core/section/all.scss";
@import "../core/enterprise/all.scss";

View file

@ -23,6 +23,12 @@ module.exports = function (environment) {
apiNamespace: '',
contentSecurityPolicyHeader: 'Content-Security-Policy-Report-Only',
// ember-cli-ifa
ifa: {
enabled: true,
inline: false,
},
EmberENV: {
FEATURES: {}
},

View file

@ -17,6 +17,9 @@ module.exports = function (defaults) {
var app = new EmberApp(defaults, {
fingerprint: {
enabled: true,
generateAssetMap: true,
fingerprintAssetMap: true,
prepend: '/',
extensions: ['js', 'css'],
exclude: ['tinymce/**', 'codemirror/**', 'flowchart/**']
},
@ -38,6 +41,17 @@ module.exports = function (defaults) {
sourcemaps: {
enabled: isDevelopment,
extensions: ['js']
},
outputPaths: {
app: {
css: {
'app': '/assets/documize.css',
'themes/blue': '/assets/theme-blue.css',
'themes/teal': '/assets/theme-teal.css',
'themes/deep-orange': '/assets/theme-deep-orange.css'
}
}
}
});

View file

@ -30,6 +30,7 @@
"ember-cli-eslint": "^4.2.1",
"ember-cli-htmlbars": "^2.0.1",
"ember-cli-htmlbars-inline-precompile": "^1.0.0",
"ember-cli-ifa": "^0.7.0",
"ember-cli-inject-live-reload": "^1.4.1",
"ember-cli-mirage": "^0.4.1",
"ember-cli-qunit": "^4.1.1",

View file

@ -172,7 +172,7 @@ amd-name-resolver@0.0.7:
dependencies:
ensure-posix-path "^1.0.1"
amd-name-resolver@^1.2.0:
amd-name-resolver@1.2.0, amd-name-resolver@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/amd-name-resolver/-/amd-name-resolver-1.2.0.tgz#fc41b3848824b557313897d71f8d5a0184fbe679"
integrity sha512-hlSTWGS1t6/xq5YCed7YALg7tKZL3rkl7UwEZ/eCIkn8JxmM6fU6Qs/1hwtjQqfuYxlffuUcgYEm0f5xP4YKaA==
@ -758,6 +758,13 @@ babel-plugin-debug-macros@^0.1.10, babel-plugin-debug-macros@^0.1.11:
dependencies:
semver "^5.3.0"
babel-plugin-debug-macros@^0.2.0-beta.6:
version "0.2.0"
resolved "https://registry.yarnpkg.com/babel-plugin-debug-macros/-/babel-plugin-debug-macros-0.2.0.tgz#0120ac20ce06ccc57bf493b667cf24b85c28da7a"
integrity sha512-Wpmw4TbhR3Eq2t3W51eBAQSdKlr+uAyF0GI4GtPfMCD12Y4cIdpKC9l0RjNTH/P9isFypSqqewMPm7//fnZlNA==
dependencies:
semver "^5.3.0"
babel-plugin-ember-modules-api-polyfill@^1.4.2:
version "1.6.0"
resolved "https://registry.yarnpkg.com/babel-plugin-ember-modules-api-polyfill/-/babel-plugin-ember-modules-api-polyfill-1.6.0.tgz#abd1afa4237b3121cb51222f9bf3283cad8990aa"
@ -779,6 +786,13 @@ babel-plugin-ember-modules-api-polyfill@^2.3.0:
dependencies:
ember-rfc176-data "^0.3.0"
babel-plugin-ember-modules-api-polyfill@^2.5.0:
version "2.5.0"
resolved "https://registry.yarnpkg.com/babel-plugin-ember-modules-api-polyfill/-/babel-plugin-ember-modules-api-polyfill-2.5.0.tgz#860aab9fecbf38c10d1fe0779c6979a854fff154"
integrity sha512-o1rOgWFHR0IRBjC9Dvqc2V4MKE2UvdMv/fD/c5GUMAkS6DlTjQV54iMH9sdQ3TGfXPukPKBIOpoSoH/hdfGiMg==
dependencies:
ember-rfc176-data "^0.3.5"
babel-plugin-eval@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/babel-plugin-eval/-/babel-plugin-eval-1.0.1.tgz#a2faed25ce6be69ade4bfec263f70169195950da"
@ -1101,7 +1115,7 @@ babel-plugin-undefined-to-void@^1.1.6:
resolved "https://registry.yarnpkg.com/babel-plugin-undefined-to-void/-/babel-plugin-undefined-to-void-1.1.6.tgz#7f578ef8b78dfae6003385d8417a61eda06e2f81"
integrity sha1-f1eO+LeN+uYAM4XYQXph7aBuL4E=
babel-polyfill@^6.16.0:
babel-polyfill@^6.16.0, babel-polyfill@^6.26.0:
version "6.26.0"
resolved "https://registry.yarnpkg.com/babel-polyfill/-/babel-polyfill-6.26.0.tgz#379937abc67d7895970adc621f284cd966cf2153"
integrity sha1-N5k3q8Z9eJWXCtxiHyhM2WbPIVM=
@ -1146,6 +1160,42 @@ babel-preset-env@^1.5.1:
invariant "^2.2.2"
semver "^5.3.0"
babel-preset-env@^1.7.0:
version "1.7.0"
resolved "https://registry.yarnpkg.com/babel-preset-env/-/babel-preset-env-1.7.0.tgz#dea79fa4ebeb883cd35dab07e260c1c9c04df77a"
integrity sha512-9OR2afuKDneX2/q2EurSftUYM0xGu4O2D9adAhVfADDhrYDaxXV0rBbevVYoY9n6nyX1PmQW/0jtpJvUNr9CHg==
dependencies:
babel-plugin-check-es2015-constants "^6.22.0"
babel-plugin-syntax-trailing-function-commas "^6.22.0"
babel-plugin-transform-async-to-generator "^6.22.0"
babel-plugin-transform-es2015-arrow-functions "^6.22.0"
babel-plugin-transform-es2015-block-scoped-functions "^6.22.0"
babel-plugin-transform-es2015-block-scoping "^6.23.0"
babel-plugin-transform-es2015-classes "^6.23.0"
babel-plugin-transform-es2015-computed-properties "^6.22.0"
babel-plugin-transform-es2015-destructuring "^6.23.0"
babel-plugin-transform-es2015-duplicate-keys "^6.22.0"
babel-plugin-transform-es2015-for-of "^6.23.0"
babel-plugin-transform-es2015-function-name "^6.22.0"
babel-plugin-transform-es2015-literals "^6.22.0"
babel-plugin-transform-es2015-modules-amd "^6.22.0"
babel-plugin-transform-es2015-modules-commonjs "^6.23.0"
babel-plugin-transform-es2015-modules-systemjs "^6.23.0"
babel-plugin-transform-es2015-modules-umd "^6.23.0"
babel-plugin-transform-es2015-object-super "^6.22.0"
babel-plugin-transform-es2015-parameters "^6.23.0"
babel-plugin-transform-es2015-shorthand-properties "^6.22.0"
babel-plugin-transform-es2015-spread "^6.22.0"
babel-plugin-transform-es2015-sticky-regex "^6.22.0"
babel-plugin-transform-es2015-template-literals "^6.22.0"
babel-plugin-transform-es2015-typeof-symbol "^6.23.0"
babel-plugin-transform-es2015-unicode-regex "^6.22.0"
babel-plugin-transform-exponentiation-operator "^6.22.0"
babel-plugin-transform-regenerator "^6.22.0"
browserslist "^3.2.6"
invariant "^2.2.2"
semver "^5.3.0"
babel-register@^6.26.0:
version "6.26.0"
resolved "https://registry.yarnpkg.com/babel-register/-/babel-register-6.26.0.tgz#6ed021173e2fcb486d7acb45c6009a856f647071"
@ -1514,6 +1564,22 @@ broccoli-babel-transpiler@^6.0.0, broccoli-babel-transpiler@^6.1.2:
rsvp "^3.5.0"
workerpool "^2.2.1"
broccoli-babel-transpiler@^6.5.0:
version "6.5.0"
resolved "https://registry.yarnpkg.com/broccoli-babel-transpiler/-/broccoli-babel-transpiler-6.5.0.tgz#aa501a227b298a99742fdd0309b1eaad7124bba0"
integrity sha512-c5OLGY40Sdmv6rP230Jt8yoK49BHfOw1LXiDMu9EC9k2U6sqlpNRK78SzvByQ8IzKtBYUfeWCxeZHcvW+gH7VQ==
dependencies:
babel-core "^6.26.0"
broccoli-funnel "^2.0.1"
broccoli-merge-trees "^2.0.0"
broccoli-persistent-filter "^1.4.3"
clone "^2.0.0"
hash-for-dep "^1.2.3"
heimdalljs-logger "^0.1.7"
json-stable-stringify "^1.0.0"
rsvp "^4.8.2"
workerpool "^2.3.0"
broccoli-builder@^0.18.8:
version "0.18.10"
resolved "https://registry.yarnpkg.com/broccoli-builder/-/broccoli-builder-0.18.10.tgz#9767e0061ff5b5e6eb1619d1a972ef2c7fd07631"
@ -1620,6 +1686,18 @@ broccoli-debug@^0.6.2:
symlink-or-copy "^1.1.8"
tree-sync "^1.2.2"
broccoli-debug@^0.6.4:
version "0.6.5"
resolved "https://registry.yarnpkg.com/broccoli-debug/-/broccoli-debug-0.6.5.tgz#164a5cdafd8936e525e702bf8f91f39d758e2e78"
integrity sha512-RIVjHvNar9EMCLDW/FggxFRXqpjhncM/3qq87bn/y+/zR9tqEkHvTqbyOc4QnB97NO2m6342w4wGkemkaeOuWg==
dependencies:
broccoli-plugin "^1.2.1"
fs-tree-diff "^0.5.2"
heimdalljs "^0.2.1"
heimdalljs-logger "^0.1.7"
symlink-or-copy "^1.1.8"
tree-sync "^1.2.2"
broccoli-file-creator@^1.0.0, broccoli-file-creator@^1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/broccoli-file-creator/-/broccoli-file-creator-1.1.1.tgz#1b35b67d215abdfadd8d49eeb69493c39e6c3450"
@ -1930,6 +2008,14 @@ browserslist@^2.1.2:
caniuse-lite "^1.0.30000718"
electron-to-chromium "^1.3.18"
browserslist@^3.2.6:
version "3.2.8"
resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-3.2.8.tgz#b0005361d6471f0f5952797a76fc985f1f978fc6"
integrity sha512-WHVocJYavUwVgVViC0ORikPHQquXwVh939TaelZ4WDqpWgTX/FsGhl/+P4qBUAGcRvtOgDgC+xftNWWp2RUTAQ==
dependencies:
caniuse-lite "^1.0.30000844"
electron-to-chromium "^1.3.47"
bser@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/bser/-/bser-2.0.0.tgz#9ac78d3ed5d915804fd87acb158bc797147a1719"
@ -2070,6 +2156,11 @@ caniuse-lite@^1.0.30000718:
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000722.tgz#8cbfe07440478e3a16ab0d3b182feef1901eab55"
integrity sha1-jL/gdEBHjjoWqw07GC/u8ZAeq1U=
caniuse-lite@^1.0.30000844:
version "1.0.30000910"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000910.tgz#755d5181d4b006e5a2b59b1ffa05d0a0470039f5"
integrity sha512-u/nxtHGAzCGZzIxt3dA/tpSPOcirBZFWKwz1EPz4aaupnBI2XR0Rbr74g0zc6Hzy41OEM4uMoZ38k56TpYAWjQ==
capture-exit@^1.1.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/capture-exit/-/capture-exit-1.2.0.tgz#1c5fcc489fd0ab00d4f1ac7ae1072e3173fbab6f"
@ -2957,6 +3048,11 @@ electron-to-chromium@^1.3.18:
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.20.tgz#2eedd5ccbae7ddc557f68ad1fce9c172e915e4e5"
integrity sha1-Lu3VzLrn3cVX9orR/OnBcukV5OU=
electron-to-chromium@^1.3.47:
version "1.3.84"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.84.tgz#2e55df59e818f150a9f61b53471ebf4f0feecc65"
integrity sha512-IYhbzJYOopiTaNWMBp7RjbecUBsbnbDneOP86f3qvS0G0xfzwNSvMJpTrvi5/Y1gU7tg2NAgeg8a8rCYvW9Whw==
ember-ajax@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/ember-ajax/-/ember-ajax-3.0.0.tgz#8f21e9da0c1d433cf879aa855fce464d517e9ab5"
@ -3058,6 +3154,25 @@ ember-cli-babel@^6.10.0, ember-cli-babel@^6.6.0:
ember-cli-version-checker "^2.1.0"
semver "^5.4.1"
ember-cli-babel@^6.11.0:
version "6.17.2"
resolved "https://registry.yarnpkg.com/ember-cli-babel/-/ember-cli-babel-6.17.2.tgz#f0d53d2fb95e70c15d8db84760d045f88f458f69"
integrity sha512-9KcCvF1PcelEFTSiJ/Ld20tfuW9acMkwHC/xINLsmwqJVDbm3oEqWtiFDZ5ebaC278O5I0GqNJWJLYNoWMNZ8g==
dependencies:
amd-name-resolver "1.2.0"
babel-plugin-debug-macros "^0.2.0-beta.6"
babel-plugin-ember-modules-api-polyfill "^2.5.0"
babel-plugin-transform-es2015-modules-amd "^6.24.0"
babel-polyfill "^6.26.0"
babel-preset-env "^1.7.0"
broccoli-babel-transpiler "^6.5.0"
broccoli-debug "^0.6.4"
broccoli-funnel "^2.0.0"
broccoli-source "^1.1.0"
clone "^2.0.0"
ember-cli-version-checker "^2.1.2"
semver "^5.5.0"
ember-cli-babel@^6.8.2:
version "6.9.0"
resolved "https://registry.yarnpkg.com/ember-cli-babel/-/ember-cli-babel-6.9.0.tgz#5147391389bdbb7091d15f81ae1dff1eb49d71aa"
@ -3133,6 +3248,13 @@ ember-cli-htmlbars@^2.0.1:
json-stable-stringify "^1.0.0"
strip-bom "^3.0.0"
ember-cli-ifa@^0.7.0:
version "0.7.0"
resolved "https://registry.yarnpkg.com/ember-cli-ifa/-/ember-cli-ifa-0.7.0.tgz#dbcfef17744d9ee10648dca5025ac55383d528f8"
integrity sha512-+BTJRF9EnZPFqMVlXT1cMupAlLEDfVXads92OKZNQjzv8RbFlkwpyD7cW6NswaDagsysD9NrJ5wLiHNzaqz2yg==
dependencies:
ember-cli-babel "^6.11.0"
ember-cli-inject-live-reload@^1.4.1:
version "1.7.0"
resolved "https://registry.yarnpkg.com/ember-cli-inject-live-reload/-/ember-cli-inject-live-reload-1.7.0.tgz#af94336e015336127dfb98080ad442bb233e37ed"
@ -3304,7 +3426,7 @@ ember-cli-version-checker@^2.1.0:
resolve "^1.3.3"
semver "^5.3.0"
ember-cli-version-checker@^2.1.1:
ember-cli-version-checker@^2.1.1, ember-cli-version-checker@^2.1.2:
version "2.1.2"
resolved "https://registry.yarnpkg.com/ember-cli-version-checker/-/ember-cli-version-checker-2.1.2.tgz#305ce102390c66e4e0f1432dea9dc5c7c19fed98"
integrity sha512-sjkHGr4IGXnO3EUcY21380Xo9Qf6bC8HWH4D62bVnrQop/8uha5XgMQRoAflMCeH6suMrezQL287JUoYc2smEw==
@ -3623,6 +3745,11 @@ ember-rfc176-data@^0.3.0, ember-rfc176-data@^0.3.1:
resolved "https://registry.yarnpkg.com/ember-rfc176-data/-/ember-rfc176-data-0.3.1.tgz#6a5a4b8b82ec3af34f3010965fa96b936ca94519"
integrity sha512-u+W5rUvYO7xyKJjiPuCM7bIAvFyPwPTJ66fOZz1xuCv3AyReI9Oev5oOADOO6YJZk+vEn0xWiZ9N6zSf8WU7Fg==
ember-rfc176-data@^0.3.5:
version "0.3.5"
resolved "https://registry.yarnpkg.com/ember-rfc176-data/-/ember-rfc176-data-0.3.5.tgz#f630e550572c81a5e5c7220f864c0f06eee9e977"
integrity sha512-5NfL1iTkIQDYs16/IZ7/jWCEglNsUrigLelBkBMsNcib9T3XzQwmhhVTjoSsk66s57LmWJ1bQu+2c1CAyYCV7A==
ember-router-generator@^1.2.3:
version "1.2.3"
resolved "https://registry.yarnpkg.com/ember-router-generator/-/ember-router-generator-1.2.3.tgz#8ed2ca86ff323363120fc14278191e9e8f1315ee"
@ -5090,7 +5217,7 @@ has@^1.0.1:
dependencies:
function-bind "^1.0.2"
hash-for-dep@^1.0.2:
hash-for-dep@^1.0.2, hash-for-dep@^1.2.3:
version "1.2.3"
resolved "https://registry.yarnpkg.com/hash-for-dep/-/hash-for-dep-1.2.3.tgz#5ec69fca32c23523972d52acb5bb65ffc3664cab"
integrity sha512-NE//rDaCFpWHViw30YM78OAGBShU+g4dnUGY3UWGyEzPOGYg/ptOjk32nEc+bC1xz+RfK5UIs6lOL6eQdrV4Ow==
@ -8934,6 +9061,11 @@ rsvp@^4.6.1, rsvp@^4.7.0:
resolved "https://registry.yarnpkg.com/rsvp/-/rsvp-4.7.0.tgz#dc1b0b1a536f7dec9d2be45e0a12ad4197c9fd96"
integrity sha1-3BsLGlNvfeydK+ReChKtQZfJ/ZY=
rsvp@^4.8.2:
version "4.8.4"
resolved "https://registry.yarnpkg.com/rsvp/-/rsvp-4.8.4.tgz#b50e6b34583f3dd89329a2f23a8a2be072845911"
integrity sha512-6FomvYPfs+Jy9TfXmBpBuMWNH94SgCsZmJKcanySzgNNP6LjWxBvyLTa9KaMfDDM5oxRfrKDB0r/qeRsLwnBfA==
rsvp@~3.0.6:
version "3.0.21"
resolved "https://registry.yarnpkg.com/rsvp/-/rsvp-3.0.21.tgz#49c588fe18ef293bcd0ab9f4e6756e6ac433359f"
@ -10433,6 +10565,13 @@ workerpool@^2.2.1:
dependencies:
object-assign "4.1.1"
workerpool@^2.3.0:
version "2.3.3"
resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-2.3.3.tgz#49a70089bd55e890d68cc836a19419451d7c81d7"
integrity sha512-L1ovlYHp6UObYqElXXpbd214GgbEKDED0d3sj7pRdFXjNkb2+un/AUcCkceHizO0IVI6SOGGncrcjozruCkRgA==
dependencies:
object-assign "4.1.1"
wrap-ansi@^2.0.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85"

View file

@ -43,4 +43,5 @@ type SiteMeta struct {
ConversionEndpoint string `json:"conversionEndpoint"`
Storage env.StoreType `json:"storageProvider"`
Location string `json:"location"` // reserved for internal use
Theme string `json:"theme"` // default side-wide theme, user overrideble
}

View file

@ -31,6 +31,7 @@ type Organization struct {
Serial string `json:"serial"`
Active bool `json:"active"`
Subscription string `json:"subscription"`
Theme string `json:"theme"`
}
// StripSecrets removes sensitive information.

View file

@ -75,9 +75,11 @@ func RegisterEndpoints(rt *env.Runtime, s *store.Store) {
//**************************************************
AddPublic(rt, "meta", []string{"GET", "OPTIONS"}, nil, meta.Meta)
AddPublic(rt, "version", []string{"GET", "OPTIONS"}, nil, func(w http.ResponseWriter, r *http.Request) {
w.Write([]byte(rt.Product.Version))
})
AddPublic(rt, "meta/themes", []string{"GET", "OPTIONS"}, nil, meta.Themes)
AddPublic(rt, "version", []string{"GET", "OPTIONS"}, nil,
func(w http.ResponseWriter, r *http.Request) {
w.Write([]byte(rt.Product.Version))
})
//**************************************************
// Non-secure public service routes