Skip to content

Commit 031aaf5

Browse files
authored
Merge pull request #4125 from nextcloud/fix/templates-admin-settings
Move template settings to vue component
2 parents 938876a + fc11c12 commit 031aaf5

File tree

10 files changed

+392
-350
lines changed

10 files changed

+392
-350
lines changed

css/admin.scss

Lines changed: 19 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -10,37 +10,21 @@
1010

1111
#richdocuments {
1212
#use_group_select, #edit_group_select {
13-
width: 200px; display: block;
13+
width: 200px;
14+
display: block;
1415
}
16+
1517
p {
1618
margin-bottom: 15px;
1719
}
20+
1821
#s2id_use_group_select,
1922
#s2id_edit_group_select {
2023
margin-left: 18px;
2124
margin-top: -4px;
2225
width: 300px !important;
2326
}
24-
}
25-
26-
input#zoteroAPIKeyField {
27-
width: 300px;
28-
}
29-
30-
textarea#documentSigningCertField {
31-
width: 600px;
32-
}
3327

34-
textarea#documentSigningKeyField {
35-
width: 600px;
36-
}
37-
38-
textarea#documentSigningCaField {
39-
width: 600px;
40-
}
41-
42-
#richdocuments,
43-
#richdocuments-templates {
4428
// inline buttons on section headers
4529
> h2 {
4630
display: inline-flex;
@@ -58,6 +42,7 @@ textarea#documentSigningCaField {
5842
line-height: 44px;
5943
padding-left: 44px;
6044
font-size: 16px;
45+
6146
&:hover,
6247
&:focus,
6348
&:active {
@@ -67,77 +52,18 @@ textarea#documentSigningCaField {
6752
}
6853
}
6954

70-
#richdocuments-templates {
71-
> input {
72-
// feedback for keyboard navigation
73-
&:hover,
74-
&:focus,
75-
&:active {
76-
+ h2 .icon-add,
77-
+ h2 .icon-loading-small {
78-
opacity: 0.7;
79-
}
80-
+ #emptycontent label {
81-
color: var(--color-text-light);
82-
}
83-
}
84-
}
85-
ul:not(.hidden) {
86-
display: flex;
87-
flex-wrap: wrap;
88-
li {
89-
$size: 150px;
90-
$sizeY: math.div($size, 210) * 297;
91-
$space: 10px;
92-
border-radius: var(--border-radius);
93-
border: 1px solid var(--color-border);
94-
margin: $space;
95-
position: relative;
96-
figure {
97-
display: flex;
98-
flex-direction: column;
99-
width: $size;
100-
margin: $space;
101-
img, .templatePlaceholder {
102-
width: $size;
103-
height: $sizeY;
104-
background-color: var(--color-background-dark);
105-
}
106-
figcaption {
107-
margin-top: $space;
108-
}
109-
}
110-
.delete-cover,
111-
.delete-template {
112-
width: $size;
113-
height: $sizeY;
114-
top: 0;
115-
left: 0;
116-
position: absolute;
117-
margin: $space;
118-
opacity: 0;
119-
transition: opacity 250ms ease-in-out;
120-
z-index: 3;
121-
line-height: $sizeY;
122-
text-align: center;
123-
font-size: 20px;
124-
background-size: 24px;
125-
// text is set as bg
126-
color: var(--color-background-darker);
127-
}
128-
.delete-cover {
129-
// bg is set as color
130-
background-color: var(--color-text-lighter);
131-
z-index: 2;
132-
}
133-
&:hover .delete-template,
134-
.delete-template:focus,
135-
.delete-template.icon-loading {
136-
opacity: 1;
137-
+ .delete-cover {
138-
opacity: 0.5;
139-
}
140-
}
141-
}
142-
}
55+
textarea#documentSigningCertField {
56+
width: 600px;
57+
}
58+
59+
textarea#documentSigningKeyField {
60+
width: 600px;
61+
}
62+
63+
textarea#documentSigningCaField {
64+
width: 600px;
65+
}
66+
67+
input#zoteroAPIKeyField {
68+
width: 300px;
14369
}

cypress/e2e/settings.spec.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,9 @@ describe('Office admin settings', function() {
7272
cy.get('.settings-entry.font-list-settings').contains(font)
7373
})
7474

75-
// FIXME: Template settings only get visible after reload
76-
cy.reload()
77-
cy.get('#richdocuments-templates')
75+
cy.get('.settings-section__name')
76+
.contains('Global Templates')
7877
.scrollIntoView()
7978
.should('be.visible')
80-
8179
})
8280
})

0 commit comments

Comments
 (0)