mirror of
https://github.com/ONLYOFFICE/web-apps.git
synced 2026-07-25 10:27:48 +08:00
Merge pull request '[VE] Fix styles' (#154) from fix/bugfix into release/v8.3.0
This commit is contained in:
@ -89,11 +89,13 @@ define([
|
||||
"toolbar-header-spreadsheet",
|
||||
"toolbar-header-presentation",
|
||||
"toolbar-header-pdf",
|
||||
"toolbar-header-visio",
|
||||
|
||||
"text-toolbar-header-on-background-document",
|
||||
"text-toolbar-header-on-background-spreadsheet",
|
||||
"text-toolbar-header-on-background-presentation",
|
||||
"text-toolbar-header-on-background-pdf",
|
||||
"text-toolbar-header-on-background-visio",
|
||||
|
||||
"background-normal",
|
||||
"background-toolbar",
|
||||
@ -120,10 +122,12 @@ define([
|
||||
"highlight-toolbar-tab-underline-spreadsheet",
|
||||
"highlight-toolbar-tab-underline-presentation",
|
||||
"highlight-toolbar-tab-underline-pdf",
|
||||
"highlight-toolbar-tab-underline-visio",
|
||||
"highlight-header-tab-underline-document",
|
||||
"highlight-header-tab-underline-spreadsheet",
|
||||
"highlight-header-tab-underline-presentation",
|
||||
"highlight-header-tab-underline-pdf",
|
||||
"highlight-header-tab-underline-visio",
|
||||
|
||||
"border-toolbar",
|
||||
"border-divider",
|
||||
@ -258,6 +262,7 @@ define([
|
||||
_css_array.push('--', c + '-spreadsheet', ':', colors[c], ';');
|
||||
_css_array.push('--', c + '-presentation', ':', colors[c], ';');
|
||||
_css_array.push('--', c + '-pdf', ':', colors[c], ';');
|
||||
_css_array.push('--', c + '-visio', ':', colors[c], ';');
|
||||
console.log("Obsolete: The 'highlight-toolbar-tab-underline' color for interface themes is deprecated. Please use 'highlight-toolbar-tab-underline-document', 'highlight-toolbar-tab-underline-presentation', etc. instead.");
|
||||
} else
|
||||
_css_array.push('--', c, ':', colors[c], ';');
|
||||
@ -443,7 +448,7 @@ define([
|
||||
|
||||
return {
|
||||
init: function (api) {
|
||||
['toolbar-header-document', 'toolbar-header-spreadsheet', 'toolbar-header-presentation', 'toolbar-header-pdf']
|
||||
['toolbar-header-document', 'toolbar-header-spreadsheet', 'toolbar-header-presentation', 'toolbar-header-pdf', 'toolbar-header-visio']
|
||||
.forEach(function (i) {
|
||||
document.documentElement.style.removeProperty('--' + i);
|
||||
});
|
||||
|
||||
@ -84,13 +84,13 @@
|
||||
|
||||
inject_style_tag(':root .theme-dark {' +
|
||||
'--toolbar-header-document: #2a2a2a; --toolbar-header-spreadsheet: #2a2a2a;' +
|
||||
'--toolbar-header-presentation: #2a2a2a; --toolbar-header-pdf: #2a2a2a;}' +
|
||||
'--toolbar-header-presentation: #2a2a2a; --toolbar-header-pdf: #2a2a2a; --toolbar-header-visio: #2a2a2a;}' +
|
||||
':root .theme-contrast-dark {' +
|
||||
'--toolbar-header-document: #1e1e1e; --toolbar-header-spreadsheet: #1e1e1e;' +
|
||||
'--toolbar-header-presentation: #1e1e1e; --toolbar-header-pdf: #1e1e1e;}');
|
||||
'--toolbar-header-presentation: #1e1e1e; --toolbar-header-pdf: #1e1e1e; --toolbar-header-visio: #1e1e1e;}');
|
||||
|
||||
let objtheme = window.uitheme.colors ? window.uitheme : localstorage.getItem("ui-theme");
|
||||
const header_tokens = ['toolbar-header-document', 'toolbar-header-spreadsheet', 'toolbar-header-presentation', 'toolbar-header-pdf'];
|
||||
const header_tokens = ['toolbar-header-document', 'toolbar-header-spreadsheet', 'toolbar-header-presentation', 'toolbar-header-pdf', 'toolbar-header-visio'];
|
||||
if ( !!objtheme ) {
|
||||
if ( typeof(objtheme) == 'string' && objtheme.lastIndexOf("{", 0) === 0 &&
|
||||
objtheme.indexOf("}", objtheme.length - 1) !== -1 )
|
||||
|
||||
@ -53,7 +53,8 @@ define([
|
||||
var _tabStyle = 'fill', _logoImage = '';
|
||||
var isPDFEditor = !!window.PDFE,
|
||||
isDocEditor = !!window.DE,
|
||||
isSSEEditor = !!window.SSE;
|
||||
isSSEEditor = !!window.SSE,
|
||||
isVisioEditor = !!window.VE;
|
||||
|
||||
var templateUserItem =
|
||||
'<li id="<%= user.get("iid") %>" class="<% if (!user.get("online")) { %> offline <% } if (user.get("view")) {%> viewmode <% } %>">' +
|
||||
@ -1088,7 +1089,8 @@ define([
|
||||
tabBackground = tabBackground || Common.Utils.InternalSettings.get("settings-tab-background") || 'header';
|
||||
if (!Common.Utils.isIE) {
|
||||
var header_color = Common.UI.Themes.currentThemeColor(isDocEditor && config.isPDFForm || isPDFEditor ? '--toolbar-header-pdf' :
|
||||
isDocEditor ? '--toolbar-header-document' : isSSEEditor ? '--toolbar-header-spreadsheet' : '--toolbar-header-presentation'),
|
||||
isDocEditor ? '--toolbar-header-document' : isSSEEditor ? '--toolbar-header-spreadsheet' :
|
||||
isVisioEditor ? '--toolbar-header-visio' : '--toolbar-header-presentation'),
|
||||
toolbar_color = Common.UI.Themes.currentThemeColor('--background-toolbar'),
|
||||
logo_type = (!config.twoLevelHeader || config.compactHeader) && (tabBackground==='toolbar') ? toolbar_color : header_color;
|
||||
isDark = (new Common.Utils.RGBColor(logo_type)).isDark();
|
||||
|
||||
@ -5,11 +5,13 @@
|
||||
--toolbar-header-spreadsheet: #40865c;
|
||||
--toolbar-header-presentation: #BE664F;
|
||||
--toolbar-header-pdf: #AA5252;
|
||||
--toolbar-header-visio: #444796;
|
||||
|
||||
--text-toolbar-header-on-background-document: #38567A;
|
||||
--text-toolbar-header-on-background-spreadsheet: #336B49;
|
||||
--text-toolbar-header-on-background-presentation: #854535;
|
||||
--text-toolbar-header-on-background-pdf: #8D4444;
|
||||
--text-toolbar-header-on-background-visio: #444796;
|
||||
|
||||
--background-normal: #fff;
|
||||
--background-toolbar: #f1f1f1;
|
||||
@ -40,11 +42,13 @@
|
||||
--highlight-header-tab-underline-spreadsheet: var(--text-toolbar-header);
|
||||
--highlight-header-tab-underline-presentation: var(--text-toolbar-header);
|
||||
--highlight-header-tab-underline-pdf: var(--text-toolbar-header);
|
||||
--highlight-header-tab-underline-visio: var(--text-toolbar-header);
|
||||
|
||||
--highlight-toolbar-tab-underline-document: #446995;
|
||||
--highlight-toolbar-tab-underline-spreadsheet: #40865c;
|
||||
--highlight-toolbar-tab-underline-presentation: #BE664F;
|
||||
--highlight-toolbar-tab-underline-pdf: #AA5252;
|
||||
--highlight-toolbar-tab-underline-visio: #444796;
|
||||
|
||||
--border-toolbar: #cbcbcb;
|
||||
--border-divider: #cbcbcb;
|
||||
|
||||
@ -5,11 +5,13 @@
|
||||
--toolbar-header-spreadsheet: #1e1e1e;
|
||||
--toolbar-header-presentation: #1e1e1e;
|
||||
--toolbar-header-pdf: #1e1e1e;
|
||||
--toolbar-header-visio: #1e1e1e;
|
||||
|
||||
--text-toolbar-header-on-background-document: #2a2a2a;
|
||||
--text-toolbar-header-on-background-spreadsheet: #2a2a2a;
|
||||
--text-toolbar-header-on-background-presentation: #2a2a2a;
|
||||
--text-toolbar-header-on-background-pdf: #2a2a2a;
|
||||
--text-toolbar-header-on-background-visio: #2a2a2a;
|
||||
|
||||
--background-normal: #212121;
|
||||
--background-toolbar: #2a2a2a;
|
||||
@ -76,11 +78,13 @@
|
||||
--highlight-header-tab-underline-spreadsheet: #40865c;
|
||||
--highlight-header-tab-underline-presentation: #BE664F;
|
||||
--highlight-header-tab-underline-pdf: #AA5252;
|
||||
--highlight-header-tab-underline-visio: #444796;
|
||||
|
||||
--highlight-toolbar-tab-underline-document: #446995;
|
||||
--highlight-toolbar-tab-underline-spreadsheet: #40865c;
|
||||
--highlight-toolbar-tab-underline-presentation: #BE664F;
|
||||
--highlight-toolbar-tab-underline-pdf: #AA5252;
|
||||
--highlight-toolbar-tab-underline-visio: #444796;
|
||||
|
||||
// Canvas
|
||||
|
||||
|
||||
@ -5,11 +5,13 @@
|
||||
--toolbar-header-spreadsheet: #2a2a2a;
|
||||
--toolbar-header-presentation: #2a2a2a;
|
||||
--toolbar-header-pdf: #2a2a2a;
|
||||
--toolbar-header-visio: #2a2a2a;
|
||||
|
||||
--text-toolbar-header-on-background-document: #2a2a2a;
|
||||
--text-toolbar-header-on-background-spreadsheet: #2a2a2a;
|
||||
--text-toolbar-header-on-background-presentation: #2a2a2a;
|
||||
--text-toolbar-header-on-background-pdf: #2a2a2a;
|
||||
--text-toolbar-header-on-background-visio: #2a2a2a;
|
||||
|
||||
--background-normal: #333;
|
||||
--background-toolbar: #404040;
|
||||
@ -76,11 +78,13 @@
|
||||
--highlight-header-tab-underline-spreadsheet: #40865c;
|
||||
--highlight-header-tab-underline-presentation: #BE664F;
|
||||
--highlight-header-tab-underline-pdf: #AA5252;
|
||||
--highlight-header-tab-underline-visio: #444796;
|
||||
|
||||
--highlight-toolbar-tab-underline-document: #446995;
|
||||
--highlight-toolbar-tab-underline-spreadsheet: #40865c;
|
||||
--highlight-toolbar-tab-underline-presentation: #BE664F;
|
||||
--highlight-toolbar-tab-underline-pdf: #AA5252;
|
||||
--highlight-toolbar-tab-underline-visio: #444796;
|
||||
|
||||
// Canvas
|
||||
|
||||
|
||||
@ -6,11 +6,13 @@
|
||||
--toolbar-header-spreadsheet: #f7f7f7;
|
||||
--toolbar-header-presentation: #f7f7f7;
|
||||
--toolbar-header-pdf: #f7f7f7;
|
||||
--toolbar-header-visio: #f7f7f7;
|
||||
|
||||
--text-toolbar-header-on-background-document: #FFFFFF;
|
||||
--text-toolbar-header-on-background-spreadsheet: #FFFFFF;
|
||||
--text-toolbar-header-on-background-presentation: #FFFFFF;
|
||||
--text-toolbar-header-on-background-pdf: #FFFFFF;
|
||||
--text-toolbar-header-on-background-visio: #FFFFFF;
|
||||
|
||||
--background-normal: #fff;
|
||||
--background-toolbar: #f7f7f7;
|
||||
@ -78,11 +80,13 @@
|
||||
--highlight-header-tab-underline-spreadsheet: #40865c;
|
||||
--highlight-header-tab-underline-presentation: #BE664F;
|
||||
--highlight-header-tab-underline-pdf: #AA5252;
|
||||
--highlight-header-tab-underline-visio: #444796;
|
||||
|
||||
--highlight-toolbar-tab-underline-document: #446995;
|
||||
--highlight-toolbar-tab-underline-spreadsheet: #40865c;
|
||||
--highlight-toolbar-tab-underline-presentation: #BE664F;
|
||||
--highlight-toolbar-tab-underline-pdf: #AA5252;
|
||||
--highlight-toolbar-tab-underline-visio: #444796;
|
||||
|
||||
// Canvas
|
||||
|
||||
|
||||
@ -16,7 +16,8 @@ const VersionHistoryController = inject('storeAppOptions', 'storeVersionHistory'
|
||||
const fileTypes = {
|
||||
de: 'docx',
|
||||
pe: 'pptx',
|
||||
sse: 'xslx'
|
||||
sse: 'xslx',
|
||||
ve: 'vsdx'
|
||||
};
|
||||
const fileType = fileTypes[window.editorType];
|
||||
const { t } = useTranslation();
|
||||
|
||||
@ -61,6 +61,9 @@ switch (window.asceditor) {
|
||||
case 'cell':
|
||||
storeInfo = 'storeSpreadsheetInfo';
|
||||
break;
|
||||
case 'visio':
|
||||
storeInfo = 'storeVisioInfo';
|
||||
break;
|
||||
}
|
||||
|
||||
const Collaboration = inject('storeAppOptions', 'users', storeInfo)(observer(CollaborationPage));
|
||||
|
||||
@ -26,7 +26,8 @@ const PageAbout = props => {
|
||||
const editors = {
|
||||
de: 'DOCUMENT EDITOR',
|
||||
pe: 'PRESENTATION EDITOR',
|
||||
sse: 'SPREADSHEET EDITOR'
|
||||
sse: 'SPREADSHEET EDITOR',
|
||||
ve: 'VISIO EDITOR'
|
||||
};
|
||||
|
||||
const nameEditor = (_t.textEditor || editors[editorType]).toUpperCase();
|
||||
|
||||
@ -403,7 +403,7 @@
|
||||
if (!(isIEBrowser && ieVer && parseFloat(ieVer[1]) < 11.0)) {
|
||||
var docstyle = getComputedStyle(document.body),
|
||||
header_color = docstyle.getPropertyValue('--toolbar-header-presentation'),
|
||||
toolbar_color = docstyle.getPropertyValue('--background-toolbar')
|
||||
toolbar_color = docstyle.getPropertyValue('--background-toolbar');
|
||||
logo_type = (view || compact) && (tabBackground==='toolbar') ? toolbar_color : header_color;
|
||||
isDark = logo_type ? isDarkColor(logo_type) : isDarkTheme ? true : !((view || compact) && (tabBackground==='toolbar'));
|
||||
image = isDark ? logoDark || logo || logoLight : logoLight || logo || logoDark;
|
||||
|
||||
@ -407,7 +407,7 @@
|
||||
if (!(isIEBrowser && ieVer && parseFloat(ieVer[1]) < 11.0)) {
|
||||
var docstyle = getComputedStyle(document.body),
|
||||
header_color = docstyle.getPropertyValue('--toolbar-header-visio'),
|
||||
toolbar_color = docstyle.getPropertyValue('--background-toolbar')
|
||||
toolbar_color = docstyle.getPropertyValue('--background-toolbar');
|
||||
logo_type = (view || compact) && (tabBackground==='toolbar') ? toolbar_color : header_color;
|
||||
isDark = logo_type ? isDarkColor(logo_type) : isDarkTheme ? true : !((view || compact) && (tabBackground==='toolbar'));
|
||||
image = isDark ? logoDark || logo || logoLight : logoLight || logo || logoDark;
|
||||
|
||||
Reference in New Issue
Block a user