Skip to content

Commit

Permalink
simplify UX
Browse files Browse the repository at this point in the history
  • Loading branch information
rjkat committed Jun 15, 2024
1 parent d365dc9 commit f7a59c8
Show file tree
Hide file tree
Showing 9 changed files with 13,656 additions and 21,465 deletions.
33 changes: 33 additions & 0 deletions @confuzzle/confuz-parser/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions @confuzzle/confuz-parser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
"confuz-file-format"
],
"dependencies": {
"dompurify": "^3.1.5",
"enolib": "^0.8.2",
"enotype": "^0.3.0",
"sanitize-html": "^2.4.0"
"enotype": "^0.3.0"
}
}
6 changes: 5 additions & 1 deletion @confuzzle/confuz-parser/parser.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
const enolib = require('enolib');
const enotype = require('enotype');
const sample = require('./sample_crossword');
const sanitizeHtml = require('sanitize-html');
import DOMPurify from 'dompurify';

function sanitizeHtml(html) {
return DOMPurify.sanitize(html);
}

const EMOJI_DICT = require('./words_to_emoji.js').EMOJI_DICT;

Expand Down
4 changes: 2 additions & 2 deletions client/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
</ul>
</div>
</template>
<p class="join-info-text">Discover publishers of .puz files at <a href="https://crosswordlinks.substack.com/about" target="_blank" rel="noopener">Daily Crossword Links<ui-icon style="font-size: 12pt;">open_in_new</ui-icon></a></p>
<p class="join-info-text">Discover publishers of .puz files at <a href="https://dailycrosswordlinks.com/" target="_blank" rel="noopener">Daily Crossword Links<ui-icon style="font-size: 12pt;">open_in_new</ui-icon></a></p>
</ui-modal>

<cfz-disconnected-modal
Expand Down Expand Up @@ -1025,7 +1025,7 @@ export default Vue.extend({
if (mode == 'invite') {
return 'Open for sharing';
}
return 'Open for solving';
return 'Load puzzle';
},
requestedPath() {
if (window.location.pathname != "/") {
Expand Down
6 changes: 5 additions & 1 deletion client/components/CfzCrosswordClues.vue
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,11 @@

<script>
import Vue from "vue";
const sanitizeHtml = require('sanitize-html');
import DOMPurify from 'dompurify';
function sanitizeHtml(html) {
return DOMPurify.sanitize(html);
}
import CfzClueList from './CfzClueList.vue'
import CfzSolverList from './CfzSolverList.vue'
Expand Down
8 changes: 0 additions & 8 deletions client/components/CfzHeaderToolbar.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
<template>
<ui-toolbar type="colored" class="crossword-toolbar" :loading="sourceLoading" style="overflow: hidden;" removeNavIcon>
<table slot="brand" class="cfz-logo">
<td data-flat-number="?" style="vertical-align: middle;"
@click="$emit('logo-clicked')">C</td>
</table>
<template v-slot="title">
<div v-if="!sourceLoading" class="crossword-title">
<span class="crossword-meta-name" v-responsive.class>{{metadata.name}}</span>
Expand Down Expand Up @@ -428,10 +424,6 @@ export default Vue.extend({
options.push(this.opt.SAVE_PUZ);
options.push(this.opt.SAVE_ENO);
}
if (!this.state.colluding && !isMobile) {
options.push(this.opt.LINK_EXTERNAL);
}
options.push(this.opt.ABOUT);
return options;
},
Expand Down
30 changes: 9 additions & 21 deletions client/components/CfzLauncher.vue
Original file line number Diff line number Diff line change
Expand Up @@ -189,42 +189,30 @@ export default Vue.extend({
if (this.showLeave) {
opt.push({
text: "Leave",
color: "red",
// color: "red",
icon: "no_meeting_room",
tooltip: "Leave group session"
});
} else {
opt.push({
text: "Join",
color: "green",
icon: "meeting_room",
tooltip: "Join a group session"
text: "Invite",
color: "primary",
icon: "group_add",
tooltip: "Invite others to this session"
});
}
if (!this.showLeave) {
} else {
opt.push({
text: "Solve",
text: "Load Puzzle",
color: "primary",
icon: "extension",
tooltip: "Open and solve puzzles"
tooltip: "Open and solve a puzzle"
});
}
opt.push({
text: "Invite",
color: "accent",
icon: "group_add",
tooltip: this.showLeave ? "Invite others to this session" : "Start a group session"
});
return opt;
}
},
methods: {
optionClicked(option) {
if (option.text == 'Solve') {
if (option.text == 'Load Puzzle') {
this.$emit('solve-clicked');
} else if (option.text == 'Create') {
this.$emit('edit-clicked');
Expand Down
Loading

0 comments on commit f7a59c8

Please sign in to comment.