Skip to content

Commit

Permalink
Merge pull request #75 from amosproj/bugfix/action-images-hardcoded-i…
Browse files Browse the repository at this point in the history
…n-the-actions-#49

moved svg paths from actions into a separate file #49
  • Loading branch information
tailoric authored Jan 12, 2022
2 parents d59b2f3 + 785b260 commit afebf05
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 8 deletions.
3 changes: 2 additions & 1 deletion frontend/src/actions/CopyLink.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import Action from "./Action";
import { store } from '@/store/index';
import { parseXML } from 'webdav';
import { NavBarIcons } from "@/util/NavBarIcons";

class CopyLink extends Action {

constructor() {
super("copyLink", "Copy Link", "M13.723 18.654l-3.61 3.609c-2.316 2.315-6.063 2.315-8.378 0-1.12-1.118-1.735-2.606-1.735-4.188 0-1.582.615-3.07 1.734-4.189l4.866-4.865c2.355-2.355 6.114-2.262 8.377 0 .453.453.81.973 1.089 1.527l-1.593 1.592c-.18-.613-.5-1.189-.964-1.652-1.448-1.448-3.93-1.51-5.439-.001l-.001.002-4.867 4.865c-1.5 1.499-1.5 3.941 0 5.44 1.517 1.517 3.958 1.488 5.442 0l2.425-2.424c.993.284 1.791.335 2.654.284zm.161-16.918l-3.574 3.576c.847-.05 1.655 0 2.653.283l2.393-2.389c1.498-1.502 3.94-1.5 5.44-.001 1.517 1.518 1.486 3.959 0 5.442l-4.831 4.831-.003.002c-1.438 1.437-3.886 1.552-5.439-.002-.473-.474-.785-1.042-.956-1.643l-.084.068-1.517 1.515c.28.556.635 1.075 1.088 1.528 2.245 2.245 6.004 2.374 8.378 0l4.832-4.831c2.314-2.316 2.316-6.062-.001-8.377-2.317-2.321-6.067-2.313-8.379-.002z");
super("copyLink", "Copy Link", NavBarIcons.LINK);
}

setEnabled (enabled) {
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/actions/Delete.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ import Action from "./Action";
import { app } from '@/main'
import { store } from '@/store/index';
import { useToast } from "vue-toastification";
import { NavBarIcons } from "@/util/NavBarIcons";

class Delete extends Action {

constructor() {
super("delete", "Delete", "M19 24h-14c-1.104 0-2-.896-2-2v-17h-1v-2h6v-1.5c0-.827.673-1.5 1.5-1.5h5c.825 0 1.5.671 1.5 1.5v1.5h6v2h-1v17c0 1.104-.896 2-2 2zm0-19h-14v16.5c0 .276.224.5.5.5h13c.276 0 .5-.224.5-.5v-16.5zm-9 4c0-.552-.448-1-1-1s-1 .448-1 1v9c0 .552.448 1 1 1s1-.448 1-1v-9zm6 0c0-.552-.448-1-1-1s-1 .448-1 1v9c0 .552.448 1 1 1s1-.448 1-1v-9zm-2-7h-4v1h4v-1z");
super("delete", "Delete", NavBarIcons.DELETE);
}

setEnabled (enabled) {
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/actions/Deselect.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import Action from "./Action";
import { store } from '@/store/index';
import { NavBarIcons } from "@/util/NavBarIcons";

class Deselect extends Action {

constructor() {
super("deselect", "0 selected", "m7.5 4.4a1.25 1.25 90 011.77 0l6.615 6.6175 6.615-6.6175a1.25 1.25 90 011.77 1.77l-6.6175 6.615 6.6175 6.615a1.25 1.25 90 01-1.77 1.77l-6.615-6.6175-6.615 6.6175a1.25 1.25 90 01-1.77-1.77l6.6175-6.615-6.6175-6.615a1.25 1.25 90 010-1.77z");
super("deselect", "0 selected", NavBarIcons.DESELECT);
}

setEnabled (enabled) {
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/actions/Download.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import Action from "./Action";
import { store } from '@/store/index';
import { useToast } from "vue-toastification";
import { NavBarIcons } from "@/util/NavBarIcons";

class Download extends Action {

constructor() {
super("download", "Download", "M12 5c3.453 0 5.891 2.797 5.567 6.78 1.745-.046 4.433.751 4.433 3.72 0 1.93-1.57 3.5-3.5 3.5h-13c-1.93 0-3.5-1.57-3.5-3.5 0-2.797 2.479-3.833 4.433-3.72-.167-4.218 2.208-6.78 5.567-6.78zm0-2c-4.006 0-7.267 3.141-7.479 7.092-2.57.463-4.521 2.706-4.521 5.408 0 3.037 2.463 5.5 5.5 5.5h13c3.037 0 5.5-2.463 5.5-5.5 0-2.702-1.951-4.945-4.521-5.408-.212-3.951-3.473-7.092-7.479-7.092zm-4 10h3v-4h2v4h3l-4 4-4-4z");
super("download", "Download", NavBarIcons.DOWNLOAD);
}
setEnabled(enabled) {
if (enabled) {
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/actions/New.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import Action from "./Action";
import { store } from '@/store/index';
import { NavBarIcons } from "@/util/NavBarIcons";

class New extends Action {

constructor() {
super("new", "New", "M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm6 13h-5v5h-2v-5h-5v-2h5v-5h2v5h5v2z");
super("new", "New", NavBarIcons.CREATE);
}

setEnabled(enabled) {
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/actions/OpenInNextcloud.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import Action from "./Action";
import { store } from '@/store/index';
import { NavBarIcons } from "@/util/NavBarIcons";

class OpenInNextcloud extends Action {

constructor() {
super("openInNextcloud", "Open in Nextcloud", "M16.027 8.713c-3.333 0-6.136 2.287-6.991 5.355-0.744-1.641-2.391-2.808-4.301-2.808-2.609 0.016-4.724 2.131-4.735 4.74 0.011 2.609 2.125 4.724 4.735 4.74 1.911 0 3.552-1.167 4.301-2.813 0.855 3.073 3.657 5.36 6.991 5.36 3.312 0 6.099-2.26 6.973-5.308 0.755 1.615 2.375 2.761 4.26 2.761 2.615-0.016 4.729-2.131 4.74-4.74-0.011-2.609-2.125-4.724-4.74-4.74-1.885 0-3.505 1.147-4.265 2.761-0.869-3.048-3.656-5.308-6.968-5.308zM16.027 11.495c2.5 0 4.5 2 4.5 4.505s-2 4.505-4.5 4.505c-2.496 0.011-4.516-2.016-4.505-4.505 0-2.505 2-4.505 4.505-4.505zM4.735 14.041c1.099 0 1.959 0.86 1.959 1.959s-0.86 1.959-1.959 1.959c-1.084 0.011-1.969-0.876-1.953-1.959 0-1.099 0.859-1.959 1.953-1.959zM27.26 14.041c1.1 0 1.959 0.86 1.959 1.959s-0.859 1.959-1.959 1.959c-1.083 0.011-1.963-0.876-1.953-1.959 0-1.099 0.86-1.959 1.953-1.959z");
super("openInNextcloud", "Open in Nextcloud", NavBarIcons.OPEN);
}

setEnabled (enabled) {
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/actions/Rename.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import Action from "./Action";
import { store } from '@/store/index';
import { NavBarIcons } from "@/util/NavBarIcons";

class Rename extends Action {

constructor() {
super("rename", "Rename", "M13.473 7.196c-.425-.439-.401-1.127.035-1.552l4.461-4.326c.218-.211.498-.318.775-.318.282 0 .563.11.776.331l-6.047 5.865zm-7.334 11.021c-.092.089-.139.208-.139.327 0 .25.203.456.455.456.115 0 .229-.042.318-.128l.748-.729-.633-.654-.749.728zm8.212-6.482l-2.57 2.481c-.824.799-1.607 1.328-2.705 1.79.496-1.084 1.05-1.852 1.873-2.65l2.569-2.479-1.049-1.083-2.564 2.485c-1.378 1.336-2.08 2.63-2.73 4.437l1.133 1.169c1.824-.593 3.14-1.255 4.518-2.591l2.563-2.486-1.038-1.073zm7.878-7.243l-5.527 5.359-1.239-1.279 5.529-5.361c.824-.803 2.087.456 1.237 1.281zm-.643-3.036c-.572 0-1.156.209-1.64.678l-6.604 6.405 3.326 3.434 6.604-6.403c.485-.47.728-1.094.728-1.719 0-1.426-1.181-2.395-2.414-2.395zm-3.586 12.01v7.534h-16v-12h8.013l2.058-2h-12.071v16h20v-11.473l-2 1.939z");
super("rename", "Rename", NavBarIcons.RENAME);
}

setEnabled(enabled) {
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/actions/Upload.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import Action from "./Action";
import { app } from '@/main'
import { store } from '@/store/index';
import { NavBarIcons } from "@/util/NavBarIcons";

class Upload extends Action {
// Emiter for the events
emitter = null;

constructor() {
super("upload", "Upload", "M16 16h-3v5h-2v-5h-3l4-4 4 4zm3.479-5.908c-.212-3.951-3.473-7.092-7.479-7.092s-7.267 3.141-7.479 7.092c-2.57.463-4.521 2.706-4.521 5.408 0 3.037 2.463 5.5 5.5 5.5h3.5v-2h-3.5c-1.93 0-3.5-1.57-3.5-3.5 0-2.797 2.479-3.833 4.433-3.72-.167-4.218 2.208-6.78 5.567-6.78 3.453 0 5.891 2.797 5.567 6.78 1.745-.046 4.433.751 4.433 3.72 0 1.93-1.57 3.5-3.5 3.5h-3.5v2h3.5c3.037 0 5.5-2.463 5.5-5.5 0-2.702-1.951-4.945-4.521-5.408z");
super("upload", "Upload", NavBarIcons.UPLOAD);
}

setEnabled(enabled) {
Expand Down
10 changes: 10 additions & 0 deletions frontend/src/util/NavBarIcons.js

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

0 comments on commit afebf05

Please sign in to comment.