Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions AppConversation.qml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import QtWebView 1.1

import com.openprisoneducation.ope 1.0
import "App.js" as App
import "moment-with-locales-2.26.0.js" as Moment
// Removed heavy Moment.js dependency

Item {
id: element
Expand Down Expand Up @@ -108,7 +108,7 @@ Item {
id: txtLastMessageTime
width: 200
height: 21
text: qsTr( moment(last_message_time).format('LLLL'));
text: Qt.formatDateTime(new Date(last_message_time), Qt.DefaultLocaleLongDate);
verticalAlignment: Text.AlignVCenter
Layout.fillWidth: true
Layout.alignment: Qt.AlignLeft | Qt.AlignTop
Expand Down
5 changes: 3 additions & 2 deletions AppInbox.qml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import QtWebView 1.1

import com.openprisoneducation.ope 1.0
import "App.js" as App
import "moment-with-locales-2.26.0.js" as Moment
// Removed heavy Moment.js dependency

Page {
id: page
Expand Down Expand Up @@ -93,7 +93,8 @@ Page {
new_record["id"] = "<queued>";
new_record["body"] = reply_text;
new_record["author_id"] = "??";
new_record["created_at"] = moment.utc().format();
// Store UTC timestamp in ISO 8601 without Moment.js
new_record["created_at"] = new Date().toISOString();
new_record["generated"] = "";
new_record["forwarded_messages"] = "[]";
new_record["attachments"] = "[]";
Expand Down
4 changes: 2 additions & 2 deletions AppMessage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import QtWebView 1.1

import com.openprisoneducation.ope 1.0
import "App.js" as App
import "moment-with-locales-2.26.0.js" as Moment
// Removed heavy Moment.js dependency

Item {
id: element;
Expand Down Expand Up @@ -113,7 +113,7 @@ Item {
width: parent.width;
height: 15;
padding: 3;
text: qsTr( moment(created_at).format('LLLL') );
text: Qt.formatDateTime(new Date(created_at), Qt.DefaultLocaleLongDate);
// anchors.right: parent.right
// anchors.rightMargin: 8
// anchors.top: parent.top
Expand Down
19 changes: 11 additions & 8 deletions OPE_LMS.pro
Original file line number Diff line number Diff line change
Expand Up @@ -268,14 +268,17 @@ INCLUDEPATH += "$${OPEN_SSL_PATH}/include"


# Make sure we have files copied to the build folder
copy_files.commands = $(COPY_DIR) \"$$shell_path($$PWD\\www_content)\" \"$$shell_path($$OUT_PWD\\$$VARIANT\\web_content)\" && \
$(COPY_FILE) \"$$shell_path($$PWD\\logo_icon.ico)\" \"$$shell_path($$OUT_PWD\\$$VARIANT\\)\" && \
$(COPY_FILE) \"$$shell_path($$PWD\\favicon.ico)\" \"$$shell_path($$OUT_PWD\\$$VARIANT\\web_content\\)\" && \
$(COPY_FILE) \"$$shell_path($$PWD\\qwebchannel.js)\" \"$$shell_path($$OUT_PWD\\$$VARIANT\\web_content\\)\" && \
$(COPY_FILE) \"$$shell_path($$PWD\\opeWebViewClient.js)\" \"$$shell_path($$OUT_PWD\\$$VARIANT\\web_content\\)\" && \
$(COPY_FILE) \"$$shell_path($$PWD\\mime_types.csv)\" \"$$shell_path($$OUT_PWD\\$$VARIANT\\)\" && \
$(COPY_FILE) \"$$shell_path($$PWD\\qt.conf)\" \"$$shell_path($$OUT_PWD\\$$VARIANT\\)\" && \
$(COPY_FILE) \"$$shell_path($$PWD\\qtquickcontrols2.conf)\" \"$$shell_path($$OUT_PWD\\$$VARIANT\\)\"
copy_files.commands = $(COPY_DIR) "$$shell_path($$PWD\www_content\video-js)" "$$shell_path($$OUT_PWD\$$VARIANT\web_content\video-js)" && \
$(COPY_DIR) "$$shell_path($$PWD\www_content\ViewerJS)" "$$shell_path($$OUT_PWD\$$VARIANT\web_content\ViewerJS)" && \
$(COPY_FILE) "$$shell_path($$PWD\www_content\player.html)" "$$shell_path($$OUT_PWD\$$VARIANT\web_content\)" && \
$(COPY_FILE) "$$shell_path($$PWD\www_content\jquery-min.js)" "$$shell_path($$OUT_PWD\$$VARIANT\web_content\)" && \
$(COPY_FILE) "$$shell_path($$PWD\logo_icon.ico)" "$$shell_path($$OUT_PWD\$$VARIANT\)" && \
$(COPY_FILE) "$$shell_path($$PWD\favicon.ico)" "$$shell_path($$OUT_PWD\$$VARIANT\web_content\)" && \
$(COPY_FILE) "$$shell_path($$PWD\qwebchannel.js)" "$$shell_path($$OUT_PWD\$$VARIANT\web_content\)" && \
$(COPY_FILE) "$$shell_path($$PWD\opeWebViewClient.js)" "$$shell_path($$OUT_PWD\$$VARIANT\web_content\)" && \
$(COPY_FILE) "$$shell_path($$PWD\mime_types.csv)" "$$shell_path($$OUT_PWD\$$VARIANT\)" && \
$(COPY_FILE) "$$shell_path($$PWD\qt.conf)" "$$shell_path($$OUT_PWD\$$VARIANT\)" && \
$(COPY_FILE) "$$shell_path($$PWD\qtquickcontrols2.conf)" "$$shell_path($$OUT_PWD\$$VARIANT\)"

#$(COPY_DIR) \"$$shell_path($${OPEN_SSL_DLL_PATH}\\*.dll)\" \"$$shell_path($$OUT_PWD\\$$VARIANT\\lib\\)\"

Expand Down
2 changes: 0 additions & 2 deletions moment-with-locales-2.26.0.js

This file was deleted.

1 change: 0 additions & 1 deletion qml.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
<file>AppInbox.qml</file>
<file>AppConversation.qml</file>
<file>AppMessage.qml</file>
<file>moment-with-locales-2.26.0.js</file>
<file>StyledButton.qml</file>
<file>ReplyPopup.qml</file>
<file>NewMessagePopup.qml</file>
Expand Down
1 change: 0 additions & 1 deletion qml_qmlcache.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
<file alias="AppInbox.qml">AppInbox.qml</file>
<file alias="AppConversation.qml">AppConversation.qml</file>
<file alias="AppMessage.qml">AppMessage.qml</file>
<file alias="moment-with-locales-2.26.0.js">moment-with-locales-2.26.0.js</file>
<file alias="StyledButton.qml">StyledButton.qml</file>
<file alias="ReplyPopup.qml">ReplyPopup.qml</file>
<file alias="NewMessagePopup.qml">NewMessagePopup.qml</file>
Expand Down