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

Modern UI / Nextcloud Theme #629

Merged
merged 162 commits into from
Aug 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
162 commits
Select commit Hold shift + click to select a range
ad8da7d
Initial commit
hampoelz Nov 5, 2022
2f8203a
fix formatting
hampoelz Nov 5, 2022
94506ed
fix: nextcloud theme font-family is not used
hampoelz Nov 5, 2022
7da114b
fix: nextcloud theme font-size is not used
hampoelz Nov 5, 2022
8d2446f
chore: Move files to new theme folder
hampoelz Nov 7, 2022
2d6e2de
revert: Nextcloud v25 styles in upstream style file
hampoelz Nov 7, 2022
5f19bb8
fix: Passed stylesheets are 'unloaded' after some time
hampoelz Nov 12, 2022
23b31c7
fix: Broken styles in embed mode
hampoelz Nov 12, 2022
65e614f
chore: Add checkboxes
hampoelz Nov 13, 2022
6281b5e
fix: Broken checkboxes in embed mode
hampoelz Nov 19, 2022
d37022b
chore: Rework checkboxes for better browser compatibility
hampoelz Nov 19, 2022
8b50845
fix: Broken styles in embed mode
hampoelz Nov 19, 2022
095bd04
fix: Sidebar button text is visible when collapsed
hampoelz Nov 19, 2022
06300de
Fix: Broken styles in latest snappymail release
hampoelz Nov 30, 2022
a57ead9
chore: Improve buttons of message list toolbar
hampoelz Nov 30, 2022
4823036
fix: Imperfectly aligned icons
hampoelz Nov 30, 2022
ae4a71f
chore: Improve padding of message list footer
hampoelz Nov 30, 2022
88ad0cc
chore: Improve unread count badge
hampoelz Dec 17, 2022
757dc78
fix: Broken checkboxes in the latest snappymail release
hampoelz Dec 17, 2022
9a3c5c1
fix: Wrong height of entries in settings menu
hampoelz Dec 17, 2022
ed01a4d
chore: Improve control group alignment
hampoelz Dec 17, 2022
4aa684e
chore: Add tables
hampoelz Dec 17, 2022
cdb4c0a
chore: Add admin side panel
hampoelz Dec 17, 2022
ef69e31
chore: Improve settings menu buttons
hampoelz Dec 18, 2022
d7af7d1
chore: Improve settings pane margin
hampoelz Dec 18, 2022
9c7f522
chore: Improve admin settings pane margin
hampoelz Dec 18, 2022
9306808
chore: Hide unnecessary theme settings
hampoelz Dec 18, 2022
34d8cf0
fix: Some buttons look slightly different
hampoelz Dec 18, 2022
c5f419e
chore: Add theme selector
hampoelz Dec 18, 2022
2ea3f6d
fix: Checkbox overlaps with other elements
hampoelz Dec 18, 2022
980f1e4
chore: Improve some buttons
hampoelz Dec 18, 2022
f88643c
chore: Improve theme selector
hampoelz Dec 18, 2022
aa1128d
refactor: Improve structure
hampoelz Dec 18, 2022
fed0d53
chore: Add alerts
hampoelz Dec 18, 2022
c3c7aa9
fix: Admin setting with wrong alignment
hampoelz Dec 18, 2022
ef4ccdf
fix: Incorrectly colored separator
hampoelz Dec 18, 2022
6529d01
fix: Admin setting with wrong alignment
hampoelz Dec 18, 2022
2c3766f
chore: Add group labels
hampoelz Jan 3, 2023
c7991c9
chore: Improve simple attachment list
hampoelz Jan 3, 2023
4ead42a
fix: Center message subject
hampoelz Jan 4, 2023
15deada
fix: Broken styles in the latest snappymail release
hampoelz Jan 30, 2023
96e0906
fix: Clipped elements on disabled left panel
hampoelz Jan 30, 2023
f8a2b34
fix: Broken styles in the latest snappymail release
hampoelz Feb 19, 2023
6564e82
Fix: Wrong colored scrollbar corner
hampoelz Feb 19, 2023
a415839
chore: Add loading and login screen
hampoelz Feb 19, 2023
19e2487
fix: Some buttons are not styled
hampoelz Feb 19, 2023
f19cfa8
fix: Some checkboxes are not styled
hampoelz Feb 19, 2023
e388e6c
chore: Add nextcloud filepicker
hampoelz Feb 19, 2023
2ee8fa6
chore: Remove hover effect for showImages area
hampoelz Feb 20, 2023
d38bb34
chore: Improve squire toolbar buttons
hampoelz Feb 20, 2023
f601e02
chore: Add error tooltip
hampoelz Feb 20, 2023
9e29238
fix: Hide number input's spin box on chrome
hampoelz Feb 20, 2023
5dd0eae
chore: Add textareas
hampoelz Feb 20, 2023
eb8bdd6
fix: Button overflow on small sidebar
hampoelz Feb 21, 2023
1b10e30
fix: MessageList min width
hampoelz Feb 21, 2023
b1fef91
fix: SettingsPane margin
hampoelz Feb 21, 2023
d021bd2
fix: MessageView toolbar padding
hampoelz Feb 22, 2023
dbaa6eb
fix: Broken styles in the latest snappymail release
hampoelz Feb 25, 2023
a93db06
fix: ShowImages layout
hampoelz Feb 25, 2023
a9d077a
fix: Disable mail invert filter
hampoelz Feb 25, 2023
9cdbb60
fix: Minor popup styles
hampoelz May 21, 2023
e179b46
chore: Add tabs
hampoelz May 21, 2023
c506420
fix: Checkbox margin
hampoelz May 22, 2023
df04a6d
fix: Popup button margin
hampoelz May 22, 2023
804b953
chore: Improve settings control-group margin
hampoelz May 22, 2023
cbbf673
chore: Add plugin popups
hampoelz May 22, 2023
55b872e
feat: Add language popup
hampoelz May 22, 2023
a6da438
fix: Account place border color
hampoelz May 22, 2023
e5c0e50
fix: Dropdown menu scrollbar
hampoelz May 22, 2023
40bcf6b
chore: Improve tabs
hampoelz May 22, 2023
243baf5
chore: Rework button toolbar
hampoelz May 22, 2023
3713d0f
fix: Consider hidden toolbar buttons
hampoelz May 22, 2023
4fe9cc5
chore: Improve buttons
hampoelz May 23, 2023
93c6a4f
fix: MessageView edit button
hampoelz May 23, 2023
3c57c2e
fix: fix: MessageView edit button selector
hampoelz May 23, 2023
0a2c19a
fix: MailMessageView button toolbar padding
hampoelz May 23, 2023
f124207
fix: Danger button
hampoelz May 23, 2023
78cc010
chore: Improve link coloring
hampoelz May 24, 2023
fd2f7e8
fix: Striped table
hampoelz May 24, 2023
f17bb54
chore: Add contacts
hampoelz May 25, 2023
e7bc290
chore: Hide additional theme settings selectively
hampoelz May 26, 2023
10d2ef3
fix: Link coloring
hampoelz May 26, 2023
8f4fd6f
fix: Button focus text color
hampoelz May 26, 2023
69b96ed
chore: Add nextcloud calendar select
hampoelz May 26, 2023
5fb914f
chore: Improve compose popup header
hampoelz May 26, 2023
c10e84f
chore: Don't collapse settings side panel
hampoelz May 26, 2023
82f7c3f
fix: Login input icons
hampoelz May 26, 2023
52227a8
fix: Unread badge for user-folders
hampoelz May 27, 2023
62cf66b
chore: Improve nextcloud file picker
hampoelz May 27, 2023
23572a1
chore: Improve attachment items
hampoelz May 28, 2023
9ab9a6c
chore: Remove "no attachments" text shadow
hampoelz May 28, 2023
11770b5
chore: Improve error tip
hampoelz May 29, 2023
10c10bb
chore: Improve compose popup button margin
hampoelz May 29, 2023
cbbcaec
fix: Popup footer button margin
hampoelz May 29, 2023
96d4ae5
fix: Non-standard width properties
hampoelz May 29, 2023
12d1d1a
fix: Styles in next snappymail release
hampoelz May 30, 2023
183f033
chore: Improve email address select
hampoelz May 30, 2023
c191489
fix: Wrong message-view error color
hampoelz May 30, 2023
d7d8fc2
refactor: Improve structure
hampoelz May 30, 2023
58c90f4
fix: Wrong message-list error color
hampoelz May 30, 2023
9e7dc8b
chore: Add message-list dragover
hampoelz May 30, 2023
0f11e81
refactor: Remove dead code
hampoelz May 30, 2023
a602dfd
chore: Add attachment-place dragover
hampoelz May 30, 2023
a6638e5
chore: Add messages drag tip
hampoelz May 30, 2023
6878d4c
fix: Broken checkbox
hampoelz May 30, 2023
55bf922
fix: New unread sub-messages badge for threaded view
hampoelz May 31, 2023
ebd474e
fix: Contact popup styles in latest snappymail release
hampoelz May 31, 2023
3d3e6d0
fix: Layout issues in horizontal view
hampoelz May 31, 2023
a65415a
docs: Improve theme passthrough code comments
hampoelz May 31, 2023
cb42124
chore: Use Nextcloud variables otherwise fallback to default
hampoelz May 31, 2023
454cc5a
chore: Improve theme selector
hampoelz May 31, 2023
2776e4c
chore: Update preview image
hampoelz May 31, 2023
704dd51
chore: Move theme to global scope
hampoelz May 31, 2023
dbe01cb
fix: Broken styles in RTL layout
hampoelz May 31, 2023
9831b23
chore: Improve search-input-wrp
hampoelz May 31, 2023
db2b630
chore: Improve threads badge margin
hampoelz May 31, 2023
d1039cb
fix: Too small messageList min-width
hampoelz Jun 1, 2023
933548d
chore: Improve folders text-overflow on disabled panel
hampoelz Jun 1, 2023
ffb8fe4
fix: Light theme backdrop message color
hampoelz Jun 1, 2023
135cf1d
fix: RTL selector maybe causes issues with non-rtl styles in some bro…
hampoelz Jun 4, 2023
6a6d836
fix: Button group fallback styles
hampoelz Jun 5, 2023
09f57db
fix: Button group fallback styles
hampoelz Jun 5, 2023
8416e4e
refactor: Full restructure of styles file
hampoelz Jun 5, 2023
ebe952e
chore: Adjust fallback border radius of grouped button
hampoelz Jun 5, 2023
a25c43f
chore: Change dropdown text align
hampoelz Jun 5, 2023
88a6ab3
fix: Inconsistent buttons
hampoelz Jun 5, 2023
c00a1e4
chore: Improve message list toolbar on mobile
hampoelz Jun 5, 2023
2327e81
fix: Input border color
hampoelz Jun 5, 2023
c79f9ab
fix: Weird icon buttons
hampoelz Jun 6, 2023
b8b813e
chore: Use same styles for input and select elements
hampoelz Jun 6, 2023
0050a8f
fix: Dropdown coloring of select element
hampoelz Jun 6, 2023
8191472
fix: Tabs label overflow
hampoelz Jun 14, 2023
75fb517
fix: Mobile dropdown positioning
hampoelz Jun 14, 2023
5800905
fix: Languages popup label margin
hampoelz Jun 14, 2023
8470525
fix: OpenPgpImport popup textarea width
hampoelz Jun 14, 2023
2fdc9a2
fix: Mobile side panel border color
hampoelz Jun 14, 2023
d3609d0
fix: Broken Nextcloud menu list margin
hampoelz Jun 15, 2023
d0b0088
chore: Improve admin settings mobile layout
hampoelz Jun 15, 2023
1ccef6c
fix: Mobile popup padding
hampoelz Jun 15, 2023
3fedf8a
chore: Improve mobile placement of checkboxes in AdvancedSearch popup
hampoelz Jun 15, 2023
6310e9a
chore: Add compose popup attachments-count badge
hampoelz Jun 15, 2023
e515163
chore: Remove admin settings toolbar text-shadow
hampoelz Jun 15, 2023
c9c0d0d
chore: Improve mobile layout of contact popup
hampoelz Jun 16, 2023
7fa1991
fix: Contact popup coloring
hampoelz Jun 16, 2023
26547f4
fix: Contact popup border
hampoelz Jun 16, 2023
5cd8794
fix: Emailaddresses input width on mobile
hampoelz Jun 17, 2023
d197636
fix: Mobile dropdown positioning
hampoelz Jun 17, 2023
92098cb
chore: Improve highlight folder row keyframe
hampoelz Jun 17, 2023
72ba59e
refactor: Cleanup
hampoelz Jun 17, 2023
534a87b
chore: Add tablet layout (wip)
hampoelz Jun 17, 2023
71c99da
chore: Rework emailaddresses select
hampoelz Jun 18, 2023
0d20305
chore: Update input & select styles from upstream nextcloud
hampoelz Jun 18, 2023
7c2e456
revert: Tablet layout parts
hampoelz Jul 1, 2023
009428c
fix: Side panel footer buttons in RTL layout
hampoelz Jul 1, 2023
8721550
refactor: Cleanup
hampoelz Jul 1, 2023
a2814e1
chore: Add fallback variables
hampoelz Jul 1, 2023
af37b2b
fix: Text overflow in sidebar menu items
hampoelz Jul 27, 2023
a667b46
chore: Rename sidebar menu item
hampoelz Jul 27, 2023
0e0d8c8
fix: Message flags default color in dropdown
hampoelz Jul 27, 2023
47ed699
Merge branch 'the-djmaze:master' into nc-theme
hampoelz Jul 27, 2023
bbd100c
chore: Add slight contrast to message list toolbar
hampoelz Aug 4, 2023
7fc268e
fix: avatar size and alignment
hampoelz Aug 13, 2023
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
38 changes: 37 additions & 1 deletion integrations/nextcloud/snappymail/js/snappymail.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* Nextcloud - SnappyMail mail plugin
*
* @author RainLoop Team, Nextgen-Networks (@nextgen-networks), Tab Fitts (@tabp0le), Pierre-Alain Bandinelli (@pierre-alain-b), SnappyMail
* @author RainLoop Team, Nextgen-Networks (@nextgen-networks), Tab Fitts (@tabp0le), Pierre-Alain Bandinelli (@pierre-alain-b), SnappyMail, Rene Hampölz (@hampoelz)
*
* Based initially on https://github.com/RainLoop/rainloop-webmail/tree/master/build/owncloud/rainloop-app
*/
Expand All @@ -10,11 +10,47 @@
document.onreadystatechange = () => {
if (document.readyState === 'complete') {
watchIFrameTitle();
passThemesToIFrame();
let form = document.querySelector('form.snappymail');
form && SnappyMailFormHelper(form);
}
};

// Pass Nextcloud themes and theme attributes to SnappyMail on
// first load and when the SnappyMail iframe is reloaded.
function passThemesToIFrame() {
const iframe = document.getElementById('rliframe');
if (!iframe) return;

let firstLoad = true;

iframe.addEventListener('load', event => {
// repass theme styles when iframe is reloaded
if (!firstLoad) {
passThemes(event.target);
}
firstLoad = false;
});

passThemes(iframe);
}

// Pass Nextcloud themes and theme attributes to SnappyMail.
function passThemes(iframe) {
if (!iframe) return;

const target = iframe.contentWindow.document;

const ncStylesheets = [...document.querySelectorAll('link.theme')];
ncStylesheets.forEach(ncSheet => {
const smSheet = target.importNode(ncSheet, true);
target.head.appendChild(smSheet);
});

const themes = [...document.body.attributes].filter(att => att.name.startsWith('data-theme'));
themes.forEach(theme => target.body.setAttribute(theme.name, theme.value));
}

// The SnappyMail application is already configured to modify the <title> element
// of its root document with the number of unread messages in the inbox.
// However, its document is the SnappyMail iframe. This function sets up a
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading