Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 69c9438a20 | |||
|
|
1a5b07273d | ||
|
|
64d2ff3e98 | ||
|
|
85a0d4f9ec | ||
|
|
84c7b31dfb | ||
| 1499347b7b | |||
| 1d39bc03d8 | |||
|
|
8f45736b1b | ||
|
|
8385197f11 | ||
|
|
ca16e3ca39 |
2
.github/workflows/php-lint.yml
vendored
2
.github/workflows/php-lint.yml
vendored
@@ -13,7 +13,7 @@ jobs:
|
||||
matrix:
|
||||
php-version: ['8.2', '8.3', '8.4']
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v5
|
||||
|
||||
- name: Setup PHP ${{ matrix.php-version }}
|
||||
uses: shivammathur/setup-php@v2
|
||||
|
||||
2
.github/workflows/phpcs.yml
vendored
2
.github/workflows/phpcs.yml
vendored
@@ -10,7 +10,7 @@ jobs:
|
||||
phpcs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v5
|
||||
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
|
||||
@@ -1,4 +1,13 @@
|
||||
CREATE TABLE ident_switch
|
||||
-- Patched version of SQL/postgres.initial.sql for gecka/ident-switch.
|
||||
-- Commit this into your Gitea fork at the same path, replacing the
|
||||
-- upstream file. Only two changes from upstream:
|
||||
-- 1. CREATE TABLE / CREATE INDEX -> IF NOT EXISTS
|
||||
-- 2. INSERT INTO system -> upsert via ON CONFLICT
|
||||
-- This makes the script safe to re-run against an already-migrated
|
||||
-- database, which happens on every container restart unless
|
||||
-- /var/www/html is persisted (composer re-installs "fresh" each time).
|
||||
|
||||
CREATE TABLE IF NOT EXISTS ident_switch
|
||||
(
|
||||
id
|
||||
serial
|
||||
@@ -82,8 +91,9 @@ CREATE TABLE ident_switch
|
||||
UNIQUE (user_id, label)
|
||||
);
|
||||
|
||||
CREATE INDEX IX_ident_switch_user_id ON ident_switch(user_id);
|
||||
CREATE INDEX IX_ident_switch_iid ON ident_switch(iid);
|
||||
CREATE INDEX IX_ident_switch_parent_id ON ident_switch(parent_id);
|
||||
CREATE INDEX IF NOT EXISTS IX_ident_switch_user_id ON ident_switch(user_id);
|
||||
CREATE INDEX IF NOT EXISTS IX_ident_switch_iid ON ident_switch(iid);
|
||||
CREATE INDEX IF NOT EXISTS IX_ident_switch_parent_id ON ident_switch(parent_id);
|
||||
|
||||
INSERT INTO system (name, value) VALUES ('ident_switch-version', '2026021000');
|
||||
INSERT INTO system (name, value) VALUES ('ident_switch-version', '2026021000')
|
||||
ON CONFLICT (name) DO UPDATE SET value = EXCLUDED.value;
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "gecka/ident-switch",
|
||||
"name": "senior/s-ident-switch",
|
||||
"type": "roundcube-plugin",
|
||||
"description": "This plugin allows users to switch between different accounts (including remote) in single Roundcube session.",
|
||||
"homepage": "https://github.com/Gecka-Apps/roundcube-ident_switch",
|
||||
|
||||
4
composer.lock
generated
4
composer.lock
generated
@@ -4,7 +4,7 @@
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "46b2d3558cb304fde0539d1b85971382",
|
||||
"content-hash": "c1389b5e002c6014eeddc8105bf77db1",
|
||||
"packages": [
|
||||
{
|
||||
"name": "roundcube/plugin-installer",
|
||||
@@ -154,5 +154,5 @@
|
||||
"ext-ctype": "*"
|
||||
},
|
||||
"platform-dev": {},
|
||||
"plugin-api-version": "2.6.0"
|
||||
"plugin-api-version": "2.9.0"
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* ident_switch - Account switcher UI and new mail notifications.
|
||||
*
|
||||
* Places the hidden <select> from the footer into the appropriate
|
||||
* skin location (Larry, Classic, Elastic), shows it, and registers
|
||||
* skin location (Larry, Classic, Elastic, Workbench), shows it, and registers
|
||||
* notification listeners for background mail checking.
|
||||
*
|
||||
* Copyright (C) 2016-2018 Boris Gulay
|
||||
@@ -22,7 +22,6 @@ $(function() {
|
||||
|
||||
var $sw = $wrapper.find('#plugin-ident_switch-account');
|
||||
var placed = false;
|
||||
|
||||
switch (rcmail.env.skin) {
|
||||
case 'larry':
|
||||
placed = plugin_switchIdent_addCbLarry($wrapper, $sw);
|
||||
@@ -33,6 +32,9 @@ $(function() {
|
||||
case 'elastic':
|
||||
placed = plugin_switchIdent_addCbElastic($wrapper, $sw);
|
||||
break;
|
||||
case 'workbench':
|
||||
placed = plugin_switchIdent_addCbElastic($wrapper, $sw);
|
||||
break;
|
||||
}
|
||||
|
||||
if (!placed) {
|
||||
@@ -57,7 +59,7 @@ $(function() {
|
||||
});
|
||||
|
||||
/**
|
||||
* Place switcher in Larry skin: replace username in top-right corner.
|
||||
* Place switcher in Larry skin: replace username in top-right corner of #topline.
|
||||
*/
|
||||
function plugin_switchIdent_addCbLarry($wrapper, $sw) {
|
||||
var $topRight = $('#topline .topright');
|
||||
@@ -65,11 +67,6 @@ function plugin_switchIdent_addCbLarry($wrapper, $sw) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$sw.css({
|
||||
'font-weight': 'bold',
|
||||
'text-overflow': 'ellipsis'
|
||||
});
|
||||
|
||||
$topRight.find('.username').hide();
|
||||
$topRight.prepend($wrapper);
|
||||
return true;
|
||||
|
||||
@@ -15,8 +15,12 @@
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* Account switcher <select>: hide native arrow, show SVG chevron */
|
||||
.ident-switch-wrapper select {
|
||||
/* Account switcher <select>: hide native arrow, show SVG chevron.
|
||||
Scoped to Elastic (.header-title.username) and Larry (#topline .topright) where
|
||||
the switcher replaces a styled header label; Classic uses Roundcube's native
|
||||
select rendering instead (see #taskbar rule below). */
|
||||
.header-title.username .ident-switch-wrapper select,
|
||||
#topline .topright .ident-switch-wrapper select {
|
||||
cursor: pointer;
|
||||
-webkit-appearance: none;
|
||||
-moz-appearance: none;
|
||||
@@ -53,6 +57,36 @@
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* Larry skin: blend the <select> into the dark #topline header (Larry styles a
|
||||
<span> here, not a <select>, so without these the native white control sticks
|
||||
out on the dark background). */
|
||||
#topline .topright .ident-switch-wrapper {
|
||||
width: auto;
|
||||
}
|
||||
#topline .topright .ident-switch-wrapper select {
|
||||
background-color: transparent;
|
||||
border: none;
|
||||
box-shadow: none;
|
||||
color: inherit;
|
||||
font-weight: bold;
|
||||
padding: 0 1.2em 0 0.25em;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
/* Classic skin: switcher is prepended inside #taskbar (right-aligned, nowrap, 24px tall).
|
||||
Drop width:100% so it sits inline before the menu links instead of pushing them
|
||||
off-screen. The select keeps Roundcube's default native rendering. */
|
||||
#taskbar > .ident-switch-wrapper {
|
||||
width: auto;
|
||||
vertical-align: middle;
|
||||
margin-right: 8px;
|
||||
}
|
||||
#taskbar > .ident-switch-wrapper select {
|
||||
max-width: 180px;
|
||||
position: relative;
|
||||
top: -2px;
|
||||
}
|
||||
|
||||
/* Unread badge */
|
||||
.ident-switch-badge {
|
||||
flex-shrink: 0;
|
||||
|
||||
@@ -222,7 +222,7 @@ class ident_switch extends rcube_plugin
|
||||
|
||||
$select = new html_select([
|
||||
'id' => 'plugin-ident_switch-account',
|
||||
'style' => 'display: none; padding: 0;',
|
||||
'style' => 'display: none;',
|
||||
'onchange' => 'plugin_switchIdent_switch(this.value);',
|
||||
]);
|
||||
$select->add($accNames, $accValues);
|
||||
Reference in New Issue
Block a user