diff --git a/assets/javascripts/discourse/components/reports/reactions.gjs b/assets/javascripts/discourse/components/reports/reactions.gjs new file mode 100644 index 0000000..ad023be --- /dev/null +++ b/assets/javascripts/discourse/components/reports/reactions.gjs @@ -0,0 +1,13 @@ +import Component from "@glimmer/component"; + +export default class Reactions extends Component { + +} diff --git a/assets/javascripts/discourse/components/rewind.gjs b/assets/javascripts/discourse/components/rewind.gjs index fb6409e..9aa0fff 100644 --- a/assets/javascripts/discourse/components/rewind.gjs +++ b/assets/javascripts/discourse/components/rewind.gjs @@ -2,12 +2,18 @@ import Component from "@glimmer/component"; import { tracked } from "@glimmer/tracking"; import { action } from "@ember/object"; import didInsert from "@ember/render-modifiers/modifiers/did-insert"; +import { eq } from "truth-helpers"; +import DButton from "discourse/components/d-button"; +import concatClass from "discourse/helpers/concat-class"; import { ajax } from "discourse/lib/ajax"; import { popupAjaxError } from "discourse/lib/ajax-error"; +import Reactions from "discourse/plugins/discourse-rewind/discourse/components/reports/reactions"; export default class Rewind extends Component { @tracked rewind = []; + @tracked fullScreen = true; + @action async loadRewind() { try { @@ -17,10 +23,34 @@ export default class Rewind extends Component { } } + @action + toggleFullScreen() { + this.fullScreen = !this.fullScreen; + } + + reportComponentForIdentifier(identifier) { + if (identifier === "reactions") { + return Reactions; + } + } + diff --git a/assets/stylesheets/common/card.scss b/assets/stylesheets/common/card.scss new file mode 100644 index 0000000..3a9d0d9 --- /dev/null +++ b/assets/stylesheets/common/card.scss @@ -0,0 +1,2 @@ +.rewind-card { +} diff --git a/assets/stylesheets/common/index.scss b/assets/stylesheets/common/index.scss index 27e640f..9cf8794 100644 --- a/assets/stylesheets/common/index.scss +++ b/assets/stylesheets/common/index.scss @@ -1 +1,3 @@ @import "rewind"; +@import "report"; +@import "card"; diff --git a/assets/stylesheets/common/report.scss b/assets/stylesheets/common/report.scss new file mode 100644 index 0000000..9a4fd59 --- /dev/null +++ b/assets/stylesheets/common/report.scss @@ -0,0 +1,14 @@ +.rewind-report { +} + +.rewind-report-page { + display: flex; + align-items: center; + justify-content: center; + padding: 1em; + box-sizing: border-box; + font-weight: 700; + font-size: var(--font-up-2); + height: 100cqh; + width: 100cqw; +} diff --git a/assets/stylesheets/common/rewind.scss b/assets/stylesheets/common/rewind.scss index 5e7021c..0cef51c 100644 --- a/assets/stylesheets/common/rewind.scss +++ b/assets/stylesheets/common/rewind.scss @@ -1,6 +1,29 @@ .rewind { width: 280px; height: 400px; - background-color: var(--secondary-high); + background-color: var(--secondary); border-radius: var(--d-border-radius); + overflow-y: auto; + overflow-x: hidden; + border: 1px solid var(--primary-very-low); + box-sizing: border-box; + position: relative; + container-type: size; + + &.-fullscreen { + top: 0; + left: 0; + right: 0; + bottom: 0; + z-index: 9999; + width: 100vw; + height: 100vh; + position: fixed; + } +} + +.rewind__exit-fullscreen-btn { + position: sticky; + top: 5px; + left: calc(100% - 45px); } diff --git a/assets/stylesheets/mobile/card.scss b/assets/stylesheets/mobile/card.scss new file mode 100644 index 0000000..e69de29 diff --git a/assets/stylesheets/mobile/index.scss b/assets/stylesheets/mobile/index.scss index e69de29..9cf8794 100644 --- a/assets/stylesheets/mobile/index.scss +++ b/assets/stylesheets/mobile/index.scss @@ -0,0 +1,3 @@ +@import "rewind"; +@import "report"; +@import "card"; diff --git a/assets/stylesheets/mobile/report.scss b/assets/stylesheets/mobile/report.scss new file mode 100644 index 0000000..8c813f8 --- /dev/null +++ b/assets/stylesheets/mobile/report.scss @@ -0,0 +1,4 @@ +.report-page { + width: 100vw; + height: 100vh; +} diff --git a/assets/stylesheets/mobile/rewind.scss b/assets/stylesheets/mobile/rewind.scss new file mode 100644 index 0000000..65efbd9 --- /dev/null +++ b/assets/stylesheets/mobile/rewind.scss @@ -0,0 +1,7 @@ +.rewind { + background-color: var(--secondary); + border-radius: var(--d-border-radius); + overflow-y: auto; + overflow-x: hidden; + border: 1px solid var(--primary-very-low); +}