diff options
author | B. Stack <bgstack15@gmail.com> | 2022-08-15 14:02:58 +0000 |
---|---|---|
committer | B. Stack <bgstack15@gmail.com> | 2022-08-15 14:02:58 +0000 |
commit | e83095bd0c444a7a792fae63e0c8e7138c2685cf (patch) | |
tree | f645653626dd8d867b2385582ec593babfb7e265 | |
parent | fix js for newmoon (diff) | |
parent | add auto-login with localStorage (diff) | |
download | radicaleinfcloud-e83095bd0c444a7a792fae63e0c8e7138c2685cf.tar.gz radicaleinfcloud-e83095bd0c444a7a792fae63e0c8e7138c2685cf.tar.bz2 radicaleinfcloud-e83095bd0c444a7a792fae63e0c8e7138c2685cf.zip |
Merge branch 'login-improvements' into 'stackrpms'
add auto-login with localStorage
See merge request bgstack15/RadicaleInfCloud!2
-rw-r--r-- | README-stackrpms.md | 3 | ||||
-rw-r--r-- | files-for-versioning.txt | 3 | ||||
-rw-r--r-- | infcloud.spec | 5 | ||||
-rw-r--r-- | radicale_infcloud/web/cache.manifest | 2 | ||||
-rw-r--r-- | radicale_infcloud/web/index.html | 2 | ||||
-rw-r--r-- | radicale_infcloud/web/main.js | 17 |
6 files changed, 28 insertions, 4 deletions
diff --git a/README-stackrpms.md b/README-stackrpms.md index 6e7580a..bee88a1 100644 --- a/README-stackrpms.md +++ b/README-stackrpms.md @@ -66,3 +66,6 @@ Relevant config options for radicale (file `/etc/radicale/config`) include: * Fri Aug 12 2022 B. Stack <bgstack15@gmail.com> - 0.13.3-1 - Add fully-working upload function + +* Sun Aug 14 2022 B. Stack <bgstack15@gmail.com> - 0.13.4-1 +- Add auto-login feature using manually-set localStorage values in browser diff --git a/files-for-versioning.txt b/files-for-versioning.txt new file mode 100644 index 0000000..cd66bc4 --- /dev/null +++ b/files-for-versioning.txt @@ -0,0 +1,3 @@ +README-stackrpms.md +infcloud.spec +radicale_infcloud/web/main.js diff --git a/infcloud.spec b/infcloud.spec index ac7bfab..30f80b3 100644 --- a/infcloud.spec +++ b/infcloud.spec @@ -1,7 +1,7 @@ %define branch stackrpms %define pname RadicaleInfCloud Name: infcloud -Version: 0.13.3 +Version: 0.13.4 Release: 1%{?dist} Summary: Rich web client for carddav and caldav BuildArch: noarch @@ -46,6 +46,9 @@ ln -s %{_sysconfdir}/%{name}/cache.manifest %{buildroot}%{_datadir}/%{name}/radi %doc README-stackrpms.md %changelog +* Sun Aug 14 2022 B. Stack <bgstack15@gmail.com> - 0.13.4-1 +- Add auto-login feature using manually-set localStorage values in browser + * Fri Aug 12 2022 B. Stack <bgstack15@gmail.com> - 0.13.3-1 - Add fully-working upload function diff --git a/radicale_infcloud/web/cache.manifest b/radicale_infcloud/web/cache.manifest index 9351554..45da448 100644 --- a/radicale_infcloud/web/cache.manifest +++ b/radicale_infcloud/web/cache.manifest @@ -1,5 +1,5 @@ CACHE MANIFEST -#V 20220516185824 +#V 20220814195636 CACHE: addressbook.js diff --git a/radicale_infcloud/web/index.html b/radicale_infcloud/web/index.html index a8b95e4..7f36475 100644 --- a/radicale_infcloud/web/index.html +++ b/radicale_infcloud/web/index.html @@ -83,7 +83,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. <td data-size="login_input"><input data-type="system_username" type="text" name="username" class="fs" placeholder="Login" /></td> </tr> <tr> - <td data-size="login_input"><input data-type="system_password" type="password" name="password" class="fs" placeholder="Password" /></td> + <td data-size="login_input"><input data-type="system_password" type="password" name="password" class="fs" placeholder="Password" title="Use browser localStorage items user, pass, locale for automatic login!"/></td> </tr> <tr> <td data-size="login"> diff --git a/radicale_infcloud/web/main.js b/radicale_infcloud/web/main.js index 6a8acda..84b42dd 100644 --- a/radicale_infcloud/web/main.js +++ b/radicale_infcloud/web/main.js @@ -179,7 +179,7 @@ var globalActiveApp=''; var globalAvailableAppsArray=new Array(); var globalEnableAppSwitch=true; var globalAppName='Calendar'; -var globalVersion='0.13.3stackrpms' +var globalVersion='0.13.4stackrpms' var globalBuildNo=1660329731; var globalXMLCache=null; var globalVersionCheckURL=(location.protocol=='file:' ? 'http:' : location.protocol)+'//www.inf-it.com/versioncheck/'+globalAppName+'/?v='+globalVersion; @@ -588,6 +588,17 @@ function getLoggedUser() function login() { $('#LoginLoader').fadeTo(1200, 1, function(){ + /* Load localStorage values for automatic login + * No mechanism is currently provided for saving these values. The user must use Developer Tools + to run localStorage.setItem("pass","value") and so on. + */ + if(localStorage.getItem("pass")!=null && localStorage.getItem("user")!=null){ + $('#LoginPage').find('[data-type="system_username"]').val(localStorage.getItem("user")); + $('#LoginPage').find('[data-type="system_password"]').val(localStorage.getItem("pass")); + if(localStorage.getItem("locale")!=null){ + $('#LoginPage').find('[data-type="language"]').val(localStorage.getItem("locale")).change(); + } + } globalLoginUsername=$('#LoginPage').find('[data-type="system_username"]').val(); globalLoginPassword=$('#LoginPage').find('[data-type="system_password"]').val(); loadConfig(); @@ -1066,6 +1077,10 @@ function globalMain() mainSettings(); init(); + /* Automatically log in if using localStorage */ + if(localStorage.getItem("pass")!=null){ + $('#LoginPage').find('[data-type="system_login"]').click(); + } } function saveSettings(isFormSave) |