diff --git a/src/components/app/app-demo.ts b/src/components/app/app-demo.ts index 3538b67..354cd8a 100644 --- a/src/components/app/app-demo.ts +++ b/src/components/app/app-demo.ts @@ -30,16 +30,15 @@ export default class AppDemo app.showRating = true app.$alert( - 'This demo analyzes an offline snapshot of my data from Jun 6, 2020,
' + + 'This demo analyzes an offline snapshot of my data from Jun 6, 2020, ' + 'which displays my academic results from Junior year.
' + '
' + - 'Online features like submitting reviews obviously won\'t work,
' + - 'Besides from that, feel free to click around! ๐Ÿ˜‡
' + + 'Feel free to click around! ๐Ÿ˜‡
' + '
' + '-- The Veracross Analyzer Team (YGui)
' + '-- Made with ๐Ÿงก in SJP', '๐Ÿฅณ Welcome to VeracrossAnalyzer Demo!', - {dangerouslyUseHTMLString: true, confirmButtonText: 'OK', customClass: 'comic'}); + {dangerouslyUseHTMLString: true, confirmButtonText: 'OK'}); }) }) } diff --git a/src/components/app/app.scss b/src/components/app/app.scss index 7d438ae..f64eb42 100644 --- a/src/components/app/app.scss +++ b/src/components/app/app.scss @@ -1,6 +1,12 @@ +div +{ + font-family: -apple-system, Nunito Sans, Avenir, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, + Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, + Hiragino Sans GB, Microsoft YaHei, WenQuanYi Micro Hei, Helvetica, Arial, sans-serif; +} + #app { - font-family: var(--font); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-align: center; @@ -23,11 +29,6 @@ --assignment-type-2: #3f991e; --assignment-type-3: #ff9900; --assignment-type-4: #b02b02; - - //--font: 'Avenir', Helvetica, Arial, sans-serif; - --font: -apple-system, Nunito Sans, Avenir, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, - Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, - Hiragino Sans GB, Microsoft YaHei, WenQuanYi Micro Hei, Helvetica, Arial, sans-serif; } .dark @@ -149,3 +150,11 @@ div.el-card.course-card > div.el-card__body { font-family: "Comic Sans MS", Nunito Sans, Helvetica Neue, Microsoft YaHei, "ๅพฎ่ฝฏ้›…้ป‘", Arial, sans-serif; } + +#demo-not-available +{ + padding-top: 40vh; + font-size: 2em; + color: #bbbbbb; + margin: 0 50px; +} diff --git a/src/components/app/app.ts b/src/components/app/app.ts index 996db98..f1046b6 100644 --- a/src/components/app/app.ts +++ b/src/components/app/app.ts @@ -54,7 +54,7 @@ export default class App extends Vue showRating: boolean = this.$cookies.get('show-rating') == 'set=yes'; // Demo mode - demoMode: boolean = window.location.hostname == 'demo.vera.hydev.org' + demoMode: boolean = window.location.hostname == 'demo.vera.hydev.org' || this.$cookies.isKey('demo-mode') // Is the login panel shown showLogin: boolean = !this.demoMode diff --git a/src/components/app/app.vue b/src/components/app/app.vue index ddf6512..3855da6 100644 --- a/src/components/app/app.vue +++ b/src/components/app/app.vue @@ -10,7 +10,10 @@
- + +
+ Course selection page is not available in demo mode. +
diff --git a/src/constants.ts b/src/constants.ts index 77387f7..b00349d 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -10,7 +10,7 @@ export default class Constants // static API_URL: string = 'http://localhost:24021/api'; /** Current version */ - static VERSION: string = '0.5.4.1391'; + static VERSION: string = '0.5.6.1761'; /** The minimum version that still supports the same cookies */ static MIN_SUPPORTED_VERSION: string = '0.4.6.1087'; diff --git a/src/pages/overall/overall-course/course-head/course-head.vue b/src/pages/overall/overall-course/course-head/course-head.vue index 21f2aaa..612db0a 100644 --- a/src/pages/overall/overall-course/course-head/course-head.vue +++ b/src/pages/overall/overall-course/course-head/course-head.vue @@ -72,7 +72,7 @@ Cancel - + {{course.rated ? 'Update' : 'Submit'}} @@ -100,6 +100,11 @@ ratingPosting = false; rating = this.course.rating; + get canSubmit() + { + return this.ratingPosting || App.instance.demoMode + } + /** * Redirect to the course page */ @@ -183,6 +188,7 @@ { this.$message.error('Sorry, but rating failed to post, please try again or email me if you continues to have issues. ' + 'But wait! The email system isn\'t created yet... oops!. (Technical error message: ' + response.data + ')'); + this.ratingPosting = false; } }); }